public class UpdateAccessKeyRequest extends AmazonWebServiceRequest implements Serializable
UpdateAccessKey operation
.
Changes the status of the specified access key from Active to Inactive, or vice versa. This action can be used to disable a user's key as part of a key rotation work flow.
If the UserName
field is not specified, the UserName is
determined implicitly based on the AWS access key ID used to sign the
request. Because this action works for access keys under the AWS
account, this API can be used to manage root credentials even if the
AWS account has no associated users.
For information about rotating keys, see Managing Keys and Certificates in the Using IAM guide.
NOOP
Constructor and Description |
---|
UpdateAccessKeyRequest()
Default constructor for a new UpdateAccessKeyRequest object.
|
UpdateAccessKeyRequest(String accessKeyId,
StatusType status)
Constructs a new UpdateAccessKeyRequest object.
|
UpdateAccessKeyRequest(String accessKeyId,
String status)
Constructs a new UpdateAccessKeyRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getAccessKeyId()
The access key ID of the secret access key you want to update.
|
String |
getStatus()
The status you want to assign to the secret access key.
|
String |
getUserName()
Name of the user whose key you want to update.
|
int |
hashCode() |
void |
setAccessKeyId(String accessKeyId)
The access key ID of the secret access key you want to update.
|
void |
setStatus(StatusType status)
The status you want to assign to the secret access key.
|
void |
setStatus(String status)
The status you want to assign to the secret access key.
|
void |
setUserName(String userName)
Name of the user whose key you want to update.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
UpdateAccessKeyRequest |
withAccessKeyId(String accessKeyId)
The access key ID of the secret access key you want to update.
|
UpdateAccessKeyRequest |
withStatus(StatusType status)
The status you want to assign to the secret access key.
|
UpdateAccessKeyRequest |
withStatus(String status)
The status you want to assign to the secret access key.
|
UpdateAccessKeyRequest |
withUserName(String userName)
Name of the user whose key you want to update.
|
copyPrivateRequestParameters, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public UpdateAccessKeyRequest()
public UpdateAccessKeyRequest(String accessKeyId, String status)
accessKeyId
- The access key ID of the secret access key you want
to update.status
- The status you want to assign to the secret access key.
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.public UpdateAccessKeyRequest(String accessKeyId, StatusType status)
accessKeyId
- The access key ID of the secret access key you want
to update.status
- The status you want to assign to the secret access key.
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.public String getUserName()
Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]*
public void setUserName(String userName)
Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]*
userName
- Name of the user whose key you want to update.public UpdateAccessKeyRequest withUserName(String userName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]*
userName
- Name of the user whose key you want to update.public String getAccessKeyId()
Constraints:
Length: 16 - 32
Pattern: [\w]*
public void setAccessKeyId(String accessKeyId)
Constraints:
Length: 16 - 32
Pattern: [\w]*
accessKeyId
- The access key ID of the secret access key you want to update.public UpdateAccessKeyRequest 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 access key ID of the secret access key you want to update.public String getStatus()
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.
Constraints:
Allowed Values: Active, Inactive
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.StatusType
public void setStatus(String status)
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.
Constraints:
Allowed Values: Active, Inactive
status
- The status you want to assign to the secret access key.
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.StatusType
public UpdateAccessKeyRequest withStatus(String status)
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Active, Inactive
status
- The status you want to assign to the secret access key.
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.StatusType
public void setStatus(StatusType status)
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.
Constraints:
Allowed Values: Active, Inactive
status
- The status you want to assign to the secret access key.
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.StatusType
public UpdateAccessKeyRequest withStatus(StatusType status)
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Active, Inactive
status
- The status you want to assign to the secret access key.
Active
means the key can be used for API calls to AWS,
while Inactive
means the key cannot be used.StatusType
public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.