public static final class STSAssumeRoleSessionCredentialsProvider.Builder extends Object
Constructor and Description |
---|
STSAssumeRoleSessionCredentialsProvider.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 |
withServiceEndpoint(String serviceEndpoint)
Sets the AWS Security Token Service (STS) endpoint where session
credentials are retrieved from.
|
public STSAssumeRoleSessionCredentialsProvider.Builder(String roleArn, String roleSessionName)
roleArn
- Required roleArn parameter used when starting a sessionroleSessionName
- Required roleSessionName parameter used when starting a sessionpublic 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 build()
Copyright © 2015. All rights reserved.