public class KeyMetadata extends Object implements Serializable, Cloneable
Contains metadata about a customer master key (CMK).
This data type is used as a response element for the CreateKey and DescribeKey operations.
Constructor and Description |
---|
KeyMetadata() |
Modifier and Type | Method and Description |
---|---|
KeyMetadata |
clone() |
boolean |
equals(Object obj) |
String |
getArn()
The Amazon Resource Name (ARN) of the key.
|
String |
getAWSAccountId()
The twelve-digit account ID of the AWS account that owns the key.
|
Date |
getCreationDate()
The date and time when the key was created.
|
Date |
getDeletionDate()
The date and time after which AWS KMS deletes the customer master key
(CMK).
|
String |
getDescription()
The friendly description of the key.
|
Boolean |
getEnabled()
Specifies whether the key is enabled.
|
String |
getKeyId()
The globally unique identifier for the key.
|
String |
getKeyState()
The state of the customer master key (CMK).
|
String |
getKeyUsage()
The cryptographic operations for which you can use the key.
|
int |
hashCode() |
Boolean |
isEnabled()
Specifies whether the key is enabled.
|
void |
setArn(String arn)
The Amazon Resource Name (ARN) of the key.
|
void |
setAWSAccountId(String aWSAccountId)
The twelve-digit account ID of the AWS account that owns the key.
|
void |
setCreationDate(Date creationDate)
The date and time when the key was created.
|
void |
setDeletionDate(Date deletionDate)
The date and time after which AWS KMS deletes the customer master key
(CMK).
|
void |
setDescription(String description)
The friendly description of the key.
|
void |
setEnabled(Boolean enabled)
Specifies whether the key is enabled.
|
void |
setKeyId(String keyId)
The globally unique identifier for the key.
|
void |
setKeyState(KeyState keyState)
The state of the customer master key (CMK).
|
void |
setKeyState(String keyState)
The state of the customer master key (CMK).
|
void |
setKeyUsage(KeyUsageType keyUsage)
The cryptographic operations for which you can use the key.
|
void |
setKeyUsage(String keyUsage)
The cryptographic operations for which you can use the key.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
KeyMetadata |
withArn(String arn)
The Amazon Resource Name (ARN) of the key.
|
KeyMetadata |
withAWSAccountId(String aWSAccountId)
The twelve-digit account ID of the AWS account that owns the key.
|
KeyMetadata |
withCreationDate(Date creationDate)
The date and time when the key was created.
|
KeyMetadata |
withDeletionDate(Date deletionDate)
The date and time after which AWS KMS deletes the customer master key
(CMK).
|
KeyMetadata |
withDescription(String description)
The friendly description of the key.
|
KeyMetadata |
withEnabled(Boolean enabled)
Specifies whether the key is enabled.
|
KeyMetadata |
withKeyId(String keyId)
The globally unique identifier for the key.
|
KeyMetadata |
withKeyState(KeyState keyState)
The state of the customer master key (CMK).
|
KeyMetadata |
withKeyState(String keyState)
The state of the customer master key (CMK).
|
KeyMetadata |
withKeyUsage(KeyUsageType keyUsage)
The cryptographic operations for which you can use the key.
|
KeyMetadata |
withKeyUsage(String keyUsage)
The cryptographic operations for which you can use the key.
|
public void setAWSAccountId(String aWSAccountId)
The twelve-digit account ID of the AWS account that owns the key.
aWSAccountId
- The twelve-digit account ID of the AWS account that owns the key.public String getAWSAccountId()
The twelve-digit account ID of the AWS account that owns the key.
public KeyMetadata withAWSAccountId(String aWSAccountId)
The twelve-digit account ID of the AWS account that owns the key.
aWSAccountId
- The twelve-digit account ID of the AWS account that owns the key.public void setKeyId(String keyId)
The globally unique identifier for the key.
keyId
- The globally unique identifier for the key.public String getKeyId()
The globally unique identifier for the key.
public KeyMetadata withKeyId(String keyId)
The globally unique identifier for the key.
keyId
- The globally unique identifier for the key.public void setArn(String arn)
The Amazon Resource Name (ARN) of the key. For examples, see AWS Key Management Service (AWS KMS) in the Example ARNs section of the AWS General Reference.
arn
- The Amazon Resource Name (ARN) of the key. For examples, see AWS Key Management Service (AWS KMS) in the Example ARNs
section of the AWS General Reference.public String getArn()
The Amazon Resource Name (ARN) of the key. For examples, see AWS Key Management Service (AWS KMS) in the Example ARNs section of the AWS General Reference.
public KeyMetadata withArn(String arn)
The Amazon Resource Name (ARN) of the key. For examples, see AWS Key Management Service (AWS KMS) in the Example ARNs section of the AWS General Reference.
arn
- The Amazon Resource Name (ARN) of the key. For examples, see AWS Key Management Service (AWS KMS) in the Example ARNs
section of the AWS General Reference.public void setCreationDate(Date creationDate)
The date and time when the key was created.
creationDate
- The date and time when the key was created.public Date getCreationDate()
The date and time when the key was created.
public KeyMetadata withCreationDate(Date creationDate)
The date and time when the key was created.
creationDate
- The date and time when the key was created.public void setEnabled(Boolean enabled)
Specifies whether the key is enabled. When KeyState
is
Enabled
this value is true, otherwise it is false.
enabled
- Specifies whether the key is enabled. When KeyState
is Enabled
this value is true, otherwise it is false.public Boolean getEnabled()
Specifies whether the key is enabled. When KeyState
is
Enabled
this value is true, otherwise it is false.
KeyState
is Enabled
this value is true, otherwise it is
false.public KeyMetadata withEnabled(Boolean enabled)
Specifies whether the key is enabled. When KeyState
is
Enabled
this value is true, otherwise it is false.
enabled
- Specifies whether the key is enabled. When KeyState
is Enabled
this value is true, otherwise it is false.public Boolean isEnabled()
Specifies whether the key is enabled. When KeyState
is
Enabled
this value is true, otherwise it is false.
KeyState
is Enabled
this value is true, otherwise it is
false.public void setDescription(String description)
The friendly description of the key.
description
- The friendly description of the key.public String getDescription()
The friendly description of the key.
public KeyMetadata withDescription(String description)
The friendly description of the key.
description
- The friendly description of the key.public void setKeyUsage(String keyUsage)
The cryptographic operations for which you can use the key. Currently the
only allowed value is ENCRYPT_DECRYPT
, which means you can
use the key for the Encrypt and Decrypt operations.
keyUsage
- The cryptographic operations for which you can use the key.
Currently the only allowed value is ENCRYPT_DECRYPT
,
which means you can use the key for the Encrypt and
Decrypt operations.KeyUsageType
public String getKeyUsage()
The cryptographic operations for which you can use the key. Currently the
only allowed value is ENCRYPT_DECRYPT
, which means you can
use the key for the Encrypt and Decrypt operations.
ENCRYPT_DECRYPT
,
which means you can use the key for the Encrypt and
Decrypt operations.KeyUsageType
public KeyMetadata withKeyUsage(String keyUsage)
The cryptographic operations for which you can use the key. Currently the
only allowed value is ENCRYPT_DECRYPT
, which means you can
use the key for the Encrypt and Decrypt operations.
keyUsage
- The cryptographic operations for which you can use the key.
Currently the only allowed value is ENCRYPT_DECRYPT
,
which means you can use the key for the Encrypt and
Decrypt operations.KeyUsageType
public void setKeyUsage(KeyUsageType keyUsage)
The cryptographic operations for which you can use the key. Currently the
only allowed value is ENCRYPT_DECRYPT
, which means you can
use the key for the Encrypt and Decrypt operations.
keyUsage
- The cryptographic operations for which you can use the key.
Currently the only allowed value is ENCRYPT_DECRYPT
,
which means you can use the key for the Encrypt and
Decrypt operations.KeyUsageType
public KeyMetadata withKeyUsage(KeyUsageType keyUsage)
The cryptographic operations for which you can use the key. Currently the
only allowed value is ENCRYPT_DECRYPT
, which means you can
use the key for the Encrypt and Decrypt operations.
keyUsage
- The cryptographic operations for which you can use the key.
Currently the only allowed value is ENCRYPT_DECRYPT
,
which means you can use the key for the Encrypt and
Decrypt operations.KeyUsageType
public void setKeyState(String keyState)
The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, go to How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
keyState
- The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, go to How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
KeyState
public String getKeyState()
The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, go to How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
For more information about how key state affects the use of a CMK, go to How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
KeyState
public KeyMetadata withKeyState(String keyState)
The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, go to How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
keyState
- The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, go to How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
KeyState
public void setKeyState(KeyState keyState)
The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, go to How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
keyState
- The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, go to How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
KeyState
public KeyMetadata withKeyState(KeyState keyState)
The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, go to How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
keyState
- The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, go to How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
KeyState
public void setDeletionDate(Date deletionDate)
The date and time after which AWS KMS deletes the customer master key
(CMK). This value is present only when KeyState
is
PendingDeletion
, otherwise this value is null.
deletionDate
- The date and time after which AWS KMS deletes the customer master
key (CMK). This value is present only when KeyState
is PendingDeletion
, otherwise this value is null.public Date getDeletionDate()
The date and time after which AWS KMS deletes the customer master key
(CMK). This value is present only when KeyState
is
PendingDeletion
, otherwise this value is null.
KeyState
is PendingDeletion
, otherwise this value is null.public KeyMetadata withDeletionDate(Date deletionDate)
The date and time after which AWS KMS deletes the customer master key
(CMK). This value is present only when KeyState
is
PendingDeletion
, otherwise this value is null.
deletionDate
- The date and time after which AWS KMS deletes the customer master
key (CMK). This value is present only when KeyState
is PendingDeletion
, otherwise this value is null.public String toString()
toString
in class Object
Object.toString()
public KeyMetadata clone()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.