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 |
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 withStsClient(AWSSecurityTokenService sts)
withClientConfiguration(ClientConfiguration)
, withLongLivedCredentials(AWSCredentials)
,
withServiceEndpoint(String)
, etc).sts
- Custom STS client to use.public STSAssumeRoleSessionCredentialsProvider build()
Copyright © 2016. All rights reserved.