aws_sdk_redshift/operation/describe_cluster_security_groups/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_cluster_security_groups::_describe_cluster_security_groups_output::DescribeClusterSecurityGroupsOutputBuilder;
3
4pub use crate::operation::describe_cluster_security_groups::_describe_cluster_security_groups_input::DescribeClusterSecurityGroupsInputBuilder;
5
6impl crate::operation::describe_cluster_security_groups::builders::DescribeClusterSecurityGroupsInputBuilder {
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_security_groups::DescribeClusterSecurityGroupsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::describe_cluster_security_groups::DescribeClusterSecurityGroupsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.describe_cluster_security_groups();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `DescribeClusterSecurityGroups`.
24///
25/// <p>Returns information about Amazon Redshift security groups. If the name of a security group is specified, the response will contain only information about only that security group.</p>
26/// <p>For information about managing security groups, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html">Amazon Redshift Cluster Security 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 security 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 security groups that have any combination of those values are returned.</p>
28/// <p>If both tag keys and values are omitted from the request, security 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 DescribeClusterSecurityGroupsFluentBuilder {
31 handle: ::std::sync::Arc<crate::client::Handle>,
32 inner: crate::operation::describe_cluster_security_groups::builders::DescribeClusterSecurityGroupsInputBuilder,
33 config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36 crate::client::customize::internal::CustomizableSend<
37 crate::operation::describe_cluster_security_groups::DescribeClusterSecurityGroupsOutput,
38 crate::operation::describe_cluster_security_groups::DescribeClusterSecurityGroupsError,
39 > for DescribeClusterSecurityGroupsFluentBuilder
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_security_groups::DescribeClusterSecurityGroupsOutput,
47 crate::operation::describe_cluster_security_groups::DescribeClusterSecurityGroupsError,
48 >,
49 > {
50 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51 }
52}
53impl DescribeClusterSecurityGroupsFluentBuilder {
54 /// Creates a new `DescribeClusterSecurityGroupsFluentBuilder`.
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 DescribeClusterSecurityGroups as a reference.
63 pub fn as_input(&self) -> &crate::operation::describe_cluster_security_groups::builders::DescribeClusterSecurityGroupsInputBuilder {
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_security_groups::DescribeClusterSecurityGroupsOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::describe_cluster_security_groups::DescribeClusterSecurityGroupsError,
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_security_groups::DescribeClusterSecurityGroups::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::describe_cluster_security_groups::DescribeClusterSecurityGroups::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_security_groups::DescribeClusterSecurityGroupsOutput,
100 crate::operation::describe_cluster_security_groups::DescribeClusterSecurityGroupsError,
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_security_groups::paginator::DescribeClusterSecurityGroupsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
117 pub fn into_paginator(self) -> crate::operation::describe_cluster_security_groups::paginator::DescribeClusterSecurityGroupsPaginator {
118 crate::operation::describe_cluster_security_groups::paginator::DescribeClusterSecurityGroupsPaginator::new(self.handle, self.inner)
119 }
120 /// <p>The name of a cluster security group for which you are requesting details. You must specify either the <b>Marker</b> parameter or a <b>ClusterSecurityGroupName</b> parameter, but not both.</p>
121 /// <p>Example: <code>securitygroup1</code></p>
122 pub fn cluster_security_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.inner = self.inner.cluster_security_group_name(input.into());
124 self
125 }
126 /// <p>The name of a cluster security group for which you are requesting details. You must specify either the <b>Marker</b> parameter or a <b>ClusterSecurityGroupName</b> parameter, but not both.</p>
127 /// <p>Example: <code>securitygroup1</code></p>
128 pub fn set_cluster_security_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.inner = self.inner.set_cluster_security_group_name(input);
130 self
131 }
132 /// <p>The name of a cluster security group for which you are requesting details. You must specify either the <b>Marker</b> parameter or a <b>ClusterSecurityGroupName</b> parameter, but not both.</p>
133 /// <p>Example: <code>securitygroup1</code></p>
134 pub fn get_cluster_security_group_name(&self) -> &::std::option::Option<::std::string::String> {
135 self.inner.get_cluster_security_group_name()
136 }
137 /// <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>
138 /// <p>Default: <code>100</code></p>
139 /// <p>Constraints: minimum 20, maximum 100.</p>
140 pub fn max_records(mut self, input: i32) -> Self {
141 self.inner = self.inner.max_records(input);
142 self
143 }
144 /// <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>
145 /// <p>Default: <code>100</code></p>
146 /// <p>Constraints: minimum 20, maximum 100.</p>
147 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
148 self.inner = self.inner.set_max_records(input);
149 self
150 }
151 /// <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>
152 /// <p>Default: <code>100</code></p>
153 /// <p>Constraints: minimum 20, maximum 100.</p>
154 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
155 self.inner.get_max_records()
156 }
157 /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusterSecurityGroups</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>
158 /// <p>Constraints: You must specify either the <b>ClusterSecurityGroupName</b> parameter or the <b>Marker</b> parameter, but not both.</p>
159 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160 self.inner = self.inner.marker(input.into());
161 self
162 }
163 /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusterSecurityGroups</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>
164 /// <p>Constraints: You must specify either the <b>ClusterSecurityGroupName</b> parameter or the <b>Marker</b> parameter, but not both.</p>
165 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.inner = self.inner.set_marker(input);
167 self
168 }
169 /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusterSecurityGroups</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>
170 /// <p>Constraints: You must specify either the <b>ClusterSecurityGroupName</b> parameter or the <b>Marker</b> parameter, but not both.</p>
171 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
172 self.inner.get_marker()
173 }
174 ///
175 /// Appends an item to `TagKeys`.
176 ///
177 /// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
178 ///
179 /// <p>A tag key or keys for which you want to return all matching cluster security groups that are associated with the specified key or keys. For example, suppose that you have security 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 security groups that have either or both of these tag keys associated with them.</p>
180 pub fn tag_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181 self.inner = self.inner.tag_keys(input.into());
182 self
183 }
184 /// <p>A tag key or keys for which you want to return all matching cluster security groups that are associated with the specified key or keys. For example, suppose that you have security 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 security groups that have either or both of these tag keys associated with them.</p>
185 pub fn set_tag_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
186 self.inner = self.inner.set_tag_keys(input);
187 self
188 }
189 /// <p>A tag key or keys for which you want to return all matching cluster security groups that are associated with the specified key or keys. For example, suppose that you have security 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 security groups that have either or both of these tag keys associated with them.</p>
190 pub fn get_tag_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
191 self.inner.get_tag_keys()
192 }
193 ///
194 /// Appends an item to `TagValues`.
195 ///
196 /// To override the contents of this collection use [`set_tag_values`](Self::set_tag_values).
197 ///
198 /// <p>A tag value or values for which you want to return all matching cluster security groups that are associated with the specified tag value or values. For example, suppose that you have security 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 security groups that have either or both of these tag values associated with them.</p>
199 pub fn tag_values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200 self.inner = self.inner.tag_values(input.into());
201 self
202 }
203 /// <p>A tag value or values for which you want to return all matching cluster security groups that are associated with the specified tag value or values. For example, suppose that you have security 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 security groups that have either or both of these tag values associated with them.</p>
204 pub fn set_tag_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
205 self.inner = self.inner.set_tag_values(input);
206 self
207 }
208 /// <p>A tag value or values for which you want to return all matching cluster security groups that are associated with the specified tag value or values. For example, suppose that you have security 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 security groups that have either or both of these tag values associated with them.</p>
209 pub fn get_tag_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
210 self.inner.get_tag_values()
211 }
212}