aws_sdk_route53resolver/operation/update_resolver_endpoint/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_resolver_endpoint::_update_resolver_endpoint_output::UpdateResolverEndpointOutputBuilder;
3
4pub use crate::operation::update_resolver_endpoint::_update_resolver_endpoint_input::UpdateResolverEndpointInputBuilder;
5
6impl crate::operation::update_resolver_endpoint::builders::UpdateResolverEndpointInputBuilder {
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_endpoint::UpdateResolverEndpointOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_resolver_endpoint::UpdateResolverEndpointError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_resolver_endpoint();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateResolverEndpoint`.
24///
25/// <p>Updates the name, or endpoint type for an inbound or an outbound Resolver endpoint. You can only update between IPV4 and DUALSTACK, IPV6 endpoint type can't be updated to other type.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateResolverEndpointFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_resolver_endpoint::builders::UpdateResolverEndpointInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_resolver_endpoint::UpdateResolverEndpointOutput,
35        crate::operation::update_resolver_endpoint::UpdateResolverEndpointError,
36    > for UpdateResolverEndpointFluentBuilder
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_endpoint::UpdateResolverEndpointOutput,
44            crate::operation::update_resolver_endpoint::UpdateResolverEndpointError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateResolverEndpointFluentBuilder {
51    /// Creates a new `UpdateResolverEndpointFluentBuilder`.
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 UpdateResolverEndpoint as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_resolver_endpoint::builders::UpdateResolverEndpointInputBuilder {
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_endpoint::UpdateResolverEndpointOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_resolver_endpoint::UpdateResolverEndpointError,
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_endpoint::UpdateResolverEndpoint::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_resolver_endpoint::UpdateResolverEndpoint::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_endpoint::UpdateResolverEndpointOutput,
97        crate::operation::update_resolver_endpoint::UpdateResolverEndpointError,
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 Resolver endpoint that you want to update.</p>
112    pub fn resolver_endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.resolver_endpoint_id(input.into());
114        self
115    }
116    /// <p>The ID of the Resolver endpoint that you want to update.</p>
117    pub fn set_resolver_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_resolver_endpoint_id(input);
119        self
120    }
121    /// <p>The ID of the Resolver endpoint that you want to update.</p>
122    pub fn get_resolver_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_resolver_endpoint_id()
124    }
125    /// <p>The name of the Resolver endpoint that you want to update.</p>
126    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.name(input.into());
128        self
129    }
130    /// <p>The name of the Resolver endpoint that you want to update.</p>
131    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_name(input);
133        self
134    }
135    /// <p>The name of the Resolver endpoint that you want to update.</p>
136    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_name()
138    }
139    /// <p>Specifies the endpoint type for what type of IP address the endpoint uses to forward DNS queries.</p>
140    /// <p>Updating to <code>IPV6</code> type isn't currently supported.</p>
141    pub fn resolver_endpoint_type(mut self, input: crate::types::ResolverEndpointType) -> Self {
142        self.inner = self.inner.resolver_endpoint_type(input);
143        self
144    }
145    /// <p>Specifies the endpoint type for what type of IP address the endpoint uses to forward DNS queries.</p>
146    /// <p>Updating to <code>IPV6</code> type isn't currently supported.</p>
147    pub fn set_resolver_endpoint_type(mut self, input: ::std::option::Option<crate::types::ResolverEndpointType>) -> Self {
148        self.inner = self.inner.set_resolver_endpoint_type(input);
149        self
150    }
151    /// <p>Specifies the endpoint type for what type of IP address the endpoint uses to forward DNS queries.</p>
152    /// <p>Updating to <code>IPV6</code> type isn't currently supported.</p>
153    pub fn get_resolver_endpoint_type(&self) -> &::std::option::Option<crate::types::ResolverEndpointType> {
154        self.inner.get_resolver_endpoint_type()
155    }
156    ///
157    /// Appends an item to `UpdateIpAddresses`.
158    ///
159    /// To override the contents of this collection use [`set_update_ip_addresses`](Self::set_update_ip_addresses).
160    ///
161    /// <p>Specifies the IPv6 address when you update the Resolver endpoint from IPv4 to dual-stack. If you don't specify an IPv6 address, one will be automatically chosen from your subnet.</p>
162    pub fn update_ip_addresses(mut self, input: crate::types::UpdateIpAddress) -> Self {
163        self.inner = self.inner.update_ip_addresses(input);
164        self
165    }
166    /// <p>Specifies the IPv6 address when you update the Resolver endpoint from IPv4 to dual-stack. If you don't specify an IPv6 address, one will be automatically chosen from your subnet.</p>
167    pub fn set_update_ip_addresses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UpdateIpAddress>>) -> Self {
168        self.inner = self.inner.set_update_ip_addresses(input);
169        self
170    }
171    /// <p>Specifies the IPv6 address when you update the Resolver endpoint from IPv4 to dual-stack. If you don't specify an IPv6 address, one will be automatically chosen from your subnet.</p>
172    pub fn get_update_ip_addresses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UpdateIpAddress>> {
173        self.inner.get_update_ip_addresses()
174    }
175    ///
176    /// Appends an item to `Protocols`.
177    ///
178    /// To override the contents of this collection use [`set_protocols`](Self::set_protocols).
179    ///
180    /// <p>The protocols you want to use for the endpoint. DoH-FIPS is applicable for default inbound endpoints only.</p>
181    /// <p>For a default inbound endpoint you can apply the protocols as follows:</p>
182    /// <ul>
183    /// <li>
184    /// <p>Do53 and DoH in combination.</p></li>
185    /// <li>
186    /// <p>Do53 and DoH-FIPS in combination.</p></li>
187    /// <li>
188    /// <p>Do53 alone.</p></li>
189    /// <li>
190    /// <p>DoH alone.</p></li>
191    /// <li>
192    /// <p>DoH-FIPS alone.</p></li>
193    /// <li>
194    /// <p>None, which is treated as Do53.</p></li>
195    /// </ul>
196    /// <p>For a delegation inbound endpoint you can use Do53 only.</p>
197    /// <p>For an outbound endpoint you can apply the protocols as follows:</p>
198    /// <ul>
199    /// <li>
200    /// <p>Do53 and DoH in combination.</p></li>
201    /// <li>
202    /// <p>Do53 alone.</p></li>
203    /// <li>
204    /// <p>DoH alone.</p></li>
205    /// <li>
206    /// <p>None, which is treated as Do53.</p></li>
207    /// </ul><important>
208    /// <p>You can't change the protocol of an inbound endpoint directly from only Do53 to only DoH, or DoH-FIPS. This is to prevent a sudden disruption to incoming traffic that relies on Do53. To change the protocol from Do53 to DoH, or DoH-FIPS, you must first enable both Do53 and DoH, or Do53 and DoH-FIPS, to make sure that all incoming traffic has transferred to using the DoH protocol, or DoH-FIPS, and then remove the Do53.</p>
209    /// </important>
210    pub fn protocols(mut self, input: crate::types::Protocol) -> Self {
211        self.inner = self.inner.protocols(input);
212        self
213    }
214    /// <p>The protocols you want to use for the endpoint. DoH-FIPS is applicable for default inbound endpoints only.</p>
215    /// <p>For a default inbound endpoint you can apply the protocols as follows:</p>
216    /// <ul>
217    /// <li>
218    /// <p>Do53 and DoH in combination.</p></li>
219    /// <li>
220    /// <p>Do53 and DoH-FIPS in combination.</p></li>
221    /// <li>
222    /// <p>Do53 alone.</p></li>
223    /// <li>
224    /// <p>DoH alone.</p></li>
225    /// <li>
226    /// <p>DoH-FIPS alone.</p></li>
227    /// <li>
228    /// <p>None, which is treated as Do53.</p></li>
229    /// </ul>
230    /// <p>For a delegation inbound endpoint you can use Do53 only.</p>
231    /// <p>For an outbound endpoint you can apply the protocols as follows:</p>
232    /// <ul>
233    /// <li>
234    /// <p>Do53 and DoH in combination.</p></li>
235    /// <li>
236    /// <p>Do53 alone.</p></li>
237    /// <li>
238    /// <p>DoH alone.</p></li>
239    /// <li>
240    /// <p>None, which is treated as Do53.</p></li>
241    /// </ul><important>
242    /// <p>You can't change the protocol of an inbound endpoint directly from only Do53 to only DoH, or DoH-FIPS. This is to prevent a sudden disruption to incoming traffic that relies on Do53. To change the protocol from Do53 to DoH, or DoH-FIPS, you must first enable both Do53 and DoH, or Do53 and DoH-FIPS, to make sure that all incoming traffic has transferred to using the DoH protocol, or DoH-FIPS, and then remove the Do53.</p>
243    /// </important>
244    pub fn set_protocols(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Protocol>>) -> Self {
245        self.inner = self.inner.set_protocols(input);
246        self
247    }
248    /// <p>The protocols you want to use for the endpoint. DoH-FIPS is applicable for default inbound endpoints only.</p>
249    /// <p>For a default inbound endpoint you can apply the protocols as follows:</p>
250    /// <ul>
251    /// <li>
252    /// <p>Do53 and DoH in combination.</p></li>
253    /// <li>
254    /// <p>Do53 and DoH-FIPS in combination.</p></li>
255    /// <li>
256    /// <p>Do53 alone.</p></li>
257    /// <li>
258    /// <p>DoH alone.</p></li>
259    /// <li>
260    /// <p>DoH-FIPS alone.</p></li>
261    /// <li>
262    /// <p>None, which is treated as Do53.</p></li>
263    /// </ul>
264    /// <p>For a delegation inbound endpoint you can use Do53 only.</p>
265    /// <p>For an outbound endpoint you can apply the protocols as follows:</p>
266    /// <ul>
267    /// <li>
268    /// <p>Do53 and DoH in combination.</p></li>
269    /// <li>
270    /// <p>Do53 alone.</p></li>
271    /// <li>
272    /// <p>DoH alone.</p></li>
273    /// <li>
274    /// <p>None, which is treated as Do53.</p></li>
275    /// </ul><important>
276    /// <p>You can't change the protocol of an inbound endpoint directly from only Do53 to only DoH, or DoH-FIPS. This is to prevent a sudden disruption to incoming traffic that relies on Do53. To change the protocol from Do53 to DoH, or DoH-FIPS, you must first enable both Do53 and DoH, or Do53 and DoH-FIPS, to make sure that all incoming traffic has transferred to using the DoH protocol, or DoH-FIPS, and then remove the Do53.</p>
277    /// </important>
278    pub fn get_protocols(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Protocol>> {
279        self.inner.get_protocols()
280    }
281}