aws_sdk_acm/operation/resend_validation_email/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::resend_validation_email::_resend_validation_email_output::ResendValidationEmailOutputBuilder;
3
4pub use crate::operation::resend_validation_email::_resend_validation_email_input::ResendValidationEmailInputBuilder;
5
6impl crate::operation::resend_validation_email::builders::ResendValidationEmailInputBuilder {
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::resend_validation_email::ResendValidationEmailOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::resend_validation_email::ResendValidationEmailError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.resend_validation_email();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ResendValidationEmail`.
24///
25/// <p>Resends the email that requests domain ownership validation. The domain owner or an authorized representative must approve the ACM certificate before it can be issued. The certificate can be approved by clicking a link in the mail to navigate to the Amazon certificate approval website and then clicking <b>I Approve</b>. However, the validation email can be blocked by spam filters. Therefore, if you do not receive the original mail, you can request that the mail be resent within 72 hours of requesting the ACM certificate. If more than 72 hours have elapsed since your original request or since your last attempt to resend validation mail, you must request a new certificate. For more information about setting up your contact email addresses, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/setup-email.html">Configure Email for your Domain</a>.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ResendValidationEmailFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::resend_validation_email::builders::ResendValidationEmailInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::resend_validation_email::ResendValidationEmailOutput,
35 crate::operation::resend_validation_email::ResendValidationEmailError,
36 > for ResendValidationEmailFluentBuilder
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::resend_validation_email::ResendValidationEmailOutput,
44 crate::operation::resend_validation_email::ResendValidationEmailError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl ResendValidationEmailFluentBuilder {
51 /// Creates a new `ResendValidationEmailFluentBuilder`.
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 ResendValidationEmail as a reference.
60 pub fn as_input(&self) -> &crate::operation::resend_validation_email::builders::ResendValidationEmailInputBuilder {
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::resend_validation_email::ResendValidationEmailOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::resend_validation_email::ResendValidationEmailError,
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::resend_validation_email::ResendValidationEmail::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::resend_validation_email::ResendValidationEmail::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::resend_validation_email::ResendValidationEmailOutput,
97 crate::operation::resend_validation_email::ResendValidationEmailError,
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>String that contains the ARN of the requested certificate. The certificate ARN is generated and returned by the <code>RequestCertificate</code> action as soon as the request is made. By default, using this parameter causes email to be sent to all top-level domains you specified in the certificate request. The ARN must be of the form:</p>
112 /// <p><code>arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012</code></p>
113 pub fn certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.certificate_arn(input.into());
115 self
116 }
117 /// <p>String that contains the ARN of the requested certificate. The certificate ARN is generated and returned by the <code>RequestCertificate</code> action as soon as the request is made. By default, using this parameter causes email to be sent to all top-level domains you specified in the certificate request. The ARN must be of the form:</p>
118 /// <p><code>arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012</code></p>
119 pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.inner = self.inner.set_certificate_arn(input);
121 self
122 }
123 /// <p>String that contains the ARN of the requested certificate. The certificate ARN is generated and returned by the <code>RequestCertificate</code> action as soon as the request is made. By default, using this parameter causes email to be sent to all top-level domains you specified in the certificate request. The ARN must be of the form:</p>
124 /// <p><code>arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012</code></p>
125 pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
126 self.inner.get_certificate_arn()
127 }
128 /// <p>The fully qualified domain name (FQDN) of the certificate that needs to be validated.</p>
129 pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.inner = self.inner.domain(input.into());
131 self
132 }
133 /// <p>The fully qualified domain name (FQDN) of the certificate that needs to be validated.</p>
134 pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.inner = self.inner.set_domain(input);
136 self
137 }
138 /// <p>The fully qualified domain name (FQDN) of the certificate that needs to be validated.</p>
139 pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
140 self.inner.get_domain()
141 }
142 /// <p>The base validation domain that will act as the suffix of the email addresses that are used to send the emails. This must be the same as the <code>Domain</code> value or a superdomain of the <code>Domain</code> value. For example, if you requested a certificate for <code>site.subdomain.example.com</code> and specify a <b>ValidationDomain</b> of <code>subdomain.example.com</code>, ACM sends email to the domain registrant, technical contact, and administrative contact in WHOIS and the following five addresses:</p>
143 /// <ul>
144 /// <li>
145 /// <p>admin@subdomain.example.com</p></li>
146 /// <li>
147 /// <p>administrator@subdomain.example.com</p></li>
148 /// <li>
149 /// <p>hostmaster@subdomain.example.com</p></li>
150 /// <li>
151 /// <p>postmaster@subdomain.example.com</p></li>
152 /// <li>
153 /// <p>webmaster@subdomain.example.com</p></li>
154 /// </ul>
155 pub fn validation_domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.inner = self.inner.validation_domain(input.into());
157 self
158 }
159 /// <p>The base validation domain that will act as the suffix of the email addresses that are used to send the emails. This must be the same as the <code>Domain</code> value or a superdomain of the <code>Domain</code> value. For example, if you requested a certificate for <code>site.subdomain.example.com</code> and specify a <b>ValidationDomain</b> of <code>subdomain.example.com</code>, ACM sends email to the domain registrant, technical contact, and administrative contact in WHOIS and the following five addresses:</p>
160 /// <ul>
161 /// <li>
162 /// <p>admin@subdomain.example.com</p></li>
163 /// <li>
164 /// <p>administrator@subdomain.example.com</p></li>
165 /// <li>
166 /// <p>hostmaster@subdomain.example.com</p></li>
167 /// <li>
168 /// <p>postmaster@subdomain.example.com</p></li>
169 /// <li>
170 /// <p>webmaster@subdomain.example.com</p></li>
171 /// </ul>
172 pub fn set_validation_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.inner = self.inner.set_validation_domain(input);
174 self
175 }
176 /// <p>The base validation domain that will act as the suffix of the email addresses that are used to send the emails. This must be the same as the <code>Domain</code> value or a superdomain of the <code>Domain</code> value. For example, if you requested a certificate for <code>site.subdomain.example.com</code> and specify a <b>ValidationDomain</b> of <code>subdomain.example.com</code>, ACM sends email to the domain registrant, technical contact, and administrative contact in WHOIS and the following five addresses:</p>
177 /// <ul>
178 /// <li>
179 /// <p>admin@subdomain.example.com</p></li>
180 /// <li>
181 /// <p>administrator@subdomain.example.com</p></li>
182 /// <li>
183 /// <p>hostmaster@subdomain.example.com</p></li>
184 /// <li>
185 /// <p>postmaster@subdomain.example.com</p></li>
186 /// <li>
187 /// <p>webmaster@subdomain.example.com</p></li>
188 /// </ul>
189 pub fn get_validation_domain(&self) -> &::std::option::Option<::std::string::String> {
190 self.inner.get_validation_domain()
191 }
192}