public class AccessKey extends Object implements Serializable, Cloneable
Contains information about an AWS access key.
This data type is used as a response element in the CreateAccessKey and ListAccessKeys actions.
NOTE:The SecretAccessKey value is returned only in response to CreateAccessKey. You can get a secret access key only when you first create an access key; you cannot recover the secret access key later. If you lose a secret access key, you must create a new access key.
Constructor and Description |
---|
AccessKey()
Default constructor for a new AccessKey object.
|
AccessKey(String userName,
String accessKeyId,
StatusType status,
String secretAccessKey)
Constructs a new AccessKey object.
|
AccessKey(String userName,
String accessKeyId,
String status,
String secretAccessKey)
Constructs a new AccessKey object.
|
Modifier and Type | Method and Description |
---|---|
AccessKey |
clone() |
boolean |
equals(Object obj) |
String |
getAccessKeyId()
The ID for this access key.
|
Date |
getCreateDate()
The date when the access key was created.
|
String |
getSecretAccessKey()
The secret key used to sign requests.
|
String |
getStatus()
The status of the access key.
|
String |
getUserName()
The name of the IAM user that the access key is associated with.
|
int |
hashCode() |
void |
setAccessKeyId(String accessKeyId)
The ID for this access key.
|
void |
setCreateDate(Date createDate)
The date when the access key was created.
|
void |
setSecretAccessKey(String secretAccessKey)
The secret key used to sign requests.
|
void |
setStatus(StatusType status)
The status of the access key.
|
void |
setStatus(String status)
The status of the access key.
|
void |
setUserName(String userName)
The name of the IAM user that the access key is associated with.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AccessKey |
withAccessKeyId(String accessKeyId)
The ID for this access key.
|
AccessKey |
withCreateDate(Date createDate)
The date when the access key was created.
|
AccessKey |
withSecretAccessKey(String secretAccessKey)
The secret key used to sign requests.
|
AccessKey |
withStatus(StatusType status)
The status of the access key.
|
AccessKey |
withStatus(String status)
The status of the access key.
|
AccessKey |
withUserName(String userName)
The name of the IAM user that the access key is associated with.
|
public AccessKey()
public AccessKey(String userName, String accessKeyId, String status, String secretAccessKey)
userName
- The name of the IAM user that the access key is
associated with.accessKeyId
- The ID for this access key.status
- The status of the access key. Active
means
the key is valid for API calls, while Inactive
means it
is not.secretAccessKey
- The secret key used to sign requests.public AccessKey(String userName, String accessKeyId, StatusType status, String secretAccessKey)
userName
- The name of the IAM user that the access key is
associated with.accessKeyId
- The ID for this access key.status
- The status of the access key. Active
means
the key is valid for API calls, while Inactive
means it
is not.secretAccessKey
- The secret key used to sign requests.public String getUserName()
Constraints:
Length: 1 - 64
Pattern: [\w+=,.@-]+
public void setUserName(String userName)
Constraints:
Length: 1 - 64
Pattern: [\w+=,.@-]+
userName
- The name of the IAM user that the access key is associated with.public AccessKey withUserName(String userName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 64
Pattern: [\w+=,.@-]+
userName
- The name of the IAM user that the access key is associated with.public String getAccessKeyId()
Constraints:
Length: 16 - 32
Pattern: [\w]+
public void setAccessKeyId(String accessKeyId)
Constraints:
Length: 16 - 32
Pattern: [\w]+
accessKeyId
- The ID for this access key.public AccessKey withAccessKeyId(String accessKeyId)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 16 - 32
Pattern: [\w]+
accessKeyId
- The ID for this access key.public String getStatus()
Active
means the key is
valid for API calls, while Inactive
means it is not.
Constraints:
Allowed Values: Active, Inactive
Active
means the key is
valid for API calls, while Inactive
means it is not.StatusType
public void setStatus(String status)
Active
means the key is
valid for API calls, while Inactive
means it is not.
Constraints:
Allowed Values: Active, Inactive
status
- The status of the access key. Active
means the key is
valid for API calls, while Inactive
means it is not.StatusType
public AccessKey withStatus(String status)
Active
means the key is
valid for API calls, while Inactive
means it is not.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Active, Inactive
status
- The status of the access key. Active
means the key is
valid for API calls, while Inactive
means it is not.StatusType
public void setStatus(StatusType status)
Active
means the key is
valid for API calls, while Inactive
means it is not.
Constraints:
Allowed Values: Active, Inactive
status
- The status of the access key. Active
means the key is
valid for API calls, while Inactive
means it is not.StatusType
public AccessKey withStatus(StatusType status)
Active
means the key is
valid for API calls, while Inactive
means it is not.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Active, Inactive
status
- The status of the access key. Active
means the key is
valid for API calls, while Inactive
means it is not.StatusType
public String getSecretAccessKey()
public void setSecretAccessKey(String secretAccessKey)
secretAccessKey
- The secret key used to sign requests.public AccessKey withSecretAccessKey(String secretAccessKey)
Returns a reference to this object so that method calls can be chained together.
secretAccessKey
- The secret key used to sign requests.public Date getCreateDate()
public void setCreateDate(Date createDate)
createDate
- The date when the access key was created.public AccessKey withCreateDate(Date createDate)
Returns a reference to this object so that method calls can be chained together.
createDate
- The date when the access key was created.public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.