/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace KMS { namespace Model { /** *

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:

AWS API * Reference

*/ class AWS_KMS_API KeyMetadata { public: KeyMetadata(); KeyMetadata(Aws::Utils::Json::JsonView jsonValue); KeyMetadata& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

The twelve-digit account ID of the AWS account that owns the CMK.

*/ inline const Aws::String& GetAWSAccountId() const{ return m_aWSAccountId; } /** *

The twelve-digit account ID of the AWS account that owns the CMK.

*/ inline bool AWSAccountIdHasBeenSet() const { return m_aWSAccountIdHasBeenSet; } /** *

The twelve-digit account ID of the AWS account that owns the CMK.

*/ inline void SetAWSAccountId(const Aws::String& value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId = value; } /** *

The twelve-digit account ID of the AWS account that owns the CMK.

*/ inline void SetAWSAccountId(Aws::String&& value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId = std::move(value); } /** *

The twelve-digit account ID of the AWS account that owns the CMK.

*/ inline void SetAWSAccountId(const char* value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId.assign(value); } /** *

The twelve-digit account ID of the AWS account that owns the CMK.

*/ inline KeyMetadata& WithAWSAccountId(const Aws::String& value) { SetAWSAccountId(value); return *this;} /** *

The twelve-digit account ID of the AWS account that owns the CMK.

*/ inline KeyMetadata& WithAWSAccountId(Aws::String&& value) { SetAWSAccountId(std::move(value)); return *this;} /** *

The twelve-digit account ID of the AWS account that owns the CMK.

*/ inline KeyMetadata& WithAWSAccountId(const char* value) { SetAWSAccountId(value); return *this;} /** *

The globally unique identifier for the CMK.

*/ inline const Aws::String& GetKeyId() const{ return m_keyId; } /** *

The globally unique identifier for the CMK.

*/ inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; } /** *

The globally unique identifier for the CMK.

*/ inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; } /** *

The globally unique identifier for the CMK.

*/ inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); } /** *

The globally unique identifier for the CMK.

*/ inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); } /** *

The globally unique identifier for the CMK.

*/ inline KeyMetadata& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;} /** *

The globally unique identifier for the CMK.

*/ inline KeyMetadata& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;} /** *

The globally unique identifier for the CMK.

*/ inline KeyMetadata& WithKeyId(const char* value) { SetKeyId(value); return *this;} /** *

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.

*/ inline const Aws::String& GetArn() const{ return m_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.

*/ inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } /** *

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.

*/ inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } /** *

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.

*/ inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } /** *

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.

*/ inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } /** *

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.

*/ inline KeyMetadata& WithArn(const Aws::String& value) { SetArn(value); return *this;} /** *

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.

*/ inline KeyMetadata& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} /** *

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.

*/ inline KeyMetadata& WithArn(const char* value) { SetArn(value); return *this;} /** *

The date and time when the CMK was created.

*/ inline const Aws::Utils::DateTime& GetCreationDate() const{ return m_creationDate; } /** *

The date and time when the CMK was created.

*/ inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; } /** *

The date and time when the CMK was created.

*/ inline void SetCreationDate(const Aws::Utils::DateTime& value) { m_creationDateHasBeenSet = true; m_creationDate = value; } /** *

The date and time when the CMK was created.

*/ inline void SetCreationDate(Aws::Utils::DateTime&& value) { m_creationDateHasBeenSet = true; m_creationDate = std::move(value); } /** *

The date and time when the CMK was created.

*/ inline KeyMetadata& WithCreationDate(const Aws::Utils::DateTime& value) { SetCreationDate(value); return *this;} /** *

The date and time when the CMK was created.

*/ inline KeyMetadata& WithCreationDate(Aws::Utils::DateTime&& value) { SetCreationDate(std::move(value)); return *this;} /** *

Specifies whether the CMK is enabled. When KeyState is * Enabled this value is true, otherwise it is false.

*/ inline bool GetEnabled() const{ return m_enabled; } /** *

Specifies whether the CMK is enabled. When KeyState is * Enabled this value is true, otherwise it is false.

*/ inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } /** *

Specifies whether the CMK is enabled. When KeyState is * Enabled this value is true, otherwise it is false.

*/ inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } /** *

Specifies whether the CMK is enabled. When KeyState is * Enabled this value is true, otherwise it is false.

*/ inline KeyMetadata& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

