aws_sdk_apigateway/operation/create_domain_name/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_domain_name::_create_domain_name_output::CreateDomainNameOutputBuilder;
3
4pub use crate::operation::create_domain_name::_create_domain_name_input::CreateDomainNameInputBuilder;
5
6impl crate::operation::create_domain_name::builders::CreateDomainNameInputBuilder {
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_name::CreateDomainNameOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_domain_name::CreateDomainNameError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_domain_name();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateDomainName`.
24///
25/// <p>Creates a new domain name.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateDomainNameFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_domain_name::builders::CreateDomainNameInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_domain_name::CreateDomainNameOutput,
35        crate::operation::create_domain_name::CreateDomainNameError,
36    > for CreateDomainNameFluentBuilder
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::create_domain_name::CreateDomainNameOutput,
44            crate::operation::create_domain_name::CreateDomainNameError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateDomainNameFluentBuilder {
51    /// Creates a new `CreateDomainNameFluentBuilder`.
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 CreateDomainName as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_domain_name::builders::CreateDomainNameInputBuilder {
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::create_domain_name::CreateDomainNameOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_domain_name::CreateDomainNameError,
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::create_domain_name::CreateDomainName::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_domain_name::CreateDomainName::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::create_domain_name::CreateDomainNameOutput,
97        crate::operation::create_domain_name::CreateDomainNameError,
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 DomainName resource.</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 DomainName resource.</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 DomainName resource.</p>
122    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_domain_name()
124    }
125    /// <p>The user-friendly name of the certificate that will be used by edge-optimized endpoint or private endpoint for this domain name.</p>
126    pub fn certificate_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.certificate_name(input.into());
128        self
129    }
130    /// <p>The user-friendly name of the certificate that will be used by edge-optimized endpoint or private endpoint for this domain name.</p>
131    pub fn set_certificate_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_certificate_name(input);
133        self
134    }
135    /// <p>The user-friendly name of the certificate that will be used by edge-optimized endpoint or private endpoint for this domain name.</p>
136    pub fn get_certificate_name(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_certificate_name()
138    }
139    /// <p>\[Deprecated\] The body of the server certificate that will be used by edge-optimized endpoint or private endpoint for this domain name provided by your certificate authority.</p>
140    pub fn certificate_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.certificate_body(input.into());
142        self
143    }
144    /// <p>\[Deprecated\] The body of the server certificate that will be used by edge-optimized endpoint or private endpoint for this domain name provided by your certificate authority.</p>
145    pub fn set_certificate_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_certificate_body(input);
147        self
148    }
149    /// <p>\[Deprecated\] The body of the server certificate that will be used by edge-optimized endpoint or private endpoint for this domain name provided by your certificate authority.</p>
150    pub fn get_certificate_body(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_certificate_body()
152    }
153    /// <p>\[Deprecated\] Your edge-optimized endpoint's domain name certificate's private key.</p>
154    pub fn certificate_private_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.certificate_private_key(input.into());
156        self
157    }
158    /// <p>\[Deprecated\] Your edge-optimized endpoint's domain name certificate's private key.</p>
159    pub fn set_certificate_private_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_certificate_private_key(input);
161        self
162    }
163    /// <p>\[Deprecated\] Your edge-optimized endpoint's domain name certificate's private key.</p>
164    pub fn get_certificate_private_key(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_certificate_private_key()
166    }
167    /// <p>\[Deprecated\] The intermediate certificates and optionally the root certificate, one after the other without any blank lines, used by an edge-optimized endpoint for this domain name. If you include the root certificate, your certificate chain must start with intermediate certificates and end with the root certificate. Use the intermediate certificates that were provided by your certificate authority. Do not include any intermediaries that are not in the chain of trust path.</p>
168    pub fn certificate_chain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
169        self.inner = self.inner.certificate_chain(input.into());
170        self
171    }
172    /// <p>\[Deprecated\] The intermediate certificates and optionally the root certificate, one after the other without any blank lines, used by an edge-optimized endpoint for this domain name. If you include the root certificate, your certificate chain must start with intermediate certificates and end with the root certificate. Use the intermediate certificates that were provided by your certificate authority. Do not include any intermediaries that are not in the chain of trust path.</p>
173    pub fn set_certificate_chain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
174        self.inner = self.inner.set_certificate_chain(input);
175        self
176    }
177    /// <p>\[Deprecated\] The intermediate certificates and optionally the root certificate, one after the other without any blank lines, used by an edge-optimized endpoint for this domain name. If you include the root certificate, your certificate chain must start with intermediate certificates and end with the root certificate. Use the intermediate certificates that were provided by your certificate authority. Do not include any intermediaries that are not in the chain of trust path.</p>
178    pub fn get_certificate_chain(&self) -> &::std::option::Option<::std::string::String> {
179        self.inner.get_certificate_chain()
180    }
181    /// <p>The reference to an Amazon Web Services-managed certificate that will be used by edge-optimized endpoint or private endpoint for this domain name. Certificate Manager is the only supported source.</p>
182    pub fn certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183        self.inner = self.inner.certificate_arn(input.into());
184        self
185    }
186    /// <p>The reference to an Amazon Web Services-managed certificate that will be used by edge-optimized endpoint or private endpoint for this domain name. Certificate Manager is the only supported source.</p>
187    pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
188        self.inner = self.inner.set_certificate_arn(input);
189        self
190    }
191    /// <p>The reference to an Amazon Web Services-managed certificate that will be used by edge-optimized endpoint or private endpoint for this domain name. Certificate Manager is the only supported source.</p>
192    pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
193        self.inner.get_certificate_arn()
194    }
195    /// <p>The user-friendly name of the certificate that will be used by regional endpoint for this domain name.</p>
196    pub fn regional_certificate_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
197        self.inner = self.inner.regional_certificate_name(input.into());
198        self
199    }
200    /// <p>The user-friendly name of the certificate that will be used by regional endpoint for this domain name.</p>
201    pub fn set_regional_certificate_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
202        self.inner = self.inner.set_regional_certificate_name(input);
203        self
204    }
205    /// <p>The user-friendly name of the certificate that will be used by regional endpoint for this domain name.</p>
206    pub fn get_regional_certificate_name(&self) -> &::std::option::Option<::std::string::String> {
207        self.inner.get_regional_certificate_name()
208    }
209    /// <p>The reference to an Amazon Web Services-managed certificate that will be used by regional endpoint for this domain name. Certificate Manager is the only supported source.</p>
210    pub fn regional_certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211        self.inner = self.inner.regional_certificate_arn(input.into());
212        self
213    }
214    /// <p>The reference to an Amazon Web Services-managed certificate that will be used by regional endpoint for this domain name. Certificate Manager is the only supported source.</p>
215    pub fn set_regional_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
216        self.inner = self.inner.set_regional_certificate_arn(input);
217        self
218    }
219    /// <p>The reference to an Amazon Web Services-managed certificate that will be used by regional endpoint for this domain name. Certificate Manager is the only supported source.</p>
220    pub fn get_regional_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
221        self.inner.get_regional_certificate_arn()
222    }
223    /// <p>The endpoint configuration of this DomainName showing the endpoint types and IP address types of the domain name.</p>
224    pub fn endpoint_configuration(mut self, input: crate::types::EndpointConfiguration) -> Self {
225        self.inner = self.inner.endpoint_configuration(input);
226        self
227    }
228    /// <p>The endpoint configuration of this DomainName showing the endpoint types and IP address types of the domain name.</p>
229    pub fn set_endpoint_configuration(mut self, input: ::std::option::Option<crate::types::EndpointConfiguration>) -> Self {
230        self.inner = self.inner.set_endpoint_configuration(input);
231        self
232    }
233    /// <p>The endpoint configuration of this DomainName showing the endpoint types and IP address types of the domain name.</p>
234    pub fn get_endpoint_configuration(&self) -> &::std::option::Option<crate::types::EndpointConfiguration> {
235        self.inner.get_endpoint_configuration()
236    }
237    ///
238    /// Adds a key-value pair to `tags`.
239    ///
240    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
241    ///
242    /// <p>The key-value map of strings. The valid character set is \[a-zA-Z+-=._:/\]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.</p>
243    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
244        self.inner = self.inner.tags(k.into(), v.into());
245        self
246    }
247    /// <p>The key-value map of strings. The valid character set is \[a-zA-Z+-=._:/\]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.</p>
248    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
249        self.inner = self.inner.set_tags(input);
250        self
251    }
252    /// <p>The key-value map of strings. The valid character set is \[a-zA-Z+-=._:/\]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.</p>
253    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
254        self.inner.get_tags()
255    }
256    /// <p>The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are <code>TLS_1_0</code> and <code>TLS_1_2</code>.</p>
257    pub fn security_policy(mut self, input: crate::types::SecurityPolicy) -> Self {
258        self.inner = self.inner.security_policy(input);
259        self
260    }
261    /// <p>The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are <code>TLS_1_0</code> and <code>TLS_1_2</code>.</p>
262    pub fn set_security_policy(mut self, input: ::std::option::Option<crate::types::SecurityPolicy>) -> Self {
263        self.inner = self.inner.set_security_policy(input);
264        self
265    }
266    /// <p>The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are <code>TLS_1_0</code> and <code>TLS_1_2</code>.</p>
267    pub fn get_security_policy(&self) -> &::std::option::Option<crate::types::SecurityPolicy> {
268        self.inner.get_security_policy()
269    }
270    /// <p>The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.</p>
271    pub fn mutual_tls_authentication(mut self, input: crate::types::MutualTlsAuthenticationInput) -> Self {
272        self.inner = self.inner.mutual_tls_authentication(input);
273        self
274    }
275    /// <p>The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.</p>
276    pub fn set_mutual_tls_authentication(mut self, input: ::std::option::Option<crate::types::MutualTlsAuthenticationInput>) -> Self {
277        self.inner = self.inner.set_mutual_tls_authentication(input);
278        self
279    }
280    /// <p>The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.</p>
281    pub fn get_mutual_tls_authentication(&self) -> &::std::option::Option<crate::types::MutualTlsAuthenticationInput> {
282        self.inner.get_mutual_tls_authentication()
283    }
284    /// <p>The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn.</p>
285    pub fn ownership_verification_certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
286        self.inner = self.inner.ownership_verification_certificate_arn(input.into());
287        self
288    }
289    /// <p>The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn.</p>
290    pub fn set_ownership_verification_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
291        self.inner = self.inner.set_ownership_verification_certificate_arn(input);
292        self
293    }
294    /// <p>The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the regionalCertificateArn.</p>
295    pub fn get_ownership_verification_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
296        self.inner.get_ownership_verification_certificate_arn()
297    }
298    /// <p>A stringified JSON policy document that applies to the <code>execute-api</code> service for this DomainName regardless of the caller and Method configuration. Supported only for private custom domain names.</p>
299    pub fn policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
300        self.inner = self.inner.policy(input.into());
301        self
302    }
303    /// <p>A stringified JSON policy document that applies to the <code>execute-api</code> service for this DomainName regardless of the caller and Method configuration. Supported only for private custom domain names.</p>
304    pub fn set_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
305        self.inner = self.inner.set_policy(input);
306        self
307    }
308    /// <p>A stringified JSON policy document that applies to the <code>execute-api</code> service for this DomainName regardless of the caller and Method configuration. Supported only for private custom domain names.</p>
309    pub fn get_policy(&self) -> &::std::option::Option<::std::string::String> {
310        self.inner.get_policy()
311    }
312    /// <p>The routing mode for this domain name. The routing mode determines how API Gateway sends traffic from your custom domain name to your private APIs.</p>
313    pub fn routing_mode(mut self, input: crate::types::RoutingMode) -> Self {
314        self.inner = self.inner.routing_mode(input);
315        self
316    }
317    /// <p>The routing mode for this domain name. The routing mode determines how API Gateway sends traffic from your custom domain name to your private APIs.</p>
318    pub fn set_routing_mode(mut self, input: ::std::option::Option<crate::types::RoutingMode>) -> Self {
319        self.inner = self.inner.set_routing_mode(input);
320        self
321    }
322    /// <p>The routing mode for this domain name. The routing mode determines how API Gateway sends traffic from your custom domain name to your private APIs.</p>
323    pub fn get_routing_mode(&self) -> &::std::option::Option<crate::types::RoutingMode> {
324        self.inner.get_routing_mode()
325    }
326}