public static final class STSAssumeRoleSessionCredentialsProvider.Builder extends Object
| Constructor and Description |
|---|
Builder(String roleArn,
String roleSessionName) |
| Modifier and Type | Method and Description |
|---|---|
STSAssumeRoleSessionCredentialsProvider |
build()
Build the configured provider
|
STSAssumeRoleSessionCredentialsProvider.Builder |
withClientConfiguration(ClientConfiguration clientConfiguration)
Set the client configuration used to create the AWSSecurityTokenService
|
STSAssumeRoleSessionCredentialsProvider.Builder |
withExternalId(String roleExternalId)
Set the roleExternalId parameter that is used when retrieving session credentials under
an assumed role.
|
STSAssumeRoleSessionCredentialsProvider.Builder |
withLongLivedCredentials(AWSCredentials longLivedCredentials)
Set credentials to use when retrieving session credentials This is not the recommended
approach.
|
STSAssumeRoleSessionCredentialsProvider.Builder |
withLongLivedCredentialsProvider(AWSCredentialsProvider longLivedCredentialsProvider)
Set credentials provider to use when retrieving session credentials
|
STSAssumeRoleSessionCredentialsProvider.Builder |
withRoleSessionDurationSeconds(int roleSessionDurationSeconds)
Set the roleSessionDurationSeconds that is used when creating a new assumed role
session.
|
STSAssumeRoleSessionCredentialsProvider.Builder |
withScopeDownPolicy(String scopeDownPolicy)
An IAM policy in JSON format to scope down permissions granted from the assume role.
|
STSAssumeRoleSessionCredentialsProvider.Builder |
withServiceEndpoint(String serviceEndpoint)
Sets the AWS Security Token Service (STS) endpoint where session credentials are
retrieved from.
|
STSAssumeRoleSessionCredentialsProvider.Builder |
withStsClient(AWSSecurityTokenService sts)
Sets a preconfigured STS client to use for the credentials provider.
|
public STSAssumeRoleSessionCredentialsProvider.Builder withLongLivedCredentials(AWSCredentials longLivedCredentials)
longLivedCredentials - Credentials used to generate sessions in the assumed rolepublic STSAssumeRoleSessionCredentialsProvider.Builder withLongLivedCredentialsProvider(AWSCredentialsProvider longLivedCredentialsProvider)
longLivedCredentialsProvider - A credentials provider used to generate sessions in
the assumed rolepublic STSAssumeRoleSessionCredentialsProvider.Builder withClientConfiguration(ClientConfiguration clientConfiguration)
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.public STSAssumeRoleSessionCredentialsProvider.Builder withServiceEndpoint(String serviceEndpoint)
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)
withClientConfiguration(ClientConfiguration), withLongLivedCredentials(AWSCredentials),
withServiceEndpoint(String), etc).sts - Custom STS client to use.public STSAssumeRoleSessionCredentialsProvider build()
Copyright © 2016. All rights reserved.