Class Credentials
- java.lang.Object
-
- software.amazon.awssdk.crt.auth.credentials.Credentials
-
public class Credentials extends Object
A class representing a set of AWS credentials.
-
-
Constructor Summary
Constructors Constructor Description Credentials()
Anonymous Credentials constructor.Credentials(byte[] accessKeyId, byte[] secretAccessKey, byte[] sessionToken)
Credentials(byte[] accessKeyId, byte[] secretAccessKey, byte[] sessionToken, long expirationTimePointSecs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Credentials
createAnonymousCredentials()
Anonymous Credentials constructor.byte[]
getAccessKeyId()
long
getExpirationTimePointSecs()
byte[]
getSecretAccessKey()
byte[]
getSessionToken()
-
-
-
Constructor Detail
-
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 Detail
-
createAnonymousCredentials
public static Credentials 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.
-
-