aws_sdk_iot/operation/create_domain_configuration/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_domain_configuration::_create_domain_configuration_output::CreateDomainConfigurationOutputBuilder;
3
4pub use crate::operation::create_domain_configuration::_create_domain_configuration_input::CreateDomainConfigurationInputBuilder;
5
6impl crate::operation::create_domain_configuration::builders::CreateDomainConfigurationInputBuilder {
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::create_domain_configuration::CreateDomainConfigurationOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_domain_configuration::CreateDomainConfigurationError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_domain_configuration();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateDomainConfiguration`.
24///
25/// <p>Creates a domain configuration.</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">CreateDomainConfiguration</a> action.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct CreateDomainConfigurationFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::create_domain_configuration::builders::CreateDomainConfigurationInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::create_domain_configuration::CreateDomainConfigurationOutput,
36 crate::operation::create_domain_configuration::CreateDomainConfigurationError,
37 > for CreateDomainConfigurationFluentBuilder
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::create_domain_configuration::CreateDomainConfigurationOutput,
45 crate::operation::create_domain_configuration::CreateDomainConfigurationError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl CreateDomainConfigurationFluentBuilder {
52 /// Creates a new `CreateDomainConfigurationFluentBuilder`.
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 CreateDomainConfiguration as a reference.
61 pub fn as_input(&self) -> &crate::operation::create_domain_configuration::builders::CreateDomainConfigurationInputBuilder {
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::create_domain_configuration::CreateDomainConfigurationOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::create_domain_configuration::CreateDomainConfigurationError,
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::create_domain_configuration::CreateDomainConfiguration::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::create_domain_configuration::CreateDomainConfiguration::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::create_domain_configuration::CreateDomainConfigurationOutput,
98 crate::operation::create_domain_configuration::CreateDomainConfigurationError,
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. This value must be unique to a region.</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. This value must be unique to a region.</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. This value must be unique to a region.</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>The name of the domain.</p>
127 pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.inner = self.inner.domain_name(input.into());
129 self
130 }
131 /// <p>The name of the domain.</p>
132 pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.inner = self.inner.set_domain_name(input);
134 self
135 }
136 /// <p>The name of the domain.</p>
137 pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
138 self.inner.get_domain_name()
139 }
140 ///
141 /// Appends an item to `serverCertificateArns`.
142 ///
143 /// To override the contents of this collection use [`set_server_certificate_arns`](Self::set_server_certificate_arns).
144 ///
145 /// <p>The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains.</p>
146 pub fn server_certificate_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.inner = self.inner.server_certificate_arns(input.into());
148 self
149 }
150 /// <p>The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains.</p>
151 pub fn set_server_certificate_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
152 self.inner = self.inner.set_server_certificate_arns(input);
153 self
154 }
155 /// <p>The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains.</p>
156 pub fn get_server_certificate_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
157 self.inner.get_server_certificate_arns()
158 }
159 /// <p>The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains.</p>
160 pub fn validation_certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.inner = self.inner.validation_certificate_arn(input.into());
162 self
163 }
164 /// <p>The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains.</p>
165 pub fn set_validation_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.inner = self.inner.set_validation_certificate_arn(input);
167 self
168 }
169 /// <p>The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains.</p>
170 pub fn get_validation_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
171 self.inner.get_validation_certificate_arn()
172 }
173 /// <p>An object that specifies the authorization service for a domain.</p>
174 pub fn authorizer_config(mut self, input: crate::types::AuthorizerConfig) -> Self {
175 self.inner = self.inner.authorizer_config(input);
176 self
177 }
178 /// <p>An object that specifies the authorization service for a domain.</p>
179 pub fn set_authorizer_config(mut self, input: ::std::option::Option<crate::types::AuthorizerConfig>) -> Self {
180 self.inner = self.inner.set_authorizer_config(input);
181 self
182 }
183 /// <p>An object that specifies the authorization service for a domain.</p>
184 pub fn get_authorizer_config(&self) -> &::std::option::Option<crate::types::AuthorizerConfig> {
185 self.inner.get_authorizer_config()
186 }
187 /// <p>The type of service delivered by the endpoint.</p><note>
188 /// <p>Amazon Web Services IoT Core currently supports only the <code>DATA</code> service type.</p>
189 /// </note>
190 pub fn service_type(mut self, input: crate::types::ServiceType) -> Self {
191 self.inner = self.inner.service_type(input);
192 self
193 }
194 /// <p>The type of service delivered by the endpoint.</p><note>
195 /// <p>Amazon Web Services IoT Core currently supports only the <code>DATA</code> service type.</p>
196 /// </note>
197 pub fn set_service_type(mut self, input: ::std::option::Option<crate::types::ServiceType>) -> Self {
198 self.inner = self.inner.set_service_type(input);
199 self
200 }
201 /// <p>The type of service delivered by the endpoint.</p><note>
202 /// <p>Amazon Web Services IoT Core currently supports only the <code>DATA</code> service type.</p>
203 /// </note>
204 pub fn get_service_type(&self) -> &::std::option::Option<crate::types::ServiceType> {
205 self.inner.get_service_type()
206 }
207 ///
208 /// Appends an item to `tags`.
209 ///
210 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
211 ///
212 /// <p>Metadata which can be used to manage the domain configuration.</p><note>
213 /// <p>For URI Request parameters use format: ...key1=value1&key2=value2...</p>
214 /// <p>For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."</p>
215 /// <p>For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."</p>
216 /// </note>
217 pub fn tags(mut self, input: crate::types::Tag) -> Self {
218 self.inner = self.inner.tags(input);
219 self
220 }
221 /// <p>Metadata which can be used to manage the domain configuration.</p><note>
222 /// <p>For URI Request parameters use format: ...key1=value1&key2=value2...</p>
223 /// <p>For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."</p>
224 /// <p>For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."</p>
225 /// </note>
226 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
227 self.inner = self.inner.set_tags(input);
228 self
229 }
230 /// <p>Metadata which can be used to manage the domain configuration.</p><note>
231 /// <p>For URI Request parameters use format: ...key1=value1&key2=value2...</p>
232 /// <p>For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."</p>
233 /// <p>For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."</p>
234 /// </note>
235 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
236 self.inner.get_tags()
237 }
238 /// <p>An object that specifies the TLS configuration for a domain.</p>
239 pub fn tls_config(mut self, input: crate::types::TlsConfig) -> Self {
240 self.inner = self.inner.tls_config(input);
241 self
242 }
243 /// <p>An object that specifies the TLS configuration for a domain.</p>
244 pub fn set_tls_config(mut self, input: ::std::option::Option<crate::types::TlsConfig>) -> Self {
245 self.inner = self.inner.set_tls_config(input);
246 self
247 }
248 /// <p>An object that specifies the TLS configuration for a domain.</p>
249 pub fn get_tls_config(&self) -> &::std::option::Option<crate::types::TlsConfig> {
250 self.inner.get_tls_config()
251 }
252 /// <p>The server certificate configuration.</p>
253 pub fn server_certificate_config(mut self, input: crate::types::ServerCertificateConfig) -> Self {
254 self.inner = self.inner.server_certificate_config(input);
255 self
256 }
257 /// <p>The server certificate configuration.</p>
258 pub fn set_server_certificate_config(mut self, input: ::std::option::Option<crate::types::ServerCertificateConfig>) -> Self {
259 self.inner = self.inner.set_server_certificate_config(input);
260 self
261 }
262 /// <p>The server certificate configuration.</p>
263 pub fn get_server_certificate_config(&self) -> &::std::option::Option<crate::types::ServerCertificateConfig> {
264 self.inner.get_server_certificate_config()
265 }
266 /// <p>An enumerated string that specifies the authentication type.</p>
267 /// <ul>
268 /// <li>
269 /// <p><code>CUSTOM_AUTH_X509</code> - Use custom authentication and authorization with additional details from the X.509 client certificate.</p></li>
270 /// </ul>
271 /// <ul>
272 /// <li>
273 /// <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>
274 /// </ul>
275 /// <ul>
276 /// <li>
277 /// <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>
278 /// </ul>
279 /// <ul>
280 /// <li>
281 /// <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>
282 /// </ul>
283 /// <ul>
284 /// <li>
285 /// <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>
286 /// </ul>
287 pub fn authentication_type(mut self, input: crate::types::AuthenticationType) -> Self {
288 self.inner = self.inner.authentication_type(input);
289 self
290 }
291 /// <p>An enumerated string that specifies the authentication type.</p>
292 /// <ul>
293 /// <li>
294 /// <p><code>CUSTOM_AUTH_X509</code> - Use custom authentication and authorization with additional details from the X.509 client certificate.</p></li>
295 /// </ul>
296 /// <ul>
297 /// <li>
298 /// <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>
299 /// </ul>
300 /// <ul>
301 /// <li>
302 /// <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>
303 /// </ul>
304 /// <ul>
305 /// <li>
306 /// <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>
307 /// </ul>
308 /// <ul>
309 /// <li>
310 /// <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>
311 /// </ul>
312 pub fn set_authentication_type(mut self, input: ::std::option::Option<crate::types::AuthenticationType>) -> Self {
313 self.inner = self.inner.set_authentication_type(input);
314 self
315 }
316 /// <p>An enumerated string that specifies the authentication type.</p>
317 /// <ul>
318 /// <li>
319 /// <p><code>CUSTOM_AUTH_X509</code> - Use custom authentication and authorization with additional details from the X.509 client certificate.</p></li>
320 /// </ul>
321 /// <ul>
322 /// <li>
323 /// <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>
324 /// </ul>
325 /// <ul>
326 /// <li>
327 /// <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>
328 /// </ul>
329 /// <ul>
330 /// <li>
331 /// <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>
332 /// </ul>
333 /// <ul>
334 /// <li>
335 /// <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>
336 /// </ul>
337 pub fn get_authentication_type(&self) -> &::std::option::Option<crate::types::AuthenticationType> {
338 self.inner.get_authentication_type()
339 }
340 /// <p>An enumerated string that specifies the application-layer protocol.</p>
341 /// <ul>
342 /// <li>
343 /// <p><code>SECURE_MQTT</code> - MQTT over TLS.</p></li>
344 /// </ul>
345 /// <ul>
346 /// <li>
347 /// <p><code>MQTT_WSS</code> - MQTT over WebSocket.</p></li>
348 /// </ul>
349 /// <ul>
350 /// <li>
351 /// <p><code>HTTPS</code> - HTTP over TLS.</p></li>
352 /// </ul>
353 /// <ul>
354 /// <li>
355 /// <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>
356 /// </ul>
357 pub fn application_protocol(mut self, input: crate::types::ApplicationProtocol) -> Self {
358 self.inner = self.inner.application_protocol(input);
359 self
360 }
361 /// <p>An enumerated string that specifies the application-layer protocol.</p>
362 /// <ul>
363 /// <li>
364 /// <p><code>SECURE_MQTT</code> - MQTT over TLS.</p></li>
365 /// </ul>
366 /// <ul>
367 /// <li>
368 /// <p><code>MQTT_WSS</code> - MQTT over WebSocket.</p></li>
369 /// </ul>
370 /// <ul>
371 /// <li>
372 /// <p><code>HTTPS</code> - HTTP over TLS.</p></li>
373 /// </ul>
374 /// <ul>
375 /// <li>
376 /// <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>
377 /// </ul>
378 pub fn set_application_protocol(mut self, input: ::std::option::Option<crate::types::ApplicationProtocol>) -> Self {
379 self.inner = self.inner.set_application_protocol(input);
380 self
381 }
382 /// <p>An enumerated string that specifies the application-layer protocol.</p>
383 /// <ul>
384 /// <li>
385 /// <p><code>SECURE_MQTT</code> - MQTT over TLS.</p></li>
386 /// </ul>
387 /// <ul>
388 /// <li>
389 /// <p><code>MQTT_WSS</code> - MQTT over WebSocket.</p></li>
390 /// </ul>
391 /// <ul>
392 /// <li>
393 /// <p><code>HTTPS</code> - HTTP over TLS.</p></li>
394 /// </ul>
395 /// <ul>
396 /// <li>
397 /// <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>
398 /// </ul>
399 pub fn get_application_protocol(&self) -> &::std::option::Option<crate::types::ApplicationProtocol> {
400 self.inner.get_application_protocol()
401 }
402 /// <p>An object that specifies the client certificate configuration for a domain.</p>
403 pub fn client_certificate_config(mut self, input: crate::types::ClientCertificateConfig) -> Self {
404 self.inner = self.inner.client_certificate_config(input);
405 self
406 }
407 /// <p>An object that specifies the client certificate configuration for a domain.</p>
408 pub fn set_client_certificate_config(mut self, input: ::std::option::Option<crate::types::ClientCertificateConfig>) -> Self {
409 self.inner = self.inner.set_client_certificate_config(input);
410 self
411 }
412 /// <p>An object that specifies the client certificate configuration for a domain.</p>
413 pub fn get_client_certificate_config(&self) -> &::std::option::Option<crate::types::ClientCertificateConfig> {
414 self.inner.get_client_certificate_config()
415 }
416}