Skip to main content

aws_sdk_customerprofiles/operation/update_domain/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_domain::_update_domain_input::UpdateDomainInputBuilder;
3
4pub use crate::operation::update_domain::_update_domain_output::UpdateDomainOutputBuilder;
5
6impl crate::operation::update_domain::builders::UpdateDomainInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::update_domain::UpdateDomainOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_domain::UpdateDomainError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_domain();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateDomain`.
24///
25/// <p>Updates the properties of a domain, including creating or selecting a dead letter queue or an encryption key.</p>
26/// <p>After a domain is created, the name can’t be changed.</p>
27/// <p>Use this API or <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_CreateDomain.html">CreateDomain</a> to enable <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html">identity resolution</a>: set <code>Matching</code> to true.</p>
28/// <p>To prevent cross-service impersonation when you call this API, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cross-service-confused-deputy-prevention.html">Cross-service confused deputy prevention</a> for sample policies that you should apply.</p>
29/// <p>To add or remove tags on an existing Domain, see <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_TagResource.html">TagResource</a>/<a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_UntagResource.html">UntagResource</a>.</p>
30#[derive(::std::clone::Clone, ::std::fmt::Debug)]
31pub struct UpdateDomainFluentBuilder {
32    handle: ::std::sync::Arc<crate::client::Handle>,
33    inner: crate::operation::update_domain::builders::UpdateDomainInputBuilder,
34    config_override: ::std::option::Option<crate::config::Builder>,
35}
36impl
37    crate::client::customize::internal::CustomizableSend<
38        crate::operation::update_domain::UpdateDomainOutput,
39        crate::operation::update_domain::UpdateDomainError,
40    > for UpdateDomainFluentBuilder
41{
42    fn send(
43        self,
44        config_override: crate::config::Builder,
45    ) -> crate::client::customize::internal::BoxFuture<
46        crate::client::customize::internal::SendResult<
47            crate::operation::update_domain::UpdateDomainOutput,
48            crate::operation::update_domain::UpdateDomainError,
49        >,
50    > {
51        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
52    }
53}
54impl UpdateDomainFluentBuilder {
55    /// Creates a new `UpdateDomainFluentBuilder`.
56    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
57        Self {
58            handle,
59            inner: ::std::default::Default::default(),
60            config_override: ::std::option::Option::None,
61        }
62    }
63    /// Access the UpdateDomain as a reference.
64    pub fn as_input(&self) -> &crate::operation::update_domain::builders::UpdateDomainInputBuilder {
65        &self.inner
66    }
67    /// Sends the request and returns the response.
68    ///
69    /// If an error occurs, an `SdkError` will be returned with additional details that
70    /// can be matched against.
71    ///
72    /// By default, any retryable failures will be retried twice. Retry behavior
73    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
74    /// set when configuring the client.
75    pub async fn send(
76        self,
77    ) -> ::std::result::Result<
78        crate::operation::update_domain::UpdateDomainOutput,
79        ::aws_smithy_runtime_api::client::result::SdkError<
80            crate::operation::update_domain::UpdateDomainError,
81            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
82        >,
83    > {
84        let input = self
85            .inner
86            .build()
87            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
88        let runtime_plugins = crate::operation::update_domain::UpdateDomain::operation_runtime_plugins(
89            self.handle.runtime_plugins.clone(),
90            &self.handle.conf,
91            self.config_override,
92        );
93        crate::operation::update_domain::UpdateDomain::orchestrate(&runtime_plugins, input).await
94    }
95
96    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97    pub fn customize(
98        self,
99    ) -> crate::client::customize::CustomizableOperation<
100        crate::operation::update_domain::UpdateDomainOutput,
101        crate::operation::update_domain::UpdateDomainError,
102        Self,
103    > {
104        crate::client::customize::CustomizableOperation::new(self)
105    }
106    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107        self.set_config_override(::std::option::Option::Some(config_override.into()));
108        self
109    }
110
111    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112        self.config_override = config_override;
113        self
114    }
115    /// <p>The unique name of the domain.</p>
116    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.inner = self.inner.domain_name(input.into());
118        self
119    }
120    /// <p>The unique name of the domain.</p>
121    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.inner = self.inner.set_domain_name(input);
123        self
124    }
125    /// <p>The unique name of the domain.</p>
126    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
127        self.inner.get_domain_name()
128    }
129    /// <p>The default number of days until the data within the domain expires.</p>
130    pub fn default_expiration_days(mut self, input: i32) -> Self {
131        self.inner = self.inner.default_expiration_days(input);
132        self
133    }
134    /// <p>The default number of days until the data within the domain expires.</p>
135    pub fn set_default_expiration_days(mut self, input: ::std::option::Option<i32>) -> Self {
136        self.inner = self.inner.set_default_expiration_days(input);
137        self
138    }
139    /// <p>The default number of days until the data within the domain expires.</p>
140    pub fn get_default_expiration_days(&self) -> &::std::option::Option<i32> {
141        self.inner.get_default_expiration_days()
142    }
143    /// <p>The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage. If specified as an empty string, it will clear any existing value.</p>
144    pub fn default_encryption_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.inner = self.inner.default_encryption_key(input.into());
146        self
147    }
148    /// <p>The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage. If specified as an empty string, it will clear any existing value.</p>
149    pub fn set_default_encryption_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.inner = self.inner.set_default_encryption_key(input);
151        self
152    }
153    /// <p>The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage. If specified as an empty string, it will clear any existing value.</p>
154    pub fn get_default_encryption_key(&self) -> &::std::option::Option<::std::string::String> {
155        self.inner.get_default_encryption_key()
156    }
157    /// <p>The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications. If specified as an empty string, it will clear any existing value. You must set up a policy on the DeadLetterQueue for the SendMessage operation to enable Amazon Connect Customer Profiles to send messages to the DeadLetterQueue.</p>
158    pub fn dead_letter_queue_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.inner = self.inner.dead_letter_queue_url(input.into());
160        self
161    }
162    /// <p>The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications. If specified as an empty string, it will clear any existing value. You must set up a policy on the DeadLetterQueue for the SendMessage operation to enable Amazon Connect Customer Profiles to send messages to the DeadLetterQueue.</p>
163    pub fn set_dead_letter_queue_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.inner = self.inner.set_dead_letter_queue_url(input);
165        self
166    }
167    /// <p>The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications. If specified as an empty string, it will clear any existing value. You must set up a policy on the DeadLetterQueue for the SendMessage operation to enable Amazon Connect Customer Profiles to send messages to the DeadLetterQueue.</p>
168    pub fn get_dead_letter_queue_url(&self) -> &::std::option::Option<::std::string::String> {
169        self.inner.get_dead_letter_queue_url()
170    }
171    /// <p>The process of matching duplicate profiles. If <code>Matching</code> = <code>true</code>, Amazon Connect Customer Profiles starts a weekly batch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every Saturday at 12AM UTC to detect duplicate profiles in your domains.</p>
172    /// <p>After the Identity Resolution Job completes, use the <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html">GetMatches</a> API to return and review the results. Or, if you have configured <code>ExportingConfig</code> in the <code>MatchingRequest</code>, you can download the results from S3.</p>
173    pub fn matching(mut self, input: crate::types::MatchingRequest) -> Self {
174        self.inner = self.inner.matching(input);
175        self
176    }
177    /// <p>The process of matching duplicate profiles. If <code>Matching</code> = <code>true</code>, Amazon Connect Customer Profiles starts a weekly batch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every Saturday at 12AM UTC to detect duplicate profiles in your domains.</p>
178    /// <p>After the Identity Resolution Job completes, use the <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html">GetMatches</a> API to return and review the results. Or, if you have configured <code>ExportingConfig</code> in the <code>MatchingRequest</code>, you can download the results from S3.</p>
179    pub fn set_matching(mut self, input: ::std::option::Option<crate::types::MatchingRequest>) -> Self {
180        self.inner = self.inner.set_matching(input);
181        self
182    }
183    /// <p>The process of matching duplicate profiles. If <code>Matching</code> = <code>true</code>, Amazon Connect Customer Profiles starts a weekly batch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every Saturday at 12AM UTC to detect duplicate profiles in your domains.</p>
184    /// <p>After the Identity Resolution Job completes, use the <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html">GetMatches</a> API to return and review the results. Or, if you have configured <code>ExportingConfig</code> in the <code>MatchingRequest</code>, you can download the results from S3.</p>
185    pub fn get_matching(&self) -> &::std::option::Option<crate::types::MatchingRequest> {
186        self.inner.get_matching()
187    }
188    /// <p>The process of matching duplicate profiles using the rule-Based matching. If <code>RuleBasedMatching</code> = true, Amazon Connect Customer Profiles will start to match and merge your profiles according to your configuration in the <code>RuleBasedMatchingRequest</code>. You can use the <code>ListRuleBasedMatches</code> and <code>GetSimilarProfiles</code> API to return and review the results. Also, if you have configured <code>ExportingConfig</code> in the <code>RuleBasedMatchingRequest</code>, you can download the results from S3.</p>
189    pub fn rule_based_matching(mut self, input: crate::types::RuleBasedMatchingRequest) -> Self {
190        self.inner = self.inner.rule_based_matching(input);
191        self
192    }
193    /// <p>The process of matching duplicate profiles using the rule-Based matching. If <code>RuleBasedMatching</code> = true, Amazon Connect Customer Profiles will start to match and merge your profiles according to your configuration in the <code>RuleBasedMatchingRequest</code>. You can use the <code>ListRuleBasedMatches</code> and <code>GetSimilarProfiles</code> API to return and review the results. Also, if you have configured <code>ExportingConfig</code> in the <code>RuleBasedMatchingRequest</code>, you can download the results from S3.</p>
194    pub fn set_rule_based_matching(mut self, input: ::std::option::Option<crate::types::RuleBasedMatchingRequest>) -> Self {
195        self.inner = self.inner.set_rule_based_matching(input);
196        self
197    }
198    /// <p>The process of matching duplicate profiles using the rule-Based matching. If <code>RuleBasedMatching</code> = true, Amazon Connect Customer Profiles will start to match and merge your profiles according to your configuration in the <code>RuleBasedMatchingRequest</code>. You can use the <code>ListRuleBasedMatches</code> and <code>GetSimilarProfiles</code> API to return and review the results. Also, if you have configured <code>ExportingConfig</code> in the <code>RuleBasedMatchingRequest</code>, you can download the results from S3.</p>
199    pub fn get_rule_based_matching(&self) -> &::std::option::Option<crate::types::RuleBasedMatchingRequest> {
200        self.inner.get_rule_based_matching()
201    }
202    /// <p>Set to true to enabled data store for this domain.</p>
203    pub fn data_store(mut self, input: crate::types::DataStoreRequest) -> Self {
204        self.inner = self.inner.data_store(input);
205        self
206    }
207    /// <p>Set to true to enabled data store for this domain.</p>
208    pub fn set_data_store(mut self, input: ::std::option::Option<crate::types::DataStoreRequest>) -> Self {
209        self.inner = self.inner.set_data_store(input);
210        self
211    }
212    /// <p>Set to true to enabled data store for this domain.</p>
213    pub fn get_data_store(&self) -> &::std::option::Option<crate::types::DataStoreRequest> {
214        self.inner.get_data_store()
215    }
216    ///
217    /// Adds a key-value pair to `Tags`.
218    ///
219    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
220    ///
221    /// <p>The tags used to organize, track, or control access for this resource.</p>
222    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
223        self.inner = self.inner.tags(k.into(), v.into());
224        self
225    }
226    /// <p>The tags used to organize, track, or control access for this resource.</p>
227    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
228        self.inner = self.inner.set_tags(input);
229        self
230    }
231    /// <p>The tags used to organize, track, or control access for this resource.</p>
232    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
233        self.inner.get_tags()
234    }
235}