aws_sdk_elasticsearch/operation/update_elasticsearch_domain_config/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_elasticsearch_domain_config::_update_elasticsearch_domain_config_output::UpdateElasticsearchDomainConfigOutputBuilder;
3
4pub use crate::operation::update_elasticsearch_domain_config::_update_elasticsearch_domain_config_input::UpdateElasticsearchDomainConfigInputBuilder;
5
6impl crate::operation::update_elasticsearch_domain_config::builders::UpdateElasticsearchDomainConfigInputBuilder {
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_elasticsearch_domain_config::UpdateElasticsearchDomainConfigOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_elasticsearch_domain_config::UpdateElasticsearchDomainConfigError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_elasticsearch_domain_config();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateElasticsearchDomainConfig`.
24///
25/// <p>Modifies the cluster configuration of the specified Elasticsearch domain, setting as setting the instance type and the number of instances.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateElasticsearchDomainConfigFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_elasticsearch_domain_config::builders::UpdateElasticsearchDomainConfigInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_elasticsearch_domain_config::UpdateElasticsearchDomainConfigOutput,
35        crate::operation::update_elasticsearch_domain_config::UpdateElasticsearchDomainConfigError,
36    > for UpdateElasticsearchDomainConfigFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::update_elasticsearch_domain_config::UpdateElasticsearchDomainConfigOutput,
44            crate::operation::update_elasticsearch_domain_config::UpdateElasticsearchDomainConfigError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateElasticsearchDomainConfigFluentBuilder {
51    /// Creates a new `UpdateElasticsearchDomainConfigFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the UpdateElasticsearchDomainConfig as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_elasticsearch_domain_config::builders::UpdateElasticsearchDomainConfigInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::update_elasticsearch_domain_config::UpdateElasticsearchDomainConfigOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_elasticsearch_domain_config::UpdateElasticsearchDomainConfigError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::update_elasticsearch_domain_config::UpdateElasticsearchDomainConfig::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_elasticsearch_domain_config::UpdateElasticsearchDomainConfig::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::update_elasticsearch_domain_config::UpdateElasticsearchDomainConfigOutput,
97        crate::operation::update_elasticsearch_domain_config::UpdateElasticsearchDomainConfigError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>The name of the Elasticsearch domain that you are updating.</p>
112    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.domain_name(input.into());
114        self
115    }
116    /// <p>The name of the Elasticsearch domain that you are updating.</p>
117    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_domain_name(input);
119        self
120    }
121    /// <p>The name of the Elasticsearch domain that you are updating.</p>
122    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_domain_name()
124    }
125    /// <p>The type and number of instances to instantiate for the domain cluster.</p>
126    pub fn elasticsearch_cluster_config(mut self, input: crate::types::ElasticsearchClusterConfig) -> Self {
127        self.inner = self.inner.elasticsearch_cluster_config(input);
128        self
129    }
130    /// <p>The type and number of instances to instantiate for the domain cluster.</p>
131    pub fn set_elasticsearch_cluster_config(mut self, input: ::std::option::Option<crate::types::ElasticsearchClusterConfig>) -> Self {
132        self.inner = self.inner.set_elasticsearch_cluster_config(input);
133        self
134    }
135    /// <p>The type and number of instances to instantiate for the domain cluster.</p>
136    pub fn get_elasticsearch_cluster_config(&self) -> &::std::option::Option<crate::types::ElasticsearchClusterConfig> {
137        self.inner.get_elasticsearch_cluster_config()
138    }
139    /// <p>Specify the type and size of the EBS volume that you want to use.</p>
140    pub fn ebs_options(mut self, input: crate::types::EbsOptions) -> Self {
141        self.inner = self.inner.ebs_options(input);
142        self
143    }
144    /// <p>Specify the type and size of the EBS volume that you want to use.</p>
145    pub fn set_ebs_options(mut self, input: ::std::option::Option<crate::types::EbsOptions>) -> Self {
146        self.inner = self.inner.set_ebs_options(input);
147        self
148    }
149    /// <p>Specify the type and size of the EBS volume that you want to use.</p>
150    pub fn get_ebs_options(&self) -> &::std::option::Option<crate::types::EbsOptions> {
151        self.inner.get_ebs_options()
152    }
153    /// <p>Option to set the time, in UTC format, for the daily automated snapshot. Default value is <code>0</code> hours.</p>
154    pub fn snapshot_options(mut self, input: crate::types::SnapshotOptions) -> Self {
155        self.inner = self.inner.snapshot_options(input);
156        self
157    }
158    /// <p>Option to set the time, in UTC format, for the daily automated snapshot. Default value is <code>0</code> hours.</p>
159    pub fn set_snapshot_options(mut self, input: ::std::option::Option<crate::types::SnapshotOptions>) -> Self {
160        self.inner = self.inner.set_snapshot_options(input);
161        self
162    }
163    /// <p>Option to set the time, in UTC format, for the daily automated snapshot. Default value is <code>0</code> hours.</p>
164    pub fn get_snapshot_options(&self) -> &::std::option::Option<crate::types::SnapshotOptions> {
165        self.inner.get_snapshot_options()
166    }
167    /// <p>Options to specify the subnets and security groups for VPC endpoint. For more information, see <a href="http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-creating-vpc" target="_blank">Creating a VPC</a> in <i>VPC Endpoints for Amazon Elasticsearch Service Domains</i></p>
168    pub fn vpc_options(mut self, input: crate::types::VpcOptions) -> Self {
169        self.inner = self.inner.vpc_options(input);
170        self
171    }
172    /// <p>Options to specify the subnets and security groups for VPC endpoint. For more information, see <a href="http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-creating-vpc" target="_blank">Creating a VPC</a> in <i>VPC Endpoints for Amazon Elasticsearch Service Domains</i></p>
173    pub fn set_vpc_options(mut self, input: ::std::option::Option<crate::types::VpcOptions>) -> Self {
174        self.inner = self.inner.set_vpc_options(input);
175        self
176    }
177    /// <p>Options to specify the subnets and security groups for VPC endpoint. For more information, see <a href="http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-creating-vpc" target="_blank">Creating a VPC</a> in <i>VPC Endpoints for Amazon Elasticsearch Service Domains</i></p>
178    pub fn get_vpc_options(&self) -> &::std::option::Option<crate::types::VpcOptions> {
179        self.inner.get_vpc_options()
180    }
181    /// <p>Options to specify the Cognito user and identity pools for Kibana authentication. For more information, see <a href="http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html" target="_blank">Amazon Cognito Authentication for Kibana</a>.</p>
182    pub fn cognito_options(mut self, input: crate::types::CognitoOptions) -> Self {
183        self.inner = self.inner.cognito_options(input);
184        self
185    }
186    /// <p>Options to specify the Cognito user and identity pools for Kibana authentication. For more information, see <a href="http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html" target="_blank">Amazon Cognito Authentication for Kibana</a>.</p>
187    pub fn set_cognito_options(mut self, input: ::std::option::Option<crate::types::CognitoOptions>) -> Self {
188        self.inner = self.inner.set_cognito_options(input);
189        self
190    }
191    /// <p>Options to specify the Cognito user and identity pools for Kibana authentication. For more information, see <a href="http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html" target="_blank">Amazon Cognito Authentication for Kibana</a>.</p>
192    pub fn get_cognito_options(&self) -> &::std::option::Option<crate::types::CognitoOptions> {
193        self.inner.get_cognito_options()
194    }
195    ///
196    /// Adds a key-value pair to `AdvancedOptions`.
197    ///
198    /// To override the contents of this collection use [`set_advanced_options`](Self::set_advanced_options).
199    ///
200    /// <p>Modifies the advanced option to allow references to indices in an HTTP request body. Must be <code>false</code> when configuring access to individual sub-resources. By default, the value is <code>true</code>. See <a href="http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options" target="_blank">Configuration Advanced Options</a> for more information.</p>
201    pub fn advanced_options(
202        mut self,
203        k: impl ::std::convert::Into<::std::string::String>,
204        v: impl ::std::convert::Into<::std::string::String>,
205    ) -> Self {
206        self.inner = self.inner.advanced_options(k.into(), v.into());
207        self
208    }
209    /// <p>Modifies the advanced option to allow references to indices in an HTTP request body. Must be <code>false</code> when configuring access to individual sub-resources. By default, the value is <code>true</code>. See <a href="http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options" target="_blank">Configuration Advanced Options</a> for more information.</p>
210    pub fn set_advanced_options(
211        mut self,
212        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
213    ) -> Self {
214        self.inner = self.inner.set_advanced_options(input);
215        self
216    }
217    /// <p>Modifies the advanced option to allow references to indices in an HTTP request body. Must be <code>false</code> when configuring access to individual sub-resources. By default, the value is <code>true</code>. See <a href="http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-advanced-options" target="_blank">Configuration Advanced Options</a> for more information.</p>
218    pub fn get_advanced_options(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
219        self.inner.get_advanced_options()
220    }
221    /// <p>IAM access policy as a JSON-formatted string.</p>
222    pub fn access_policies(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223        self.inner = self.inner.access_policies(input.into());
224        self
225    }
226    /// <p>IAM access policy as a JSON-formatted string.</p>
227    pub fn set_access_policies(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228        self.inner = self.inner.set_access_policies(input);
229        self
230    }
231    /// <p>IAM access policy as a JSON-formatted string.</p>
232    pub fn get_access_policies(&self) -> &::std::option::Option<::std::string::String> {
233        self.inner.get_access_policies()
234    }
235    ///
236    /// Adds a key-value pair to `LogPublishingOptions`.
237    ///
238    /// To override the contents of this collection use [`set_log_publishing_options`](Self::set_log_publishing_options).
239    ///
240    /// <p>Map of <code>LogType</code> and <code>LogPublishingOption</code>, each containing options to publish a given type of Elasticsearch log.</p>
241    pub fn log_publishing_options(mut self, k: crate::types::LogType, v: crate::types::LogPublishingOption) -> Self {
242        self.inner = self.inner.log_publishing_options(k, v);
243        self
244    }
245    /// <p>Map of <code>LogType</code> and <code>LogPublishingOption</code>, each containing options to publish a given type of Elasticsearch log.</p>
246    pub fn set_log_publishing_options(
247        mut self,
248        input: ::std::option::Option<::std::collections::HashMap<crate::types::LogType, crate::types::LogPublishingOption>>,
249    ) -> Self {
250        self.inner = self.inner.set_log_publishing_options(input);
251        self
252    }
253    /// <p>Map of <code>LogType</code> and <code>LogPublishingOption</code>, each containing options to publish a given type of Elasticsearch log.</p>
254    pub fn get_log_publishing_options(
255        &self,
256    ) -> &::std::option::Option<::std::collections::HashMap<crate::types::LogType, crate::types::LogPublishingOption>> {
257        self.inner.get_log_publishing_options()
258    }
259    /// <p>Options to specify configuration that will be applied to the domain endpoint.</p>
260    pub fn domain_endpoint_options(mut self, input: crate::types::DomainEndpointOptions) -> Self {
261        self.inner = self.inner.domain_endpoint_options(input);
262        self
263    }
264    /// <p>Options to specify configuration that will be applied to the domain endpoint.</p>
265    pub fn set_domain_endpoint_options(mut self, input: ::std::option::Option<crate::types::DomainEndpointOptions>) -> Self {
266        self.inner = self.inner.set_domain_endpoint_options(input);
267        self
268    }
269    /// <p>Options to specify configuration that will be applied to the domain endpoint.</p>
270    pub fn get_domain_endpoint_options(&self) -> &::std::option::Option<crate::types::DomainEndpointOptions> {
271        self.inner.get_domain_endpoint_options()
272    }
273    /// <p>Specifies advanced security options.</p>
274    pub fn advanced_security_options(mut self, input: crate::types::AdvancedSecurityOptionsInput) -> Self {
275        self.inner = self.inner.advanced_security_options(input);
276        self
277    }
278    /// <p>Specifies advanced security options.</p>
279    pub fn set_advanced_security_options(mut self, input: ::std::option::Option<crate::types::AdvancedSecurityOptionsInput>) -> Self {
280        self.inner = self.inner.set_advanced_security_options(input);
281        self
282    }
283    /// <p>Specifies advanced security options.</p>
284    pub fn get_advanced_security_options(&self) -> &::std::option::Option<crate::types::AdvancedSecurityOptionsInput> {
285        self.inner.get_advanced_security_options()
286    }
287    /// <p>Specifies the NodeToNodeEncryptionOptions.</p>
288    pub fn node_to_node_encryption_options(mut self, input: crate::types::NodeToNodeEncryptionOptions) -> Self {
289        self.inner = self.inner.node_to_node_encryption_options(input);
290        self
291    }
292    /// <p>Specifies the NodeToNodeEncryptionOptions.</p>
293    pub fn set_node_to_node_encryption_options(mut self, input: ::std::option::Option<crate::types::NodeToNodeEncryptionOptions>) -> Self {
294        self.inner = self.inner.set_node_to_node_encryption_options(input);
295        self
296    }
297    /// <p>Specifies the NodeToNodeEncryptionOptions.</p>
298    pub fn get_node_to_node_encryption_options(&self) -> &::std::option::Option<crate::types::NodeToNodeEncryptionOptions> {
299        self.inner.get_node_to_node_encryption_options()
300    }
301    /// <p>Specifies the Encryption At Rest Options.</p>
302    pub fn encryption_at_rest_options(mut self, input: crate::types::EncryptionAtRestOptions) -> Self {
303        self.inner = self.inner.encryption_at_rest_options(input);
304        self
305    }
306    /// <p>Specifies the Encryption At Rest Options.</p>
307    pub fn set_encryption_at_rest_options(mut self, input: ::std::option::Option<crate::types::EncryptionAtRestOptions>) -> Self {
308        self.inner = self.inner.set_encryption_at_rest_options(input);
309        self
310    }
311    /// <p>Specifies the Encryption At Rest Options.</p>
312    pub fn get_encryption_at_rest_options(&self) -> &::std::option::Option<crate::types::EncryptionAtRestOptions> {
313        self.inner.get_encryption_at_rest_options()
314    }
315    /// <p>Specifies Auto-Tune options.</p>
316    pub fn auto_tune_options(mut self, input: crate::types::AutoTuneOptions) -> Self {
317        self.inner = self.inner.auto_tune_options(input);
318        self
319    }
320    /// <p>Specifies Auto-Tune options.</p>
321    pub fn set_auto_tune_options(mut self, input: ::std::option::Option<crate::types::AutoTuneOptions>) -> Self {
322        self.inner = self.inner.set_auto_tune_options(input);
323        self
324    }
325    /// <p>Specifies Auto-Tune options.</p>
326    pub fn get_auto_tune_options(&self) -> &::std::option::Option<crate::types::AutoTuneOptions> {
327        self.inner.get_auto_tune_options()
328    }
329    /// <p>This flag, when set to True, specifies whether the <code>UpdateElasticsearchDomain</code> request should return the results of validation checks without actually applying the change. This flag, when set to True, specifies the deployment mechanism through which the update shall be applied on the domain. This will not actually perform the Update.</p>
330    pub fn dry_run(mut self, input: bool) -> Self {
331        self.inner = self.inner.dry_run(input);
332        self
333    }
334    /// <p>This flag, when set to True, specifies whether the <code>UpdateElasticsearchDomain</code> request should return the results of validation checks without actually applying the change. This flag, when set to True, specifies the deployment mechanism through which the update shall be applied on the domain. This will not actually perform the Update.</p>
335    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
336        self.inner = self.inner.set_dry_run(input);
337        self
338    }
339    /// <p>This flag, when set to True, specifies whether the <code>UpdateElasticsearchDomain</code> request should return the results of validation checks without actually applying the change. This flag, when set to True, specifies the deployment mechanism through which the update shall be applied on the domain. This will not actually perform the Update.</p>
340    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
341        self.inner.get_dry_run()
342    }
343}