public class Credentials extends Object implements Serializable
AWS credentials for API authentication.
Constructor and Description |
---|
Credentials()
Default constructor for Credentials object.
|
Credentials(String accessKeyId,
String secretAccessKey,
String sessionToken,
Date expiration)
Constructs a new Credentials object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getAccessKeyId()
The access key ID that identifies the temporary security credentials.
|
Date |
getExpiration()
The date on which the current credentials expire.
|
String |
getSecretAccessKey()
The secret access key that can be used to sign requests.
|
String |
getSessionToken()
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.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Credentials |
withAccessKeyId(String accessKeyId)
The access key ID that identifies the temporary security credentials.
|
Credentials |
withExpiration(Date expiration)
The date on which the current credentials expire.
|
Credentials |
withSecretAccessKey(String secretAccessKey)
The secret access key that can be used to sign requests.
|
Credentials |
withSessionToken(String sessionToken)
The token that users must pass to the service API to use the temporary
credentials.
|
public Credentials()
public Credentials(String accessKeyId, String secretAccessKey, String sessionToken, 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 String getAccessKeyId()
The access key ID that identifies the temporary security credentials.
Constraints:
Length: 16 - 128
Pattern: [\w]*
The access key ID that identifies the temporary security credentials.
public void setAccessKeyId(String accessKeyId)
The access key ID that identifies the temporary security credentials.
Constraints:
Length: 16 - 128
Pattern: [\w]*
accessKeyId
- The access key ID that identifies the temporary security credentials.
public Credentials withAccessKeyId(String accessKeyId)
The access key ID that identifies the temporary security credentials.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 16 - 128
Pattern: [\w]*
accessKeyId
- The access key ID that identifies the temporary security credentials.
public String getSecretAccessKey()
The secret access key that can be used to sign requests.
The secret access key that can be used to sign requests.
public void setSecretAccessKey(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 Credentials withSecretAccessKey(String secretAccessKey)
The secret access key that can be used to sign requests.
Returns a reference to this object so that method calls can be chained together.
secretAccessKey
- The secret access key that can be used to sign requests.
public String getSessionToken()
The token that users must pass to the service API to use the temporary credentials.
The token that users must pass to the service API to use the temporary credentials.
public void setSessionToken(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 Credentials withSessionToken(String sessionToken)
The token that users must pass to the service API to use the temporary credentials.
Returns a reference to this object so that method calls can be chained together.
sessionToken
- The token that users must pass to the service API to use the temporary credentials.
public Date getExpiration()
The date on which the current credentials expire.
The date on which the current credentials expire.
public void setExpiration(Date expiration)
The date on which the current credentials expire.
expiration
- The date on which the current credentials expire.
public Credentials withExpiration(Date expiration)
The date on which the current credentials expire.
Returns a reference to this object so that method calls can be chained together.
expiration
- The date on which the current credentials expire.
public String toString()
toString
in class Object
Object.toString()
Copyright © 2019. All rights reserved.