aws_sdk_rds/operation/describe_global_clusters/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_global_clusters::_describe_global_clusters_output::DescribeGlobalClustersOutputBuilder;
3
4pub use crate::operation::describe_global_clusters::_describe_global_clusters_input::DescribeGlobalClustersInputBuilder;
5
6impl crate::operation::describe_global_clusters::builders::DescribeGlobalClustersInputBuilder {
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_global_clusters::DescribeGlobalClustersOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_global_clusters::DescribeGlobalClustersError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_global_clusters();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeGlobalClusters`.
24///
25/// <p>Returns information about Aurora global database clusters. This API supports pagination.</p>
26/// <p>For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html"> What is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide</i>.</p><note>
27/// <p>This action only applies to Aurora DB clusters.</p>
28/// </note>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct DescribeGlobalClustersFluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::describe_global_clusters::builders::DescribeGlobalClustersInputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36    crate::client::customize::internal::CustomizableSend<
37        crate::operation::describe_global_clusters::DescribeGlobalClustersOutput,
38        crate::operation::describe_global_clusters::DescribeGlobalClustersError,
39    > for DescribeGlobalClustersFluentBuilder
40{
41    fn send(
42        self,
43        config_override: crate::config::Builder,
44    ) -> crate::client::customize::internal::BoxFuture<
45        crate::client::customize::internal::SendResult<
46            crate::operation::describe_global_clusters::DescribeGlobalClustersOutput,
47            crate::operation::describe_global_clusters::DescribeGlobalClustersError,
48        >,
49    > {
50        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51    }
52}
53impl DescribeGlobalClustersFluentBuilder {
54    /// Creates a new `DescribeGlobalClustersFluentBuilder`.
55    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56        Self {
57            handle,
58            inner: ::std::default::Default::default(),
59            config_override: ::std::option::Option::None,
60        }
61    }
62    /// Access the DescribeGlobalClusters as a reference.
63    pub fn as_input(&self) -> &crate::operation::describe_global_clusters::builders::DescribeGlobalClustersInputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::describe_global_clusters::DescribeGlobalClustersOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::describe_global_clusters::DescribeGlobalClustersError,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins = crate::operation::describe_global_clusters::DescribeGlobalClusters::operation_runtime_plugins(
88            self.handle.runtime_plugins.clone(),
89            &self.handle.conf,
90            self.config_override,
91        );
92        crate::operation::describe_global_clusters::DescribeGlobalClusters::orchestrate(&runtime_plugins, input).await
93    }
94
95    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96    pub fn customize(
97        self,
98    ) -> crate::client::customize::CustomizableOperation<
99        crate::operation::describe_global_clusters::DescribeGlobalClustersOutput,
100        crate::operation::describe_global_clusters::DescribeGlobalClustersError,
101        Self,
102    > {
103        crate::client::customize::CustomizableOperation::new(self)
104    }
105    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106        self.set_config_override(::std::option::Option::Some(config_override.into()));
107        self
108    }
109
110    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111        self.config_override = config_override;
112        self
113    }
114    /// Create a paginator for this request
115    ///
116    /// Paginators are used by calling [`send().await`](crate::operation::describe_global_clusters::paginator::DescribeGlobalClustersPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
117    pub fn into_paginator(self) -> crate::operation::describe_global_clusters::paginator::DescribeGlobalClustersPaginator {
118        crate::operation::describe_global_clusters::paginator::DescribeGlobalClustersPaginator::new(self.handle, self.inner)
119    }
120    /// <p>The user-supplied DB cluster identifier. If this parameter is specified, information from only the specific DB cluster is returned. This parameter isn't case-sensitive.</p>
121    /// <p>Constraints:</p>
122    /// <ul>
123    /// <li>
124    /// <p>If supplied, must match an existing DBClusterIdentifier.</p></li>
125    /// </ul>
126    pub fn global_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.global_cluster_identifier(input.into());
128        self
129    }
130    /// <p>The user-supplied DB cluster identifier. If this parameter is specified, information from only the specific DB cluster is returned. This parameter isn't case-sensitive.</p>
131    /// <p>Constraints:</p>
132    /// <ul>
133    /// <li>
134    /// <p>If supplied, must match an existing DBClusterIdentifier.</p></li>
135    /// </ul>
136    pub fn set_global_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.inner = self.inner.set_global_cluster_identifier(input);
138        self
139    }
140    /// <p>The user-supplied DB cluster identifier. If this parameter is specified, information from only the specific DB cluster is returned. This parameter isn't case-sensitive.</p>
141    /// <p>Constraints:</p>
142    /// <ul>
143    /// <li>
144    /// <p>If supplied, must match an existing DBClusterIdentifier.</p></li>
145    /// </ul>
146    pub fn get_global_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
147        self.inner.get_global_cluster_identifier()
148    }
149    ///
150    /// Appends an item to `Filters`.
151    ///
152    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
153    ///
154    /// <p>A filter that specifies one or more global database clusters to describe. This parameter is case-sensitive.</p>
155    /// <p>Currently, the only supported filter is <code>region</code>.</p>
156    /// <p>If used, the request returns information about any global cluster with at least one member (primary or secondary) in the specified Amazon Web Services Regions.</p>
157    pub fn filters(mut self, input: crate::types::Filter) -> Self {
158        self.inner = self.inner.filters(input);
159        self
160    }
161    /// <p>A filter that specifies one or more global database clusters to describe. This parameter is case-sensitive.</p>
162    /// <p>Currently, the only supported filter is <code>region</code>.</p>
163    /// <p>If used, the request returns information about any global cluster with at least one member (primary or secondary) in the specified Amazon Web Services Regions.</p>
164    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
165        self.inner = self.inner.set_filters(input);
166        self
167    }
168    /// <p>A filter that specifies one or more global database clusters to describe. This parameter is case-sensitive.</p>
169    /// <p>Currently, the only supported filter is <code>region</code>.</p>
170    /// <p>If used, the request returns information about any global cluster with at least one member (primary or secondary) in the specified Amazon Web Services Regions.</p>
171    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
172        self.inner.get_filters()
173    }
174    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p>
175    /// <p>Default: 100</p>
176    /// <p>Constraints: Minimum 20, maximum 100.</p>
177    pub fn max_records(mut self, input: i32) -> Self {
178        self.inner = self.inner.max_records(input);
179        self
180    }
181    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p>
182    /// <p>Default: 100</p>
183    /// <p>Constraints: Minimum 20, maximum 100.</p>
184    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
185        self.inner = self.inner.set_max_records(input);
186        self
187    }
188    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p>
189    /// <p>Default: 100</p>
190    /// <p>Constraints: Minimum 20, maximum 100.</p>
191    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
192        self.inner.get_max_records()
193    }
194    /// <p>An optional pagination token provided by a previous <code>DescribeGlobalClusters</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
195    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196        self.inner = self.inner.marker(input.into());
197        self
198    }
199    /// <p>An optional pagination token provided by a previous <code>DescribeGlobalClusters</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
200    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201        self.inner = self.inner.set_marker(input);
202        self
203    }
204    /// <p>An optional pagination token provided by a previous <code>DescribeGlobalClusters</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
205    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
206        self.inner.get_marker()
207    }
208}