aws_sdk_redshift/operation/describe_cluster_parameter_groups/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_cluster_parameter_groups::_describe_cluster_parameter_groups_output::DescribeClusterParameterGroupsOutputBuilder;
3
4pub use crate::operation::describe_cluster_parameter_groups::_describe_cluster_parameter_groups_input::DescribeClusterParameterGroupsInputBuilder;
5
6impl crate::operation::describe_cluster_parameter_groups::builders::DescribeClusterParameterGroupsInputBuilder {
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_parameter_groups::DescribeClusterParameterGroupsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::describe_cluster_parameter_groups::DescribeClusterParameterGroupsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.describe_cluster_parameter_groups();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `DescribeClusterParameterGroups`.
24///
25/// <p>Returns a list of Amazon Redshift parameter groups, including parameter groups you created and the default parameter group. For each parameter group, the response includes the parameter group name, description, and parameter group family name. You can optionally specify a name to retrieve the description of a specific parameter group.</p>
26/// <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>
27/// <p>If you specify both tag keys and tag values in the same request, Amazon Redshift returns all parameter groups that match any combination of the specified keys and values. For example, if you have <code>owner</code> and <code>environment</code> for tag keys, and <code>admin</code> and <code>test</code> for tag values, all parameter groups that have any combination of those values are returned.</p>
28/// <p>If both tag keys and values are omitted from the request, parameter groups are returned regardless of whether they have tag keys or values associated with them.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct DescribeClusterParameterGroupsFluentBuilder {
31 handle: ::std::sync::Arc<crate::client::Handle>,
32 inner: crate::operation::describe_cluster_parameter_groups::builders::DescribeClusterParameterGroupsInputBuilder,
33 config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36 crate::client::customize::internal::CustomizableSend<
37 crate::operation::describe_cluster_parameter_groups::DescribeClusterParameterGroupsOutput,
38 crate::operation::describe_cluster_parameter_groups::DescribeClusterParameterGroupsError,
39 > for DescribeClusterParameterGroupsFluentBuilder
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_cluster_parameter_groups::DescribeClusterParameterGroupsOutput,
47 crate::operation::describe_cluster_parameter_groups::DescribeClusterParameterGroupsError,
48 >,
49 > {
50 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51 }
52}
53impl DescribeClusterParameterGroupsFluentBuilder {
54 /// Creates a new `DescribeClusterParameterGroupsFluentBuilder`.
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 DescribeClusterParameterGroups as a reference.
63 pub fn as_input(&self) -> &crate::operation::describe_cluster_parameter_groups::builders::DescribeClusterParameterGroupsInputBuilder {
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_cluster_parameter_groups::DescribeClusterParameterGroupsOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::describe_cluster_parameter_groups::DescribeClusterParameterGroupsError,
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_cluster_parameter_groups::DescribeClusterParameterGroups::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::describe_cluster_parameter_groups::DescribeClusterParameterGroups::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_cluster_parameter_groups::DescribeClusterParameterGroupsOutput,
100 crate::operation::describe_cluster_parameter_groups::DescribeClusterParameterGroupsError,
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_cluster_parameter_groups::paginator::DescribeClusterParameterGroupsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
117 pub fn into_paginator(self) -> crate::operation::describe_cluster_parameter_groups::paginator::DescribeClusterParameterGroupsPaginator {
118 crate::operation::describe_cluster_parameter_groups::paginator::DescribeClusterParameterGroupsPaginator::new(self.handle, self.inner)
119 }
120 /// <p>The name of a specific parameter group for which to return details. By default, details about all parameter groups and the default parameter group are returned.</p>
121 pub fn parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.inner = self.inner.parameter_group_name(input.into());
123 self
124 }
125 /// <p>The name of a specific parameter group for which to return details. By default, details about all parameter groups and the default parameter group are returned.</p>
126 pub fn set_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.inner = self.inner.set_parameter_group_name(input);
128 self
129 }
130 /// <p>The name of a specific parameter group for which to return details. By default, details about all parameter groups and the default parameter group are returned.</p>
131 pub fn get_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
132 self.inner.get_parameter_group_name()
133 }
134 /// <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>
135 /// <p>Default: <code>100</code></p>
136 /// <p>Constraints: minimum 20, maximum 100.</p>
137 pub fn max_records(mut self, input: i32) -> Self {
138 self.inner = self.inner.max_records(input);
139 self
140 }
141 /// <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>
142 /// <p>Default: <code>100</code></p>
143 /// <p>Constraints: minimum 20, maximum 100.</p>
144 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
145 self.inner = self.inner.set_max_records(input);
146 self
147 }
148 /// <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>
149 /// <p>Default: <code>100</code></p>
150 /// <p>Constraints: minimum 20, maximum 100.</p>
151 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
152 self.inner.get_max_records()
153 }
154 /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusterParameterGroups</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>
155 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.inner = self.inner.marker(input.into());
157 self
158 }
159 /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusterParameterGroups</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>
160 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161 self.inner = self.inner.set_marker(input);
162 self
163 }
164 /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusterParameterGroups</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>
165 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
166 self.inner.get_marker()
167 }
168 ///
169 /// Appends an item to `TagKeys`.
170 ///
171 /// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
172 ///
173 /// <p>A tag key or keys for which you want to return all matching cluster parameter groups that are associated with the specified key or keys. For example, suppose that you have parameter groups that are tagged with keys called <code>owner</code> and <code>environment</code>. If you specify both of these tag keys in the request, Amazon Redshift returns a response with the parameter groups that have either or both of these tag keys associated with them.</p>
174 pub fn tag_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175 self.inner = self.inner.tag_keys(input.into());
176 self
177 }
178 /// <p>A tag key or keys for which you want to return all matching cluster parameter groups that are associated with the specified key or keys. For example, suppose that you have parameter groups that are tagged with keys called <code>owner</code> and <code>environment</code>. If you specify both of these tag keys in the request, Amazon Redshift returns a response with the parameter groups that have either or both of these tag keys associated with them.</p>
179 pub fn set_tag_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
180 self.inner = self.inner.set_tag_keys(input);
181 self
182 }
183 /// <p>A tag key or keys for which you want to return all matching cluster parameter groups that are associated with the specified key or keys. For example, suppose that you have parameter groups that are tagged with keys called <code>owner</code> and <code>environment</code>. If you specify both of these tag keys in the request, Amazon Redshift returns a response with the parameter groups that have either or both of these tag keys associated with them.</p>
184 pub fn get_tag_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
185 self.inner.get_tag_keys()
186 }
187 ///
188 /// Appends an item to `TagValues`.
189 ///
190 /// To override the contents of this collection use [`set_tag_values`](Self::set_tag_values).
191 ///
192 /// <p>A tag value or values for which you want to return all matching cluster parameter groups that are associated with the specified tag value or values. For example, suppose that you have parameter groups that are tagged with values called <code>admin</code> and <code>test</code>. If you specify both of these tag values in the request, Amazon Redshift returns a response with the parameter groups that have either or both of these tag values associated with them.</p>
193 pub fn tag_values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194 self.inner = self.inner.tag_values(input.into());
195 self
196 }
197 /// <p>A tag value or values for which you want to return all matching cluster parameter groups that are associated with the specified tag value or values. For example, suppose that you have parameter groups that are tagged with values called <code>admin</code> and <code>test</code>. If you specify both of these tag values in the request, Amazon Redshift returns a response with the parameter groups that have either or both of these tag values associated with them.</p>
198 pub fn set_tag_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
199 self.inner = self.inner.set_tag_values(input);
200 self
201 }
202 /// <p>A tag value or values for which you want to return all matching cluster parameter groups that are associated with the specified tag value or values. For example, suppose that you have parameter groups that are tagged with values called <code>admin</code> and <code>test</code>. If you specify both of these tag values in the request, Amazon Redshift returns a response with the parameter groups that have either or both of these tag values associated with them.</p>
203 pub fn get_tag_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
204 self.inner.get_tag_values()
205 }
206}