Class KeyMetadata
- All Implemented Interfaces:
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
getArn()
The Amazon Resource Name (ARN) of the key.The twelve-digit account ID of the AWS account that owns the key.The date and time when the key was created.The date and time after which AWS KMS deletes the customer master key (CMK).The friendly description of the key.Specifies whether the key is enabled.getKeyId()
The globally unique identifier for the key.The state of the customer master key (CMK).The cryptographic operations for which you can use the key.int
hashCode()
Specifies whether the key is enabled.void
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
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.toString()
Returns a string representation of this object; useful for testing and debugging.The Amazon Resource Name (ARN) of the key.withAWSAccountId
(String aWSAccountId) The twelve-digit account ID of the AWS account that owns the key.withCreationDate
(Date creationDate) The date and time when the key was created.withDeletionDate
(Date deletionDate) The date and time after which AWS KMS deletes the customer master key (CMK).withDescription
(String description) The friendly description of the key.withEnabled
(Boolean enabled) Specifies whether the key is enabled.The globally unique identifier for the key.withKeyState
(KeyState keyState) The state of the customer master key (CMK).withKeyState
(String keyState) The state of the customer master key (CMK).withKeyUsage
(KeyUsageType keyUsage) The cryptographic operations for which you can use the key.withKeyUsage
(String keyUsage) The cryptographic operations for which you can use the key.
-
Constructor Details
-
KeyMetadata
public KeyMetadata()
-
-
Method Details
-
setAWSAccountId
The twelve-digit account ID of the AWS account that owns the key.
- Parameters:
aWSAccountId
- The twelve-digit account ID of the AWS account that owns the key.
-
getAWSAccountId
The twelve-digit account ID of the AWS account that owns the key.
- Returns:
- The twelve-digit account ID of the AWS account that owns the key.
-
withAWSAccountId
The twelve-digit account ID of the AWS account that owns the key.
- Parameters:
aWSAccountId
- The twelve-digit account ID of the AWS account that owns the key.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKeyId
The globally unique identifier for the key.
- Parameters:
keyId
- The globally unique identifier for the key.
-
getKeyId
The globally unique identifier for the key.
- Returns:
- The globally unique identifier for the key.
-
withKeyId
The globally unique identifier for the key.
- Parameters:
keyId
- The globally unique identifier for the key.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setArn
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.
- Parameters:
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.
-
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.
- Returns:
- 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.
-
withArn
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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCreationDate
The date and time when the key was created.
- Parameters:
creationDate
- The date and time when the key was created.
-
getCreationDate
The date and time when the key was created.
- Returns:
- The date and time when the key was created.
-
withCreationDate
The date and time when the key was created.
- Parameters:
creationDate
- The date and time when the key was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEnabled
Specifies whether the key is enabled. When
KeyState
isEnabled
this value is true, otherwise it is false.- Parameters:
enabled
- Specifies whether the key is enabled. WhenKeyState
isEnabled
this value is true, otherwise it is false.
-
getEnabled
Specifies whether the key is enabled. When
KeyState
isEnabled
this value is true, otherwise it is false.- Returns:
- Specifies whether the key is enabled. When
KeyState
isEnabled
this value is true, otherwise it is false.
-
withEnabled
Specifies whether the key is enabled. When
KeyState
isEnabled
this value is true, otherwise it is false.- Parameters:
enabled
- Specifies whether the key is enabled. WhenKeyState
isEnabled
this value is true, otherwise it is false.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isEnabled
Specifies whether the key is enabled. When
KeyState
isEnabled
this value is true, otherwise it is false.- Returns:
- Specifies whether the key is enabled. When
KeyState
isEnabled
this value is true, otherwise it is false.
-
setDescription
The friendly description of the key.
- Parameters:
description
- The friendly description of the key.
-
getDescription
The friendly description of the key.
- Returns:
- The friendly description of the key.
-
withDescription
The friendly description of the key.
- Parameters:
description
- The friendly description of the key.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKeyUsage
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. -
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. -
withKeyUsage
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.- Parameters:
keyUsage
- The cryptographic operations for which you can use the key. Currently the only allowed value isENCRYPT_DECRYPT
, which means you can use the key for the Encrypt and Decrypt operations.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setKeyUsage
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. -
withKeyUsage
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.- Parameters:
keyUsage
- The cryptographic operations for which you can use the key. Currently the only allowed value isENCRYPT_DECRYPT
, which means you can use the key for the Encrypt and Decrypt operations.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setKeyState
The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
- Parameters:
keyState
- The state of the customer master key (CMK).For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
- See Also:
-
getKeyState
The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
- Returns:
- The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
- See Also:
-
withKeyState
The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
- Parameters:
keyState
- The state of the customer master key (CMK).For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setKeyState
The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
- Parameters:
keyState
- The state of the customer master key (CMK).For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
- See Also:
-
withKeyState
The state of the customer master key (CMK).
For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
- Parameters:
keyState
- The state of the customer master key (CMK).For more information about how key state affects the use of a CMK, see How Key State Affects the Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setDeletionDate
The date and time after which AWS KMS deletes the customer master key (CMK). This value is present only when
KeyState
isPendingDeletion
, otherwise this value is null.- Parameters:
deletionDate
- The date and time after which AWS KMS deletes the customer master key (CMK). This value is present only whenKeyState
isPendingDeletion
, otherwise this value is null.
-
getDeletionDate
The date and time after which AWS KMS deletes the customer master key (CMK). This value is present only when
KeyState
isPendingDeletion
, otherwise this value is null.- Returns:
- The date and time after which AWS KMS deletes the customer master
key (CMK). This value is present only when
KeyState
isPendingDeletion
, otherwise this value is null.
-
withDeletionDate
The date and time after which AWS KMS deletes the customer master key (CMK). This value is present only when
KeyState
isPendingDeletion
, otherwise this value is null.- Parameters:
deletionDate
- The date and time after which AWS KMS deletes the customer master key (CMK). This value is present only whenKeyState
isPendingDeletion
, otherwise this value is null.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-