/** * 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 AWS_DYNAMODB_API SSESpecification { public: SSESpecification(); SSESpecification(Aws::Utils::Json::JsonView jsonValue); SSESpecification& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

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

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

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

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

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

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

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

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

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

  • * KMS - Server-side encryption that uses AWS Key Management Service. * The key is stored in your account and is managed by AWS KMS (AWS 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 AWS Key Management Service. * The key is stored in your account and is managed by AWS KMS (AWS 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 AWS Key Management Service. * The key is stored in your account and is managed by AWS KMS (AWS 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 AWS Key Management Service. * The key is stored in your account and is managed by AWS KMS (AWS 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 AWS Key Management Service. * The key is stored in your account and is managed by AWS KMS (AWS 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 AWS Key Management Service. * The key is stored in your account and is managed by AWS KMS (AWS KMS charges * apply).

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

The AWS KMS customer master key (CMK) that should be used for the AWS KMS * encryption. To specify a CMK, 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 customer master key * alias/aws/dynamodb.

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

The AWS KMS customer master key (CMK) that should be used for the AWS KMS * encryption. To specify a CMK, 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 customer master key * alias/aws/dynamodb.

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

The AWS KMS customer master key (CMK) that should be used for the AWS KMS * encryption. To specify a CMK, 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 customer master key * alias/aws/dynamodb.

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

The AWS KMS customer master key (CMK) that should be used for the AWS KMS * encryption. To specify a CMK, 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 customer master key * alias/aws/dynamodb.

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

The AWS KMS customer master key (CMK) that should be used for the AWS KMS * encryption. To specify a CMK, 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 customer master key * alias/aws/dynamodb.

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

The AWS KMS customer master key (CMK) that should be used for the AWS KMS * encryption. To specify a CMK, 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 customer master key * alias/aws/dynamodb.

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

The AWS KMS customer master key (CMK) that should be used for the AWS KMS * encryption. To specify a CMK, 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 customer master key * alias/aws/dynamodb.

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

The AWS KMS customer master key (CMK) that should be used for the AWS KMS * encryption. To specify a CMK, 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 customer master key * alias/aws/dynamodb.

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