Class Credentials
- All Implemented Interfaces:
Serializable
,Cloneable
AWS credentials for API authentication.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for Credentials object.Credentials
(String accessKeyId, String secretAccessKey, String sessionToken, Date expiration) Constructs a new Credentials object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The access key ID that identifies the temporary security credentials.The date on which the current credentials expire.The secret access key that can be used to sign requests.The token that users must pass to the service API to use the temporary credentials.int
hashCode()
void
setAccessKeyId
(String accessKeyId) The access key ID that identifies the temporary security credentials.void
setExpiration
(Date expiration) The date on which the current credentials expire.void
setSecretAccessKey
(String secretAccessKey) The secret access key that can be used to sign requests.void
setSessionToken
(String sessionToken) The token that users must pass to the service API to use the temporary credentials.toString()
Returns a string representation of this object; useful for testing and debugging.withAccessKeyId
(String accessKeyId) The access key ID that identifies the temporary security credentials.withExpiration
(Date expiration) The date on which the current credentials expire.withSecretAccessKey
(String secretAccessKey) The secret access key that can be used to sign requests.withSessionToken
(String sessionToken) The token that users must pass to the service API to use the temporary credentials.
-
Constructor Details
-
Credentials
public Credentials()Default constructor for Credentials object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it. -
Credentials
public Credentials(String accessKeyId, String secretAccessKey, String sessionToken, Date expiration) Constructs a new Credentials object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
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.
-
-
Method Details
-
setAccessKeyId
The access key ID that identifies the temporary security credentials.
- Parameters:
accessKeyId
- The access key ID that identifies the temporary security credentials.
-
getAccessKeyId
The access key ID that identifies the temporary security credentials.
- Returns:
- The access key ID that identifies the temporary security credentials.
-
withAccessKeyId
The access key ID that identifies the temporary security credentials.
- Parameters:
accessKeyId
- The access key ID that identifies the temporary security credentials.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSecretAccessKey
The secret access key that can be used to sign requests.
- Parameters:
secretAccessKey
- The secret access key that can be used to sign requests.
-
getSecretAccessKey
The secret access key that can be used to sign requests.
- Returns:
- The secret access key that can be used to sign requests.
-
withSecretAccessKey
The secret access key that can be used to sign requests.
- Parameters:
secretAccessKey
- The secret access key that can be used to sign requests.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSessionToken
The token that users must pass to the service API to use the temporary credentials.
- Parameters:
sessionToken
- The token that users must pass to the service API to use the temporary credentials.
-
getSessionToken
The token that users must pass to the service API to use the temporary credentials.
- Returns:
- The token that users must pass to the service API to use the temporary credentials.
-
withSessionToken
The token that users must pass to the service API to use the temporary credentials.
- Parameters:
sessionToken
- The token that users must pass to the service API to use the temporary credentials.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setExpiration
The date on which the current credentials expire.
- Parameters:
expiration
- The date on which the current credentials expire.
-
getExpiration
The date on which the current credentials expire.
- Returns:
- The date on which the current credentials expire.
-
withExpiration
The date on which the current credentials expire.
- Parameters:
expiration
- The date on which the current credentials expire.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-