aws_sdk_rds/operation/describe_blue_green_deployments/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_blue_green_deployments::_describe_blue_green_deployments_output::DescribeBlueGreenDeploymentsOutputBuilder;
3
4pub use crate::operation::describe_blue_green_deployments::_describe_blue_green_deployments_input::DescribeBlueGreenDeploymentsInputBuilder;
5
6impl crate::operation::describe_blue_green_deployments::builders::DescribeBlueGreenDeploymentsInputBuilder {
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_blue_green_deployments::DescribeBlueGreenDeploymentsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_blue_green_deployments::DescribeBlueGreenDeploymentsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_blue_green_deployments();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeBlueGreenDeployments`.
24///
25/// <p>Describes one or more blue/green deployments.</p>
26/// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html">Using Amazon RDS Blue/Green Deployments for database updates</a> in the <i>Amazon RDS User Guide</i> and <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/blue-green-deployments.html"> Using Amazon RDS Blue/Green Deployments for database updates</a> in the <i>Amazon Aurora User Guide</i>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct DescribeBlueGreenDeploymentsFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::describe_blue_green_deployments::builders::DescribeBlueGreenDeploymentsInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::describe_blue_green_deployments::DescribeBlueGreenDeploymentsOutput,
36        crate::operation::describe_blue_green_deployments::DescribeBlueGreenDeploymentsError,
37    > for DescribeBlueGreenDeploymentsFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::describe_blue_green_deployments::DescribeBlueGreenDeploymentsOutput,
45            crate::operation::describe_blue_green_deployments::DescribeBlueGreenDeploymentsError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl DescribeBlueGreenDeploymentsFluentBuilder {
52    /// Creates a new `DescribeBlueGreenDeploymentsFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the DescribeBlueGreenDeployments as a reference.
61    pub fn as_input(&self) -> &crate::operation::describe_blue_green_deployments::builders::DescribeBlueGreenDeploymentsInputBuilder {
62        &self.inner
63    }
64    /// Sends the request and returns the response.
65    ///
66    /// If an error occurs, an `SdkError` will be returned with additional details that
67    /// can be matched against.
68    ///
69    /// By default, any retryable failures will be retried twice. Retry behavior
70    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71    /// set when configuring the client.
72    pub async fn send(
73        self,
74    ) -> ::std::result::Result<
75        crate::operation::describe_blue_green_deployments::DescribeBlueGreenDeploymentsOutput,
76        ::aws_smithy_runtime_api::client::result::SdkError<
77            crate::operation::describe_blue_green_deployments::DescribeBlueGreenDeploymentsError,
78            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79        >,
80    > {
81        let input = self
82            .inner
83            .build()
84            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85        let runtime_plugins = crate::operation::describe_blue_green_deployments::DescribeBlueGreenDeployments::operation_runtime_plugins(
86            self.handle.runtime_plugins.clone(),
87            &self.handle.conf,
88            self.config_override,
89        );
90        crate::operation::describe_blue_green_deployments::DescribeBlueGreenDeployments::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::describe_blue_green_deployments::DescribeBlueGreenDeploymentsOutput,
98        crate::operation::describe_blue_green_deployments::DescribeBlueGreenDeploymentsError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// Create a paginator for this request
113    ///
114    /// Paginators are used by calling [`send().await`](crate::operation::describe_blue_green_deployments::paginator::DescribeBlueGreenDeploymentsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
115    pub fn into_paginator(self) -> crate::operation::describe_blue_green_deployments::paginator::DescribeBlueGreenDeploymentsPaginator {
116        crate::operation::describe_blue_green_deployments::paginator::DescribeBlueGreenDeploymentsPaginator::new(self.handle, self.inner)
117    }
118    /// <p>The blue/green deployment identifier. If you specify this parameter, the response only includes information about the specific blue/green deployment. This parameter isn't case-sensitive.</p>
119    /// <p>Constraints:</p>
120    /// <ul>
121    /// <li>
122    /// <p>Must match an existing blue/green deployment identifier.</p></li>
123    /// </ul>
124    pub fn blue_green_deployment_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.inner = self.inner.blue_green_deployment_identifier(input.into());
126        self
127    }
128    /// <p>The blue/green deployment identifier. If you specify this parameter, the response only includes information about the specific blue/green deployment. This parameter isn't case-sensitive.</p>
129    /// <p>Constraints:</p>
130    /// <ul>
131    /// <li>
132    /// <p>Must match an existing blue/green deployment identifier.</p></li>
133    /// </ul>
134    pub fn set_blue_green_deployment_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.inner = self.inner.set_blue_green_deployment_identifier(input);
136        self
137    }
138    /// <p>The blue/green deployment identifier. If you specify this parameter, the response only includes information about the specific blue/green deployment. This parameter isn't case-sensitive.</p>
139    /// <p>Constraints:</p>
140    /// <ul>
141    /// <li>
142    /// <p>Must match an existing blue/green deployment identifier.</p></li>
143    /// </ul>
144    pub fn get_blue_green_deployment_identifier(&self) -> &::std::option::Option<::std::string::String> {
145        self.inner.get_blue_green_deployment_identifier()
146    }
147    ///
148    /// Appends an item to `Filters`.
149    ///
150    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
151    ///
152    /// <p>A filter that specifies one or more blue/green deployments to describe.</p>
153    /// <p>Valid Values:</p>
154    /// <ul>
155    /// <li>
156    /// <p><code>blue-green-deployment-identifier</code> - Accepts system-generated identifiers for blue/green deployments. The results list only includes information about the blue/green deployments with the specified identifiers.</p></li>
157    /// <li>
158    /// <p><code>blue-green-deployment-name</code> - Accepts user-supplied names for blue/green deployments. The results list only includes information about the blue/green deployments with the specified names.</p></li>
159    /// <li>
160    /// <p><code>source</code> - Accepts source databases for a blue/green deployment. The results list only includes information about the blue/green deployments with the specified source databases.</p></li>
161    /// <li>
162    /// <p><code>target</code> - Accepts target databases for a blue/green deployment. The results list only includes information about the blue/green deployments with the specified target databases.</p></li>
163    /// </ul>
164    pub fn filters(mut self, input: crate::types::Filter) -> Self {
165        self.inner = self.inner.filters(input);
166        self
167    }
168    /// <p>A filter that specifies one or more blue/green deployments to describe.</p>
169    /// <p>Valid Values:</p>
170    /// <ul>
171    /// <li>
172    /// <p><code>blue-green-deployment-identifier</code> - Accepts system-generated identifiers for blue/green deployments. The results list only includes information about the blue/green deployments with the specified identifiers.</p></li>
173    /// <li>
174    /// <p><code>blue-green-deployment-name</code> - Accepts user-supplied names for blue/green deployments. The results list only includes information about the blue/green deployments with the specified names.</p></li>
175    /// <li>
176    /// <p><code>source</code> - Accepts source databases for a blue/green deployment. The results list only includes information about the blue/green deployments with the specified source databases.</p></li>
177    /// <li>
178    /// <p><code>target</code> - Accepts target databases for a blue/green deployment. The results list only includes information about the blue/green deployments with the specified target databases.</p></li>
179    /// </ul>
180    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
181        self.inner = self.inner.set_filters(input);
182        self
183    }
184    /// <p>A filter that specifies one or more blue/green deployments to describe.</p>
185    /// <p>Valid Values:</p>
186    /// <ul>
187    /// <li>
188    /// <p><code>blue-green-deployment-identifier</code> - Accepts system-generated identifiers for blue/green deployments. The results list only includes information about the blue/green deployments with the specified identifiers.</p></li>
189    /// <li>
190    /// <p><code>blue-green-deployment-name</code> - Accepts user-supplied names for blue/green deployments. The results list only includes information about the blue/green deployments with the specified names.</p></li>
191    /// <li>
192    /// <p><code>source</code> - Accepts source databases for a blue/green deployment. The results list only includes information about the blue/green deployments with the specified source databases.</p></li>
193    /// <li>
194    /// <p><code>target</code> - Accepts target databases for a blue/green deployment. The results list only includes information about the blue/green deployments with the specified target databases.</p></li>
195    /// </ul>
196    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
197        self.inner.get_filters()
198    }
199    /// <p>An optional pagination token provided by a previous <code>DescribeBlueGreenDeployments</code> request. If you specify this parameter, the response only includes records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
200    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201        self.inner = self.inner.marker(input.into());
202        self
203    }
204    /// <p>An optional pagination token provided by a previous <code>DescribeBlueGreenDeployments</code> request. If you specify this parameter, the response only includes records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
205    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206        self.inner = self.inner.set_marker(input);
207        self
208    }
209    /// <p>An optional pagination token provided by a previous <code>DescribeBlueGreenDeployments</code> request. If you specify this parameter, the response only includes records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
210    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
211        self.inner.get_marker()
212    }
213    /// <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 you can retrieve the remaining results.</p>
214    /// <p>Default: 100</p>
215    /// <p>Constraints:</p>
216    /// <ul>
217    /// <li>
218    /// <p>Must be a minimum of 20.</p></li>
219    /// <li>
220    /// <p>Can't exceed 100.</p></li>
221    /// </ul>
222    pub fn max_records(mut self, input: i32) -> Self {
223        self.inner = self.inner.max_records(input);
224        self
225    }
226    /// <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 you can retrieve the remaining results.</p>
227    /// <p>Default: 100</p>
228    /// <p>Constraints:</p>
229    /// <ul>
230    /// <li>
231    /// <p>Must be a minimum of 20.</p></li>
232    /// <li>
233    /// <p>Can't exceed 100.</p></li>
234    /// </ul>
235    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
236        self.inner = self.inner.set_max_records(input);
237        self
238    }
239    /// <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 you can retrieve the remaining results.</p>
240    /// <p>Default: 100</p>
241    /// <p>Constraints:</p>
242    /// <ul>
243    /// <li>
244    /// <p>Must be a minimum of 20.</p></li>
245    /// <li>
246    /// <p>Can't exceed 100.</p></li>
247    /// </ul>
248    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
249        self.inner.get_max_records()
250    }
251}