aws_sdk_ssm/operation/describe_parameters/
_describe_parameters_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeParametersInput {
6    /// <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
7    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::ParametersFilter>>,
8    /// <p>Filters to limit the request results.</p>
9    pub parameter_filters: ::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>>,
10    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
11    pub max_results: ::std::option::Option<i32>,
12    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
13    pub next_token: ::std::option::Option<::std::string::String>,
14    /// <p>Lists parameters that are shared with you.</p><note>
15    /// <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <code>PutResourcePolicy</code> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p>
16    /// <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
17    /// </note>
18    pub shared: ::std::option::Option<bool>,
19}
20impl DescribeParametersInput {
21    /// <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
22    ///
23    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
24    pub fn filters(&self) -> &[crate::types::ParametersFilter] {
25        self.filters.as_deref().unwrap_or_default()
26    }
27    /// <p>Filters to limit the request results.</p>
28    ///
29    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameter_filters.is_none()`.
30    pub fn parameter_filters(&self) -> &[crate::types::ParameterStringFilter] {
31        self.parameter_filters.as_deref().unwrap_or_default()
32    }
33    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
34    pub fn max_results(&self) -> ::std::option::Option<i32> {
35        self.max_results
36    }
37    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
38    pub fn next_token(&self) -> ::std::option::Option<&str> {
39        self.next_token.as_deref()
40    }
41    /// <p>Lists parameters that are shared with you.</p><note>
42    /// <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <code>PutResourcePolicy</code> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p>
43    /// <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
44    /// </note>
45    pub fn shared(&self) -> ::std::option::Option<bool> {
46        self.shared
47    }
48}
49impl DescribeParametersInput {
50    /// Creates a new builder-style object to manufacture [`DescribeParametersInput`](crate::operation::describe_parameters::DescribeParametersInput).
51    pub fn builder() -> crate::operation::describe_parameters::builders::DescribeParametersInputBuilder {
52        crate::operation::describe_parameters::builders::DescribeParametersInputBuilder::default()
53    }
54}
55
56/// A builder for [`DescribeParametersInput`](crate::operation::describe_parameters::DescribeParametersInput).
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct DescribeParametersInputBuilder {
60    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::ParametersFilter>>,
61    pub(crate) parameter_filters: ::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>>,
62    pub(crate) max_results: ::std::option::Option<i32>,
63    pub(crate) next_token: ::std::option::Option<::std::string::String>,
64    pub(crate) shared: ::std::option::Option<bool>,
65}
66impl DescribeParametersInputBuilder {
67    /// Appends an item to `filters`.
68    ///
69    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
70    ///
71    /// <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
72    pub fn filters(mut self, input: crate::types::ParametersFilter) -> Self {
73        let mut v = self.filters.unwrap_or_default();
74        v.push(input);
75        self.filters = ::std::option::Option::Some(v);
76        self
77    }
78    /// <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
79    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParametersFilter>>) -> Self {
80        self.filters = input;
81        self
82    }
83    /// <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
84    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParametersFilter>> {
85        &self.filters
86    }
87    /// Appends an item to `parameter_filters`.
88    ///
89    /// To override the contents of this collection use [`set_parameter_filters`](Self::set_parameter_filters).
90    ///
91    /// <p>Filters to limit the request results.</p>
92    pub fn parameter_filters(mut self, input: crate::types::ParameterStringFilter) -> Self {
93        let mut v = self.parameter_filters.unwrap_or_default();
94        v.push(input);
95        self.parameter_filters = ::std::option::Option::Some(v);
96        self
97    }
98    /// <p>Filters to limit the request results.</p>
99    pub fn set_parameter_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>>) -> Self {
100        self.parameter_filters = input;
101        self
102    }
103    /// <p>Filters to limit the request results.</p>
104    pub fn get_parameter_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>> {
105        &self.parameter_filters
106    }
107    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
108    pub fn max_results(mut self, input: i32) -> Self {
109        self.max_results = ::std::option::Option::Some(input);
110        self
111    }
112    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
113    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
114        self.max_results = input;
115        self
116    }
117    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
118    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
119        &self.max_results
120    }
121    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
122    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.next_token = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
127    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.next_token = input;
129        self
130    }
131    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
132    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
133        &self.next_token
134    }
135    /// <p>Lists parameters that are shared with you.</p><note>
136    /// <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <code>PutResourcePolicy</code> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p>
137    /// <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
138    /// </note>
139    pub fn shared(mut self, input: bool) -> Self {
140        self.shared = ::std::option::Option::Some(input);
141        self
142    }
143    /// <p>Lists parameters that are shared with you.</p><note>
144    /// <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <code>PutResourcePolicy</code> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p>
145    /// <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
146    /// </note>
147    pub fn set_shared(mut self, input: ::std::option::Option<bool>) -> Self {
148        self.shared = input;
149        self
150    }
151    /// <p>Lists parameters that are shared with you.</p><note>
152    /// <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <code>PutResourcePolicy</code> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p>
153    /// <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
154    /// </note>
155    pub fn get_shared(&self) -> &::std::option::Option<bool> {
156        &self.shared
157    }
158    /// Consumes the builder and constructs a [`DescribeParametersInput`](crate::operation::describe_parameters::DescribeParametersInput).
159    pub fn build(
160        self,
161    ) -> ::std::result::Result<crate::operation::describe_parameters::DescribeParametersInput, ::aws_smithy_types::error::operation::BuildError> {
162        ::std::result::Result::Ok(crate::operation::describe_parameters::DescribeParametersInput {
163            filters: self.filters,
164            parameter_filters: self.parameter_filters,
165            max_results: self.max_results,
166            next_token: self.next_token,
167            shared: self.shared,
168        })
169    }
170}