aws_sdk_iot/operation/update_domain_configuration/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_domain_configuration::_update_domain_configuration_output::UpdateDomainConfigurationOutputBuilder;
3
4pub use crate::operation::update_domain_configuration::_update_domain_configuration_input::UpdateDomainConfigurationInputBuilder;
5
6impl crate::operation::update_domain_configuration::builders::UpdateDomainConfigurationInputBuilder {
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_configuration::UpdateDomainConfigurationOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_domain_configuration::UpdateDomainConfigurationError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_domain_configuration();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateDomainConfiguration`.
24///
25/// <p>Updates values stored in the domain configuration. Domain configurations for default endpoints can't be updated.</p>
26/// <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">UpdateDomainConfiguration</a> action.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct UpdateDomainConfigurationFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::update_domain_configuration::builders::UpdateDomainConfigurationInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::update_domain_configuration::UpdateDomainConfigurationOutput,
36 crate::operation::update_domain_configuration::UpdateDomainConfigurationError,
37 > for UpdateDomainConfigurationFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::update_domain_configuration::UpdateDomainConfigurationOutput,
45 crate::operation::update_domain_configuration::UpdateDomainConfigurationError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl UpdateDomainConfigurationFluentBuilder {
52 /// Creates a new `UpdateDomainConfigurationFluentBuilder`.
53 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 /// Access the UpdateDomainConfiguration as a reference.
61 pub fn as_input(&self) -> &crate::operation::update_domain_configuration::builders::UpdateDomainConfigurationInputBuilder {
62 &self.inner
63 }
64 /// Sends the request and returns the response.
65 ///
66 /// If an error occurs, an `SdkError` will be returned with additional details that
67 /// can be matched against.
68 ///
69 /// By default, any retryable failures will be retried twice. Retry behavior
70 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71 /// set when configuring the client.
72 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::update_domain_configuration::UpdateDomainConfigurationOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::update_domain_configuration::UpdateDomainConfigurationError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::update_domain_configuration::UpdateDomainConfiguration::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::update_domain_configuration::UpdateDomainConfiguration::orchestrate(&runtime_plugins, input).await
91 }
92
93 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::update_domain_configuration::UpdateDomainConfigurationOutput,
98 crate::operation::update_domain_configuration::UpdateDomainConfigurationError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 /// <p>The name of the domain configuration to be updated.</p>
113 pub fn domain_configuration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.domain_configuration_name(input.into());
115 self
116 }
117 /// <p>The name of the domain configuration to be updated.</p>
118 pub fn set_domain_configuration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.inner = self.inner.set_domain_configuration_name(input);
120 self
121 }
122 /// <p>The name of the domain configuration to be updated.</p>
123 pub fn get_domain_configuration_name(&self) -> &::std::option::Option<::std::string::String> {
124 self.inner.get_domain_configuration_name()
125 }
126 /// <p>An object that specifies the authorization service for a domain.</p>
127 pub fn authorizer_config(mut self, input: crate::types::AuthorizerConfig) -> Self {
128 self.inner = self.inner.authorizer_config(input);
129 self
130 }
131 /// <p>An object that specifies the authorization service for a domain.</p>
132 pub fn set_authorizer_config(mut self, input: ::std::option::Option<crate::types::AuthorizerConfig>) -> Self {
133 self.inner = self.inner.set_authorizer_config(input);
134 self
135 }
136 /// <p>An object that specifies the authorization service for a domain.</p>
137 pub fn get_authorizer_config(&self) -> &::std::option::Option<crate::types::AuthorizerConfig> {
138 self.inner.get_authorizer_config()
139 }
140 /// <p>The status to which the domain configuration should be updated.</p>
141 pub fn domain_configuration_status(mut self, input: crate::types::DomainConfigurationStatus) -> Self {
142 self.inner = self.inner.domain_configuration_status(input);
143 self
144 }
145 /// <p>The status to which the domain configuration should be updated.</p>
146 pub fn set_domain_configuration_status(mut self, input: ::std::option::Option<crate::types::DomainConfigurationStatus>) -> Self {
147 self.inner = self.inner.set_domain_configuration_status(input);
148 self
149 }
150 /// <p>The status to which the domain configuration should be updated.</p>
151 pub fn get_domain_configuration_status(&self) -> &::std::option::Option<crate::types::DomainConfigurationStatus> {
152 self.inner.get_domain_configuration_status()
153 }
154 /// <p>Removes the authorization configuration from a domain.</p>
155 pub fn remove_authorizer_config(mut self, input: bool) -> Self {
156 self.inner = self.inner.remove_authorizer_config(input);
157 self
158 }
159 /// <p>Removes the authorization configuration from a domain.</p>
160 pub fn set_remove_authorizer_config(mut self, input: ::std::option::Option<bool>) -> Self {
161 self.inner = self.inner.set_remove_authorizer_config(input);
162 self
163 }
164 /// <p>Removes the authorization configuration from a domain.</p>
165 pub fn get_remove_authorizer_config(&self) -> &::std::option::Option<bool> {
166 self.inner.get_remove_authorizer_config()
167 }
168 /// <p>An object that specifies the TLS configuration for a domain.</p>
169 pub fn tls_config(mut self, input: crate::types::TlsConfig) -> Self {
170 self.inner = self.inner.tls_config(input);
171 self
172 }
173 /// <p>An object that specifies the TLS configuration for a domain.</p>
174 pub fn set_tls_config(mut self, input: ::std::option::Option<crate::types::TlsConfig>) -> Self {
175 self.inner = self.inner.set_tls_config(input);
176 self
177 }
178 /// <p>An object that specifies the TLS configuration for a domain.</p>
179 pub fn get_tls_config(&self) -> &::std::option::Option<crate::types::TlsConfig> {
180 self.inner.get_tls_config()
181 }
182 /// <p>The server certificate configuration.</p>
183 pub fn server_certificate_config(mut self, input: crate::types::ServerCertificateConfig) -> Self {
184 self.inner = self.inner.server_certificate_config(input);
185 self
186 }
187 /// <p>The server certificate configuration.</p>
188 pub fn set_server_certificate_config(mut self, input: ::std::option::Option<crate::types::ServerCertificateConfig>) -> Self {
189 self.inner = self.inner.set_server_certificate_config(input);
190 self
191 }
192 /// <p>The server certificate configuration.</p>
193 pub fn get_server_certificate_config(&self) -> &::std::option::Option<crate::types::ServerCertificateConfig> {
194 self.inner.get_server_certificate_config()
195 }
196 /// <p>An enumerated string that specifies the authentication type.</p>
197 /// <ul>
198 /// <li>
199 /// <p><code>CUSTOM_AUTH_X509</code> - Use custom authentication and authorization with additional details from the X.509 client certificate.</p></li>
200 /// </ul>
201 /// <ul>
202 /// <li>
203 /// <p><code>CUSTOM_AUTH</code> - Use custom authentication and authorization. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/custom-authentication.html">Custom authentication and authorization</a>.</p></li>
204 /// </ul>
205 /// <ul>
206 /// <li>
207 /// <p><code>AWS_X509</code> - Use X.509 client certificates without custom authentication and authorization. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html">X.509 client certificates</a>.</p></li>
208 /// </ul>
209 /// <ul>
210 /// <li>
211 /// <p><code>AWS_SIGV4</code> - Use Amazon Web Services Signature Version 4. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/custom-authentication.html">IAM users, groups, and roles</a>.</p></li>
212 /// </ul>
213 /// <ul>
214 /// <li>
215 /// <p><code>DEFAULT </code> - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify authentication type. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html">Device communication protocols</a>.</p></li>
216 /// </ul>
217 pub fn authentication_type(mut self, input: crate::types::AuthenticationType) -> Self {
218 self.inner = self.inner.authentication_type(input);
219 self
220 }
221 /// <p>An enumerated string that specifies the authentication type.</p>
222 /// <ul>
223 /// <li>
224 /// <p><code>CUSTOM_AUTH_X509</code> - Use custom authentication and authorization with additional details from the X.509 client certificate.</p></li>
225 /// </ul>
226 /// <ul>
227 /// <li>
228 /// <p><code>CUSTOM_AUTH</code> - Use custom authentication and authorization. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/custom-authentication.html">Custom authentication and authorization</a>.</p></li>
229 /// </ul>
230 /// <ul>
231 /// <li>
232 /// <p><code>AWS_X509</code> - Use X.509 client certificates without custom authentication and authorization. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html">X.509 client certificates</a>.</p></li>
233 /// </ul>
234 /// <ul>
235 /// <li>
236 /// <p><code>AWS_SIGV4</code> - Use Amazon Web Services Signature Version 4. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/custom-authentication.html">IAM users, groups, and roles</a>.</p></li>
237 /// </ul>
238 /// <ul>
239 /// <li>
240 /// <p><code>DEFAULT </code> - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify authentication type. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html">Device communication protocols</a>.</p></li>
241 /// </ul>
242 pub fn set_authentication_type(mut self, input: ::std::option::Option<crate::types::AuthenticationType>) -> Self {
243 self.inner = self.inner.set_authentication_type(input);
244 self
245 }
246 /// <p>An enumerated string that specifies the authentication type.</p>
247 /// <ul>
248 /// <li>
249 /// <p><code>CUSTOM_AUTH_X509</code> - Use custom authentication and authorization with additional details from the X.509 client certificate.</p></li>
250 /// </ul>
251 /// <ul>
252 /// <li>
253 /// <p><code>CUSTOM_AUTH</code> - Use custom authentication and authorization. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/custom-authentication.html">Custom authentication and authorization</a>.</p></li>
254 /// </ul>
255 /// <ul>
256 /// <li>
257 /// <p><code>AWS_X509</code> - Use X.509 client certificates without custom authentication and authorization. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html">X.509 client certificates</a>.</p></li>
258 /// </ul>
259 /// <ul>
260 /// <li>
261 /// <p><code>AWS_SIGV4</code> - Use Amazon Web Services Signature Version 4. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/custom-authentication.html">IAM users, groups, and roles</a>.</p></li>
262 /// </ul>
263 /// <ul>
264 /// <li>
265 /// <p><code>DEFAULT </code> - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify authentication type. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html">Device communication protocols</a>.</p></li>
266 /// </ul>
267 pub fn get_authentication_type(&self) -> &::std::option::Option<crate::types::AuthenticationType> {
268 self.inner.get_authentication_type()
269 }
270 /// <p>An enumerated string that specifies the application-layer protocol.</p>
271 /// <ul>
272 /// <li>
273 /// <p><code>SECURE_MQTT</code> - MQTT over TLS.</p></li>
274 /// </ul>
275 /// <ul>
276 /// <li>
277 /// <p><code>MQTT_WSS</code> - MQTT over WebSocket.</p></li>
278 /// </ul>
279 /// <ul>
280 /// <li>
281 /// <p><code>HTTPS</code> - HTTP over TLS.</p></li>
282 /// </ul>
283 /// <ul>
284 /// <li>
285 /// <p><code>DEFAULT</code> - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify application_layer protocol. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html">Device communication protocols</a>.</p></li>
286 /// </ul>
287 pub fn application_protocol(mut self, input: crate::types::ApplicationProtocol) -> Self {
288 self.inner = self.inner.application_protocol(input);
289 self
290 }
291 /// <p>An enumerated string that specifies the application-layer protocol.</p>
292 /// <ul>
293 /// <li>
294 /// <p><code>SECURE_MQTT</code> - MQTT over TLS.</p></li>
295 /// </ul>
296 /// <ul>
297 /// <li>
298 /// <p><code>MQTT_WSS</code> - MQTT over WebSocket.</p></li>
299 /// </ul>
300 /// <ul>
301 /// <li>
302 /// <p><code>HTTPS</code> - HTTP over TLS.</p></li>
303 /// </ul>
304 /// <ul>
305 /// <li>
306 /// <p><code>DEFAULT</code> - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify application_layer protocol. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html">Device communication protocols</a>.</p></li>
307 /// </ul>
308 pub fn set_application_protocol(mut self, input: ::std::option::Option<crate::types::ApplicationProtocol>) -> Self {
309 self.inner = self.inner.set_application_protocol(input);
310 self
311 }
312 /// <p>An enumerated string that specifies the application-layer protocol.</p>
313 /// <ul>
314 /// <li>
315 /// <p><code>SECURE_MQTT</code> - MQTT over TLS.</p></li>
316 /// </ul>
317 /// <ul>
318 /// <li>
319 /// <p><code>MQTT_WSS</code> - MQTT over WebSocket.</p></li>
320 /// </ul>
321 /// <ul>
322 /// <li>
323 /// <p><code>HTTPS</code> - HTTP over TLS.</p></li>
324 /// </ul>
325 /// <ul>
326 /// <li>
327 /// <p><code>DEFAULT</code> - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify application_layer protocol. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html">Device communication protocols</a>.</p></li>
328 /// </ul>
329 pub fn get_application_protocol(&self) -> &::std::option::Option<crate::types::ApplicationProtocol> {
330 self.inner.get_application_protocol()
331 }
332 /// <p>An object that specifies the client certificate configuration for a domain.</p>
333 pub fn client_certificate_config(mut self, input: crate::types::ClientCertificateConfig) -> Self {
334 self.inner = self.inner.client_certificate_config(input);
335 self
336 }
337 /// <p>An object that specifies the client certificate configuration for a domain.</p>
338 pub fn set_client_certificate_config(mut self, input: ::std::option::Option<crate::types::ClientCertificateConfig>) -> Self {
339 self.inner = self.inner.set_client_certificate_config(input);
340 self
341 }
342 /// <p>An object that specifies the client certificate configuration for a domain.</p>
343 pub fn get_client_certificate_config(&self) -> &::std::option::Option<crate::types::ClientCertificateConfig> {
344 self.inner.get_client_certificate_config()
345 }
346}