public static interface KeyMetadata.Builder extends CopyableBuilder<KeyMetadata.Builder,KeyMetadata>
Modifier and Type | Method and Description |
---|---|
KeyMetadata.Builder |
arn(String arn)
The Amazon Resource Name (ARN) of the CMK.
|
KeyMetadata.Builder |
awsAccountId(String awsAccountId)
The twelve-digit account ID of the AWS account that owns the CMK.
|
KeyMetadata.Builder |
creationDate(Instant creationDate)
The date and time when the CMK was created.
|
KeyMetadata.Builder |
deletionDate(Instant deletionDate)
The date and time after which AWS KMS deletes the CMK.
|
KeyMetadata.Builder |
description(String description)
The description of the CMK.
|
KeyMetadata.Builder |
enabled(Boolean enabled)
Specifies whether the CMK is enabled.
|
KeyMetadata.Builder |
expirationModel(ExpirationModelType expirationModel)
Specifies whether the CMK's key material expires.
|
KeyMetadata.Builder |
expirationModel(String expirationModel)
Specifies whether the CMK's key material expires.
|
KeyMetadata.Builder |
keyId(String keyId)
The globally unique identifier for the CMK.
|
KeyMetadata.Builder |
keyManager(KeyManagerType keyManager)
The CMK's manager.
|
KeyMetadata.Builder |
keyManager(String keyManager)
The CMK's manager.
|
KeyMetadata.Builder |
keyState(KeyState keyState)
The state of the CMK.
|
KeyMetadata.Builder |
keyState(String keyState)
The state of the CMK.
|
KeyMetadata.Builder |
keyUsage(KeyUsageType keyUsage)
The cryptographic operations for which you can use the CMK.
|
KeyMetadata.Builder |
keyUsage(String keyUsage)
The cryptographic operations for which you can use the CMK.
|
KeyMetadata.Builder |
origin(OriginType origin)
The source of the CMK's key material.
|
KeyMetadata.Builder |
origin(String origin)
The source of the CMK's key material.
|
KeyMetadata.Builder |
validTo(Instant validTo)
The time at which the imported key material expires.
|
copy
apply, build
KeyMetadata.Builder awsAccountId(String awsAccountId)
The twelve-digit account ID of the AWS account that owns the CMK.
awsAccountId
- The twelve-digit account ID of the AWS account that owns the CMK.KeyMetadata.Builder keyId(String keyId)
The globally unique identifier for the CMK.
keyId
- The globally unique identifier for the CMK.KeyMetadata.Builder arn(String arn)
The Amazon Resource Name (ARN) of the CMK. 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 CMK. For examples, see AWS
Key Management Service (AWS KMS) in the Example ARNs section of the AWS General Reference.KeyMetadata.Builder creationDate(Instant creationDate)
The date and time when the CMK was created.
creationDate
- The date and time when the CMK was created.KeyMetadata.Builder enabled(Boolean enabled)
Specifies whether the CMK is enabled. When KeyState
is Enabled
this value is true,
otherwise it is false.
enabled
- Specifies whether the CMK is enabled. When KeyState
is Enabled
this value is
true, otherwise it is false.KeyMetadata.Builder description(String description)
The description of the CMK.
description
- The description of the CMK.KeyMetadata.Builder keyUsage(String keyUsage)
The cryptographic operations for which you can use the CMK. Currently the only allowed value is
ENCRYPT_DECRYPT
, which means you can use the CMK for the Encrypt and Decrypt
operations.
keyUsage
- The cryptographic operations for which you can use the CMK. Currently the only allowed value is
ENCRYPT_DECRYPT
, which means you can use the CMK for the Encrypt and
Decrypt operations.KeyUsageType
,
KeyUsageType
KeyMetadata.Builder keyUsage(KeyUsageType keyUsage)
The cryptographic operations for which you can use the CMK. Currently the only allowed value is
ENCRYPT_DECRYPT
, which means you can use the CMK for the Encrypt and Decrypt
operations.
keyUsage
- The cryptographic operations for which you can use the CMK. Currently the only allowed value is
ENCRYPT_DECRYPT
, which means you can use the CMK for the Encrypt and
Decrypt operations.KeyUsageType
,
KeyUsageType
KeyMetadata.Builder keyState(String keyState)
The state of the 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.
keyState
- The state of the 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.
KeyState
,
KeyState
KeyMetadata.Builder keyState(KeyState keyState)
The state of the 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.
keyState
- The state of the 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.
KeyState
,
KeyState
KeyMetadata.Builder deletionDate(Instant deletionDate)
The date and time after which AWS KMS deletes the CMK. This value is present only when KeyState
is PendingDeletion
, otherwise this value is omitted.
deletionDate
- The date and time after which AWS KMS deletes the CMK. This value is present only when
KeyState
is PendingDeletion
, otherwise this value is omitted.KeyMetadata.Builder validTo(Instant validTo)
The time at which the imported key material expires. When the key material expires, AWS KMS deletes the key
material and the CMK becomes unusable. This value is present only for CMKs whose Origin
is
EXTERNAL
and whose ExpirationModel
is KEY_MATERIAL_EXPIRES
, otherwise
this value is omitted.
validTo
- The time at which the imported key material expires. When the key material expires, AWS KMS deletes
the key material and the CMK becomes unusable. This value is present only for CMKs whose
Origin
is EXTERNAL
and whose ExpirationModel
is
KEY_MATERIAL_EXPIRES
, otherwise this value is omitted.KeyMetadata.Builder origin(String origin)
The source of the CMK's key material. When this value is AWS_KMS
, AWS KMS created the key
material. When this value is EXTERNAL
, the key material was imported from your existing key
management infrastructure or the CMK lacks key material.
origin
- The source of the CMK's key material. When this value is AWS_KMS
, AWS KMS created the key
material. When this value is EXTERNAL
, the key material was imported from your existing
key management infrastructure or the CMK lacks key material.OriginType
,
OriginType
KeyMetadata.Builder origin(OriginType origin)
The source of the CMK's key material. When this value is AWS_KMS
, AWS KMS created the key
material. When this value is EXTERNAL
, the key material was imported from your existing key
management infrastructure or the CMK lacks key material.
origin
- The source of the CMK's key material. When this value is AWS_KMS
, AWS KMS created the key
material. When this value is EXTERNAL
, the key material was imported from your existing
key management infrastructure or the CMK lacks key material.OriginType
,
OriginType
KeyMetadata.Builder expirationModel(String expirationModel)
Specifies whether the CMK's key material expires. This value is present only when Origin
is
EXTERNAL
, otherwise this value is omitted.
expirationModel
- Specifies whether the CMK's key material expires. This value is present only when Origin
is EXTERNAL
, otherwise this value is omitted.ExpirationModelType
,
ExpirationModelType
KeyMetadata.Builder expirationModel(ExpirationModelType expirationModel)
Specifies whether the CMK's key material expires. This value is present only when Origin
is
EXTERNAL
, otherwise this value is omitted.
expirationModel
- Specifies whether the CMK's key material expires. This value is present only when Origin
is EXTERNAL
, otherwise this value is omitted.ExpirationModelType
,
ExpirationModelType
KeyMetadata.Builder keyManager(String keyManager)
The CMK's manager. CMKs are either customer-managed or AWS-managed. For more information about the difference, see Customer Master Keys in the AWS Key Management Service Developer Guide.
keyManager
- The CMK's manager. CMKs are either customer-managed or AWS-managed. For more information about the
difference, see Customer Master
Keys in the AWS Key Management Service Developer Guide.KeyManagerType
,
KeyManagerType
KeyMetadata.Builder keyManager(KeyManagerType keyManager)
The CMK's manager. CMKs are either customer-managed or AWS-managed. For more information about the difference, see Customer Master Keys in the AWS Key Management Service Developer Guide.
keyManager
- The CMK's manager. CMKs are either customer-managed or AWS-managed. For more information about the
difference, see Customer Master
Keys in the AWS Key Management Service Developer Guide.KeyManagerType
,
KeyManagerType
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.