aws_sdk_ssm/operation/get_parameter/_get_parameter_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 GetParameterInput {
6 /// <p>The name or Amazon Resource Name (ARN) of the parameter that you want to query. For parameters shared with you from another account, you must use the full ARN.</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>
8 /// <p>For more 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>
9 pub name: ::std::option::Option<::std::string::String>,
10 /// <p>Return decrypted values for secure string parameters. This flag is ignored for <code>String</code> and <code>StringList</code> parameter types.</p>
11 pub with_decryption: ::std::option::Option<bool>,
12}
13impl GetParameterInput {
14 /// <p>The name or Amazon Resource Name (ARN) of the parameter that you want to query. For parameters shared with you from another account, you must use the full ARN.</p>
15 /// <p>To query by parameter label, use <code>"Name": "name:label"</code>. To query by parameter version, use <code>"Name": "name:version"</code>.</p>
16 /// <p>For more 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>
17 pub fn name(&self) -> ::std::option::Option<&str> {
18 self.name.as_deref()
19 }
20 /// <p>Return decrypted values for secure string parameters. This flag is ignored for <code>String</code> and <code>StringList</code> parameter types.</p>
21 pub fn with_decryption(&self) -> ::std::option::Option<bool> {
22 self.with_decryption
23 }
24}
25impl GetParameterInput {
26 /// Creates a new builder-style object to manufacture [`GetParameterInput`](crate::operation::get_parameter::GetParameterInput).
27 pub fn builder() -> crate::operation::get_parameter::builders::GetParameterInputBuilder {
28 crate::operation::get_parameter::builders::GetParameterInputBuilder::default()
29 }
30}
31
32/// A builder for [`GetParameterInput`](crate::operation::get_parameter::GetParameterInput).
33#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
34#[non_exhaustive]
35pub struct GetParameterInputBuilder {
36 pub(crate) name: ::std::option::Option<::std::string::String>,
37 pub(crate) with_decryption: ::std::option::Option<bool>,
38}
39impl GetParameterInputBuilder {
40 /// <p>The name or Amazon Resource Name (ARN) of the parameter that you want to query. For parameters shared with you from another account, you must use the full ARN.</p>
41 /// <p>To query by parameter label, use <code>"Name": "name:label"</code>. To query by parameter version, use <code>"Name": "name:version"</code>.</p>
42 /// <p>For more 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>
43 /// This field is required.
44 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45 self.name = ::std::option::Option::Some(input.into());
46 self
47 }
48 /// <p>The name or Amazon Resource Name (ARN) of the parameter that you want to query. For parameters shared with you from another account, you must use the full ARN.</p>
49 /// <p>To query by parameter label, use <code>"Name": "name:label"</code>. To query by parameter version, use <code>"Name": "name:version"</code>.</p>
50 /// <p>For more 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>
51 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.name = input;
53 self
54 }
55 /// <p>The name or Amazon Resource Name (ARN) of the parameter that you want to query. For parameters shared with you from another account, you must use the full ARN.</p>
56 /// <p>To query by parameter label, use <code>"Name": "name:label"</code>. To query by parameter version, use <code>"Name": "name:version"</code>.</p>
57 /// <p>For more 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>
58 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
59 &self.name
60 }
61 /// <p>Return decrypted values for secure string parameters. This flag is ignored for <code>String</code> and <code>StringList</code> parameter types.</p>
62 pub fn with_decryption(mut self, input: bool) -> Self {
63 self.with_decryption = ::std::option::Option::Some(input);
64 self
65 }
66 /// <p>Return decrypted values for secure string parameters. This flag is ignored for <code>String</code> and <code>StringList</code> parameter types.</p>
67 pub fn set_with_decryption(mut self, input: ::std::option::Option<bool>) -> Self {
68 self.with_decryption = input;
69 self
70 }
71 /// <p>Return decrypted values for secure string parameters. This flag is ignored for <code>String</code> and <code>StringList</code> parameter types.</p>
72 pub fn get_with_decryption(&self) -> &::std::option::Option<bool> {
73 &self.with_decryption
74 }
75 /// Consumes the builder and constructs a [`GetParameterInput`](crate::operation::get_parameter::GetParameterInput).
76 pub fn build(
77 self,
78 ) -> ::std::result::Result<crate::operation::get_parameter::GetParameterInput, ::aws_smithy_types::error::operation::BuildError> {
79 ::std::result::Result::Ok(crate::operation::get_parameter::GetParameterInput {
80 name: self.name,
81 with_decryption: self.with_decryption,
82 })
83 }
84}