public static final class STSAssumeRoleSessionCredentialsProvider.Builder extends Object
Constructor and Description |
---|
Builder(String roleArn,
String roleSessionName) |
@Deprecated public STSAssumeRoleSessionCredentialsProvider.Builder withLongLivedCredentials(AWSCredentials longLivedCredentials)
withStsClient(AWSSecurityTokenService)
setter. Use AWSSecurityTokenServiceClientBuilder
to create an STS client.longLivedCredentials
- Credentials used to generate sessions in the assumed role@Deprecated public STSAssumeRoleSessionCredentialsProvider.Builder withLongLivedCredentialsProvider(AWSCredentialsProvider longLivedCredentialsProvider)
withStsClient(AWSSecurityTokenService)
setter. Use AWSSecurityTokenServiceClientBuilder
to create an STS client.longLivedCredentialsProvider
- A credentials provider used to generate sessions in
the assumed role@Deprecated public STSAssumeRoleSessionCredentialsProvider.Builder withClientConfiguration(ClientConfiguration clientConfiguration)
withStsClient(AWSSecurityTokenService)
setter. Use AWSSecurityTokenServiceClientBuilder
to create an STS client.clientConfiguration
- ClientConfiguration for the AWSSecurityTokenService clientpublic STSAssumeRoleSessionCredentialsProvider.Builder withExternalId(String roleExternalId)
roleExternalId
- An external id used in the service call used to retrieve session
credentialspublic STSAssumeRoleSessionCredentialsProvider.Builder withRoleSessionDurationSeconds(int roleSessionDurationSeconds)
roleSessionDurationSeconds
- The duration for which we want to have an assumed role
session to be active.@Deprecated public STSAssumeRoleSessionCredentialsProvider.Builder withServiceEndpoint(String serviceEndpoint)
withStsClient(AWSSecurityTokenService)
setter. Use AWSSecurityTokenServiceClientBuilder
to create an STS client.public STSAssumeRoleSessionCredentialsProvider.Builder withScopeDownPolicy(String scopeDownPolicy)
An IAM policy in JSON format to scope down permissions granted from the assume role.
This parameter is optional. If you pass a policy, the temporary security credentials that are returned by the operation have the permissions that are allowed by both (the intersection of) the access policy of the role that is being assumed, and the policy that you pass. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use the passed policy to grant permissions that are in excess of those allowed by the access policy of the role that is being assumed. For more information, see Permissions for AssumeRole, AssumeRoleWithSAML, and AssumeRoleWithWebIdentity in the IAM User Guide.
The format for this parameter, as described by its regex pattern, is a string of characters up to 2048 characters in length. The characters can be any ASCII character from the space character to the end of the valid character list ( -ÿ). It can also include the tab ( ), linefeed ( ), and carriage return ( ) characters.
The policy plain text must be 2048 bytes or shorter. However, an internal conversion compresses it into a packed binary format with a separate limit. The PackedPolicySize response element indicates by percentage how close to the upper size limit the policy is, with 100% equaling the maximum allowed size.
scopeDownPolicy
- An IAM policy in JSON format.
This parameter is optional. If you pass a policy, the temporary security credentials that are returned by the operation have the permissions that are allowed by both (the intersection of) the access policy of the role that is being assumed, and the policy that you pass. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use the passed policy to grant permissions that are in excess of those allowed by the access policy of the role that is being assumed. For more information, see Permissions for AssumeRole, AssumeRoleWithSAML, and AssumeRoleWithWebIdentity in the IAM User Guide.
The format for this parameter, as described by its regex pattern, is a string of characters up to 2048 characters in length. The characters can be any ASCII character from the space character to the end of the valid character list ( -ÿ). It can also include the tab ( ), linefeed ( ), and carriage return ( ) characters.
The policy plain text must be 2048 bytes or shorter. However, an internal conversion compresses it into a packed binary format with a separate limit. The PackedPolicySize response element indicates by percentage how close to the upper size limit the policy is, with 100% equaling the maximum allowed size.
public STSAssumeRoleSessionCredentialsProvider.Builder withStsClient(AWSSecurityTokenService sts)
AWSSecurityTokenServiceClientBuilder
for an easy
way to configure and create an STS client.
Note: This setter is mutually exclusive to the deprecated withClientConfiguration(ClientConfiguration)
, withLongLivedCredentials(AWSCredentials)
,
withLongLivedCredentialsProvider(AWSCredentialsProvider)
, and withServiceEndpoint(String)
setters. Construct a fully configured STS client via the
AWSSecurityTokenServiceClientBuilder
and
pass it to this setter.
sts
- Custom STS client to use.public STSAssumeRoleSessionCredentialsProvider build()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.