public class Credential extends Object
We mainly use two of them:
Permanent credential: SecretId & SecretKey, can only be obtained from Tencent Cloud Management Console, https://console.cloud.tencent.com/cam/capi.
Ephemeral credential, can be obtained from Security Token Service (STS), has three dimensions: SecretId, SecretKey and Token. It will expire after a short time, hence you need to invoke STS API to refresh it.
Modifier and Type | Class and Description |
---|---|
static interface |
Credential.Updater |
Constructor and Description |
---|
Credential() |
Credential(String secretId,
String secretKey) |
Credential(String secretId,
String secretKey,
String token) |
Credential(String secretId,
String secretKey,
String token,
Credential.Updater updater) |
Modifier and Type | Method and Description |
---|---|
String |
getSecretId() |
String |
getSecretKey() |
String |
getToken() |
Credential.Updater |
getUpdater() |
void |
setSecretId(String secretId) |
void |
setSecretKey(String secretKey) |
void |
setToken(String token) |
void |
setUpdater(Credential.Updater updater) |
public Credential()
public Credential(String secretId, String secretKey, String token, Credential.Updater updater)
public Credential.Updater getUpdater()
public void setUpdater(Credential.Updater updater)
public String getSecretId()
public void setSecretId(String secretId)
public String getSecretKey()
public void setSecretKey(String secretKey)
public String getToken()
public void setToken(String token)
Copyright © 2024. All rights reserved.