aws_sdk_ec2/operation/disable_route_server_propagation/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::disable_route_server_propagation::_disable_route_server_propagation_output::DisableRouteServerPropagationOutputBuilder;
3
4pub use crate::operation::disable_route_server_propagation::_disable_route_server_propagation_input::DisableRouteServerPropagationInputBuilder;
5
6impl crate::operation::disable_route_server_propagation::builders::DisableRouteServerPropagationInputBuilder {
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::disable_route_server_propagation::DisableRouteServerPropagationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::disable_route_server_propagation::DisableRouteServerPropagationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.disable_route_server_propagation();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DisableRouteServerPropagation`.
24///
25/// <p>Disables route propagation from a route server to a specified route table.</p>
26/// <p>When enabled, route server propagation installs the routes in the FIB on the route table you've specified. Route server supports IPv4 and IPv6 route propagation.</p>
27/// <p>Amazon VPC Route Server simplifies routing for traffic between workloads that are deployed within a VPC and its internet gateways. With this feature, VPC Route Server dynamically updates VPC and internet gateway route tables with your preferred IPv4 or IPv6 routes to achieve routing fault tolerance for those workloads. This enables you to automatically reroute traffic within a VPC, which increases the manageability of VPC routing and interoperability with third-party workloads.</p>
28/// <p>Route server supports the follow route table types:</p>
29/// <ul>
30/// <li>
31/// <p>VPC route tables not associated with subnets</p></li>
32/// <li>
33/// <p>Subnet route tables</p></li>
34/// <li>
35/// <p>Internet gateway route tables</p></li>
36/// </ul>
37/// <p>Route server does not support route tables associated with virtual private gateways. To propagate routes into a transit gateway route table, use <a href="https://docs.aws.amazon.com/vpc/latest/tgw/tgw-connect.html">Transit Gateway Connect</a>.</p>
38/// <p>For more information see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/dynamic-routing-route-server.html">Dynamic routing in your VPC with VPC Route Server</a> in the <i>Amazon VPC User Guide</i>.</p>
39#[derive(::std::clone::Clone, ::std::fmt::Debug)]
40pub struct DisableRouteServerPropagationFluentBuilder {
41    handle: ::std::sync::Arc<crate::client::Handle>,
42    inner: crate::operation::disable_route_server_propagation::builders::DisableRouteServerPropagationInputBuilder,
43    config_override: ::std::option::Option<crate::config::Builder>,
44}
45impl
46    crate::client::customize::internal::CustomizableSend<
47        crate::operation::disable_route_server_propagation::DisableRouteServerPropagationOutput,
48        crate::operation::disable_route_server_propagation::DisableRouteServerPropagationError,
49    > for DisableRouteServerPropagationFluentBuilder
50{
51    fn send(
52        self,
53        config_override: crate::config::Builder,
54    ) -> crate::client::customize::internal::BoxFuture<
55        crate::client::customize::internal::SendResult<
56            crate::operation::disable_route_server_propagation::DisableRouteServerPropagationOutput,
57            crate::operation::disable_route_server_propagation::DisableRouteServerPropagationError,
58        >,
59    > {
60        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
61    }
62}
63impl DisableRouteServerPropagationFluentBuilder {
64    /// Creates a new `DisableRouteServerPropagationFluentBuilder`.
65    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
66        Self {
67            handle,
68            inner: ::std::default::Default::default(),
69            config_override: ::std::option::Option::None,
70        }
71    }
72    /// Access the DisableRouteServerPropagation as a reference.
73    pub fn as_input(&self) -> &crate::operation::disable_route_server_propagation::builders::DisableRouteServerPropagationInputBuilder {
74        &self.inner
75    }
76    /// Sends the request and returns the response.
77    ///
78    /// If an error occurs, an `SdkError` will be returned with additional details that
79    /// can be matched against.
80    ///
81    /// By default, any retryable failures will be retried twice. Retry behavior
82    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
83    /// set when configuring the client.
84    pub async fn send(
85        self,
86    ) -> ::std::result::Result<
87        crate::operation::disable_route_server_propagation::DisableRouteServerPropagationOutput,
88        ::aws_smithy_runtime_api::client::result::SdkError<
89            crate::operation::disable_route_server_propagation::DisableRouteServerPropagationError,
90            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
91        >,
92    > {
93        let input = self
94            .inner
95            .build()
96            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
97        let runtime_plugins = crate::operation::disable_route_server_propagation::DisableRouteServerPropagation::operation_runtime_plugins(
98            self.handle.runtime_plugins.clone(),
99            &self.handle.conf,
100            self.config_override,
101        );
102        crate::operation::disable_route_server_propagation::DisableRouteServerPropagation::orchestrate(&runtime_plugins, input).await
103    }
104
105    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
106    pub fn customize(
107        self,
108    ) -> crate::client::customize::CustomizableOperation<
109        crate::operation::disable_route_server_propagation::DisableRouteServerPropagationOutput,
110        crate::operation::disable_route_server_propagation::DisableRouteServerPropagationError,
111        Self,
112    > {
113        crate::client::customize::CustomizableOperation::new(self)
114    }
115    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
116        self.set_config_override(::std::option::Option::Some(config_override.into()));
117        self
118    }
119
120    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
121        self.config_override = config_override;
122        self
123    }
124    /// <p>The ID of the route server for which to disable propagation.</p>
125    pub fn route_server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.inner = self.inner.route_server_id(input.into());
127        self
128    }
129    /// <p>The ID of the route server for which to disable propagation.</p>
130    pub fn set_route_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.inner = self.inner.set_route_server_id(input);
132        self
133    }
134    /// <p>The ID of the route server for which to disable propagation.</p>
135    pub fn get_route_server_id(&self) -> &::std::option::Option<::std::string::String> {
136        self.inner.get_route_server_id()
137    }
138    /// <p>The ID of the route table for which to disable route server propagation.</p>
139    pub fn route_table_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.inner = self.inner.route_table_id(input.into());
141        self
142    }
143    /// <p>The ID of the route table for which to disable route server propagation.</p>
144    pub fn set_route_table_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.inner = self.inner.set_route_table_id(input);
146        self
147    }
148    /// <p>The ID of the route table for which to disable route server propagation.</p>
149    pub fn get_route_table_id(&self) -> &::std::option::Option<::std::string::String> {
150        self.inner.get_route_table_id()
151    }
152    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
153    pub fn dry_run(mut self, input: bool) -> Self {
154        self.inner = self.inner.dry_run(input);
155        self
156    }
157    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
158    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
159        self.inner = self.inner.set_dry_run(input);
160        self
161    }
162    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
163    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
164        self.inner.get_dry_run()
165    }
166}