aws_sdk_redshift/operation/describe_cluster_parameters/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_cluster_parameters::_describe_cluster_parameters_output::DescribeClusterParametersOutputBuilder;
3
4pub use crate::operation::describe_cluster_parameters::_describe_cluster_parameters_input::DescribeClusterParametersInputBuilder;
5
6impl crate::operation::describe_cluster_parameters::builders::DescribeClusterParametersInputBuilder {
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_cluster_parameters::DescribeClusterParametersOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_cluster_parameters::DescribeClusterParametersError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_cluster_parameters();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeClusterParameters`.
24///
25/// <p>Returns a detailed list of parameters contained within the specified Amazon Redshift parameter group. For each parameter the response includes information such as parameter name, description, data type, value, whether the parameter value is modifiable, and so on.</p>
26/// <p>You can specify <i>source</i> filter to retrieve parameters of only specific type. For example, to retrieve parameters that were modified by a user action such as from <code>ModifyClusterParameterGroup</code>, you can specify <i>source</i> equal to <i>user</i>.</p>
27/// <p>For more information about parameters and parameter groups, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html">Amazon Redshift Parameter Groups</a> in the <i>Amazon Redshift Cluster Management Guide</i>.</p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct DescribeClusterParametersFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::describe_cluster_parameters::builders::DescribeClusterParametersInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::describe_cluster_parameters::DescribeClusterParametersOutput,
37        crate::operation::describe_cluster_parameters::DescribeClusterParametersError,
38    > for DescribeClusterParametersFluentBuilder
39{
40    fn send(
41        self,
42        config_override: crate::config::Builder,
43    ) -> crate::client::customize::internal::BoxFuture<
44        crate::client::customize::internal::SendResult<
45            crate::operation::describe_cluster_parameters::DescribeClusterParametersOutput,
46            crate::operation::describe_cluster_parameters::DescribeClusterParametersError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl DescribeClusterParametersFluentBuilder {
53    /// Creates a new `DescribeClusterParametersFluentBuilder`.
54    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55        Self {
56            handle,
57            inner: ::std::default::Default::default(),
58            config_override: ::std::option::Option::None,
59        }
60    }
61    /// Access the DescribeClusterParameters as a reference.
62    pub fn as_input(&self) -> &crate::operation::describe_cluster_parameters::builders::DescribeClusterParametersInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::describe_cluster_parameters::DescribeClusterParametersOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::describe_cluster_parameters::DescribeClusterParametersError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins = crate::operation::describe_cluster_parameters::DescribeClusterParameters::operation_runtime_plugins(
87            self.handle.runtime_plugins.clone(),
88            &self.handle.conf,
89            self.config_override,
90        );
91        crate::operation::describe_cluster_parameters::DescribeClusterParameters::orchestrate(&runtime_plugins, input).await
92    }
93
94    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
95    pub fn customize(
96        self,
97    ) -> crate::client::customize::CustomizableOperation<
98        crate::operation::describe_cluster_parameters::DescribeClusterParametersOutput,
99        crate::operation::describe_cluster_parameters::DescribeClusterParametersError,
100        Self,
101    > {
102        crate::client::customize::CustomizableOperation::new(self)
103    }
104    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105        self.set_config_override(::std::option::Option::Some(config_override.into()));
106        self
107    }
108
109    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110        self.config_override = config_override;
111        self
112    }
113    /// Create a paginator for this request
114    ///
115    /// Paginators are used by calling [`send().await`](crate::operation::describe_cluster_parameters::paginator::DescribeClusterParametersPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
116    pub fn into_paginator(self) -> crate::operation::describe_cluster_parameters::paginator::DescribeClusterParametersPaginator {
117        crate::operation::describe_cluster_parameters::paginator::DescribeClusterParametersPaginator::new(self.handle, self.inner)
118    }
119    /// <p>The name of a cluster parameter group for which to return details.</p>
120    pub fn parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.inner = self.inner.parameter_group_name(input.into());
122        self
123    }
124    /// <p>The name of a cluster parameter group for which to return details.</p>
125    pub fn set_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.inner = self.inner.set_parameter_group_name(input);
127        self
128    }
129    /// <p>The name of a cluster parameter group for which to return details.</p>
130    pub fn get_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
131        self.inner.get_parameter_group_name()
132    }
133    /// <p>The parameter types to return. Specify <code>user</code> to show parameters that are different form the default. Similarly, specify <code>engine-default</code> to show parameters that are the same as the default parameter group.</p>
134    /// <p>Default: All parameter types returned.</p>
135    /// <p>Valid Values: <code>user</code> | <code>engine-default</code></p>
136    pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137        self.inner = self.inner.source(input.into());
138        self
139    }
140    /// <p>The parameter types to return. Specify <code>user</code> to show parameters that are different form the default. Similarly, specify <code>engine-default</code> to show parameters that are the same as the default parameter group.</p>
141    /// <p>Default: All parameter types returned.</p>
142    /// <p>Valid Values: <code>user</code> | <code>engine-default</code></p>
143    pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144        self.inner = self.inner.set_source(input);
145        self
146    }
147    /// <p>The parameter types to return. Specify <code>user</code> to show parameters that are different form the default. Similarly, specify <code>engine-default</code> to show parameters that are the same as the default parameter group.</p>
148    /// <p>Default: All parameter types returned.</p>
149    /// <p>Valid Values: <code>user</code> | <code>engine-default</code></p>
150    pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_source()
152    }
153    /// <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
154    /// <p>Default: <code>100</code></p>
155    /// <p>Constraints: minimum 20, maximum 100.</p>
156    pub fn max_records(mut self, input: i32) -> Self {
157        self.inner = self.inner.max_records(input);
158        self
159    }
160    /// <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
161    /// <p>Default: <code>100</code></p>
162    /// <p>Constraints: minimum 20, maximum 100.</p>
163    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
164        self.inner = self.inner.set_max_records(input);
165        self
166    }
167    /// <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
168    /// <p>Default: <code>100</code></p>
169    /// <p>Constraints: minimum 20, maximum 100.</p>
170    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
171        self.inner.get_max_records()
172    }
173    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusterParameters</code> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request.</p>
174    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175        self.inner = self.inner.marker(input.into());
176        self
177    }
178    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusterParameters</code> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request.</p>
179    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180        self.inner = self.inner.set_marker(input);
181        self
182    }
183    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusterParameters</code> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request.</p>
184    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
185        self.inner.get_marker()
186    }
187}