aws_sdk_ssm/operation/get_parameters/
_get_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 GetParametersInput {
6    /// <p>The names or Amazon Resource Names (ARNs) of the parameters that you want to query. For parameters shared with you from another account, you must use the full ARNs.</p>
7    /// <p>To query by parameter label, use <code>"Name": "name:label"</code>. To query by parameter version, use <code>"Name": "name:version"</code>.</p><note>
8    /// <p>The results for <code>GetParameters</code> requests are listed in alphabetical order in query responses.</p>
9    /// </note>
10    /// <p>For information about shared 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>
11    pub names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12    /// <p>Return decrypted secure string value. Return decrypted values for secure string parameters. This flag is ignored for <code>String</code> and <code>StringList</code> parameter types.</p>
13    pub with_decryption: ::std::option::Option<bool>,
14}
15impl GetParametersInput {
16    /// <p>The names or Amazon Resource Names (ARNs) of the parameters that you want to query. For parameters shared with you from another account, you must use the full ARNs.</p>
17    /// <p>To query by parameter label, use <code>"Name": "name:label"</code>. To query by parameter version, use <code>"Name": "name:version"</code>.</p><note>
18    /// <p>The results for <code>GetParameters</code> requests are listed in alphabetical order in query responses.</p>
19    /// </note>
20    /// <p>For information about shared 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>
21    ///
22    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.names.is_none()`.
23    pub fn names(&self) -> &[::std::string::String] {
24        self.names.as_deref().unwrap_or_default()
25    }
26    /// <p>Return decrypted secure string value. Return decrypted values for secure string parameters. This flag is ignored for <code>String</code> and <code>StringList</code> parameter types.</p>
27    pub fn with_decryption(&self) -> ::std::option::Option<bool> {
28        self.with_decryption
29    }
30}
31impl GetParametersInput {
32    /// Creates a new builder-style object to manufacture [`GetParametersInput`](crate::operation::get_parameters::GetParametersInput).
33    pub fn builder() -> crate::operation::get_parameters::builders::GetParametersInputBuilder {
34        crate::operation::get_parameters::builders::GetParametersInputBuilder::default()
35    }
36}
37
38/// A builder for [`GetParametersInput`](crate::operation::get_parameters::GetParametersInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct GetParametersInputBuilder {
42    pub(crate) names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
43    pub(crate) with_decryption: ::std::option::Option<bool>,
44}
45impl GetParametersInputBuilder {
46    /// Appends an item to `names`.
47    ///
48    /// To override the contents of this collection use [`set_names`](Self::set_names).
49    ///
50    /// <p>The names or Amazon Resource Names (ARNs) of the parameters that you want to query. For parameters shared with you from another account, you must use the full ARNs.</p>
51    /// <p>To query by parameter label, use <code>"Name": "name:label"</code>. To query by parameter version, use <code>"Name": "name:version"</code>.</p><note>
52    /// <p>The results for <code>GetParameters</code> requests are listed in alphabetical order in query responses.</p>
53    /// </note>
54    /// <p>For information about shared 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>
55    pub fn names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56        let mut v = self.names.unwrap_or_default();
57        v.push(input.into());
58        self.names = ::std::option::Option::Some(v);
59        self
60    }
61    /// <p>The names or Amazon Resource Names (ARNs) of the parameters that you want to query. For parameters shared with you from another account, you must use the full ARNs.</p>
62    /// <p>To query by parameter label, use <code>"Name": "name:label"</code>. To query by parameter version, use <code>"Name": "name:version"</code>.</p><note>
63    /// <p>The results for <code>GetParameters</code> requests are listed in alphabetical order in query responses.</p>
64    /// </note>
65    /// <p>For information about shared 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>
66    pub fn set_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
67        self.names = input;
68        self
69    }
70    /// <p>The names or Amazon Resource Names (ARNs) of the parameters that you want to query. For parameters shared with you from another account, you must use the full ARNs.</p>
71    /// <p>To query by parameter label, use <code>"Name": "name:label"</code>. To query by parameter version, use <code>"Name": "name:version"</code>.</p><note>
72    /// <p>The results for <code>GetParameters</code> requests are listed in alphabetical order in query responses.</p>
73    /// </note>
74    /// <p>For information about shared 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>
75    pub fn get_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
76        &self.names
77    }
78    /// <p>Return decrypted secure string value. Return decrypted values for secure string parameters. This flag is ignored for <code>String</code> and <code>StringList</code> parameter types.</p>
79    pub fn with_decryption(mut self, input: bool) -> Self {
80        self.with_decryption = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>Return decrypted secure string value. Return decrypted values for secure string parameters. This flag is ignored for <code>String</code> and <code>StringList</code> parameter types.</p>
84    pub fn set_with_decryption(mut self, input: ::std::option::Option<bool>) -> Self {
85        self.with_decryption = input;
86        self
87    }
88    /// <p>Return decrypted secure string value. Return decrypted values for secure string parameters. This flag is ignored for <code>String</code> and <code>StringList</code> parameter types.</p>
89    pub fn get_with_decryption(&self) -> &::std::option::Option<bool> {
90        &self.with_decryption
91    }
92    /// Consumes the builder and constructs a [`GetParametersInput`](crate::operation::get_parameters::GetParametersInput).
93    pub fn build(
94        self,
95    ) -> ::std::result::Result<crate::operation::get_parameters::GetParametersInput, ::aws_smithy_types::error::operation::BuildError> {
96        ::std::result::Result::Ok(crate::operation::get_parameters::GetParametersInput {
97            names: self.names,
98            with_decryption: self.with_decryption,
99        })
100    }
101}