aws_sdk_redshift/operation/describe_clusters/
_describe_clusters_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p></p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeClustersInput {
7    /// <p>The unique identifier of a cluster whose properties you are requesting. This parameter is case sensitive.</p>
8    /// <p>The default is that all clusters defined for an account are returned.</p>
9    pub cluster_identifier: ::std::option::Option<::std::string::String>,
10    /// <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>
11    /// <p>Default: <code>100</code></p>
12    /// <p>Constraints: minimum 20, maximum 100.</p>
13    pub max_records: ::std::option::Option<i32>,
14    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusters</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>
15    /// <p>Constraints: You can specify either the <b>ClusterIdentifier</b> parameter or the <b>Marker</b> parameter, but not both.</p>
16    pub marker: ::std::option::Option<::std::string::String>,
17    /// <p>A tag key or keys for which you want to return all matching clusters that are associated with the specified key or keys. For example, suppose that you have clusters 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 clusters that have either or both of these tag keys associated with them.</p>
18    pub tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
19    /// <p>A tag value or values for which you want to return all matching clusters that are associated with the specified tag value or values. For example, suppose that you have clusters 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 clusters that have either or both of these tag values associated with them.</p>
20    pub tag_values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
21}
22impl DescribeClustersInput {
23    /// <p>The unique identifier of a cluster whose properties you are requesting. This parameter is case sensitive.</p>
24    /// <p>The default is that all clusters defined for an account are returned.</p>
25    pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
26        self.cluster_identifier.as_deref()
27    }
28    /// <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>
29    /// <p>Default: <code>100</code></p>
30    /// <p>Constraints: minimum 20, maximum 100.</p>
31    pub fn max_records(&self) -> ::std::option::Option<i32> {
32        self.max_records
33    }
34    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusters</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>
35    /// <p>Constraints: You can specify either the <b>ClusterIdentifier</b> parameter or the <b>Marker</b> parameter, but not both.</p>
36    pub fn marker(&self) -> ::std::option::Option<&str> {
37        self.marker.as_deref()
38    }
39    /// <p>A tag key or keys for which you want to return all matching clusters that are associated with the specified key or keys. For example, suppose that you have clusters 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 clusters that have either or both of these tag keys associated with them.</p>
40    ///
41    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_keys.is_none()`.
42    pub fn tag_keys(&self) -> &[::std::string::String] {
43        self.tag_keys.as_deref().unwrap_or_default()
44    }
45    /// <p>A tag value or values for which you want to return all matching clusters that are associated with the specified tag value or values. For example, suppose that you have clusters 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 clusters that have either or both of these tag values associated with them.</p>
46    ///
47    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_values.is_none()`.
48    pub fn tag_values(&self) -> &[::std::string::String] {
49        self.tag_values.as_deref().unwrap_or_default()
50    }
51}
52impl DescribeClustersInput {
53    /// Creates a new builder-style object to manufacture [`DescribeClustersInput`](crate::operation::describe_clusters::DescribeClustersInput).
54    pub fn builder() -> crate::operation::describe_clusters::builders::DescribeClustersInputBuilder {
55        crate::operation::describe_clusters::builders::DescribeClustersInputBuilder::default()
56    }
57}
58
59/// A builder for [`DescribeClustersInput`](crate::operation::describe_clusters::DescribeClustersInput).
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
61#[non_exhaustive]
62pub struct DescribeClustersInputBuilder {
63    pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
64    pub(crate) max_records: ::std::option::Option<i32>,
65    pub(crate) marker: ::std::option::Option<::std::string::String>,
66    pub(crate) tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
67    pub(crate) tag_values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
68}
69impl DescribeClustersInputBuilder {
70    /// <p>The unique identifier of a cluster whose properties you are requesting. This parameter is case sensitive.</p>
71    /// <p>The default is that all clusters defined for an account are returned.</p>
72    pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.cluster_identifier = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The unique identifier of a cluster whose properties you are requesting. This parameter is case sensitive.</p>
77    /// <p>The default is that all clusters defined for an account are returned.</p>
78    pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.cluster_identifier = input;
80        self
81    }
82    /// <p>The unique identifier of a cluster whose properties you are requesting. This parameter is case sensitive.</p>
83    /// <p>The default is that all clusters defined for an account are returned.</p>
84    pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
85        &self.cluster_identifier
86    }
87    /// <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>
88    /// <p>Default: <code>100</code></p>
89    /// <p>Constraints: minimum 20, maximum 100.</p>
90    pub fn max_records(mut self, input: i32) -> Self {
91        self.max_records = ::std::option::Option::Some(input);
92        self
93    }
94    /// <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>
95    /// <p>Default: <code>100</code></p>
96    /// <p>Constraints: minimum 20, maximum 100.</p>
97    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
98        self.max_records = input;
99        self
100    }
101    /// <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>
102    /// <p>Default: <code>100</code></p>
103    /// <p>Constraints: minimum 20, maximum 100.</p>
104    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
105        &self.max_records
106    }
107    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusters</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>
108    /// <p>Constraints: You can specify either the <b>ClusterIdentifier</b> parameter or the <b>Marker</b> parameter, but not both.</p>
109    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.marker = ::std::option::Option::Some(input.into());
111        self
112    }
113    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusters</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>
114    /// <p>Constraints: You can specify either the <b>ClusterIdentifier</b> parameter or the <b>Marker</b> parameter, but not both.</p>
115    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116        self.marker = input;
117        self
118    }
119    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeClusters</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>
120    /// <p>Constraints: You can specify either the <b>ClusterIdentifier</b> parameter or the <b>Marker</b> parameter, but not both.</p>
121    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
122        &self.marker
123    }
124    /// Appends an item to `tag_keys`.
125    ///
126    /// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
127    ///
128    /// <p>A tag key or keys for which you want to return all matching clusters that are associated with the specified key or keys. For example, suppose that you have clusters 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 clusters that have either or both of these tag keys associated with them.</p>
129    pub fn tag_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        let mut v = self.tag_keys.unwrap_or_default();
131        v.push(input.into());
132        self.tag_keys = ::std::option::Option::Some(v);
133        self
134    }
135    /// <p>A tag key or keys for which you want to return all matching clusters that are associated with the specified key or keys. For example, suppose that you have clusters 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 clusters that have either or both of these tag keys associated with them.</p>
136    pub fn set_tag_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
137        self.tag_keys = input;
138        self
139    }
140    /// <p>A tag key or keys for which you want to return all matching clusters that are associated with the specified key or keys. For example, suppose that you have clusters 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 clusters that have either or both of these tag keys associated with them.</p>
141    pub fn get_tag_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
142        &self.tag_keys
143    }
144    /// Appends an item to `tag_values`.
145    ///
146    /// To override the contents of this collection use [`set_tag_values`](Self::set_tag_values).
147    ///
148    /// <p>A tag value or values for which you want to return all matching clusters that are associated with the specified tag value or values. For example, suppose that you have clusters 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 clusters that have either or both of these tag values associated with them.</p>
149    pub fn tag_values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        let mut v = self.tag_values.unwrap_or_default();
151        v.push(input.into());
152        self.tag_values = ::std::option::Option::Some(v);
153        self
154    }
155    /// <p>A tag value or values for which you want to return all matching clusters that are associated with the specified tag value or values. For example, suppose that you have clusters 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 clusters that have either or both of these tag values associated with them.</p>
156    pub fn set_tag_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
157        self.tag_values = input;
158        self
159    }
160    /// <p>A tag value or values for which you want to return all matching clusters that are associated with the specified tag value or values. For example, suppose that you have clusters 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 clusters that have either or both of these tag values associated with them.</p>
161    pub fn get_tag_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
162        &self.tag_values
163    }
164    /// Consumes the builder and constructs a [`DescribeClustersInput`](crate::operation::describe_clusters::DescribeClustersInput).
165    pub fn build(
166        self,
167    ) -> ::std::result::Result<crate::operation::describe_clusters::DescribeClustersInput, ::aws_smithy_types::error::operation::BuildError> {
168        ::std::result::Result::Ok(crate::operation::describe_clusters::DescribeClustersInput {
169            cluster_identifier: self.cluster_identifier,
170            max_records: self.max_records,
171            marker: self.marker,
172            tag_keys: self.tag_keys,
173            tag_values: self.tag_values,
174        })
175    }
176}