Class AccessKey
- java.lang.Object
-
- com.amazonaws.services.identitymanagement.model.AccessKey
-
- All Implemented Interfaces:
Serializable,Cloneable
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.
The
SecretAccessKeyvalue 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.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessKeyclone()booleanequals(Object obj)StringgetAccessKeyId()The ID for this access key.DategetCreateDate()The date when the access key was created.StringgetSecretAccessKey()The secret key used to sign requests.StringgetStatus()The status of the access key.StringgetUserName()The name of the IAM user that the access key is associated with.inthashCode()voidsetAccessKeyId(String accessKeyId)The ID for this access key.voidsetCreateDate(Date createDate)The date when the access key was created.voidsetSecretAccessKey(String secretAccessKey)The secret key used to sign requests.voidsetStatus(StatusType status)The status of the access key.voidsetStatus(String status)The status of the access key.voidsetUserName(String userName)The name of the IAM user that the access key is associated with.StringtoString()Returns a string representation of this object; useful for testing and debugging.AccessKeywithAccessKeyId(String accessKeyId)The ID for this access key.AccessKeywithCreateDate(Date createDate)The date when the access key was created.AccessKeywithSecretAccessKey(String secretAccessKey)The secret key used to sign requests.AccessKeywithStatus(StatusType status)The status of the access key.AccessKeywithStatus(String status)The status of the access key.AccessKeywithUserName(String userName)The name of the IAM user that the access key is associated with.
-
-
-
Constructor Detail
-
AccessKey
public AccessKey()
Default constructor for AccessKey object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
-
AccessKey
public AccessKey(String userName, String accessKeyId, String status, String secretAccessKey)
Constructs a new AccessKey object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
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.Activemeans the key is valid for API calls, whileInactivemeans it is not.secretAccessKey- The secret key used to sign requests.
-
AccessKey
public AccessKey(String userName, String accessKeyId, StatusType status, String secretAccessKey)
Constructs a new AccessKey object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
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.Activemeans the key is valid for API calls, whileInactivemeans it is not.secretAccessKey- The secret key used to sign requests.
-
-
Method Detail
-
setUserName
public void setUserName(String userName)
The name of the IAM user that the access key is associated with.
- Parameters:
userName- The name of the IAM user that the access key is associated with.
-
getUserName
public String getUserName()
The name of the IAM user that the access key is associated with.
- Returns:
- The name of the IAM user that the access key is associated with.
-
withUserName
public AccessKey withUserName(String userName)
The name of the IAM user that the access key is associated with.
- Parameters:
userName- The name of the IAM user that the access key is associated with.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAccessKeyId
public void setAccessKeyId(String accessKeyId)
The ID for this access key.
- Parameters:
accessKeyId- The ID for this access key.
-
getAccessKeyId
public String getAccessKeyId()
The ID for this access key.
- Returns:
- The ID for this access key.
-
withAccessKeyId
public AccessKey withAccessKeyId(String accessKeyId)
The ID for this access key.
- Parameters:
accessKeyId- The ID for this access key.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStatus
public void setStatus(String status)
The status of the access key.
Activemeans the key is valid for API calls, whileInactivemeans it is not.- Parameters:
status- The status of the access key.Activemeans the key is valid for API calls, whileInactivemeans it is not.- See Also:
StatusType
-
getStatus
public String getStatus()
The status of the access key.
Activemeans the key is valid for API calls, whileInactivemeans it is not.- Returns:
- The status of the access key.
Activemeans the key is valid for API calls, whileInactivemeans it is not. - See Also:
StatusType
-
withStatus
public AccessKey withStatus(String status)
The status of the access key.
Activemeans the key is valid for API calls, whileInactivemeans it is not.- Parameters:
status- The status of the access key.Activemeans the key is valid for API calls, whileInactivemeans it is not.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
StatusType
-
setStatus
public void setStatus(StatusType status)
The status of the access key.
Activemeans the key is valid for API calls, whileInactivemeans it is not.- Parameters:
status- The status of the access key.Activemeans the key is valid for API calls, whileInactivemeans it is not.- See Also:
StatusType
-
withStatus
public AccessKey withStatus(StatusType status)
The status of the access key.
Activemeans the key is valid for API calls, whileInactivemeans it is not.- Parameters:
status- The status of the access key.Activemeans the key is valid for API calls, whileInactivemeans it is not.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
StatusType
-
setSecretAccessKey
public void setSecretAccessKey(String secretAccessKey)
The secret key used to sign requests.
- Parameters:
secretAccessKey- The secret key used to sign requests.
-
getSecretAccessKey
public String getSecretAccessKey()
The secret key used to sign requests.
- Returns:
- The secret key used to sign requests.
-
withSecretAccessKey
public AccessKey withSecretAccessKey(String secretAccessKey)
The secret key used to sign requests.
- Parameters:
secretAccessKey- The secret key used to sign requests.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCreateDate
public void setCreateDate(Date createDate)
The date when the access key was created.
- Parameters:
createDate- The date when the access key was created.
-
getCreateDate
public Date getCreateDate()
The date when the access key was created.
- Returns:
- The date when the access key was created.
-
withCreateDate
public AccessKey withCreateDate(Date createDate)
The date when the access key was created.
- Parameters:
createDate- The date when the access key was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-