aws_sdk_sts/client/get_scoped_credentials.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`GetScopedCredentials`](crate::operation::get_scoped_credentials::builders::GetScopedCredentialsFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`policy(impl Into<String>)`](crate::operation::get_scoped_credentials::builders::GetScopedCredentialsFluentBuilder::policy) / [`set_policy(Option<String>)`](crate::operation::get_scoped_credentials::builders::GetScopedCredentialsFluentBuilder::set_policy):<br>required: **false**<br><p>An IAM policy in JSON format that you want to use as a scope down policy.</p> <p>A request must provide at least one of <code>Policy</code> or <code>DurationSeconds</code>. Both parameters are optional individually, but you must specify at least one of them.</p> <p>The resulting session's permissions are the intersection of the calling session's existing permissions and this scope down policy. You cannot use this scope down policy to grant more permissions than the calling session already has.</p> <p>The plaintext of the scope down policy cannot exceed 2,048 characters. The JSON policy characters can be any ASCII character from the space character to the end of the valid character list (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.</p><note> <p>An internal conversion compresses the inline scope down policy into a packed binary format that has a separate limit. If the packed policy exceeds this limit, the request fails with <code>PackedPolicyTooLarge</code>.</p> <p>If the document is not valid IAM policy JSON, the request fails with <code>MalformedPolicyDocument</code>.</p> </note><br>
7 /// - [`duration_seconds(i32)`](crate::operation::get_scoped_credentials::builders::GetScopedCredentialsFluentBuilder::duration_seconds) / [`set_duration_seconds(Option<i32>)`](crate::operation::get_scoped_credentials::builders::GetScopedCredentialsFluentBuilder::set_duration_seconds):<br>required: **false**<br><p>The duration, in seconds, of the resulting scoped down credentials. The value can range from 1 second to 129,600 seconds (36 hours).</p> <p>If you do not specify this value, the scoped down credentials will inherit the calling session's expiration time.</p><br>
8 /// - [`minimum_session_token_size(i32)`](crate::operation::get_scoped_credentials::builders::GetScopedCredentialsFluentBuilder::minimum_session_token_size) / [`set_minimum_session_token_size(Option<i32>)`](crate::operation::get_scoped_credentials::builders::GetScopedCredentialsFluentBuilder::set_minimum_session_token_size):<br>required: **false**<br><p>The minimum size, in bytes, of the session token that STS issues for the request. STS increases the session token to at least this size, regardless of its actual content. The value must not exceed 4,096 bytes. When set to 0 or not specified, the session token size is unchanged.</p><br>
9 /// - [`scoped_session_description(impl Into<String>)`](crate::operation::get_scoped_credentials::builders::GetScopedCredentialsFluentBuilder::scoped_session_description) / [`set_scoped_session_description(Option<String>)`](crate::operation::get_scoped_credentials::builders::GetScopedCredentialsFluentBuilder::set_scoped_session_description):<br>required: **false**<br><p>A caller-supplied description of the scoped session. The value cannot exceed 256 characters. This description is logged to CloudTrail for the request, so you can use it to record the purpose of the scoped session.</p><br>
10 /// - On success, responds with [`GetScopedCredentialsOutput`](crate::operation::get_scoped_credentials::GetScopedCredentialsOutput) with field(s):
11 /// - [`credentials(Option<Credentials>)`](crate::operation::get_scoped_credentials::GetScopedCredentialsOutput::credentials): <p>The temporary security credentials for the scoped down session, which include an access key ID, a secret access key, and a security token.</p><note> <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> </note>
12 /// - [`session_info(Option<ScopedSession>)`](crate::operation::get_scoped_credentials::GetScopedCredentialsOutput::session_info): <p>Metadata about the resulting scoped session, including its identifier and ARN. Because the identity does not change, the identifiers reflect the same principal and session name as the calling session.</p>
13 /// - [`session_token_utilization(Option<i32>)`](crate::operation::get_scoped_credentials::GetScopedCredentialsOutput::session_token_utilization): <p>The percentage (0-100) of the maximum allowed session token size that the returned session token consumes.</p>
14 /// - [`session_token_size(Option<i32>)`](crate::operation::get_scoped_credentials::GetScopedCredentialsOutput::session_token_size): <p>The size, in bytes, of the session token returned in the Credentials for this response.</p>
15 /// - [`scoped_policies_count(Option<i32>)`](crate::operation::get_scoped_credentials::GetScopedCredentialsOutput::scoped_policies_count): <p><code>GetScopedCredentials</code> can be called recursively and <code>ScopedPoliciesCount</code> specifies the number of scope down policies applied to the session. Each recursive call adds another scope down policy layer. A maximum of 3 scope down policy layers are allowed per session. If a session already has 3 <code>GetScopedCredentials</code> scope-down policies, a subsequent <code>GetScopedCredentials</code> call that supplies a <code>Policy</code> (attempting to append a fourth scope-down policy) is denied.</p>
16 /// - [`source_identity(Option<String>)`](crate::operation::get_scoped_credentials::GetScopedCredentialsOutput::source_identity): <p>The source identity of the calling session, carried forward unchanged. This operation never sets or modifies the source identity; it reflects the value established when the source identity was first set. For more information, 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 IAM User Guide.</p>
17 /// - On failure, responds with [`SdkError<GetScopedCredentialsError>`](crate::operation::get_scoped_credentials::GetScopedCredentialsError)
18 pub fn get_scoped_credentials(&self) -> crate::operation::get_scoped_credentials::builders::GetScopedCredentialsFluentBuilder {
19 crate::operation::get_scoped_credentials::builders::GetScopedCredentialsFluentBuilder::new(self.handle.clone())
20 }
21}