Class Credentials
java.lang.Object
software.amazon.awssdk.crt.auth.credentials.Credentials
A class representing a set of AWS credentials.
-
Constructor Summary
ConstructorsConstructorDescriptionAnonymous Credentials constructor.Credentials
(byte[] accessKeyId, byte[] secretAccessKey, byte[] sessionToken) Credentials
(byte[] accessKeyId, byte[] secretAccessKey, byte[] sessionToken, long expirationTimePointSecs) -
Method Summary
Modifier and TypeMethodDescriptionstatic Credentials
Anonymous Credentials constructor.byte[]
long
byte[]
byte[]
-
Constructor Details
-
Credentials
public Credentials()Anonymous Credentials constructor. Use Anonymous Credentials when you want to skip signing. The recommended approach is to use createAnonymousCredentials(). -
Credentials
public Credentials(byte[] accessKeyId, byte[] secretAccessKey, byte[] sessionToken) - Parameters:
accessKeyId
- - access key id to usesecretAccessKey
- - secret access key to usesessionToken
- - (optional) session token to use
-
Credentials
public Credentials(byte[] accessKeyId, byte[] secretAccessKey, byte[] sessionToken, long expirationTimePointSecs) - Parameters:
accessKeyId
- - access key id to usesecretAccessKey
- - secret access key to usesessionToken
- - (optional) session token to useexpirationTimePointSecs
- - Time when the credentials expires, as secs since epoch.
-
-
Method Details
-
createAnonymousCredentials
Anonymous Credentials constructor. Use Anonymous Credentials when you want to skip signing.- Returns:
- Anonymous Credentials
-
getAccessKeyId
public byte[] getAccessKeyId()- Returns:
- the access key id of the credentials
-
getSecretAccessKey
public byte[] getSecretAccessKey()- Returns:
- the secret access key of the credentials
-
getSessionToken
public byte[] getSessionToken()- Returns:
- the session token of the credentials
-
getExpirationTimePointSecs
public long getExpirationTimePointSecs()- Returns:
- the expiration timepoint as secs since epoch.
-