@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AccessKey extends Object implements Serializable, Cloneable
Contains information about an Amazon Web Services access key.
This data type is used as a response element in the CreateAccessKey and ListAccessKeys operations.
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 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.
|
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 that 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 that the key is valid for API calls, while
Inactive
means it is not.secretAccessKey
- The secret key used to sign requests.public void setUserName(String userName)
The name of the IAM user that the access key is associated with.
userName
- The name of the IAM user that the access key is associated with.public String getUserName()
The name of the IAM user that the access key is associated with.
public AccessKey withUserName(String userName)
The name of the IAM user that the access key is associated with.
userName
- The name of the IAM user that the access key is associated with.public void setAccessKeyId(String accessKeyId)
The ID for this access key.
accessKeyId
- The ID for this access key.public String getAccessKeyId()
The ID for this access key.
public AccessKey withAccessKeyId(String accessKeyId)
The ID for this access key.
accessKeyId
- The ID for this access key.public void setStatus(String status)
The status of the access key. Active
means that the key is valid for API calls, while
Inactive
means it is not.
status
- The status of the access key. Active
means that the key is valid for API calls, while
Inactive
means it is not.StatusType
public String getStatus()
The status of the access key. Active
means that the key is valid for API calls, while
Inactive
means it is not.
Active
means that the key is valid for API calls, while
Inactive
means it is not.StatusType
public AccessKey withStatus(String status)
The status of the access key. Active
means that the key is valid for API calls, while
Inactive
means it is not.
status
- The status of the access key. Active
means that the key is valid for API calls, while
Inactive
means it is not.StatusType
public void setStatus(StatusType status)
The status of the access key. Active
means that the key is valid for API calls, while
Inactive
means it is not.
status
- The status of the access key. Active
means that the key is valid for API calls, while
Inactive
means it is not.StatusType
public AccessKey withStatus(StatusType status)
The status of the access key. Active
means that the key is valid for API calls, while
Inactive
means it is not.
status
- The status of the access key. Active
means that the key is valid for API calls, while
Inactive
means it is not.StatusType
public void setSecretAccessKey(String secretAccessKey)
The secret key used to sign requests.
secretAccessKey
- The secret key used to sign requests.public String getSecretAccessKey()
The secret key used to sign requests.
public AccessKey withSecretAccessKey(String secretAccessKey)
The secret key used to sign requests.
secretAccessKey
- The secret key used to sign requests.public void setCreateDate(Date createDate)
The date when the access key was created.
createDate
- The date when the access key was created.public Date getCreateDate()
The date when the access key was created.
public AccessKey withCreateDate(Date createDate)
The date when the access key was created.
createDate
- The date when the access key was created.public String toString()
toString
in class Object
Object.toString()