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

Contains metadata about an KMS key.

See Also:

AWS * API Reference

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

The twelve-digit account ID of the Amazon Web Services account that owns the * KMS key.

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

The twelve-digit account ID of the Amazon Web Services account that owns the * KMS key.

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

The twelve-digit account ID of the Amazon Web Services account that owns the * KMS key.

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

The twelve-digit account ID of the Amazon Web Services account that owns the * KMS key.

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

The twelve-digit account ID of the Amazon Web Services account that owns the * KMS key.

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

The twelve-digit account ID of the Amazon Web Services account that owns the * KMS key.

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

The twelve-digit account ID of the Amazon Web Services account that owns the * KMS key.

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

The twelve-digit account ID of the Amazon Web Services account that owns the * KMS key.

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

Indicates when the KMS key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline double GetCreationDate() const{ return m_creationDate; } /** *

Indicates when the KMS key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

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

Indicates when the KMS key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetCreationDate(double value) { m_creationDateHasBeenSet = true; m_creationDate = value; } /** *

Indicates when the KMS key was created.

Uses the * date-time format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsKmsKeyDetails& WithCreationDate(double value) { SetCreationDate(value); return *this;} /** *

The globally unique identifier for the KMS key.

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

The globally unique identifier for the KMS key.

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

The globally unique identifier for the KMS key.

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

The globally unique identifier for the KMS key.

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

The globally unique identifier for the KMS key.

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

The globally unique identifier for the KMS key.

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

The globally unique identifier for the KMS key.

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

The globally unique identifier for the KMS key.

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

The manager of the KMS key. KMS keys in your Amazon Web Services account are * either customer managed or Amazon Web Services managed.

*/ inline const Aws::String& GetKeyManager() const{ return m_keyManager; } /** *

The manager of the KMS key. KMS keys in your Amazon Web Services account are * either customer managed or Amazon Web Services managed.

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

The manager of the KMS key. KMS keys in your Amazon Web Services account are * either customer managed or Amazon Web Services managed.

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

The manager of the KMS key. KMS keys in your Amazon Web Services account are * either customer managed or Amazon Web Services managed.

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

The manager of the KMS key. KMS keys in your Amazon Web Services account are * either customer managed or Amazon Web Services managed.

*/ inline void SetKeyManager(const char* value) { m_keyManagerHasBeenSet = true; m_keyManager.assign(value); } /** *

The manager of the KMS key. KMS keys in your Amazon Web Services account are * either customer managed or Amazon Web Services managed.

*/ inline AwsKmsKeyDetails& WithKeyManager(const Aws::String& value) { SetKeyManager(value); return *this;} /** *

The manager of the KMS key. KMS keys in your Amazon Web Services account are * either customer managed or Amazon Web Services managed.

*/ inline AwsKmsKeyDetails& WithKeyManager(Aws::String&& value) { SetKeyManager(std::move(value)); return *this;} /** *

The manager of the KMS key. KMS keys in your Amazon Web Services account are * either customer managed or Amazon Web Services managed.

*/ inline AwsKmsKeyDetails& WithKeyManager(const char* value) { SetKeyManager(value); return *this;} /** *

The state of the KMS key. Valid values are as follows:

  • * Disabled

  • Enabled

  • *

    PendingDeletion

  • PendingImport *

  • Unavailable

*/ inline const Aws::String& GetKeyState() const{ return m_keyState; } /** *

The state of the KMS key. Valid values are as follows:

  • * Disabled

  • Enabled

  • *

    PendingDeletion

  • PendingImport *

  • Unavailable

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

The state of the KMS key. Valid values are as follows:

  • * Disabled

  • Enabled

  • *

    PendingDeletion

  • PendingImport *

  • Unavailable

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

The state of the KMS key. Valid values are as follows:

  • * Disabled

  • Enabled

  • *

    PendingDeletion

  • PendingImport *

  • Unavailable

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

The state of the KMS key. Valid values are as follows:

  • * Disabled

  • Enabled

  • *

    PendingDeletion

  • PendingImport *

  • Unavailable

*/ inline void SetKeyState(const char* value) { m_keyStateHasBeenSet = true; m_keyState.assign(value); } /** *

The state of the KMS key. Valid values are as follows:

  • * Disabled

  • Enabled

  • *

    PendingDeletion

  • PendingImport *

  • Unavailable

*/ inline AwsKmsKeyDetails& WithKeyState(const Aws::String& value) { SetKeyState(value); return *this;} /** *

The state of the KMS key. Valid values are as follows:

  • * Disabled

  • Enabled

  • *

    PendingDeletion

  • PendingImport *

  • Unavailable

*/ inline AwsKmsKeyDetails& WithKeyState(Aws::String&& value) { SetKeyState(std::move(value)); return *this;} /** *

The state of the KMS key. Valid values are as follows:

  • * Disabled

  • Enabled

  • *

    PendingDeletion

  • PendingImport *

  • Unavailable

*/ inline AwsKmsKeyDetails& WithKeyState(const char* value) { SetKeyState(value); return *this;} /** *

The source of the KMS key material.

When this value is * AWS_KMS, KMS created the key material.

When this value is * EXTERNAL, the key material was imported from your existing key * management infrastructure or the KMS key lacks key material.

When this * value is AWS_CLOUDHSM, the key material was created in the CloudHSM * cluster associated with a custom key store.

*/ inline const Aws::String& GetOrigin() const{ return m_origin; } /** *

The source of the KMS key material.

When this value is * AWS_KMS, KMS created the key material.

When this value is * EXTERNAL, the key material was imported from your existing key * management infrastructure or the KMS key lacks key material.

When this * value is AWS_CLOUDHSM, the key material was created in the CloudHSM * cluster associated with a custom key store.

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

The source of the KMS key material.

When this value is * AWS_KMS, KMS created the key material.

When this value is * EXTERNAL, the key material was imported from your existing key * management infrastructure or the KMS key lacks key material.

When this * value is AWS_CLOUDHSM, the key material was created in the CloudHSM * cluster associated with a custom key store.

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

The source of the KMS key material.

When this value is * AWS_KMS, KMS created the key material.

When this value is * EXTERNAL, the key material was imported from your existing key * management infrastructure or the KMS key lacks key material.

When this * value is AWS_CLOUDHSM, the key material was created in the CloudHSM * cluster associated with a custom key store.

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

The source of the KMS key material.

When this value is * AWS_KMS, KMS created the key material.

When this value is * EXTERNAL, the key material was imported from your existing key * management infrastructure or the KMS key lacks key material.

When this * value is AWS_CLOUDHSM, the key material was created in the CloudHSM * cluster associated with a custom key store.

*/ inline void SetOrigin(const char* value) { m_originHasBeenSet = true; m_origin.assign(value); } /** *

The source of the KMS key material.

When this value is * AWS_KMS, KMS created the key material.

When this value is * EXTERNAL, the key material was imported from your existing key * management infrastructure or the KMS key lacks key material.

When this * value is AWS_CLOUDHSM, the key material was created in the CloudHSM * cluster associated with a custom key store.

*/ inline AwsKmsKeyDetails& WithOrigin(const Aws::String& value) { SetOrigin(value); return *this;} /** *

The source of the KMS key material.

When this value is * AWS_KMS, KMS created the key material.

When this value is * EXTERNAL, the key material was imported from your existing key * management infrastructure or the KMS key lacks key material.

When this * value is AWS_CLOUDHSM, the key material was created in the CloudHSM * cluster associated with a custom key store.

*/ inline AwsKmsKeyDetails& WithOrigin(Aws::String&& value) { SetOrigin(std::move(value)); return *this;} /** *

The source of the KMS key material.

When this value is * AWS_KMS, KMS created the key material.

When this value is * EXTERNAL, the key material was imported from your existing key * management infrastructure or the KMS key lacks key material.

When this * value is AWS_CLOUDHSM, the key material was created in the CloudHSM * cluster associated with a custom key store.

*/ inline AwsKmsKeyDetails& WithOrigin(const char* value) { SetOrigin(value); return *this;} /** *

A description of the KMS key.

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

A description of the KMS key.

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

A description of the KMS key.

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

A description of the KMS key.

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

A description of the KMS key.

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

A description of the KMS key.

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

A description of the KMS key.

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

A description of the KMS key.

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

Whether the key has key rotation enabled.

*/ inline bool GetKeyRotationStatus() const{ return m_keyRotationStatus; } /** *

Whether the key has key rotation enabled.

*/ inline bool KeyRotationStatusHasBeenSet() const { return m_keyRotationStatusHasBeenSet; } /** *

Whether the key has key rotation enabled.

*/ inline void SetKeyRotationStatus(bool value) { m_keyRotationStatusHasBeenSet = true; m_keyRotationStatus = value; } /** *

Whether the key has key rotation enabled.

*/ inline AwsKmsKeyDetails& WithKeyRotationStatus(bool value) { SetKeyRotationStatus(value); return *this;} private: Aws::String m_aWSAccountId; bool m_aWSAccountIdHasBeenSet = false; double m_creationDate; bool m_creationDateHasBeenSet = false; Aws::String m_keyId; bool m_keyIdHasBeenSet = false; Aws::String m_keyManager; bool m_keyManagerHasBeenSet = false; Aws::String m_keyState; bool m_keyStateHasBeenSet = false; Aws::String m_origin; bool m_originHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; bool m_keyRotationStatus; bool m_keyRotationStatusHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws