aws_sdk_ec2/operation/describe_route_servers/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_route_servers::_describe_route_servers_output::DescribeRouteServersOutputBuilder;
3
4pub use crate::operation::describe_route_servers::_describe_route_servers_input::DescribeRouteServersInputBuilder;
5
6impl crate::operation::describe_route_servers::builders::DescribeRouteServersInputBuilder {
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::describe_route_servers::DescribeRouteServersOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_route_servers::DescribeRouteServersError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_route_servers();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeRouteServers`.
24///
25/// <p>Describes one or more route servers.</p>
26/// <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>
27/// <p>Route server supports the follow route table types:</p>
28/// <ul>
29/// <li>
30/// <p>VPC route tables not associated with subnets</p></li>
31/// <li>
32/// <p>Subnet route tables</p></li>
33/// <li>
34/// <p>Internet gateway route tables</p></li>
35/// </ul>
36/// <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>
37/// <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>
38#[derive(::std::clone::Clone, ::std::fmt::Debug)]
39pub struct DescribeRouteServersFluentBuilder {
40    handle: ::std::sync::Arc<crate::client::Handle>,
41    inner: crate::operation::describe_route_servers::builders::DescribeRouteServersInputBuilder,
42    config_override: ::std::option::Option<crate::config::Builder>,
43}
44impl
45    crate::client::customize::internal::CustomizableSend<
46        crate::operation::describe_route_servers::DescribeRouteServersOutput,
47        crate::operation::describe_route_servers::DescribeRouteServersError,
48    > for DescribeRouteServersFluentBuilder
49{
50    fn send(
51        self,
52        config_override: crate::config::Builder,
53    ) -> crate::client::customize::internal::BoxFuture<
54        crate::client::customize::internal::SendResult<
55            crate::operation::describe_route_servers::DescribeRouteServersOutput,
56            crate::operation::describe_route_servers::DescribeRouteServersError,
57        >,
58    > {
59        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
60    }
61}
62impl DescribeRouteServersFluentBuilder {
63    /// Creates a new `DescribeRouteServersFluentBuilder`.
64    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
65        Self {
66            handle,
67            inner: ::std::default::Default::default(),
68            config_override: ::std::option::Option::None,
69        }
70    }
71    /// Access the DescribeRouteServers as a reference.
72    pub fn as_input(&self) -> &crate::operation::describe_route_servers::builders::DescribeRouteServersInputBuilder {
73        &self.inner
74    }
75    /// Sends the request and returns the response.
76    ///
77    /// If an error occurs, an `SdkError` will be returned with additional details that
78    /// can be matched against.
79    ///
80    /// By default, any retryable failures will be retried twice. Retry behavior
81    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
82    /// set when configuring the client.
83    pub async fn send(
84        self,
85    ) -> ::std::result::Result<
86        crate::operation::describe_route_servers::DescribeRouteServersOutput,
87        ::aws_smithy_runtime_api::client::result::SdkError<
88            crate::operation::describe_route_servers::DescribeRouteServersError,
89            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
90        >,
91    > {
92        let input = self
93            .inner
94            .build()
95            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
96        let runtime_plugins = crate::operation::describe_route_servers::DescribeRouteServers::operation_runtime_plugins(
97            self.handle.runtime_plugins.clone(),
98            &self.handle.conf,
99            self.config_override,
100        );
101        crate::operation::describe_route_servers::DescribeRouteServers::orchestrate(&runtime_plugins, input).await
102    }
103
104    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
105    pub fn customize(
106        self,
107    ) -> crate::client::customize::CustomizableOperation<
108        crate::operation::describe_route_servers::DescribeRouteServersOutput,
109        crate::operation::describe_route_servers::DescribeRouteServersError,
110        Self,
111    > {
112        crate::client::customize::CustomizableOperation::new(self)
113    }
114    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
115        self.set_config_override(::std::option::Option::Some(config_override.into()));
116        self
117    }
118
119    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
120        self.config_override = config_override;
121        self
122    }
123    /// Create a paginator for this request
124    ///
125    /// Paginators are used by calling [`send().await`](crate::operation::describe_route_servers::paginator::DescribeRouteServersPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
126    pub fn into_paginator(self) -> crate::operation::describe_route_servers::paginator::DescribeRouteServersPaginator {
127        crate::operation::describe_route_servers::paginator::DescribeRouteServersPaginator::new(self.handle, self.inner)
128    }
129    ///
130    /// Appends an item to `RouteServerIds`.
131    ///
132    /// To override the contents of this collection use [`set_route_server_ids`](Self::set_route_server_ids).
133    ///
134    /// <p>The IDs of the route servers to describe.</p>
135    pub fn route_server_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.inner = self.inner.route_server_ids(input.into());
137        self
138    }
139    /// <p>The IDs of the route servers to describe.</p>
140    pub fn set_route_server_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
141        self.inner = self.inner.set_route_server_ids(input);
142        self
143    }
144    /// <p>The IDs of the route servers to describe.</p>
145    pub fn get_route_server_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
146        self.inner.get_route_server_ids()
147    }
148    /// <p>The token for the next page of results.</p>
149    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.inner = self.inner.next_token(input.into());
151        self
152    }
153    /// <p>The token for the next page of results.</p>
154    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.inner = self.inner.set_next_token(input);
156        self
157    }
158    /// <p>The token for the next page of results.</p>
159    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
160        self.inner.get_next_token()
161    }
162    /// <p>The maximum number of results to return with a single call.</p>
163    pub fn max_results(mut self, input: i32) -> Self {
164        self.inner = self.inner.max_results(input);
165        self
166    }
167    /// <p>The maximum number of results to return with a single call.</p>
168    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
169        self.inner = self.inner.set_max_results(input);
170        self
171    }
172    /// <p>The maximum number of results to return with a single call.</p>
173    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
174        self.inner.get_max_results()
175    }
176    ///
177    /// Appends an item to `Filters`.
178    ///
179    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
180    ///
181    /// <p>One or more filters to apply to the describe request.</p>
182    pub fn filters(mut self, input: crate::types::Filter) -> Self {
183        self.inner = self.inner.filters(input);
184        self
185    }
186    /// <p>One or more filters to apply to the describe request.</p>
187    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
188        self.inner = self.inner.set_filters(input);
189        self
190    }
191    /// <p>One or more filters to apply to the describe request.</p>
192    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
193        self.inner.get_filters()
194    }
195    /// <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>
196    pub fn dry_run(mut self, input: bool) -> Self {
197        self.inner = self.inner.dry_run(input);
198        self
199    }
200    /// <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>
201    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
202        self.inner = self.inner.set_dry_run(input);
203        self
204    }
205    /// <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>
206    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
207        self.inner.get_dry_run()
208    }
209}