public class STSAssumeRoleSessionCredentialsProvider extends Object implements AlibabaCloudCredentialsProvider
| Modifier and Type | Field and Description |
|---|---|
long |
assumeRoleRound
For test
To know how many rounds AssumeRole has been called
|
static int |
DEFAULT_DURATION_SECONDS
Default duration for started sessions.
|
| Constructor and Description |
|---|
STSAssumeRoleSessionCredentialsProvider(AlibabaCloudCredentialsProvider longLivedCredentialsProvider,
String roleArn,
IClientProfile clientProfile) |
STSAssumeRoleSessionCredentialsProvider(AlibabaCloudCredentials longLivedCredentials,
String roleArn,
IClientProfile clientProfile) |
STSAssumeRoleSessionCredentialsProvider(String accessKeyId,
String accessKeySecret,
String roleSessionName,
String roleArn,
String regionId) |
STSAssumeRoleSessionCredentialsProvider(String accessKeyId,
String accessKeySecret,
String roleSessionName,
String roleArn,
String regionId,
String policy) |
| Modifier and Type | Method and Description |
|---|---|
AlibabaCloudCredentials |
getCredentials() |
static String |
getNewRoleSessionName() |
STSAssumeRoleSessionCredentialsProvider |
withRoleSessionDurationSeconds(long roleSessionDurationSeconds) |
STSAssumeRoleSessionCredentialsProvider |
withRoleSessionName(String roleSessionName) |
STSAssumeRoleSessionCredentialsProvider |
withSTSClient(IAcsClient client) |
public static final int DEFAULT_DURATION_SECONDS
public long assumeRoleRound
public STSAssumeRoleSessionCredentialsProvider(AlibabaCloudCredentials longLivedCredentials, String roleArn, IClientProfile clientProfile)
public STSAssumeRoleSessionCredentialsProvider(AlibabaCloudCredentialsProvider longLivedCredentialsProvider, String roleArn, IClientProfile clientProfile)
public STSAssumeRoleSessionCredentialsProvider(String accessKeyId, String accessKeySecret, String roleSessionName, String roleArn, String regionId)
public static String getNewRoleSessionName()
public STSAssumeRoleSessionCredentialsProvider withRoleSessionName(String roleSessionName)
public STSAssumeRoleSessionCredentialsProvider withRoleSessionDurationSeconds(long roleSessionDurationSeconds)
public STSAssumeRoleSessionCredentialsProvider withSTSClient(IAcsClient client)
public AlibabaCloudCredentials getCredentials() throws ClientException, ServerException
getCredentials in interface AlibabaCloudCredentialsProviderClientExceptionServerExceptionCopyright © 2022. All rights reserved.