/** * 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 DLM { namespace Model { /** *

Specifies a rule for cross-Region snapshot copies.

See Also:

* AWS * API Reference

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

The target Region.

*/ inline const Aws::String& GetTargetRegion() const{ return m_targetRegion; } /** *

The target Region.

*/ inline bool TargetRegionHasBeenSet() const { return m_targetRegionHasBeenSet; } /** *

The target Region.

*/ inline void SetTargetRegion(const Aws::String& value) { m_targetRegionHasBeenSet = true; m_targetRegion = value; } /** *

The target Region.

*/ inline void SetTargetRegion(Aws::String&& value) { m_targetRegionHasBeenSet = true; m_targetRegion = std::move(value); } /** *

The target Region.

*/ inline void SetTargetRegion(const char* value) { m_targetRegionHasBeenSet = true; m_targetRegion.assign(value); } /** *

The target Region.

*/ inline CrossRegionCopyRule& WithTargetRegion(const Aws::String& value) { SetTargetRegion(value); return *this;} /** *

The target Region.

*/ inline CrossRegionCopyRule& WithTargetRegion(Aws::String&& value) { SetTargetRegion(std::move(value)); return *this;} /** *

The target Region.

*/ inline CrossRegionCopyRule& WithTargetRegion(const char* value) { SetTargetRegion(value); return *this;} /** *

To encrypt a copy of an unencrypted snapshot if encryption by default is not * enabled, enable encryption using this parameter. Copies of encrypted snapshots * are encrypted, even if this parameter is false or if encryption by default is * not enabled.

*/ inline bool GetEncrypted() const{ return m_encrypted; } /** *

To encrypt a copy of an unencrypted snapshot if encryption by default is not * enabled, enable encryption using this parameter. Copies of encrypted snapshots * are encrypted, even if this parameter is false or if encryption by default is * not enabled.

*/ inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; } /** *

To encrypt a copy of an unencrypted snapshot if encryption by default is not * enabled, enable encryption using this parameter. Copies of encrypted snapshots * are encrypted, even if this parameter is false or if encryption by default is * not enabled.

*/ inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; } /** *

To encrypt a copy of an unencrypted snapshot if encryption by default is not * enabled, enable encryption using this parameter. Copies of encrypted snapshots * are encrypted, even if this parameter is false or if encryption by default is * not enabled.

*/ inline CrossRegionCopyRule& WithEncrypted(bool value) { SetEncrypted(value); return *this;} /** *

The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to * use for EBS encryption. If this parameter is not specified, your AWS managed CMK * for EBS is used.

*/ inline const Aws::String& GetCmkArn() const{ return m_cmkArn; } /** *

The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to * use for EBS encryption. If this parameter is not specified, your AWS managed CMK * for EBS is used.

*/ inline bool CmkArnHasBeenSet() const { return m_cmkArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to * use for EBS encryption. If this parameter is not specified, your AWS managed CMK * for EBS is used.

*/ inline void SetCmkArn(const Aws::String& value) { m_cmkArnHasBeenSet = true; m_cmkArn = value; } /** *

The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to * use for EBS encryption. If this parameter is not specified, your AWS managed CMK * for EBS is used.

*/ inline void SetCmkArn(Aws::String&& value) { m_cmkArnHasBeenSet = true; m_cmkArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to * use for EBS encryption. If this parameter is not specified, your AWS managed CMK * for EBS is used.

*/ inline void SetCmkArn(const char* value) { m_cmkArnHasBeenSet = true; m_cmkArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to * use for EBS encryption. If this parameter is not specified, your AWS managed CMK * for EBS is used.

*/ inline CrossRegionCopyRule& WithCmkArn(const Aws::String& value) { SetCmkArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to * use for EBS encryption. If this parameter is not specified, your AWS managed CMK * for EBS is used.

*/ inline CrossRegionCopyRule& WithCmkArn(Aws::String&& value) { SetCmkArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to * use for EBS encryption. If this parameter is not specified, your AWS managed CMK * for EBS is used.

*/ inline CrossRegionCopyRule& WithCmkArn(const char* value) { SetCmkArn(value); return *this;} /** *

Copy all user-defined tags from the source snapshot to the copied * snapshot.

*/ inline bool GetCopyTags() const{ return m_copyTags; } /** *

Copy all user-defined tags from the source snapshot to the copied * snapshot.

*/ inline bool CopyTagsHasBeenSet() const { return m_copyTagsHasBeenSet; } /** *

Copy all user-defined tags from the source snapshot to the copied * snapshot.

*/ inline void SetCopyTags(bool value) { m_copyTagsHasBeenSet = true; m_copyTags = value; } /** *

Copy all user-defined tags from the source snapshot to the copied * snapshot.

*/ inline CrossRegionCopyRule& WithCopyTags(bool value) { SetCopyTags(value); return *this;} /** *

The retention rule.

*/ inline const CrossRegionCopyRetainRule& GetRetainRule() const{ return m_retainRule; } /** *

The retention rule.

*/ inline bool RetainRuleHasBeenSet() const { return m_retainRuleHasBeenSet; } /** *

The retention rule.

*/ inline void SetRetainRule(const CrossRegionCopyRetainRule& value) { m_retainRuleHasBeenSet = true; m_retainRule = value; } /** *

The retention rule.

*/ inline void SetRetainRule(CrossRegionCopyRetainRule&& value) { m_retainRuleHasBeenSet = true; m_retainRule = std::move(value); } /** *

The retention rule.

*/ inline CrossRegionCopyRule& WithRetainRule(const CrossRegionCopyRetainRule& value) { SetRetainRule(value); return *this;} /** *

The retention rule.

*/ inline CrossRegionCopyRule& WithRetainRule(CrossRegionCopyRetainRule&& value) { SetRetainRule(std::move(value)); return *this;} private: Aws::String m_targetRegion; bool m_targetRegionHasBeenSet; bool m_encrypted; bool m_encryptedHasBeenSet; Aws::String m_cmkArn; bool m_cmkArnHasBeenSet; bool m_copyTags; bool m_copyTagsHasBeenSet; CrossRegionCopyRetainRule m_retainRule; bool m_retainRuleHasBeenSet; }; } // namespace Model } // namespace DLM } // namespace Aws