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 String getAWSAccountId()
public void setAWSAccountId(String aWSAccountId)
aWSAccountId - The twelve-digit account ID of the AWS account that owns the key.public KeyMetadata withAWSAccountId(String aWSAccountId)
Returns a reference to this object so that method calls can be chained together.
aWSAccountId - The twelve-digit account ID of the AWS account that owns the key.public String getKeyId()
Constraints:
Length: 1 - 256
public void setKeyId(String keyId)
Constraints:
Length: 1 - 256
keyId - The globally unique identifier for the key.public KeyMetadata withKeyId(String keyId)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
keyId - The globally unique identifier for the key.public String getArn()
Constraints:
Length: 20 - 2048
public void setArn(String arn)
Constraints:
Length: 20 - 2048
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 KeyMetadata withArn(String arn)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 20 - 2048
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 Date getCreationDate()
public void setCreationDate(Date creationDate)
creationDate - The date and time when the key was created.public KeyMetadata withCreationDate(Date creationDate)
Returns a reference to this object so that method calls can be chained together.
creationDate - The date and time when the key was created.public Boolean isEnabled()
KeyState is
Enabled this value is true, otherwise it is false.KeyState is
Enabled this value is true, otherwise it is false.public void setEnabled(Boolean enabled)
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 KeyMetadata withEnabled(Boolean enabled)
KeyState is
Enabled this value is true, otherwise it is false.
Returns a reference to this object so that method calls can be chained together.
enabled - Specifies whether the key is enabled. When KeyState is
Enabled this value is true, otherwise it is false.public Boolean getEnabled()
KeyState is
Enabled this value is true, otherwise it is false.KeyState is
Enabled this value is true, otherwise it is false.public String getDescription()
Constraints:
Length: 0 - 8192
public void setDescription(String description)
Constraints:
Length: 0 - 8192
description - The friendly description of the key.public KeyMetadata withDescription(String description)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 8192
description - The friendly description of the key.public String getKeyUsage()
ENCRYPT_DECRYPT, which means
you can use the key for the Encrypt and Decrypt
operations.
Constraints:
Allowed Values: ENCRYPT_DECRYPT
ENCRYPT_DECRYPT, which means
you can use the key for the Encrypt and Decrypt
operations.KeyUsageTypepublic void setKeyUsage(String keyUsage)
ENCRYPT_DECRYPT, which means
you can use the key for the Encrypt and Decrypt
operations.
Constraints:
Allowed Values: ENCRYPT_DECRYPT
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.KeyUsageTypepublic KeyMetadata withKeyUsage(String keyUsage)
ENCRYPT_DECRYPT, which means
you can use the key for the Encrypt and Decrypt
operations.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ENCRYPT_DECRYPT
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.KeyUsageTypepublic void setKeyUsage(KeyUsageType keyUsage)
ENCRYPT_DECRYPT, which means
you can use the key for the Encrypt and Decrypt
operations.
Constraints:
Allowed Values: ENCRYPT_DECRYPT
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.KeyUsageTypepublic KeyMetadata withKeyUsage(KeyUsageType keyUsage)
ENCRYPT_DECRYPT, which means
you can use the key for the Encrypt and Decrypt
operations.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ENCRYPT_DECRYPT
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.KeyUsageTypepublic String getKeyState()
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.
Constraints:
Allowed Values: Enabled, Disabled, PendingDeletion
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.
KeyStatepublic void setKeyState(String keyState)
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.
Constraints:
Allowed Values: Enabled, Disabled, PendingDeletion
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.
KeyStatepublic KeyMetadata withKeyState(String keyState)
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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Enabled, Disabled, PendingDeletion
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.
KeyStatepublic void setKeyState(KeyState keyState)
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.
Constraints:
Allowed Values: Enabled, Disabled, PendingDeletion
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.
KeyStatepublic KeyMetadata withKeyState(KeyState keyState)
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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Enabled, Disabled, PendingDeletion
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.
KeyStatepublic Date getDeletionDate()
KeyState is
PendingDeletion, otherwise this value is null.KeyState is
PendingDeletion, otherwise this value is null.public void setDeletionDate(Date deletionDate)
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 KeyMetadata withDeletionDate(Date deletionDate)
KeyState is
PendingDeletion, otherwise this value is null.
Returns a reference to this object so that method calls can be chained together.
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 ObjectObject.toString()public KeyMetadata clone()
Copyright © 2015. All rights reserved.