com.amazonaws.services.identitymanagement.model
Class UpdateAccessKeyRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.identitymanagement.model.UpdateAccessKeyRequest

public class UpdateAccessKeyRequest
extends AmazonWebServiceRequest

Container for the parameters to the 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 workflow.

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 Using AWS Identity and Access Management .

See Also:
AmazonIdentityManagement.updateAccessKey(UpdateAccessKeyRequest)

Constructor Summary
UpdateAccessKeyRequest()
          Default constructor for a new UpdateAccessKeyRequest object.
UpdateAccessKeyRequest(java.lang.String accessKeyId, java.lang.String status)
          Constructs a new UpdateAccessKeyRequest object.
 
Method Summary
 java.lang.String getAccessKeyId()
          The Access Key ID of the Secret Access Key you want to update.
 java.lang.String getStatus()
          The status you want to assign to the Secret Access Key.
 java.lang.String getUserName()
          Name of the User whose key you want to update.
 void setAccessKeyId(java.lang.String accessKeyId)
          The Access Key ID of the Secret Access Key you want to update.
 void setStatus(java.lang.String status)
          The status you want to assign to the Secret Access Key.
 void setUserName(java.lang.String userName)
          Name of the User whose key you want to update.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 UpdateAccessKeyRequest withAccessKeyId(java.lang.String accessKeyId)
          The Access Key ID of the Secret Access Key you want to update.
 UpdateAccessKeyRequest withStatus(java.lang.String status)
          The status you want to assign to the Secret Access Key.
 UpdateAccessKeyRequest withUserName(java.lang.String userName)
          Name of the User whose key you want to update.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UpdateAccessKeyRequest

public UpdateAccessKeyRequest()
Default constructor for a new UpdateAccessKeyRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


UpdateAccessKeyRequest

public UpdateAccessKeyRequest(java.lang.String accessKeyId,
                              java.lang.String status)
Constructs a new UpdateAccessKeyRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
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.
Method Detail

getUserName

public java.lang.String getUserName()
Name of the User whose key you want to update.

Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]*

Returns:
Name of the User whose key you want to update.

setUserName

public void setUserName(java.lang.String userName)
Name of the User whose key you want to update.

Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]*

Parameters:
userName - Name of the User whose key you want to update.

withUserName

public UpdateAccessKeyRequest withUserName(java.lang.String userName)
Name of the User whose key you want to update.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]*

Parameters:
userName - Name of the User whose key you want to update.
Returns:
A reference to this updated object so that method calls can be chained together.

getAccessKeyId

public java.lang.String getAccessKeyId()
The Access Key ID of the Secret Access Key you want to update.

Constraints:
Length: 16 - 32
Pattern: [\w]*

Returns:
The Access Key ID of the Secret Access Key you want to update.

setAccessKeyId

public void setAccessKeyId(java.lang.String accessKeyId)
The Access Key ID of the Secret Access Key you want to update.

Constraints:
Length: 16 - 32
Pattern: [\w]*

Parameters:
accessKeyId - The Access Key ID of the Secret Access Key you want to update.

withAccessKeyId

public UpdateAccessKeyRequest withAccessKeyId(java.lang.String accessKeyId)
The Access Key ID of the Secret Access Key you want to update.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 16 - 32
Pattern: [\w]*

Parameters:
accessKeyId - The Access Key ID of the Secret Access Key you want to update.
Returns:
A reference to this updated object so that method calls can be chained together.

getStatus

public java.lang.String getStatus()
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.

Constraints:
Allowed Values: Active, Inactive

Returns:
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.
See Also:
statusType

setStatus

public void setStatus(java.lang.String 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.

Constraints:
Allowed Values: Active, Inactive

Parameters:
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.
See Also:
statusType

withStatus

public UpdateAccessKeyRequest withStatus(java.lang.String 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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: Active, Inactive

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
statusType

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.