@Deprecated public class STSSessionCredentials extends java.lang.Object implements AWSRefreshableSessionCredentials
Calls to getAWSAccessKeyId(),
getAWSSecretKey(), and
getSessionToken() should be synchronized on
this object to prevent races on the boundary of session expiration.
Alternately, clients can call
getImmutableCredentials() to ensure a
consistent set of access key, secret key, and token.
This class is deprecated and should not be used anymore.
Instead, use STSSessionCredentialsProvider.
| 修飾子とタイプ | フィールドと説明 |
|---|---|
static int |
DEFAULT_DURATION_SECONDS
非推奨です。
|
| コンストラクタと説明 |
|---|
STSSessionCredentials(AWSCredentials credentials)
非推奨です。
Create a new credentials object that will periodically and automatically
obtain a session from STS.
|
STSSessionCredentials(AWSCredentials credentials,
int sessionDurationSeconds)
非推奨です。
Create a new credentials object that will periodically and automatically
obtain a session from STS.
|
STSSessionCredentials(AWSSecurityTokenService stsClient)
非推奨です。
Create a new credentials object that will periodically and automatically
obtain a session from STS, using a preconfigured STS client.
|
STSSessionCredentials(AWSSecurityTokenService stsClient,
int sessionDuratinSeconds)
非推奨です。
Create a new credentials object that will periodically and automatically
obtain a session from STS, using a preconfigured STS client.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
java.lang.String |
getAWSAccessKeyId()
非推奨です。
Returns the AWS access key for the current STS session, beginning a new
one if necessary.
|
java.lang.String |
getAWSSecretKey()
非推奨です。
Returns the AWS secret key for the current STS session, beginning a new
one if necessary.
|
AWSSessionCredentials |
getImmutableCredentials()
非推奨です。
Returns immutable session credentials for this session, beginning a new one if necessary.
|
java.lang.String |
getSessionToken()
非推奨です。
Returns the session token for the current STS session, beginning a new
one if necessary.
|
void |
refreshCredentials()
非推奨です。
Refreshes the session credentials from STS.
|
public static final int DEFAULT_DURATION_SECONDS
public STSSessionCredentials(AWSCredentials credentials)
credentials - Primary AWS account credentials.public STSSessionCredentials(AWSCredentials credentials, int sessionDurationSeconds)
credentials - Primary AWS account credentials.sessionDurationSeconds - The duration, in seconds, for each session to last.public STSSessionCredentials(AWSSecurityTokenService stsClient)
stsClient - A pre-configured STS client from which to get credentials.public STSSessionCredentials(AWSSecurityTokenService stsClient, int sessionDuratinSeconds)
stsClient - A pre-configured STS client from which to get credentials.settings - Session settings for all sessions createdpublic java.lang.String getAWSAccessKeyId()
Clients are encouraged to call the atomic
RenewableAWSSessionCredentials#getImmutableCredentials() as a proxy to this method.
getAWSAccessKeyId インタフェース内 AWSCredentialspublic java.lang.String getAWSSecretKey()
Clients are encouraged to call the atomic
RenewableAWSSessionCredentials#getImmutableCredentials() as a proxy to this method.
getAWSSecretKey インタフェース内 AWSCredentialspublic java.lang.String getSessionToken()
Clients are encouraged to call the atomic
RenewableAWSSessionCredentials#getImmutableCredentials() as a proxy to this method.
getSessionToken インタフェース内 AWSSessionCredentialspublic AWSSessionCredentials getImmutableCredentials()
public void refreshCredentials()
refreshCredentials インタフェース内 AWSRefreshableSessionCredentials