aws_sdk_sts/operation/assume_root/
_assume_root_output.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)]
5pub struct AssumeRootOutput  {
6    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security token.</p><note>
7    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
8    /// </note>
9    pub credentials: ::std::option::Option<crate::types::Credentials>,
10    /// <p>The source identity specified by the principal that is calling the <code>AssumeRoot</code> operation.</p>
11    /// <p>You can use the <code>aws:SourceIdentity</code> condition key to control access based on the value of source identity. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
12    /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
13    pub source_identity: ::std::option::Option<::std::string::String>,
14    _request_id: Option<String>,
15}
16impl  AssumeRootOutput  {
17    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security token.</p><note>
18    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
19    /// </note>
20    pub fn credentials(&self) -> ::std::option::Option<&crate::types::Credentials> {
21        self.credentials.as_ref()
22    }
23    /// <p>The source identity specified by the principal that is calling the <code>AssumeRoot</code> operation.</p>
24    /// <p>You can use the <code>aws:SourceIdentity</code> condition key to control access based on the value of source identity. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
25    /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
26    pub fn source_identity(&self) -> ::std::option::Option<&str> {
27        self.source_identity.as_deref()
28    }
29}
30impl  ::std::fmt::Debug for AssumeRootOutput  {
31    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
32        let mut formatter = f.debug_struct("AssumeRootOutput");
33        formatter.field("credentials", &"*** Sensitive Data Redacted ***");
34        formatter.field("source_identity", &self.source_identity);
35        formatter.field("_request_id", &self._request_id);
36        formatter.finish()
37    }
38}
39impl ::aws_types::request_id::RequestId for AssumeRootOutput {
40                                    fn request_id(&self) -> Option<&str> {
41                                        self._request_id.as_deref()
42                                    }
43                                }
44impl AssumeRootOutput {
45    /// Creates a new builder-style object to manufacture [`AssumeRootOutput`](crate::operation::assume_root::AssumeRootOutput).
46    pub fn builder() -> crate::operation::assume_root::builders::AssumeRootOutputBuilder {
47        crate::operation::assume_root::builders::AssumeRootOutputBuilder::default()
48    }
49}
50
51/// A builder for [`AssumeRootOutput`](crate::operation::assume_root::AssumeRootOutput).
52#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
53#[non_exhaustive]
54pub struct AssumeRootOutputBuilder {
55    pub(crate) credentials: ::std::option::Option<crate::types::Credentials>,
56    pub(crate) source_identity: ::std::option::Option<::std::string::String>,
57    _request_id: Option<String>,
58}
59impl AssumeRootOutputBuilder {
60    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security token.</p><note>
61    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
62    /// </note>
63    pub fn credentials(mut self, input: crate::types::Credentials) -> Self {
64        self.credentials = ::std::option::Option::Some(input);
65        self
66    }
67    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security token.</p><note>
68    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
69    /// </note>
70    pub fn set_credentials(mut self, input: ::std::option::Option<crate::types::Credentials>) -> Self {
71        self.credentials = input; self
72    }
73    /// <p>The temporary security credentials, which include an access key ID, a secret access key, and a security token.</p><note>
74    /// <p>The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no assumptions about the maximum size.</p>
75    /// </note>
76    pub fn get_credentials(&self) -> &::std::option::Option<crate::types::Credentials> {
77        &self.credentials
78    }
79    /// <p>The source identity specified by the principal that is calling the <code>AssumeRoot</code> operation.</p>
80    /// <p>You can use the <code>aws:SourceIdentity</code> condition key to control access based on the value of source identity. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
81    /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
82    pub fn source_identity(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.source_identity = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The source identity specified by the principal that is calling the <code>AssumeRoot</code> operation.</p>
87    /// <p>You can use the <code>aws:SourceIdentity</code> condition key to control access based on the value of source identity. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
88    /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
89    pub fn set_source_identity(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.source_identity = input; self
91    }
92    /// <p>The source identity specified by the principal that is calling the <code>AssumeRoot</code> operation.</p>
93    /// <p>You can use the <code>aws:SourceIdentity</code> condition key to control access based on the value of source identity. For more information about using source identity, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">Monitor and control actions taken with assumed roles</a> in the <i>IAM User Guide</i>.</p>
94    /// <p>The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-</p>
95    pub fn get_source_identity(&self) -> &::std::option::Option<::std::string::String> {
96        &self.source_identity
97    }
98    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
99                                        self._request_id = Some(request_id.into());
100                                        self
101                                    }
102    
103                                    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
104                                        self._request_id = request_id;
105                                        self
106                                    }
107    /// Consumes the builder and constructs a [`AssumeRootOutput`](crate::operation::assume_root::AssumeRootOutput).
108    pub fn build(self) -> crate::operation::assume_root::AssumeRootOutput {
109        crate::operation::assume_root::AssumeRootOutput {
110            credentials: self.credentials
111            ,
112            source_identity: self.source_identity
113            ,
114            _request_id: self._request_id,
115        }
116    }
117}
118impl ::std::fmt::Debug for AssumeRootOutputBuilder {
119    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
120        let mut formatter = f.debug_struct("AssumeRootOutputBuilder");
121        formatter.field("credentials", &"*** Sensitive Data Redacted ***");
122        formatter.field("source_identity", &self.source_identity);
123        formatter.field("_request_id", &self._request_id);
124        formatter.finish()
125    }
126}
127