Interface KeyMetadata.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<KeyMetadata.Builder,KeyMetadata>,SdkBuilder<KeyMetadata.Builder,KeyMetadata>,SdkPojo
- Enclosing class:
- KeyMetadata
@Mutable @NotThreadSafe public static interface KeyMetadata.Builder extends SdkPojo, CopyableBuilder<KeyMetadata.Builder,KeyMetadata>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description KeyMetadata.Builderarn(String arn)The Amazon Resource Name (ARN) of the KMS key.KeyMetadata.BuilderawsAccountId(String awsAccountId)The twelve-digit account ID of the Amazon Web Services account that owns the KMS key.KeyMetadata.BuildercloudHsmClusterId(String cloudHsmClusterId)The cluster ID of the CloudHSM cluster that contains the key material for the KMS key.KeyMetadata.BuildercreationDate(Instant creationDate)The date and time when the KMS key was created.KeyMetadata.BuildercurrentKeyMaterialId(String currentKeyMaterialId)Identifies the current key material.KeyMetadata.BuildercustomerMasterKeySpec(String customerMasterKeySpec)Deprecated.This field has been deprecated.KeyMetadata.BuildercustomerMasterKeySpec(CustomerMasterKeySpec customerMasterKeySpec)Deprecated.This field has been deprecated.KeyMetadata.BuildercustomKeyStoreId(String customKeyStoreId)A unique identifier for the custom key store that contains the KMS key.KeyMetadata.BuilderdeletionDate(Instant deletionDate)The date and time after which KMS deletes this KMS key.KeyMetadata.Builderdescription(String description)The description of the KMS key.KeyMetadata.Builderenabled(Boolean enabled)Specifies whether the KMS key is enabled.KeyMetadata.BuilderencryptionAlgorithms(Collection<EncryptionAlgorithmSpec> encryptionAlgorithms)The encryption algorithms that the KMS key supports.KeyMetadata.BuilderencryptionAlgorithms(EncryptionAlgorithmSpec... encryptionAlgorithms)The encryption algorithms that the KMS key supports.KeyMetadata.BuilderencryptionAlgorithmsWithStrings(String... encryptionAlgorithms)The encryption algorithms that the KMS key supports.KeyMetadata.BuilderencryptionAlgorithmsWithStrings(Collection<String> encryptionAlgorithms)The encryption algorithms that the KMS key supports.KeyMetadata.BuilderexpirationModel(String expirationModel)Specifies whether the KMS key's key material expires.KeyMetadata.BuilderexpirationModel(ExpirationModelType expirationModel)Specifies whether the KMS key's key material expires.KeyMetadata.BuilderkeyAgreementAlgorithms(Collection<KeyAgreementAlgorithmSpec> keyAgreementAlgorithms)The key agreement algorithm used to derive a shared secret.KeyMetadata.BuilderkeyAgreementAlgorithms(KeyAgreementAlgorithmSpec... keyAgreementAlgorithms)The key agreement algorithm used to derive a shared secret.KeyMetadata.BuilderkeyAgreementAlgorithmsWithStrings(String... keyAgreementAlgorithms)The key agreement algorithm used to derive a shared secret.KeyMetadata.BuilderkeyAgreementAlgorithmsWithStrings(Collection<String> keyAgreementAlgorithms)The key agreement algorithm used to derive a shared secret.KeyMetadata.BuilderkeyId(String keyId)The globally unique identifier for the KMS key.KeyMetadata.BuilderkeyManager(String keyManager)The manager of the KMS key.KeyMetadata.BuilderkeyManager(KeyManagerType keyManager)The manager of the KMS key.KeyMetadata.BuilderkeySpec(String keySpec)Describes the type of key material in the KMS key.KeyMetadata.BuilderkeySpec(KeySpec keySpec)Describes the type of key material in the KMS key.KeyMetadata.BuilderkeyState(String keyState)The current status of the KMS key.KeyMetadata.BuilderkeyState(KeyState keyState)The current status of the KMS key.KeyMetadata.BuilderkeyUsage(String keyUsage)The cryptographic operations for which you can use the KMS key.KeyMetadata.BuilderkeyUsage(KeyUsageType keyUsage)The cryptographic operations for which you can use the KMS key.KeyMetadata.BuildermacAlgorithms(Collection<MacAlgorithmSpec> macAlgorithms)The message authentication code (MAC) algorithm that the HMAC KMS key supports.KeyMetadata.BuildermacAlgorithms(MacAlgorithmSpec... macAlgorithms)The message authentication code (MAC) algorithm that the HMAC KMS key supports.KeyMetadata.BuildermacAlgorithmsWithStrings(String... macAlgorithms)The message authentication code (MAC) algorithm that the HMAC KMS key supports.KeyMetadata.BuildermacAlgorithmsWithStrings(Collection<String> macAlgorithms)The message authentication code (MAC) algorithm that the HMAC KMS key supports.KeyMetadata.BuildermultiRegion(Boolean multiRegion)Indicates whether the KMS key is a multi-Region (True) or regional (False) key.default KeyMetadata.BuildermultiRegionConfiguration(Consumer<MultiRegionConfiguration.Builder> multiRegionConfiguration)Lists the primary and replica keys in same multi-Region key.KeyMetadata.BuildermultiRegionConfiguration(MultiRegionConfiguration multiRegionConfiguration)Lists the primary and replica keys in same multi-Region key.KeyMetadata.Builderorigin(String origin)The source of the key material for the KMS key.KeyMetadata.Builderorigin(OriginType origin)The source of the key material for the KMS key.KeyMetadata.BuilderpendingDeletionWindowInDays(Integer pendingDeletionWindowInDays)The waiting period before the primary key in a multi-Region key is deleted.KeyMetadata.BuildersigningAlgorithms(Collection<SigningAlgorithmSpec> signingAlgorithms)The signing algorithms that the KMS key supports.KeyMetadata.BuildersigningAlgorithms(SigningAlgorithmSpec... signingAlgorithms)The signing algorithms that the KMS key supports.KeyMetadata.BuildersigningAlgorithmsWithStrings(String... signingAlgorithms)The signing algorithms that the KMS key supports.KeyMetadata.BuildersigningAlgorithmsWithStrings(Collection<String> signingAlgorithms)The signing algorithms that the KMS key supports.KeyMetadata.BuildervalidTo(Instant validTo)The earliest time at which any imported key material permanently associated with this KMS key expires.default KeyMetadata.BuilderxksKeyConfiguration(Consumer<XksKeyConfigurationType.Builder> xksKeyConfiguration)Information about the external key that is associated with a KMS key in an external key store.KeyMetadata.BuilderxksKeyConfiguration(XksKeyConfigurationType xksKeyConfiguration)Information about the external key that is associated with a KMS key in an external key store.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
awsAccountId
KeyMetadata.Builder awsAccountId(String awsAccountId)
The twelve-digit account ID of the Amazon Web Services account that owns the KMS key.
- Parameters:
awsAccountId- The twelve-digit account ID of the Amazon Web Services account that owns the KMS key.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
keyId
KeyMetadata.Builder keyId(String keyId)
The globally unique identifier for the KMS key.
- Parameters:
keyId- The globally unique identifier for the KMS key.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
arn
KeyMetadata.Builder arn(String arn)
The Amazon Resource Name (ARN) of the KMS key. For examples, see Key Management Service (KMS) in the Example ARNs section of the Amazon Web Services General Reference.
- Parameters:
arn- The Amazon Resource Name (ARN) of the KMS key. For examples, see Key Management Service (KMS) in the Example ARNs section of the Amazon Web Services General Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
creationDate
KeyMetadata.Builder creationDate(Instant creationDate)
The date and time when the KMS key was created.
- Parameters:
creationDate- The date and time when the KMS key was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
enabled
KeyMetadata.Builder enabled(Boolean enabled)
Specifies whether the KMS key is enabled. When
KeyStateisEnabledthis value is true, otherwise it is false.- Parameters:
enabled- Specifies whether the KMS key is enabled. WhenKeyStateisEnabledthis value is true, otherwise it is false.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
KeyMetadata.Builder description(String description)
The description of the KMS key.
- Parameters:
description- The description of the KMS key.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
keyUsage
KeyMetadata.Builder keyUsage(String keyUsage)
The cryptographic operations for which you can use the KMS key.
- Parameters:
keyUsage- The cryptographic operations for which you can use the KMS key.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
KeyUsageType,KeyUsageType
-
keyUsage
KeyMetadata.Builder keyUsage(KeyUsageType keyUsage)
The cryptographic operations for which you can use the KMS key.
- Parameters:
keyUsage- The cryptographic operations for which you can use the KMS key.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
KeyUsageType,KeyUsageType
-
keyState
KeyMetadata.Builder keyState(String keyState)
The current status of the KMS key.
For more information about how key state affects the use of a KMS key, see Key states of KMS keys in the Key Management Service Developer Guide.
- Parameters:
keyState- The current status of the KMS key.For more information about how key state affects the use of a KMS key, see Key states of KMS keys in the Key Management Service Developer Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
KeyState,KeyState
-
keyState
KeyMetadata.Builder keyState(KeyState keyState)
The current status of the KMS key.
For more information about how key state affects the use of a KMS key, see Key states of KMS keys in the Key Management Service Developer Guide.
- Parameters:
keyState- The current status of the KMS key.For more information about how key state affects the use of a KMS key, see Key states of KMS keys in the Key Management Service Developer Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
KeyState,KeyState
-
deletionDate
KeyMetadata.Builder deletionDate(Instant deletionDate)
The date and time after which KMS deletes this KMS key. This value is present only when the KMS key is scheduled for deletion, that is, when its
KeyStateisPendingDeletion.When the primary key in a multi-Region key is scheduled for deletion but still has replica keys, its key state is
PendingReplicaDeletionand the length of its waiting period is displayed in thePendingDeletionWindowInDaysfield.- Parameters:
deletionDate- The date and time after which KMS deletes this KMS key. This value is present only when the KMS key is scheduled for deletion, that is, when itsKeyStateisPendingDeletion.When the primary key in a multi-Region key is scheduled for deletion but still has replica keys, its key state is
PendingReplicaDeletionand the length of its waiting period is displayed in thePendingDeletionWindowInDaysfield.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
validTo
KeyMetadata.Builder validTo(Instant validTo)
The earliest time at which any imported key material permanently associated with this KMS key expires. When a key material expires, KMS deletes the key material and the KMS key becomes unusable. This value is present only for KMS keys whose
OriginisEXTERNALand theExpirationModelisKEY_MATERIAL_EXPIRES, otherwise this value is omitted.- Parameters:
validTo- The earliest time at which any imported key material permanently associated with this KMS key expires. When a key material expires, KMS deletes the key material and the KMS key becomes unusable. This value is present only for KMS keys whoseOriginisEXTERNALand theExpirationModelisKEY_MATERIAL_EXPIRES, otherwise this value is omitted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
origin
KeyMetadata.Builder origin(String origin)
The source of the key material for the KMS key. When this value is
AWS_KMS, KMS created the key material. When this value isEXTERNAL, the key material was imported or the KMS key doesn't have any key material. When this value isAWS_CLOUDHSM, the key material was created in the CloudHSM cluster associated with a custom key store.- Parameters:
origin- The source of the key material for the KMS key. When this value isAWS_KMS, KMS created the key material. When this value isEXTERNAL, the key material was imported or the KMS key doesn't have any key material. When this value isAWS_CLOUDHSM, the key material was created in the CloudHSM cluster associated with a custom key store.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
OriginType,OriginType
-
origin
KeyMetadata.Builder origin(OriginType origin)
The source of the key material for the KMS key. When this value is
AWS_KMS, KMS created the key material. When this value isEXTERNAL, the key material was imported or the KMS key doesn't have any key material. When this value isAWS_CLOUDHSM, the key material was created in the CloudHSM cluster associated with a custom key store.- Parameters:
origin- The source of the key material for the KMS key. When this value isAWS_KMS, KMS created the key material. When this value isEXTERNAL, the key material was imported or the KMS key doesn't have any key material. When this value isAWS_CLOUDHSM, the key material was created in the CloudHSM cluster associated with a custom key store.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
OriginType,OriginType
-
customKeyStoreId
KeyMetadata.Builder customKeyStoreId(String customKeyStoreId)
A unique identifier for the custom key store that contains the KMS key. This field is present only when the KMS key is created in a custom key store.
- Parameters:
customKeyStoreId- A unique identifier for the custom key store that contains the KMS key. This field is present only when the KMS key is created in a custom key store.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
cloudHsmClusterId
KeyMetadata.Builder cloudHsmClusterId(String cloudHsmClusterId)
The cluster ID of the CloudHSM cluster that contains the key material for the KMS key. When you create a KMS key in an CloudHSM custom key store, KMS creates the key material for the KMS key in the associated CloudHSM cluster. This field is present only when the KMS key is created in an CloudHSM key store.
- Parameters:
cloudHsmClusterId- The cluster ID of the CloudHSM cluster that contains the key material for the KMS key. When you create a KMS key in an CloudHSM custom key store, KMS creates the key material for the KMS key in the associated CloudHSM cluster. This field is present only when the KMS key is created in an CloudHSM key store.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
expirationModel
KeyMetadata.Builder expirationModel(String expirationModel)
Specifies whether the KMS key's key material expires. This value is present only when
OriginisEXTERNAL, otherwise this value is omitted.- Parameters:
expirationModel- Specifies whether the KMS key's key material expires. This value is present only whenOriginisEXTERNAL, otherwise this value is omitted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ExpirationModelType,ExpirationModelType
-
expirationModel
KeyMetadata.Builder expirationModel(ExpirationModelType expirationModel)
Specifies whether the KMS key's key material expires. This value is present only when
OriginisEXTERNAL, otherwise this value is omitted.- Parameters:
expirationModel- Specifies whether the KMS key's key material expires. This value is present only whenOriginisEXTERNAL, otherwise this value is omitted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ExpirationModelType,ExpirationModelType
-
keyManager
KeyMetadata.Builder keyManager(String keyManager)
The manager of the KMS key. KMS keys in your Amazon Web Services account are either customer managed or Amazon Web Services managed. For more information about the difference, see KMS keys in the Key Management Service Developer Guide.
- Parameters:
keyManager- The manager of the KMS key. KMS keys in your Amazon Web Services account are either customer managed or Amazon Web Services managed. For more information about the difference, see KMS keys in the Key Management Service Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
KeyManagerType,KeyManagerType
-
keyManager
KeyMetadata.Builder keyManager(KeyManagerType keyManager)
The manager of the KMS key. KMS keys in your Amazon Web Services account are either customer managed or Amazon Web Services managed. For more information about the difference, see KMS keys in the Key Management Service Developer Guide.
- Parameters:
keyManager- The manager of the KMS key. KMS keys in your Amazon Web Services account are either customer managed or Amazon Web Services managed. For more information about the difference, see KMS keys in the Key Management Service Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
KeyManagerType,KeyManagerType
-
customerMasterKeySpec
@Deprecated KeyMetadata.Builder customerMasterKeySpec(String customerMasterKeySpec)
Deprecated.This field has been deprecated. Instead, use the KeySpec field.Instead, use the
KeySpecfield.The
KeySpecandCustomerMasterKeySpecfields have the same value. We recommend that you use theKeySpecfield in your code. However, to avoid breaking changes, KMS supports both fields.- Parameters:
customerMasterKeySpec- Instead, use theKeySpecfield.The
KeySpecandCustomerMasterKeySpecfields have the same value. We recommend that you use theKeySpecfield in your code. However, to avoid breaking changes, KMS supports both fields.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CustomerMasterKeySpec,CustomerMasterKeySpec
-
customerMasterKeySpec
@Deprecated KeyMetadata.Builder customerMasterKeySpec(CustomerMasterKeySpec customerMasterKeySpec)
Deprecated.This field has been deprecated. Instead, use the KeySpec field.Instead, use the
KeySpecfield.The
KeySpecandCustomerMasterKeySpecfields have the same value. We recommend that you use theKeySpecfield in your code. However, to avoid breaking changes, KMS supports both fields.- Parameters:
customerMasterKeySpec- Instead, use theKeySpecfield.The
KeySpecandCustomerMasterKeySpecfields have the same value. We recommend that you use theKeySpecfield in your code. However, to avoid breaking changes, KMS supports both fields.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CustomerMasterKeySpec,CustomerMasterKeySpec
-
keySpec
KeyMetadata.Builder keySpec(String keySpec)
Describes the type of key material in the KMS key.
-
keySpec
KeyMetadata.Builder keySpec(KeySpec keySpec)
Describes the type of key material in the KMS key.
-
encryptionAlgorithmsWithStrings
KeyMetadata.Builder encryptionAlgorithmsWithStrings(Collection<String> encryptionAlgorithms)
The encryption algorithms that the KMS key supports. You cannot use the KMS key with other encryption algorithms within KMS.
This value is present only when the
KeyUsageof the KMS key isENCRYPT_DECRYPT.- Parameters:
encryptionAlgorithms- The encryption algorithms that the KMS key supports. You cannot use the KMS key with other encryption algorithms within KMS.This value is present only when the
KeyUsageof the KMS key isENCRYPT_DECRYPT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
encryptionAlgorithmsWithStrings
KeyMetadata.Builder encryptionAlgorithmsWithStrings(String... encryptionAlgorithms)
The encryption algorithms that the KMS key supports. You cannot use the KMS key with other encryption algorithms within KMS.
This value is present only when the
KeyUsageof the KMS key isENCRYPT_DECRYPT.- Parameters:
encryptionAlgorithms- The encryption algorithms that the KMS key supports. You cannot use the KMS key with other encryption algorithms within KMS.This value is present only when the
KeyUsageof the KMS key isENCRYPT_DECRYPT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
encryptionAlgorithms
KeyMetadata.Builder encryptionAlgorithms(Collection<EncryptionAlgorithmSpec> encryptionAlgorithms)
The encryption algorithms that the KMS key supports. You cannot use the KMS key with other encryption algorithms within KMS.
This value is present only when the
KeyUsageof the KMS key isENCRYPT_DECRYPT.- Parameters:
encryptionAlgorithms- The encryption algorithms that the KMS key supports. You cannot use the KMS key with other encryption algorithms within KMS.This value is present only when the
KeyUsageof the KMS key isENCRYPT_DECRYPT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
encryptionAlgorithms
KeyMetadata.Builder encryptionAlgorithms(EncryptionAlgorithmSpec... encryptionAlgorithms)
The encryption algorithms that the KMS key supports. You cannot use the KMS key with other encryption algorithms within KMS.
This value is present only when the
KeyUsageof the KMS key isENCRYPT_DECRYPT.- Parameters:
encryptionAlgorithms- The encryption algorithms that the KMS key supports. You cannot use the KMS key with other encryption algorithms within KMS.This value is present only when the
KeyUsageof the KMS key isENCRYPT_DECRYPT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
signingAlgorithmsWithStrings
KeyMetadata.Builder signingAlgorithmsWithStrings(Collection<String> signingAlgorithms)
The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing algorithms within KMS.
This field appears only when the
KeyUsageof the KMS key isSIGN_VERIFY.- Parameters:
signingAlgorithms- The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing algorithms within KMS.This field appears only when the
KeyUsageof the KMS key isSIGN_VERIFY.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
signingAlgorithmsWithStrings
KeyMetadata.Builder signingAlgorithmsWithStrings(String... signingAlgorithms)
The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing algorithms within KMS.
This field appears only when the
KeyUsageof the KMS key isSIGN_VERIFY.- Parameters:
signingAlgorithms- The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing algorithms within KMS.This field appears only when the
KeyUsageof the KMS key isSIGN_VERIFY.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
signingAlgorithms
KeyMetadata.Builder signingAlgorithms(Collection<SigningAlgorithmSpec> signingAlgorithms)
The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing algorithms within KMS.
This field appears only when the
KeyUsageof the KMS key isSIGN_VERIFY.- Parameters:
signingAlgorithms- The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing algorithms within KMS.This field appears only when the
KeyUsageof the KMS key isSIGN_VERIFY.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
signingAlgorithms
KeyMetadata.Builder signingAlgorithms(SigningAlgorithmSpec... signingAlgorithms)
The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing algorithms within KMS.
This field appears only when the
KeyUsageof the KMS key isSIGN_VERIFY.- Parameters:
signingAlgorithms- The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing algorithms within KMS.This field appears only when the
KeyUsageof the KMS key isSIGN_VERIFY.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
keyAgreementAlgorithmsWithStrings
KeyMetadata.Builder keyAgreementAlgorithmsWithStrings(Collection<String> keyAgreementAlgorithms)
The key agreement algorithm used to derive a shared secret.
- Parameters:
keyAgreementAlgorithms- The key agreement algorithm used to derive a shared secret.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
keyAgreementAlgorithmsWithStrings
KeyMetadata.Builder keyAgreementAlgorithmsWithStrings(String... keyAgreementAlgorithms)
The key agreement algorithm used to derive a shared secret.
- Parameters:
keyAgreementAlgorithms- The key agreement algorithm used to derive a shared secret.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
keyAgreementAlgorithms
KeyMetadata.Builder keyAgreementAlgorithms(Collection<KeyAgreementAlgorithmSpec> keyAgreementAlgorithms)
The key agreement algorithm used to derive a shared secret.
- Parameters:
keyAgreementAlgorithms- The key agreement algorithm used to derive a shared secret.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
keyAgreementAlgorithms
KeyMetadata.Builder keyAgreementAlgorithms(KeyAgreementAlgorithmSpec... keyAgreementAlgorithms)
The key agreement algorithm used to derive a shared secret.
- Parameters:
keyAgreementAlgorithms- The key agreement algorithm used to derive a shared secret.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
multiRegion
KeyMetadata.Builder multiRegion(Boolean multiRegion)
Indicates whether the KMS key is a multi-Region (
True) or regional (False) key. This value isTruefor multi-Region primary and replica keys andFalsefor regional KMS keys.For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.
- Parameters:
multiRegion- Indicates whether the KMS key is a multi-Region (True) or regional (False) key. This value isTruefor multi-Region primary and replica keys andFalsefor regional KMS keys.For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
multiRegionConfiguration
KeyMetadata.Builder multiRegionConfiguration(MultiRegionConfiguration multiRegionConfiguration)
Lists the primary and replica keys in same multi-Region key. This field is present only when the value of the
MultiRegionfield isTrue.For more information about any listed KMS key, use the DescribeKey operation.
-
MultiRegionKeyTypeindicates whether the KMS key is aPRIMARYorREPLICAkey. -
PrimaryKeydisplays the key ARN and Region of the primary key. This field displays the current KMS key if it is the primary key. -
ReplicaKeysdisplays the key ARNs and Regions of all replica keys. This field includes the current KMS key if it is a replica key.
- Parameters:
multiRegionConfiguration- Lists the primary and replica keys in same multi-Region key. This field is present only when the value of theMultiRegionfield isTrue.For more information about any listed KMS key, use the DescribeKey operation.
-
MultiRegionKeyTypeindicates whether the KMS key is aPRIMARYorREPLICAkey. -
PrimaryKeydisplays the key ARN and Region of the primary key. This field displays the current KMS key if it is the primary key. -
ReplicaKeysdisplays the key ARNs and Regions of all replica keys. This field includes the current KMS key if it is a replica key.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
multiRegionConfiguration
default KeyMetadata.Builder multiRegionConfiguration(Consumer<MultiRegionConfiguration.Builder> multiRegionConfiguration)
Lists the primary and replica keys in same multi-Region key. This field is present only when the value of the
MultiRegionfield isTrue.For more information about any listed KMS key, use the DescribeKey operation.
-
MultiRegionKeyTypeindicates whether the KMS key is aPRIMARYorREPLICAkey. -
PrimaryKeydisplays the key ARN and Region of the primary key. This field displays the current KMS key if it is the primary key. -
ReplicaKeysdisplays the key ARNs and Regions of all replica keys. This field includes the current KMS key if it is a replica key.
MultiRegionConfiguration.Builderavoiding the need to create one manually viaMultiRegionConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tomultiRegionConfiguration(MultiRegionConfiguration).- Parameters:
multiRegionConfiguration- a consumer that will call methods onMultiRegionConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
multiRegionConfiguration(MultiRegionConfiguration)
-
-
pendingDeletionWindowInDays
KeyMetadata.Builder pendingDeletionWindowInDays(Integer pendingDeletionWindowInDays)
The waiting period before the primary key in a multi-Region key is deleted. This waiting period begins when the last of its replica keys is deleted. This value is present only when the
KeyStateof the KMS key isPendingReplicaDeletion. That indicates that the KMS key is the primary key in a multi-Region key, it is scheduled for deletion, and it still has existing replica keys.When a single-Region KMS key or a multi-Region replica key is scheduled for deletion, its deletion date is displayed in the
DeletionDatefield. However, when the primary key in a multi-Region key is scheduled for deletion, its waiting period doesn't begin until all of its replica keys are deleted. This value displays that waiting period. When the last replica key in the multi-Region key is deleted, theKeyStateof the scheduled primary key changes fromPendingReplicaDeletiontoPendingDeletionand the deletion date appears in theDeletionDatefield.- Parameters:
pendingDeletionWindowInDays- The waiting period before the primary key in a multi-Region key is deleted. This waiting period begins when the last of its replica keys is deleted. This value is present only when theKeyStateof the KMS key isPendingReplicaDeletion. That indicates that the KMS key is the primary key in a multi-Region key, it is scheduled for deletion, and it still has existing replica keys.When a single-Region KMS key or a multi-Region replica key is scheduled for deletion, its deletion date is displayed in the
DeletionDatefield. However, when the primary key in a multi-Region key is scheduled for deletion, its waiting period doesn't begin until all of its replica keys are deleted. This value displays that waiting period. When the last replica key in the multi-Region key is deleted, theKeyStateof the scheduled primary key changes fromPendingReplicaDeletiontoPendingDeletionand the deletion date appears in theDeletionDatefield.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
macAlgorithmsWithStrings
KeyMetadata.Builder macAlgorithmsWithStrings(Collection<String> macAlgorithms)
The message authentication code (MAC) algorithm that the HMAC KMS key supports.
This value is present only when the
KeyUsageof the KMS key isGENERATE_VERIFY_MAC.- Parameters:
macAlgorithms- The message authentication code (MAC) algorithm that the HMAC KMS key supports.This value is present only when the
KeyUsageof the KMS key isGENERATE_VERIFY_MAC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
macAlgorithmsWithStrings
KeyMetadata.Builder macAlgorithmsWithStrings(String... macAlgorithms)
The message authentication code (MAC) algorithm that the HMAC KMS key supports.
This value is present only when the
KeyUsageof the KMS key isGENERATE_VERIFY_MAC.- Parameters:
macAlgorithms- The message authentication code (MAC) algorithm that the HMAC KMS key supports.This value is present only when the
KeyUsageof the KMS key isGENERATE_VERIFY_MAC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
macAlgorithms
KeyMetadata.Builder macAlgorithms(Collection<MacAlgorithmSpec> macAlgorithms)
The message authentication code (MAC) algorithm that the HMAC KMS key supports.
This value is present only when the
KeyUsageof the KMS key isGENERATE_VERIFY_MAC.- Parameters:
macAlgorithms- The message authentication code (MAC) algorithm that the HMAC KMS key supports.This value is present only when the
KeyUsageof the KMS key isGENERATE_VERIFY_MAC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
macAlgorithms
KeyMetadata.Builder macAlgorithms(MacAlgorithmSpec... macAlgorithms)
The message authentication code (MAC) algorithm that the HMAC KMS key supports.
This value is present only when the
KeyUsageof the KMS key isGENERATE_VERIFY_MAC.- Parameters:
macAlgorithms- The message authentication code (MAC) algorithm that the HMAC KMS key supports.This value is present only when the
KeyUsageof the KMS key isGENERATE_VERIFY_MAC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
xksKeyConfiguration
KeyMetadata.Builder xksKeyConfiguration(XksKeyConfigurationType xksKeyConfiguration)
Information about the external key that is associated with a KMS key in an external key store.
For more information, see External key in the Key Management Service Developer Guide.
- Parameters:
xksKeyConfiguration- Information about the external key that is associated with a KMS key in an external key store.For more information, see External key in the Key Management Service Developer Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
xksKeyConfiguration
default KeyMetadata.Builder xksKeyConfiguration(Consumer<XksKeyConfigurationType.Builder> xksKeyConfiguration)
Information about the external key that is associated with a KMS key in an external key store.
For more information, see External key in the Key Management Service Developer Guide.
This is a convenience method that creates an instance of theXksKeyConfigurationType.Builderavoiding the need to create one manually viaXksKeyConfigurationType.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toxksKeyConfiguration(XksKeyConfigurationType).- Parameters:
xksKeyConfiguration- a consumer that will call methods onXksKeyConfigurationType.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
xksKeyConfiguration(XksKeyConfigurationType)
-
currentKeyMaterialId
KeyMetadata.Builder currentKeyMaterialId(String currentKeyMaterialId)
Identifies the current key material. This value is present for symmetric encryption keys with
AWS_KMSorEXTERNALorigin. These KMS keys support automatic or on-demand key rotation and can have multiple key materials associated with them. KMS uses the current key material for both encryption and decryption, and the non-current key material for decryption operations only.- Parameters:
currentKeyMaterialId- Identifies the current key material. This value is present for symmetric encryption keys withAWS_KMSorEXTERNALorigin. These KMS keys support automatic or on-demand key rotation and can have multiple key materials associated with them. KMS uses the current key material for both encryption and decryption, and the non-current key material for decryption operations only.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-