public class Credentials
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
AWS credentials for API authentication.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
accessKeyId
The access key ID that identifies the temporary security credentials.
|
private java.util.Date |
expiration
The date on which the current credentials expire.
|
private java.lang.String |
secretAccessKey
The secret access key that can be used to sign requests.
|
private java.lang.String |
sessionToken
The token that users must pass to the service API to use the temporary
credentials.
|
Constructor and Description |
---|
Credentials()
Default constructor for Credentials object.
|
Credentials(java.lang.String accessKeyId,
java.lang.String secretAccessKey,
java.lang.String sessionToken,
java.util.Date expiration)
Constructs a new Credentials object.
|
Modifier and Type | Method and Description |
---|---|
Credentials |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAccessKeyId()
The access key ID that identifies the temporary security credentials.
|
java.util.Date |
getExpiration()
The date on which the current credentials expire.
|
java.lang.String |
getSecretAccessKey()
The secret access key that can be used to sign requests.
|
java.lang.String |
getSessionToken()
The token that users must pass to the service API to use the temporary
credentials.
|
int |
hashCode() |
void |
setAccessKeyId(java.lang.String accessKeyId)
The access key ID that identifies the temporary security credentials.
|
void |
setExpiration(java.util.Date expiration)
The date on which the current credentials expire.
|
void |
setSecretAccessKey(java.lang.String secretAccessKey)
The secret access key that can be used to sign requests.
|
void |
setSessionToken(java.lang.String sessionToken)
The token that users must pass to the service API to use the temporary
credentials.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Credentials |
withAccessKeyId(java.lang.String accessKeyId)
The access key ID that identifies the temporary security credentials.
|
Credentials |
withExpiration(java.util.Date expiration)
The date on which the current credentials expire.
|
Credentials |
withSecretAccessKey(java.lang.String secretAccessKey)
The secret access key that can be used to sign requests.
|
Credentials |
withSessionToken(java.lang.String sessionToken)
The token that users must pass to the service API to use the temporary
credentials.
|
private java.lang.String accessKeyId
The access key ID that identifies the temporary security credentials.
private java.lang.String secretAccessKey
The secret access key that can be used to sign requests.
private java.lang.String sessionToken
The token that users must pass to the service API to use the temporary credentials.
private java.util.Date expiration
The date on which the current credentials expire.
public Credentials()
public Credentials(java.lang.String accessKeyId, java.lang.String secretAccessKey, java.lang.String sessionToken, java.util.Date expiration)
accessKeyId
- The access key ID that identifies the temporary security
credentials.secretAccessKey
- The secret access key that can be used to sign requests.sessionToken
- The token that users must pass to the service API to use the
temporary credentials.expiration
- The date on which the current credentials expire.public void setAccessKeyId(java.lang.String accessKeyId)
The access key ID that identifies the temporary security credentials.
accessKeyId
- The access key ID that identifies the temporary security
credentials.public java.lang.String getAccessKeyId()
The access key ID that identifies the temporary security credentials.
public Credentials withAccessKeyId(java.lang.String accessKeyId)
The access key ID that identifies the temporary security credentials.
accessKeyId
- The access key ID that identifies the temporary security
credentials.public void setSecretAccessKey(java.lang.String secretAccessKey)
The secret access key that can be used to sign requests.
secretAccessKey
- The secret access key that can be used to sign requests.public java.lang.String getSecretAccessKey()
The secret access key that can be used to sign requests.
public Credentials withSecretAccessKey(java.lang.String secretAccessKey)
The secret access key that can be used to sign requests.
secretAccessKey
- The secret access key that can be used to sign requests.public void setSessionToken(java.lang.String sessionToken)
The token that users must pass to the service API to use the temporary credentials.
sessionToken
- The token that users must pass to the service API to use the
temporary credentials.public java.lang.String getSessionToken()
The token that users must pass to the service API to use the temporary credentials.
public Credentials withSessionToken(java.lang.String sessionToken)
The token that users must pass to the service API to use the temporary credentials.
sessionToken
- The token that users must pass to the service API to use the
temporary credentials.public void setExpiration(java.util.Date expiration)
The date on which the current credentials expire.
expiration
- The date on which the current credentials expire.public java.util.Date getExpiration()
The date on which the current credentials expire.
public Credentials withExpiration(java.util.Date expiration)
The date on which the current credentials expire.
expiration
- The date on which the current credentials expire.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Credentials clone()
clone
in class java.lang.Object