aws_sdk_dynamodb/operation/update_contributor_insights/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_contributor_insights::_update_contributor_insights_output::UpdateContributorInsightsOutputBuilder;
3
4pub use crate::operation::update_contributor_insights::_update_contributor_insights_input::UpdateContributorInsightsInputBuilder;
5
6impl crate::operation::update_contributor_insights::builders::UpdateContributorInsightsInputBuilder {
7                    /// Sends a request with this input using the given client.
8                    pub async fn send_with(self, client: &crate::Client) -> ::std::result::Result<
9                        crate::operation::update_contributor_insights::UpdateContributorInsightsOutput,
10                        ::aws_smithy_runtime_api::client::result::SdkError<
11                            crate::operation::update_contributor_insights::UpdateContributorInsightsError,
12                            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13                        >
14                    > {
15                        let mut fluent_builder = client.update_contributor_insights();
16                        fluent_builder.inner = self;
17                        fluent_builder.send().await
18                    }
19                }
20/// Fluent builder constructing a request to `UpdateContributorInsights`.
21/// 
22/// <p>Updates the status for contributor insights for a specific table or index. CloudWatch Contributor Insights for DynamoDB graphs display the partition key and (if applicable) sort key of frequently accessed items and frequently throttled items in plaintext. If you require the use of Amazon Web Services Key Management Service (KMS) to encrypt this table’s partition key and sort key data with an Amazon Web Services managed key or customer managed key, you should not enable CloudWatch Contributor Insights for DynamoDB for this table.</p>
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
24pub struct UpdateContributorInsightsFluentBuilder {
25                handle: ::std::sync::Arc<crate::client::Handle>,
26                inner: crate::operation::update_contributor_insights::builders::UpdateContributorInsightsInputBuilder,
27config_override: ::std::option::Option<crate::config::Builder>,
28            }
29impl
30                crate::client::customize::internal::CustomizableSend<
31                    crate::operation::update_contributor_insights::UpdateContributorInsightsOutput,
32                    crate::operation::update_contributor_insights::UpdateContributorInsightsError,
33                > for UpdateContributorInsightsFluentBuilder
34            {
35                fn send(
36                    self,
37                    config_override: crate::config::Builder,
38                ) -> crate::client::customize::internal::BoxFuture<
39                    crate::client::customize::internal::SendResult<
40                        crate::operation::update_contributor_insights::UpdateContributorInsightsOutput,
41                        crate::operation::update_contributor_insights::UpdateContributorInsightsError,
42                    >,
43                > {
44                    ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
45                }
46            }
47impl UpdateContributorInsightsFluentBuilder {
48    /// Creates a new `UpdateContributorInsightsFluentBuilder`.
49                    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
50                        Self {
51                            handle,
52                            inner: ::std::default::Default::default(),
53    config_override: ::std::option::Option::None,
54                        }
55                    }
56    /// Access the UpdateContributorInsights as a reference.
57                    pub fn as_input(&self) -> &crate::operation::update_contributor_insights::builders::UpdateContributorInsightsInputBuilder {
58                        &self.inner
59                    }
60    /// Sends the request and returns the response.
61                    ///
62                    /// If an error occurs, an `SdkError` will be returned with additional details that
63                    /// can be matched against.
64                    ///
65                    /// By default, any retryable failures will be retried twice. Retry behavior
66                    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
67                    /// set when configuring the client. Note: retries are enabled by default when using
68                    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
69                    pub async fn send(self) -> ::std::result::Result<crate::operation::update_contributor_insights::UpdateContributorInsightsOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_contributor_insights::UpdateContributorInsightsError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
70                        let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
71                        let runtime_plugins = crate::operation::update_contributor_insights::UpdateContributorInsights::operation_runtime_plugins(
72                            self.handle.runtime_plugins.clone(),
73                            &self.handle.conf,
74                            self.config_override,
75                        );
76                        crate::operation::update_contributor_insights::UpdateContributorInsights::orchestrate(&runtime_plugins, input).await
77                    }
78    
79                    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
80                    pub fn customize(
81                        self,
82                    ) -> crate::client::customize::CustomizableOperation<crate::operation::update_contributor_insights::UpdateContributorInsightsOutput, crate::operation::update_contributor_insights::UpdateContributorInsightsError, Self> {
83                        crate::client::customize::CustomizableOperation::new(self)
84                    }
85    pub(crate) fn config_override(
86                            mut self,
87                            config_override: impl ::std::convert::Into<crate::config::Builder>,
88                        ) -> Self {
89                            self.set_config_override(::std::option::Option::Some(config_override.into()));
90                            self
91                        }
92    
93                        pub(crate) fn set_config_override(
94                            &mut self,
95                            config_override: ::std::option::Option<crate::config::Builder>,
96                        ) -> &mut Self {
97                            self.config_override = config_override;
98                            self
99                        }
100    /// <p>The name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
101    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102                    self.inner = self.inner.table_name(input.into());
103                    self
104                }
105    /// <p>The name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
106    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107                    self.inner = self.inner.set_table_name(input);
108                    self
109                }
110    /// <p>The name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
111    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
112                    self.inner.get_table_name()
113                }
114    /// <p>The global secondary index name, if applicable.</p>
115    pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116                    self.inner = self.inner.index_name(input.into());
117                    self
118                }
119    /// <p>The global secondary index name, if applicable.</p>
120    pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121                    self.inner = self.inner.set_index_name(input);
122                    self
123                }
124    /// <p>The global secondary index name, if applicable.</p>
125    pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
126                    self.inner.get_index_name()
127                }
128    /// <p>Represents the contributor insights action.</p>
129    pub fn contributor_insights_action(mut self, input: crate::types::ContributorInsightsAction) -> Self {
130                    self.inner = self.inner.contributor_insights_action(input);
131                    self
132                }
133    /// <p>Represents the contributor insights action.</p>
134    pub fn set_contributor_insights_action(mut self, input: ::std::option::Option<crate::types::ContributorInsightsAction>) -> Self {
135                    self.inner = self.inner.set_contributor_insights_action(input);
136                    self
137                }
138    /// <p>Represents the contributor insights action.</p>
139    pub fn get_contributor_insights_action(&self) -> &::std::option::Option<crate::types::ContributorInsightsAction> {
140                    self.inner.get_contributor_insights_action()
141                }
142    /// <p>Specifies whether to track all access and throttled events or throttled events only for the DynamoDB table or index.</p>
143    pub fn contributor_insights_mode(mut self, input: crate::types::ContributorInsightsMode) -> Self {
144                    self.inner = self.inner.contributor_insights_mode(input);
145                    self
146                }
147    /// <p>Specifies whether to track all access and throttled events or throttled events only for the DynamoDB table or index.</p>
148    pub fn set_contributor_insights_mode(mut self, input: ::std::option::Option<crate::types::ContributorInsightsMode>) -> Self {
149                    self.inner = self.inner.set_contributor_insights_mode(input);
150                    self
151                }
152    /// <p>Specifies whether to track all access and throttled events or throttled events only for the DynamoDB table or index.</p>
153    pub fn get_contributor_insights_mode(&self) -> &::std::option::Option<crate::types::ContributorInsightsMode> {
154                    self.inner.get_contributor_insights_mode()
155                }
156}
157