public class CredentialsProviderFactory extends Object
| Constructor and Description |
|---|
CredentialsProviderFactory() |
| Modifier and Type | Method and Description |
|---|---|
static DefaultCredentialProvider |
newDefaultCredentialProvider(String accessKeyId,
String secretAccessKey)
Create an instance of DefaultCredentialProvider.
|
static DefaultCredentialProvider |
newDefaultCredentialProvider(String accessKeyId,
String secretAccessKey,
String securityToken)
Create an instance of DefaultCredentialProvider.
|
static EnvironmentVariableCredentialsProvider |
newEnvironmentVariableCredentialsProvider()
Create an instance of EnvironmentVariableCredentialsProvider by reading
the environment variable to obtain the ak/sk, such as TABLESTORE_ACCESS_KEY_ID
and TABLESTORE_ACCESS_KEY_SECRET
|
static InstanceProfileCredentialsProvider |
newInstanceProfileCredentialsProvider(String roleName)
Create an instance of InstanceProfileCredentialsProvider obtained the
ak/sk by ECS Metadata Service.
|
static SystemPropertiesCredentialsProvider |
newSystemPropertiesCredentialsProvider()
Create an instance of EnvironmentVariableCredentialsProvider by reading
the java system property used when starting up the JVM to enable the
default metrics collected by the TableStore SDK, such as -Dtablestore.accessKeyId and
-Dtablestore.accessKeySecret.
|
public static DefaultCredentialProvider newDefaultCredentialProvider(String accessKeyId, String secretAccessKey)
accessKeyId - Access Key ID.secretAccessKey - Secret Access Key.DefaultCredentialProvider instance.public static DefaultCredentialProvider newDefaultCredentialProvider(String accessKeyId, String secretAccessKey, String securityToken)
accessKeyId - Access Key ID.secretAccessKey - Secret Access Key.securityToken - Security Token from STS.DefaultCredentialProvider instance.public static EnvironmentVariableCredentialsProvider newEnvironmentVariableCredentialsProvider() throws ClientException
EnvironmentVariableCredentialsProvider instance.ClientException - TableStore Client side exception.public static SystemPropertiesCredentialsProvider newSystemPropertiesCredentialsProvider() throws ClientException
SystemPropertiesCredentialsProvider instance.ClientException - TableStore Client side exception.public static InstanceProfileCredentialsProvider newInstanceProfileCredentialsProvider(String roleName) throws ClientException
roleName - Role name of the ECS binding, NOT ROLE ARN.InstanceProfileCredentialsProvider instance.ClientException - TableSTore Client side exception.Copyright © 2024. All Rights Reserved.