The description of the CMK.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the CMK.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the CMK.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the CMK.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the CMK.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the CMK.

*/ inline KeyMetadata& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the CMK.

*/ inline KeyMetadata& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the CMK.

*/ inline KeyMetadata& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The cryptographic * operations for which you can use the CMK.

*/ inline const KeyUsageType& GetKeyUsage() const{ return m_keyUsage; } /** *

The cryptographic * operations for which you can use the CMK.

*/ inline bool KeyUsageHasBeenSet() const { return m_keyUsageHasBeenSet; } /** *

The cryptographic * operations for which you can use the CMK.

*/ inline void SetKeyUsage(const KeyUsageType& value) { m_keyUsageHasBeenSet = true; m_keyUsage = value; } /** *

The cryptographic * operations for which you can use the CMK.

*/ inline void SetKeyUsage(KeyUsageType&& value) { m_keyUsageHasBeenSet = true; m_keyUsage = std::move(value); } /** *

The cryptographic * operations for which you can use the CMK.

*/ inline KeyMetadata& WithKeyUsage(const KeyUsageType& value) { SetKeyUsage(value); return *this;} /** *

The cryptographic * operations for which you can use the CMK.

*/ inline KeyMetadata& WithKeyUsage(KeyUsageType&& value) { SetKeyUsage(std::move(value)); return *this;} /** *

The current status of the CMK.

For more information about how key * state affects the use of a CMK, see Key * state: Effect on your CMK in the AWS Key Management Service Developer * Guide.

*/ inline const KeyState& GetKeyState() const{ return m_keyState; } /** *

The current status of the CMK.

For more information about how key * state affects the use of a CMK, see Key * state: Effect on your CMK in the AWS Key Management Service Developer * Guide.

*/ inline bool KeyStateHasBeenSet() const { return m_keyStateHasBeenSet; } /** *

The current status of the CMK.

For more information about how key * state affects the use of a CMK, see Key * state: Effect on your CMK in the AWS Key Management Service Developer * Guide.

*/ inline void SetKeyState(const KeyState& value) { m_keyStateHasBeenSet = true; m_keyState = value; } /** *

The current status of the CMK.

For more information about how key * state affects the use of a CMK, see Key * state: Effect on your CMK in the AWS Key Management Service Developer * Guide.

*/ inline void SetKeyState(KeyState&& value) { m_keyStateHasBeenSet = true; m_keyState = std::move(value); } /** *

The current status of the CMK.

For more information about how key * state affects the use of a CMK, see Key * state: Effect on your CMK in the AWS Key Management Service Developer * Guide.

*/ inline KeyMetadata& WithKeyState(const KeyState& value) { SetKeyState(value); return *this;} /** *

The current status of the CMK.

For more information about how key * state affects the use of a CMK, see Key * state: Effect on your CMK in the AWS Key Management Service Developer * Guide.

*/ inline KeyMetadata& WithKeyState(KeyState&& value) { SetKeyState(std::move(value)); return *this;} /** *

The date and time after which AWS KMS deletes the CMK. This value is present * only when KeyState is PendingDeletion.

*/ inline const Aws::Utils::DateTime& GetDeletionDate() const{ return m_deletionDate; } /** *

The date and time after which AWS KMS deletes the CMK. This value is present * only when KeyState is PendingDeletion.

*/ inline bool DeletionDateHasBeenSet() const { return m_deletionDateHasBeenSet; } /** *

The date and time after which AWS KMS deletes the CMK. This value is present * only when KeyState is PendingDeletion.

*/ inline void SetDeletionDate(const Aws::Utils::DateTime& value) { m_deletionDateHasBeenSet = true; m_deletionDate = value; } /** *

The date and time after which AWS KMS deletes the CMK. This value is present * only when KeyState is PendingDeletion.

*/ inline void SetDeletionDate(Aws::Utils::DateTime&& value) { m_deletionDateHasBeenSet = true; m_deletionDate = std::move(value); } /** *

The date and time after which AWS KMS deletes the CMK. This value is present * only when KeyState is PendingDeletion.

*/ inline KeyMetadata& WithDeletionDate(const Aws::Utils::DateTime& value) { SetDeletionDate(value); return *this;} /** *

The date and time after which AWS KMS deletes the CMK. This value is present * only when KeyState is PendingDeletion.

*/ inline KeyMetadata& WithDeletionDate(Aws::Utils::DateTime&& value) { SetDeletionDate(std::move(value)); return *this;} /** *

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.

*/ inline const Aws::Utils::DateTime& GetValidTo() const{ return m_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.

*/ inline bool ValidToHasBeenSet() const { return m_validToHasBeenSet; } /** *

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.

*/ inline void SetValidTo(const Aws::Utils::DateTime& value) { m_validToHasBeenSet = true; m_validTo = value; } /** *

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.

*/ inline void SetValidTo(Aws::Utils::DateTime&& value) { m_validToHasBeenSet = true; m_validTo = std::move(value); } /** *

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.

*/ inline KeyMetadata& WithValidTo(const Aws::Utils::DateTime& value) { SetValidTo(value); return *this;} /** *

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.

*/ inline KeyMetadata& WithValidTo(Aws::Utils::DateTime&& value) { SetValidTo(std::move(value)); return *this;} /** *

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. When this value is * AWS_CLOUDHSM, the key material was created in the AWS CloudHSM * cluster associated with a custom key store.

*/ inline const OriginType& GetOrigin() const{ return m_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. When this value is * AWS_CLOUDHSM, the key material was created in the AWS CloudHSM * cluster associated with a custom key store.

*/ inline bool OriginHasBeenSet() const { return m_originHasBeenSet; } /** *

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. When this value is * AWS_CLOUDHSM, the key material was created in the AWS CloudHSM * cluster associated with a custom key store.

*/ inline void SetOrigin(const OriginType& value) { m_originHasBeenSet = true; m_origin = value; } /** *

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. When this value is * AWS_CLOUDHSM, the key material was created in the AWS CloudHSM * cluster associated with a custom key store.

*/ inline void SetOrigin(OriginType&& value) { m_originHasBeenSet = true; m_origin = std::move(value); } /** *

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. When this value is * AWS_CLOUDHSM, the key material was created in the AWS CloudHSM * cluster associated with a custom key store.

*/ inline KeyMetadata& WithOrigin(const OriginType& value) { SetOrigin(value); return *this;} /** *

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. When this value is * AWS_CLOUDHSM, the key material was created in the AWS CloudHSM * cluster associated with a custom key store.

*/ inline KeyMetadata& WithOrigin(OriginType&& value) { SetOrigin(std::move(value)); return *this;} /** *

A unique identifier for the custom * key store that contains the CMK. This value is present only when the CMK is * created in a custom key store.

*/ inline const Aws::String& GetCustomKeyStoreId() const{ return m_customKeyStoreId; } /** *

A unique identifier for the custom * key store that contains the CMK. This value is present only when the CMK is * created in a custom key store.

*/ inline bool CustomKeyStoreIdHasBeenSet() const { return m_customKeyStoreIdHasBeenSet; } /** *

A unique identifier for the custom * key store that contains the CMK. This value is present only when the CMK is * created in a custom key store.

*/ inline void SetCustomKeyStoreId(const Aws::String& value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId = value; } /** *

A unique identifier for the custom * key store that contains the CMK. This value is present only when the CMK is * created in a custom key store.

*/ inline void SetCustomKeyStoreId(Aws::String&& value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId = std::move(value); } /** *

A unique identifier for the custom * key store that contains the CMK. This value is present only when the CMK is * created in a custom key store.

*/ inline void SetCustomKeyStoreId(const char* value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId.assign(value); } /** *

A unique identifier for the custom * key store that contains the CMK. This value is present only when the CMK is * created in a custom key store.

*/ inline KeyMetadata& WithCustomKeyStoreId(const Aws::String& value) { SetCustomKeyStoreId(value); return *this;} /** *

A unique identifier for the custom * key store that contains the CMK. This value is present only when the CMK is * created in a custom key store.

*/ inline KeyMetadata& WithCustomKeyStoreId(Aws::String&& value) { SetCustomKeyStoreId(std::move(value)); return *this;} /** *

A unique identifier for the custom * key store that contains the CMK. This value is present only when the CMK is * created in a custom key store.

*/ inline KeyMetadata& WithCustomKeyStoreId(const char* value) { SetCustomKeyStoreId(value); return *this;} /** *

The cluster ID of the AWS CloudHSM cluster that contains the key material for * the CMK. When you create a CMK in a custom * key store, AWS KMS creates the key material for the CMK in the associated * AWS CloudHSM cluster. This value is present only when the CMK is created in a * custom key store.

*/ inline const Aws::String& GetCloudHsmClusterId() const{ return m_cloudHsmClusterId; } /** *

The cluster ID of the AWS CloudHSM cluster that contains the key material for * the CMK. When you create a CMK in a custom * key store, AWS KMS creates the key material for the CMK in the associated * AWS CloudHSM cluster. This value is present only when the CMK is created in a * custom key store.

*/ inline bool CloudHsmClusterIdHasBeenSet() const { return m_cloudHsmClusterIdHasBeenSet; } /** *

The cluster ID of the AWS CloudHSM cluster that contains the key material for * the CMK. When you create a CMK in a custom * key store, AWS KMS creates the key material for the CMK in the associated * AWS CloudHSM cluster. This value is present only when the CMK is created in a * custom key store.

*/ inline void SetCloudHsmClusterId(const Aws::String& value) { m_cloudHsmClusterIdHasBeenSet = true; m_cloudHsmClusterId = value; } /** *

The cluster ID of the AWS CloudHSM cluster that contains the key material for * the CMK. When you create a CMK in a custom * key store, AWS KMS creates the key material for the CMK in the associated * AWS CloudHSM cluster. This value is present only when the CMK is created in a * custom key store.

*/ inline void SetCloudHsmClusterId(Aws::String&& value) { m_cloudHsmClusterIdHasBeenSet = true; m_cloudHsmClusterId = std::move(value); } /** *

The cluster ID of the AWS CloudHSM cluster that contains the key material for * the CMK. When you create a CMK in a custom * key store, AWS KMS creates the key material for the CMK in the associated * AWS CloudHSM cluster. This value is present only when the CMK is created in a * custom key store.

*/ inline void SetCloudHsmClusterId(const char* value) { m_cloudHsmClusterIdHasBeenSet = true; m_cloudHsmClusterId.assign(value); } /** *

The cluster ID of the AWS CloudHSM cluster that contains the key material for * the CMK. When you create a CMK in a custom * key store, AWS KMS creates the key material for the CMK in the associated * AWS CloudHSM cluster. This value is present only when the CMK is created in a * custom key store.

*/ inline KeyMetadata& WithCloudHsmClusterId(const Aws::String& value) { SetCloudHsmClusterId(value); return *this;} /** *

The cluster ID of the AWS CloudHSM cluster that contains the key material for * the CMK. When you create a CMK in a custom * key store, AWS KMS creates the key material for the CMK in the associated * AWS CloudHSM cluster. This value is present only when the CMK is created in a * custom key store.

*/ inline KeyMetadata& WithCloudHsmClusterId(Aws::String&& value) { SetCloudHsmClusterId(std::move(value)); return *this;} /** *

The cluster ID of the AWS CloudHSM cluster that contains the key material for * the CMK. When you create a CMK in a custom * key store, AWS KMS creates the key material for the CMK in the associated * AWS CloudHSM cluster. This value is present only when the CMK is created in a * custom key store.

*/ inline KeyMetadata& WithCloudHsmClusterId(const char* value) { SetCloudHsmClusterId(value); return *this;} /** *

Specifies whether the CMK's key material expires. This value is present only * when Origin is EXTERNAL, otherwise this value is * omitted.

*/ inline const ExpirationModelType& GetExpirationModel() const{ return m_expirationModel; } /** *

Specifies whether the CMK's key material expires. This value is present only * when Origin is EXTERNAL, otherwise this value is * omitted.

*/ inline bool ExpirationModelHasBeenSet() const { return m_expirationModelHasBeenSet; } /** *

Specifies whether the CMK's key material expires. This value is present only * when Origin is EXTERNAL, otherwise this value is * omitted.

*/ inline void SetExpirationModel(const ExpirationModelType& value) { m_expirationModelHasBeenSet = true; m_expirationModel = value; } /** *

Specifies whether the CMK's key material expires. This value is present only * when Origin is EXTERNAL, otherwise this value is * omitted.

*/ inline void SetExpirationModel(ExpirationModelType&& value) { m_expirationModelHasBeenSet = true; m_expirationModel = std::move(value); } /** *

Specifies whether the CMK's key material expires. This value is present only * when Origin is EXTERNAL, otherwise this value is * omitted.

*/ inline KeyMetadata& WithExpirationModel(const ExpirationModelType& value) { SetExpirationModel(value); return *this;} /** *

Specifies whether the CMK's key material expires. This value is present only * when Origin is EXTERNAL, otherwise this value is * omitted.

*/ inline KeyMetadata& WithExpirationModel(ExpirationModelType&& value) { SetExpirationModel(std::move(value)); return *this;} /** *

The manager of the CMK. CMKs in your AWS account 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.

*/ inline const KeyManagerType& GetKeyManager() const{ return m_keyManager; } /** *

The manager of the CMK. CMKs in your AWS account 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.

*/ inline bool KeyManagerHasBeenSet() const { return m_keyManagerHasBeenSet; } /** *

The manager of the CMK. CMKs in your AWS account 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.

*/ inline void SetKeyManager(const KeyManagerType& value) { m_keyManagerHasBeenSet = true; m_keyManager = value; } /** *

The manager of the CMK. CMKs in your AWS account 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.

*/ inline void SetKeyManager(KeyManagerType&& value) { m_keyManagerHasBeenSet = true; m_keyManager = std::move(value); } /** *

The manager of the CMK. CMKs in your AWS account 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.

*/ inline KeyMetadata& WithKeyManager(const KeyManagerType& value) { SetKeyManager(value); return *this;} /** *

The manager of the CMK. CMKs in your AWS account 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.

*/ inline KeyMetadata& WithKeyManager(KeyManagerType&& value) { SetKeyManager(std::move(value)); return *this;} /** *

Describes the type of key material in the CMK.

*/ inline const CustomerMasterKeySpec& GetCustomerMasterKeySpec() const{ return m_customerMasterKeySpec; } /** *

Describes the type of key material in the CMK.

*/ inline bool CustomerMasterKeySpecHasBeenSet() const { return m_customerMasterKeySpecHasBeenSet; } /** *

Describes the type of key material in the CMK.

*/ inline void SetCustomerMasterKeySpec(const CustomerMasterKeySpec& value) { m_customerMasterKeySpecHasBeenSet = true; m_customerMasterKeySpec = value; } /** *

Describes the type of key material in the CMK.

*/ inline void SetCustomerMasterKeySpec(CustomerMasterKeySpec&& value) { m_customerMasterKeySpecHasBeenSet = true; m_customerMasterKeySpec = std::move(value); } /** *

Describes the type of key material in the CMK.

*/ inline KeyMetadata& WithCustomerMasterKeySpec(const CustomerMasterKeySpec& value) { SetCustomerMasterKeySpec(value); return *this;} /** *

Describes the type of key material in the CMK.

*/ inline KeyMetadata& WithCustomerMasterKeySpec(CustomerMasterKeySpec&& value) { SetCustomerMasterKeySpec(std::move(value)); return *this;} /** *

The encryption algorithms that the CMK supports. You cannot use the CMK with * other encryption algorithms within AWS KMS.

This field appears only when * the KeyUsage of the CMK is ENCRYPT_DECRYPT.

*/ inline const Aws::Vector& GetEncryptionAlgorithms() const{ return m_encryptionAlgorithms; } /** *

The encryption algorithms that the CMK supports. You cannot use the CMK with * other encryption algorithms within AWS KMS.

This field appears only when * the KeyUsage of the CMK is ENCRYPT_DECRYPT.

*/ inline bool EncryptionAlgorithmsHasBeenSet() const { return m_encryptionAlgorithmsHasBeenSet; } /** *

The encryption algorithms that the CMK supports. You cannot use the CMK with * other encryption algorithms within AWS KMS.

This field appears only when * the KeyUsage of the CMK is ENCRYPT_DECRYPT.

*/ inline void SetEncryptionAlgorithms(const Aws::Vector& value) { m_encryptionAlgorithmsHasBeenSet = true; m_encryptionAlgorithms = value; } /** *

The encryption algorithms that the CMK supports. You cannot use the CMK with * other encryption algorithms within AWS KMS.

This field appears only when * the KeyUsage of the CMK is ENCRYPT_DECRYPT.

*/ inline void SetEncryptionAlgorithms(Aws::Vector&& value) { m_encryptionAlgorithmsHasBeenSet = true; m_encryptionAlgorithms = std::move(value); } /** *

The encryption algorithms that the CMK supports. You cannot use the CMK with * other encryption algorithms within AWS KMS.

This field appears only when * the KeyUsage of the CMK is ENCRYPT_DECRYPT.

*/ inline KeyMetadata& WithEncryptionAlgorithms(const Aws::Vector& value) { SetEncryptionAlgorithms(value); return *this;} /** *

The encryption algorithms that the CMK supports. You cannot use the CMK with * other encryption algorithms within AWS KMS.

This field appears only when * the KeyUsage of the CMK is ENCRYPT_DECRYPT.

*/ inline KeyMetadata& WithEncryptionAlgorithms(Aws::Vector&& value) { SetEncryptionAlgorithms(std::move(value)); return *this;} /** *

The encryption algorithms that the CMK supports. You cannot use the CMK with * other encryption algorithms within AWS KMS.

This field appears only when * the KeyUsage of the CMK is ENCRYPT_DECRYPT.

*/ inline KeyMetadata& AddEncryptionAlgorithms(const EncryptionAlgorithmSpec& value) { m_encryptionAlgorithmsHasBeenSet = true; m_encryptionAlgorithms.push_back(value); return *this; } /** *

The encryption algorithms that the CMK supports. You cannot use the CMK with * other encryption algorithms within AWS KMS.

This field appears only when * the KeyUsage of the CMK is ENCRYPT_DECRYPT.

*/ inline KeyMetadata& AddEncryptionAlgorithms(EncryptionAlgorithmSpec&& value) { m_encryptionAlgorithmsHasBeenSet = true; m_encryptionAlgorithms.push_back(std::move(value)); return *this; } /** *

The signing algorithms that the CMK supports. You cannot use the CMK with * other signing algorithms within AWS KMS.

This field appears only when the * KeyUsage of the CMK is SIGN_VERIFY.

*/ inline const Aws::Vector& GetSigningAlgorithms() const{ return m_signingAlgorithms; } /** *

The signing algorithms that the CMK supports. You cannot use the CMK with * other signing algorithms within AWS KMS.

This field appears only when the * KeyUsage of the CMK is SIGN_VERIFY.

*/ inline bool SigningAlgorithmsHasBeenSet() const { return m_signingAlgorithmsHasBeenSet; } /** *

The signing algorithms that the CMK supports. You cannot use the CMK with * other signing algorithms within AWS KMS.

This field appears only when the * KeyUsage of the CMK is SIGN_VERIFY.

*/ inline void SetSigningAlgorithms(const Aws::Vector& value) { m_signingAlgorithmsHasBeenSet = true; m_signingAlgorithms = value; } /** *

The signing algorithms that the CMK supports. You cannot use the CMK with * other signing algorithms within AWS KMS.

This field appears only when the * KeyUsage of the CMK is SIGN_VERIFY.

*/ inline void SetSigningAlgorithms(Aws::Vector&& value) { m_signingAlgorithmsHasBeenSet = true; m_signingAlgorithms = std::move(value); } /** *

The signing algorithms that the CMK supports. You cannot use the CMK with * other signing algorithms within AWS KMS.

This field appears only when the * KeyUsage of the CMK is SIGN_VERIFY.

*/ inline KeyMetadata& WithSigningAlgorithms(const Aws::Vector& value) { SetSigningAlgorithms(value); return *this;} /** *

The signing algorithms that the CMK supports. You cannot use the CMK with * other signing algorithms within AWS KMS.

This field appears only when the * KeyUsage of the CMK is SIGN_VERIFY.

*/ inline KeyMetadata& WithSigningAlgorithms(Aws::Vector&& value) { SetSigningAlgorithms(std::move(value)); return *this;} /** *

The signing algorithms that the CMK supports. You cannot use the CMK with * other signing algorithms within AWS KMS.

This field appears only when the * KeyUsage of the CMK is SIGN_VERIFY.

*/ inline KeyMetadata& AddSigningAlgorithms(const SigningAlgorithmSpec& value) { m_signingAlgorithmsHasBeenSet = true; m_signingAlgorithms.push_back(value); return *this; } /** *

The signing algorithms that the CMK supports. You cannot use the CMK with * other signing algorithms within AWS KMS.

This field appears only when the * KeyUsage of the CMK is SIGN_VERIFY.

*/ inline KeyMetadata& AddSigningAlgorithms(SigningAlgorithmSpec&& value) { m_signingAlgorithmsHasBeenSet = true; m_signingAlgorithms.push_back(std::move(value)); return *this; } private: Aws::String m_aWSAccountId; bool m_aWSAccountIdHasBeenSet; Aws::String m_keyId; bool m_keyIdHasBeenSet; Aws::String m_arn; bool m_arnHasBeenSet; Aws::Utils::DateTime m_creationDate; bool m_creationDateHasBeenSet; bool m_enabled; bool m_enabledHasBeenSet; Aws::String m_description; bool m_descriptionHasBeenSet; KeyUsageType m_keyUsage; bool m_keyUsageHasBeenSet; KeyState m_keyState; bool m_keyStateHasBeenSet; Aws::Utils::DateTime m_deletionDate; bool m_deletionDateHasBeenSet; Aws::Utils::DateTime m_validTo; bool m_validToHasBeenSet; OriginType m_origin; bool m_originHasBeenSet; Aws::String m_customKeyStoreId; bool m_customKeyStoreIdHasBeenSet; Aws::String m_cloudHsmClusterId; bool m_cloudHsmClusterIdHasBeenSet; ExpirationModelType m_expirationModel; bool m_expirationModelHasBeenSet; KeyManagerType m_keyManager; bool m_keyManagerHasBeenSet; CustomerMasterKeySpec m_customerMasterKeySpec; bool m_customerMasterKeySpecHasBeenSet; Aws::Vector m_encryptionAlgorithms; bool m_encryptionAlgorithmsHasBeenSet; Aws::Vector m_signingAlgorithms; bool m_signingAlgorithmsHasBeenSet; }; } // namespace Model } // namespace KMS } // namespace Aws