aws_sdk_ec2/operation/get_route_server_routing_database/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_route_server_routing_database::_get_route_server_routing_database_output::GetRouteServerRoutingDatabaseOutputBuilder;
3
4pub use crate::operation::get_route_server_routing_database::_get_route_server_routing_database_input::GetRouteServerRoutingDatabaseInputBuilder;
5
6impl crate::operation::get_route_server_routing_database::builders::GetRouteServerRoutingDatabaseInputBuilder {
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::get_route_server_routing_database::GetRouteServerRoutingDatabaseOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_route_server_routing_database::GetRouteServerRoutingDatabaseError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_route_server_routing_database();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetRouteServerRoutingDatabase`.
24///
25/// <p>Gets the routing database for the specified route server. The <a href="https://en.wikipedia.org/wiki/Routing_table">Routing Information Base (RIB)</a> serves as a database that stores all the routing information and network topology data collected by a router or routing system, such as routes learned from BGP peers. The RIB is constantly updated as new routing information is received or existing routes change. This ensures that the route server always has the most current view of the network topology and can make optimal routing decisions.</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#[derive(::std::clone::Clone, ::std::fmt::Debug)]
38pub struct GetRouteServerRoutingDatabaseFluentBuilder {
39    handle: ::std::sync::Arc<crate::client::Handle>,
40    inner: crate::operation::get_route_server_routing_database::builders::GetRouteServerRoutingDatabaseInputBuilder,
41    config_override: ::std::option::Option<crate::config::Builder>,
42}
43impl
44    crate::client::customize::internal::CustomizableSend<
45        crate::operation::get_route_server_routing_database::GetRouteServerRoutingDatabaseOutput,
46        crate::operation::get_route_server_routing_database::GetRouteServerRoutingDatabaseError,
47    > for GetRouteServerRoutingDatabaseFluentBuilder
48{
49    fn send(
50        self,
51        config_override: crate::config::Builder,
52    ) -> crate::client::customize::internal::BoxFuture<
53        crate::client::customize::internal::SendResult<
54            crate::operation::get_route_server_routing_database::GetRouteServerRoutingDatabaseOutput,
55            crate::operation::get_route_server_routing_database::GetRouteServerRoutingDatabaseError,
56        >,
57    > {
58        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
59    }
60}
61impl GetRouteServerRoutingDatabaseFluentBuilder {
62    /// Creates a new `GetRouteServerRoutingDatabaseFluentBuilder`.
63    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
64        Self {
65            handle,
66            inner: ::std::default::Default::default(),
67            config_override: ::std::option::Option::None,
68        }
69    }
70    /// Access the GetRouteServerRoutingDatabase as a reference.
71    pub fn as_input(&self) -> &crate::operation::get_route_server_routing_database::builders::GetRouteServerRoutingDatabaseInputBuilder {
72        &self.inner
73    }
74    /// Sends the request and returns the response.
75    ///
76    /// If an error occurs, an `SdkError` will be returned with additional details that
77    /// can be matched against.
78    ///
79    /// By default, any retryable failures will be retried twice. Retry behavior
80    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
81    /// set when configuring the client.
82    pub async fn send(
83        self,
84    ) -> ::std::result::Result<
85        crate::operation::get_route_server_routing_database::GetRouteServerRoutingDatabaseOutput,
86        ::aws_smithy_runtime_api::client::result::SdkError<
87            crate::operation::get_route_server_routing_database::GetRouteServerRoutingDatabaseError,
88            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
89        >,
90    > {
91        let input = self
92            .inner
93            .build()
94            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
95        let runtime_plugins = crate::operation::get_route_server_routing_database::GetRouteServerRoutingDatabase::operation_runtime_plugins(
96            self.handle.runtime_plugins.clone(),
97            &self.handle.conf,
98            self.config_override,
99        );
100        crate::operation::get_route_server_routing_database::GetRouteServerRoutingDatabase::orchestrate(&runtime_plugins, input).await
101    }
102
103    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
104    pub fn customize(
105        self,
106    ) -> crate::client::customize::CustomizableOperation<
107        crate::operation::get_route_server_routing_database::GetRouteServerRoutingDatabaseOutput,
108        crate::operation::get_route_server_routing_database::GetRouteServerRoutingDatabaseError,
109        Self,
110    > {
111        crate::client::customize::CustomizableOperation::new(self)
112    }
113    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
114        self.set_config_override(::std::option::Option::Some(config_override.into()));
115        self
116    }
117
118    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
119        self.config_override = config_override;
120        self
121    }
122    /// <p>The ID of the route server for which to get the routing database.</p>
123    pub fn route_server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.inner = self.inner.route_server_id(input.into());
125        self
126    }
127    /// <p>The ID of the route server for which to get the routing database.</p>
128    pub fn set_route_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.inner = self.inner.set_route_server_id(input);
130        self
131    }
132    /// <p>The ID of the route server for which to get the routing database.</p>
133    pub fn get_route_server_id(&self) -> &::std::option::Option<::std::string::String> {
134        self.inner.get_route_server_id()
135    }
136    /// <p>The token for the next page of results.</p>
137    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.inner = self.inner.next_token(input.into());
139        self
140    }
141    /// <p>The token for the next page of results.</p>
142    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.inner = self.inner.set_next_token(input);
144        self
145    }
146    /// <p>The token for the next page of results.</p>
147    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
148        self.inner.get_next_token()
149    }
150    /// <p>The maximum number of routing database entries to return in a single response.</p>
151    pub fn max_results(mut self, input: i32) -> Self {
152        self.inner = self.inner.max_results(input);
153        self
154    }
155    /// <p>The maximum number of routing database entries to return in a single response.</p>
156    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
157        self.inner = self.inner.set_max_results(input);
158        self
159    }
160    /// <p>The maximum number of routing database entries to return in a single response.</p>
161    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
162        self.inner.get_max_results()
163    }
164    /// <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>
165    pub fn dry_run(mut self, input: bool) -> Self {
166        self.inner = self.inner.dry_run(input);
167        self
168    }
169    /// <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>
170    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
171        self.inner = self.inner.set_dry_run(input);
172        self
173    }
174    /// <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>
175    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
176        self.inner.get_dry_run()
177    }
178    ///
179    /// Appends an item to `Filters`.
180    ///
181    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
182    ///
183    /// <p>Filters to apply to the routing database query.</p>
184    pub fn filters(mut self, input: crate::types::Filter) -> Self {
185        self.inner = self.inner.filters(input);
186        self
187    }
188    /// <p>Filters to apply to the routing database query.</p>
189    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
190        self.inner = self.inner.set_filters(input);
191        self
192    }
193    /// <p>Filters to apply to the routing database query.</p>
194    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
195        self.inner.get_filters()
196    }
197}