aws_sdk_route53resolver/operation/create_resolver_endpoint/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_resolver_endpoint::_create_resolver_endpoint_output::CreateResolverEndpointOutputBuilder;
3
4pub use crate::operation::create_resolver_endpoint::_create_resolver_endpoint_input::CreateResolverEndpointInputBuilder;
5
6impl crate::operation::create_resolver_endpoint::builders::CreateResolverEndpointInputBuilder {
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_resolver_endpoint::CreateResolverEndpointOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_resolver_endpoint::CreateResolverEndpointError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_resolver_endpoint();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateResolverEndpoint`.
24///
25/// <p>Creates a Resolver endpoint. There are two types of Resolver endpoints, inbound and outbound:</p>
26/// <ul>
27/// <li>
28/// <p>An <i>inbound Resolver endpoint</i> forwards DNS queries to the DNS service for a VPC from your network.</p></li>
29/// <li>
30/// <p>An <i>outbound Resolver endpoint</i> forwards DNS queries from the DNS service for a VPC to your network.</p></li>
31/// </ul>
32#[derive(::std::clone::Clone, ::std::fmt::Debug)]
33pub struct CreateResolverEndpointFluentBuilder {
34 handle: ::std::sync::Arc<crate::client::Handle>,
35 inner: crate::operation::create_resolver_endpoint::builders::CreateResolverEndpointInputBuilder,
36 config_override: ::std::option::Option<crate::config::Builder>,
37}
38impl
39 crate::client::customize::internal::CustomizableSend<
40 crate::operation::create_resolver_endpoint::CreateResolverEndpointOutput,
41 crate::operation::create_resolver_endpoint::CreateResolverEndpointError,
42 > for CreateResolverEndpointFluentBuilder
43{
44 fn send(
45 self,
46 config_override: crate::config::Builder,
47 ) -> crate::client::customize::internal::BoxFuture<
48 crate::client::customize::internal::SendResult<
49 crate::operation::create_resolver_endpoint::CreateResolverEndpointOutput,
50 crate::operation::create_resolver_endpoint::CreateResolverEndpointError,
51 >,
52 > {
53 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
54 }
55}
56impl CreateResolverEndpointFluentBuilder {
57 /// Creates a new `CreateResolverEndpointFluentBuilder`.
58 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
59 Self {
60 handle,
61 inner: ::std::default::Default::default(),
62 config_override: ::std::option::Option::None,
63 }
64 }
65 /// Access the CreateResolverEndpoint as a reference.
66 pub fn as_input(&self) -> &crate::operation::create_resolver_endpoint::builders::CreateResolverEndpointInputBuilder {
67 &self.inner
68 }
69 /// Sends the request and returns the response.
70 ///
71 /// If an error occurs, an `SdkError` will be returned with additional details that
72 /// can be matched against.
73 ///
74 /// By default, any retryable failures will be retried twice. Retry behavior
75 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
76 /// set when configuring the client.
77 pub async fn send(
78 self,
79 ) -> ::std::result::Result<
80 crate::operation::create_resolver_endpoint::CreateResolverEndpointOutput,
81 ::aws_smithy_runtime_api::client::result::SdkError<
82 crate::operation::create_resolver_endpoint::CreateResolverEndpointError,
83 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
84 >,
85 > {
86 let input = self
87 .inner
88 .build()
89 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
90 let runtime_plugins = crate::operation::create_resolver_endpoint::CreateResolverEndpoint::operation_runtime_plugins(
91 self.handle.runtime_plugins.clone(),
92 &self.handle.conf,
93 self.config_override,
94 );
95 crate::operation::create_resolver_endpoint::CreateResolverEndpoint::orchestrate(&runtime_plugins, input).await
96 }
97
98 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
99 pub fn customize(
100 self,
101 ) -> crate::client::customize::CustomizableOperation<
102 crate::operation::create_resolver_endpoint::CreateResolverEndpointOutput,
103 crate::operation::create_resolver_endpoint::CreateResolverEndpointError,
104 Self,
105 > {
106 crate::client::customize::CustomizableOperation::new(self)
107 }
108 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
109 self.set_config_override(::std::option::Option::Some(config_override.into()));
110 self
111 }
112
113 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
114 self.config_override = config_override;
115 self
116 }
117 /// <p>A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
118 pub fn creator_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.inner = self.inner.creator_request_id(input.into());
120 self
121 }
122 /// <p>A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
123 pub fn set_creator_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.inner = self.inner.set_creator_request_id(input);
125 self
126 }
127 /// <p>A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
128 pub fn get_creator_request_id(&self) -> &::std::option::Option<::std::string::String> {
129 self.inner.get_creator_request_id()
130 }
131 /// <p>A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 console.</p>
132 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.inner = self.inner.name(input.into());
134 self
135 }
136 /// <p>A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 console.</p>
137 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138 self.inner = self.inner.set_name(input);
139 self
140 }
141 /// <p>A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 console.</p>
142 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
143 self.inner.get_name()
144 }
145 ///
146 /// Appends an item to `SecurityGroupIds`.
147 ///
148 /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
149 ///
150 /// <p>The ID of one or more security groups that you want to use to control access to this VPC. The security group that you specify must include one or more inbound rules (for inbound Resolver endpoints) or outbound rules (for outbound Resolver endpoints). Inbound and outbound rules must allow TCP and UDP access. For inbound access, open port 53. For outbound access, open the port that you're using for DNS queries on your network.</p>
151 /// <p>Some security group rules will cause your connection to be tracked. For outbound resolver endpoint, it can potentially impact the maximum queries per second from outbound endpoint to your target name server. For inbound resolver endpoint, it can bring down the overall maximum queries per second per IP address to as low as 1500. To avoid connection tracking caused by security group, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#untracked-connectionsl">Untracked connections</a>.</p>
152 pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153 self.inner = self.inner.security_group_ids(input.into());
154 self
155 }
156 /// <p>The ID of one or more security groups that you want to use to control access to this VPC. The security group that you specify must include one or more inbound rules (for inbound Resolver endpoints) or outbound rules (for outbound Resolver endpoints). Inbound and outbound rules must allow TCP and UDP access. For inbound access, open port 53. For outbound access, open the port that you're using for DNS queries on your network.</p>
157 /// <p>Some security group rules will cause your connection to be tracked. For outbound resolver endpoint, it can potentially impact the maximum queries per second from outbound endpoint to your target name server. For inbound resolver endpoint, it can bring down the overall maximum queries per second per IP address to as low as 1500. To avoid connection tracking caused by security group, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#untracked-connectionsl">Untracked connections</a>.</p>
158 pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
159 self.inner = self.inner.set_security_group_ids(input);
160 self
161 }
162 /// <p>The ID of one or more security groups that you want to use to control access to this VPC. The security group that you specify must include one or more inbound rules (for inbound Resolver endpoints) or outbound rules (for outbound Resolver endpoints). Inbound and outbound rules must allow TCP and UDP access. For inbound access, open port 53. For outbound access, open the port that you're using for DNS queries on your network.</p>
163 /// <p>Some security group rules will cause your connection to be tracked. For outbound resolver endpoint, it can potentially impact the maximum queries per second from outbound endpoint to your target name server. For inbound resolver endpoint, it can bring down the overall maximum queries per second per IP address to as low as 1500. To avoid connection tracking caused by security group, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#untracked-connectionsl">Untracked connections</a>.</p>
164 pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
165 self.inner.get_security_group_ids()
166 }
167 /// <p>Specify the applicable value:</p>
168 /// <ul>
169 /// <li>
170 /// <p><code>INBOUND</code>: Resolver forwards DNS queries to the DNS service for a VPC from your network.</p></li>
171 /// <li>
172 /// <p><code>OUTBOUND</code>: Resolver forwards DNS queries from the DNS service for a VPC to your network.</p></li>
173 /// <li>
174 /// <p><code>INBOUND_DELEGATION</code>: Resolver delegates queries to Route 53 private hosted zones from your network.</p></li>
175 /// </ul>
176 pub fn direction(mut self, input: crate::types::ResolverEndpointDirection) -> Self {
177 self.inner = self.inner.direction(input);
178 self
179 }
180 /// <p>Specify the applicable value:</p>
181 /// <ul>
182 /// <li>
183 /// <p><code>INBOUND</code>: Resolver forwards DNS queries to the DNS service for a VPC from your network.</p></li>
184 /// <li>
185 /// <p><code>OUTBOUND</code>: Resolver forwards DNS queries from the DNS service for a VPC to your network.</p></li>
186 /// <li>
187 /// <p><code>INBOUND_DELEGATION</code>: Resolver delegates queries to Route 53 private hosted zones from your network.</p></li>
188 /// </ul>
189 pub fn set_direction(mut self, input: ::std::option::Option<crate::types::ResolverEndpointDirection>) -> Self {
190 self.inner = self.inner.set_direction(input);
191 self
192 }
193 /// <p>Specify the applicable value:</p>
194 /// <ul>
195 /// <li>
196 /// <p><code>INBOUND</code>: Resolver forwards DNS queries to the DNS service for a VPC from your network.</p></li>
197 /// <li>
198 /// <p><code>OUTBOUND</code>: Resolver forwards DNS queries from the DNS service for a VPC to your network.</p></li>
199 /// <li>
200 /// <p><code>INBOUND_DELEGATION</code>: Resolver delegates queries to Route 53 private hosted zones from your network.</p></li>
201 /// </ul>
202 pub fn get_direction(&self) -> &::std::option::Option<crate::types::ResolverEndpointDirection> {
203 self.inner.get_direction()
204 }
205 ///
206 /// Appends an item to `IpAddresses`.
207 ///
208 /// To override the contents of this collection use [`set_ip_addresses`](Self::set_ip_addresses).
209 ///
210 /// <p>The subnets and IP addresses in your VPC that DNS queries originate from (for outbound endpoints) or that you forward DNS queries to (for inbound endpoints). The subnet ID uniquely identifies a VPC.</p><note>
211 /// <p>Even though the minimum is 1, Route 53 requires that you create at least two.</p>
212 /// </note>
213 pub fn ip_addresses(mut self, input: crate::types::IpAddressRequest) -> Self {
214 self.inner = self.inner.ip_addresses(input);
215 self
216 }
217 /// <p>The subnets and IP addresses in your VPC that DNS queries originate from (for outbound endpoints) or that you forward DNS queries to (for inbound endpoints). The subnet ID uniquely identifies a VPC.</p><note>
218 /// <p>Even though the minimum is 1, Route 53 requires that you create at least two.</p>
219 /// </note>
220 pub fn set_ip_addresses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IpAddressRequest>>) -> Self {
221 self.inner = self.inner.set_ip_addresses(input);
222 self
223 }
224 /// <p>The subnets and IP addresses in your VPC that DNS queries originate from (for outbound endpoints) or that you forward DNS queries to (for inbound endpoints). The subnet ID uniquely identifies a VPC.</p><note>
225 /// <p>Even though the minimum is 1, Route 53 requires that you create at least two.</p>
226 /// </note>
227 pub fn get_ip_addresses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IpAddressRequest>> {
228 self.inner.get_ip_addresses()
229 }
230 /// <p>The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the <code>PreferredInstanceType</code>.</p>
231 pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
232 self.inner = self.inner.outpost_arn(input.into());
233 self
234 }
235 /// <p>The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the <code>PreferredInstanceType</code>.</p>
236 pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
237 self.inner = self.inner.set_outpost_arn(input);
238 self
239 }
240 /// <p>The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the <code>PreferredInstanceType</code>.</p>
241 pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
242 self.inner.get_outpost_arn()
243 }
244 /// <p>The instance type. If you specify this, you must also specify a value for the <code>OutpostArn</code>.</p>
245 pub fn preferred_instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
246 self.inner = self.inner.preferred_instance_type(input.into());
247 self
248 }
249 /// <p>The instance type. If you specify this, you must also specify a value for the <code>OutpostArn</code>.</p>
250 pub fn set_preferred_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
251 self.inner = self.inner.set_preferred_instance_type(input);
252 self
253 }
254 /// <p>The instance type. If you specify this, you must also specify a value for the <code>OutpostArn</code>.</p>
255 pub fn get_preferred_instance_type(&self) -> &::std::option::Option<::std::string::String> {
256 self.inner.get_preferred_instance_type()
257 }
258 ///
259 /// Appends an item to `Tags`.
260 ///
261 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
262 ///
263 /// <p>A list of the tag keys and values that you want to associate with the endpoint.</p>
264 pub fn tags(mut self, input: crate::types::Tag) -> Self {
265 self.inner = self.inner.tags(input);
266 self
267 }
268 /// <p>A list of the tag keys and values that you want to associate with the endpoint.</p>
269 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
270 self.inner = self.inner.set_tags(input);
271 self
272 }
273 /// <p>A list of the tag keys and values that you want to associate with the endpoint.</p>
274 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
275 self.inner.get_tags()
276 }
277 /// <p>For the endpoint type you can choose either IPv4, IPv6, or dual-stack. A dual-stack endpoint means that it will resolve via both IPv4 and IPv6. This endpoint type is applied to all IP addresses.</p>
278 pub fn resolver_endpoint_type(mut self, input: crate::types::ResolverEndpointType) -> Self {
279 self.inner = self.inner.resolver_endpoint_type(input);
280 self
281 }
282 /// <p>For the endpoint type you can choose either IPv4, IPv6, or dual-stack. A dual-stack endpoint means that it will resolve via both IPv4 and IPv6. This endpoint type is applied to all IP addresses.</p>
283 pub fn set_resolver_endpoint_type(mut self, input: ::std::option::Option<crate::types::ResolverEndpointType>) -> Self {
284 self.inner = self.inner.set_resolver_endpoint_type(input);
285 self
286 }
287 /// <p>For the endpoint type you can choose either IPv4, IPv6, or dual-stack. A dual-stack endpoint means that it will resolve via both IPv4 and IPv6. This endpoint type is applied to all IP addresses.</p>
288 pub fn get_resolver_endpoint_type(&self) -> &::std::option::Option<crate::types::ResolverEndpointType> {
289 self.inner.get_resolver_endpoint_type()
290 }
291 ///
292 /// Appends an item to `Protocols`.
293 ///
294 /// To override the contents of this collection use [`set_protocols`](Self::set_protocols).
295 ///
296 /// <p>The protocols you want to use for the endpoint. DoH-FIPS is applicable for default inbound endpoints only.</p>
297 /// <p>For a default inbound endpoint you can apply the protocols as follows:</p>
298 /// <ul>
299 /// <li>
300 /// <p>Do53 and DoH in combination.</p></li>
301 /// <li>
302 /// <p>Do53 and DoH-FIPS in combination.</p></li>
303 /// <li>
304 /// <p>Do53 alone.</p></li>
305 /// <li>
306 /// <p>DoH alone.</p></li>
307 /// <li>
308 /// <p>DoH-FIPS alone.</p></li>
309 /// <li>
310 /// <p>None, which is treated as Do53.</p></li>
311 /// </ul>
312 /// <p>For a delegation inbound endpoint you can use Do53 only.</p>
313 /// <p>For an outbound endpoint you can apply the protocols as follows:</p>
314 /// <ul>
315 /// <li>
316 /// <p>Do53 and DoH in combination.</p></li>
317 /// <li>
318 /// <p>Do53 alone.</p></li>
319 /// <li>
320 /// <p>DoH alone.</p></li>
321 /// <li>
322 /// <p>None, which is treated as Do53.</p></li>
323 /// </ul>
324 pub fn protocols(mut self, input: crate::types::Protocol) -> Self {
325 self.inner = self.inner.protocols(input);
326 self
327 }
328 /// <p>The protocols you want to use for the endpoint. DoH-FIPS is applicable for default inbound endpoints only.</p>
329 /// <p>For a default inbound endpoint you can apply the protocols as follows:</p>
330 /// <ul>
331 /// <li>
332 /// <p>Do53 and DoH in combination.</p></li>
333 /// <li>
334 /// <p>Do53 and DoH-FIPS in combination.</p></li>
335 /// <li>
336 /// <p>Do53 alone.</p></li>
337 /// <li>
338 /// <p>DoH alone.</p></li>
339 /// <li>
340 /// <p>DoH-FIPS alone.</p></li>
341 /// <li>
342 /// <p>None, which is treated as Do53.</p></li>
343 /// </ul>
344 /// <p>For a delegation inbound endpoint you can use Do53 only.</p>
345 /// <p>For an outbound endpoint you can apply the protocols as follows:</p>
346 /// <ul>
347 /// <li>
348 /// <p>Do53 and DoH in combination.</p></li>
349 /// <li>
350 /// <p>Do53 alone.</p></li>
351 /// <li>
352 /// <p>DoH alone.</p></li>
353 /// <li>
354 /// <p>None, which is treated as Do53.</p></li>
355 /// </ul>
356 pub fn set_protocols(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Protocol>>) -> Self {
357 self.inner = self.inner.set_protocols(input);
358 self
359 }
360 /// <p>The protocols you want to use for the endpoint. DoH-FIPS is applicable for default inbound endpoints only.</p>
361 /// <p>For a default inbound endpoint you can apply the protocols as follows:</p>
362 /// <ul>
363 /// <li>
364 /// <p>Do53 and DoH in combination.</p></li>
365 /// <li>
366 /// <p>Do53 and DoH-FIPS in combination.</p></li>
367 /// <li>
368 /// <p>Do53 alone.</p></li>
369 /// <li>
370 /// <p>DoH alone.</p></li>
371 /// <li>
372 /// <p>DoH-FIPS alone.</p></li>
373 /// <li>
374 /// <p>None, which is treated as Do53.</p></li>
375 /// </ul>
376 /// <p>For a delegation inbound endpoint you can use Do53 only.</p>
377 /// <p>For an outbound endpoint you can apply the protocols as follows:</p>
378 /// <ul>
379 /// <li>
380 /// <p>Do53 and DoH in combination.</p></li>
381 /// <li>
382 /// <p>Do53 alone.</p></li>
383 /// <li>
384 /// <p>DoH alone.</p></li>
385 /// <li>
386 /// <p>None, which is treated as Do53.</p></li>
387 /// </ul>
388 pub fn get_protocols(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Protocol>> {
389 self.inner.get_protocols()
390 }
391}