aws_sdk_route53resolver/operation/update_resolver_config/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_resolver_config::_update_resolver_config_output::UpdateResolverConfigOutputBuilder;
3
4pub use crate::operation::update_resolver_config::_update_resolver_config_input::UpdateResolverConfigInputBuilder;
5
6impl crate::operation::update_resolver_config::builders::UpdateResolverConfigInputBuilder {
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_resolver_config::UpdateResolverConfigOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_resolver_config::UpdateResolverConfigError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_resolver_config();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateResolverConfig`.
24///
25/// <p>Updates the behavior configuration of Route 53 Resolver behavior for a single VPC from Amazon Virtual Private Cloud.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateResolverConfigFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::update_resolver_config::builders::UpdateResolverConfigInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::update_resolver_config::UpdateResolverConfigOutput,
35 crate::operation::update_resolver_config::UpdateResolverConfigError,
36 > for UpdateResolverConfigFluentBuilder
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::update_resolver_config::UpdateResolverConfigOutput,
44 crate::operation::update_resolver_config::UpdateResolverConfigError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl UpdateResolverConfigFluentBuilder {
51 /// Creates a new `UpdateResolverConfigFluentBuilder`.
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 UpdateResolverConfig as a reference.
60 pub fn as_input(&self) -> &crate::operation::update_resolver_config::builders::UpdateResolverConfigInputBuilder {
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::update_resolver_config::UpdateResolverConfigOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::update_resolver_config::UpdateResolverConfigError,
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::update_resolver_config::UpdateResolverConfig::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::update_resolver_config::UpdateResolverConfig::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::update_resolver_config::UpdateResolverConfigOutput,
97 crate::operation::update_resolver_config::UpdateResolverConfigError,
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 ID of the Amazon Virtual Private Cloud VPC or a Route 53 Profile that you're configuring Resolver for.</p>
112 pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.resource_id(input.into());
114 self
115 }
116 /// <p>The ID of the Amazon Virtual Private Cloud VPC or a Route 53 Profile that you're configuring Resolver for.</p>
117 pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_resource_id(input);
119 self
120 }
121 /// <p>The ID of the Amazon Virtual Private Cloud VPC or a Route 53 Profile that you're configuring Resolver for.</p>
122 pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_resource_id()
124 }
125 /// <p>Indicates whether or not the Resolver will create autodefined rules for reverse DNS lookups. This is enabled by default. Disabling this option will also affect EC2-Classic instances using ClassicLink. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html">ClassicLink</a> in the <i>Amazon EC2 guide</i>.</p><important>
126 /// <p>We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon EC2 guide</i> and the blog <a href="http://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/">EC2-Classic Networking is Retiring – Here’s How to Prepare</a>.</p>
127 /// </important> <note>
128 /// <p>It can take some time for the status change to be completed.</p>
129 /// </note>
130 /// <p></p>
131 pub fn autodefined_reverse_flag(mut self, input: crate::types::AutodefinedReverseFlag) -> Self {
132 self.inner = self.inner.autodefined_reverse_flag(input);
133 self
134 }
135 /// <p>Indicates whether or not the Resolver will create autodefined rules for reverse DNS lookups. This is enabled by default. Disabling this option will also affect EC2-Classic instances using ClassicLink. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html">ClassicLink</a> in the <i>Amazon EC2 guide</i>.</p><important>
136 /// <p>We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon EC2 guide</i> and the blog <a href="http://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/">EC2-Classic Networking is Retiring – Here’s How to Prepare</a>.</p>
137 /// </important> <note>
138 /// <p>It can take some time for the status change to be completed.</p>
139 /// </note>
140 /// <p></p>
141 pub fn set_autodefined_reverse_flag(mut self, input: ::std::option::Option<crate::types::AutodefinedReverseFlag>) -> Self {
142 self.inner = self.inner.set_autodefined_reverse_flag(input);
143 self
144 }
145 /// <p>Indicates whether or not the Resolver will create autodefined rules for reverse DNS lookups. This is enabled by default. Disabling this option will also affect EC2-Classic instances using ClassicLink. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html">ClassicLink</a> in the <i>Amazon EC2 guide</i>.</p><important>
146 /// <p>We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon EC2 guide</i> and the blog <a href="http://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/">EC2-Classic Networking is Retiring – Here’s How to Prepare</a>.</p>
147 /// </important> <note>
148 /// <p>It can take some time for the status change to be completed.</p>
149 /// </note>
150 /// <p></p>
151 pub fn get_autodefined_reverse_flag(&self) -> &::std::option::Option<crate::types::AutodefinedReverseFlag> {
152 self.inner.get_autodefined_reverse_flag()
153 }
154}