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

Represents the settings used to enable server-side encryption.

See * Also:

AWS * API Reference

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

Indicates whether server-side encryption is done using an Amazon Web Services * managed key or an Amazon Web Services owned key. If enabled (true), server-side * encryption type is set to KMS and an Amazon Web Services managed * key is used (KMS charges apply). If disabled (false) or not specified, * server-side encryption is set to Amazon Web Services owned key.

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

Indicates whether server-side encryption is done using an Amazon Web Services * managed key or an Amazon Web Services owned key. If enabled (true), server-side * encryption type is set to KMS and an Amazon Web Services managed * key is used (KMS charges apply). If disabled (false) or not specified, * server-side encryption is set to Amazon Web Services owned key.

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

Indicates whether server-side encryption is done using an Amazon Web Services * managed key or an Amazon Web Services owned key. If enabled (true), server-side * encryption type is set to KMS and an Amazon Web Services managed * key is used (KMS charges apply). If disabled (false) or not specified, * server-side encryption is set to Amazon Web Services owned key.

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

Indicates whether server-side encryption is done using an Amazon Web Services * managed key or an Amazon Web Services owned key. If enabled (true), server-side * encryption type is set to KMS and an Amazon Web Services managed * key is used (KMS charges apply). If disabled (false) or not specified, * server-side encryption is set to Amazon Web Services owned key.

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

Server-side encryption type. The only supported value is:

  • * KMS - Server-side encryption that uses Key Management Service. The * key is stored in your account and is managed by KMS (KMS charges apply).

    *
*/ inline const SSEType& GetSSEType() const{ return m_sSEType; } /** *

Server-side encryption type. The only supported value is:

  • * KMS - Server-side encryption that uses Key Management Service. The * key is stored in your account and is managed by KMS (KMS charges apply).

    *
*/ inline bool SSETypeHasBeenSet() const { return m_sSETypeHasBeenSet; } /** *

Server-side encryption type. The only supported value is:

  • * KMS - Server-side encryption that uses Key Management Service. The * key is stored in your account and is managed by KMS (KMS charges apply).

    *
*/ inline void SetSSEType(const SSEType& value) { m_sSETypeHasBeenSet = true; m_sSEType = value; } /** *

Server-side encryption type. The only supported value is:

  • * KMS - Server-side encryption that uses Key Management Service. The * key is stored in your account and is managed by KMS (KMS charges apply).

    *
*/ inline void SetSSEType(SSEType&& value) { m_sSETypeHasBeenSet = true; m_sSEType = std::move(value); } /** *

Server-side encryption type. The only supported value is:

  • * KMS - Server-side encryption that uses Key Management Service. The * key is stored in your account and is managed by KMS (KMS charges apply).

    *
*/ inline SSESpecification& WithSSEType(const SSEType& value) { SetSSEType(value); return *this;} /** *

Server-side encryption type. The only supported value is:

  • * KMS - Server-side encryption that uses Key Management Service. The * key is stored in your account and is managed by KMS (KMS charges apply).

    *
*/ inline SSESpecification& WithSSEType(SSEType&& value) { SetSSEType(std::move(value)); return *this;} /** *

The KMS key that should be used for the KMS encryption. To specify a key, use * its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you * should only provide this parameter if the key is different from the default * DynamoDB key alias/aws/dynamodb.

*/ inline const Aws::String& GetKMSMasterKeyId() const{ return m_kMSMasterKeyId; } /** *

The KMS key that should be used for the KMS encryption. To specify a key, use * its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you * should only provide this parameter if the key is different from the default * DynamoDB key alias/aws/dynamodb.

*/ inline bool KMSMasterKeyIdHasBeenSet() const { return m_kMSMasterKeyIdHasBeenSet; } /** *

The KMS key that should be used for the KMS encryption. To specify a key, use * its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you * should only provide this parameter if the key is different from the default * DynamoDB key alias/aws/dynamodb.

*/ inline void SetKMSMasterKeyId(const Aws::String& value) { m_kMSMasterKeyIdHasBeenSet = true; m_kMSMasterKeyId = value; } /** *

The KMS key that should be used for the KMS encryption. To specify a key, use * its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you * should only provide this parameter if the key is different from the default * DynamoDB key alias/aws/dynamodb.

*/ inline void SetKMSMasterKeyId(Aws::String&& value) { m_kMSMasterKeyIdHasBeenSet = true; m_kMSMasterKeyId = std::move(value); } /** *

The KMS key that should be used for the KMS encryption. To specify a key, use * its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you * should only provide this parameter if the key is different from the default * DynamoDB key alias/aws/dynamodb.

*/ inline void SetKMSMasterKeyId(const char* value) { m_kMSMasterKeyIdHasBeenSet = true; m_kMSMasterKeyId.assign(value); } /** *

The KMS key that should be used for the KMS encryption. To specify a key, use * its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you * should only provide this parameter if the key is different from the default * DynamoDB key alias/aws/dynamodb.

*/ inline SSESpecification& WithKMSMasterKeyId(const Aws::String& value) { SetKMSMasterKeyId(value); return *this;} /** *

The KMS key that should be used for the KMS encryption. To specify a key, use * its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you * should only provide this parameter if the key is different from the default * DynamoDB key alias/aws/dynamodb.

*/ inline SSESpecification& WithKMSMasterKeyId(Aws::String&& value) { SetKMSMasterKeyId(std::move(value)); return *this;} /** *

The KMS key that should be used for the KMS encryption. To specify a key, use * its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you * should only provide this parameter if the key is different from the default * DynamoDB key alias/aws/dynamodb.

*/ inline SSESpecification& WithKMSMasterKeyId(const char* value) { SetKMSMasterKeyId(value); return *this;} private: bool m_enabled; bool m_enabledHasBeenSet = false; SSEType m_sSEType; bool m_sSETypeHasBeenSet = false; Aws::String m_kMSMasterKeyId; bool m_kMSMasterKeyIdHasBeenSet = false; }; } // namespace Model } // namespace DynamoDB } // namespace Aws