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

[Snapshot and AMI policies only] Specifies a cross-Region copy rule * for snapshot and AMI policies.

To specify a cross-Region copy * action for event-based polices, use CrossRegionCopyAction.

*

See Also:

AWS * API Reference

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

Avoid using this parameter when creating new policies. Instead, use * Target to specify a target Region or a target Outpost for snapshot * copies.

For policies created before the Target parameter was * introduced, this parameter indicates the target Region for snapshot copies.

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

Avoid using this parameter when creating new policies. Instead, use * Target to specify a target Region or a target Outpost for snapshot * copies.

For policies created before the Target parameter was * introduced, this parameter indicates the target Region for snapshot copies.

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

Avoid using this parameter when creating new policies. Instead, use * Target to specify a target Region or a target Outpost for snapshot * copies.

For policies created before the Target parameter was * introduced, this parameter indicates the target Region for snapshot copies.

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

Avoid using this parameter when creating new policies. Instead, use * Target to specify a target Region or a target Outpost for snapshot * copies.

For policies created before the Target parameter was * introduced, this parameter indicates the target Region for snapshot copies.

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

Avoid using this parameter when creating new policies. Instead, use * Target to specify a target Region or a target Outpost for snapshot * copies.

For policies created before the Target parameter was * introduced, this parameter indicates the target Region for snapshot copies.

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

Avoid using this parameter when creating new policies. Instead, use * Target to specify a target Region or a target Outpost for snapshot * copies.

For policies created before the Target parameter was * introduced, this parameter indicates the target Region for snapshot copies.

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

Avoid using this parameter when creating new policies. Instead, use * Target to specify a target Region or a target Outpost for snapshot * copies.

For policies created before the Target parameter was * introduced, this parameter indicates the target Region for snapshot copies.

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

Avoid using this parameter when creating new policies. Instead, use * Target to specify a target Region or a target Outpost for snapshot * copies.

For policies created before the Target parameter was * introduced, this parameter indicates the target Region for snapshot copies.

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

The target Region or the Amazon Resource Name (ARN) of the target Outpost for * the snapshot copies.

Use this parameter instead of TargetRegion. * Do not specify both.

*/ inline const Aws::String& GetTarget() const{ return m_target; } /** *

The target Region or the Amazon Resource Name (ARN) of the target Outpost for * the snapshot copies.

Use this parameter instead of TargetRegion. * Do not specify both.

*/ inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; } /** *

The target Region or the Amazon Resource Name (ARN) of the target Outpost for * the snapshot copies.

Use this parameter instead of TargetRegion. * Do not specify both.

*/ inline void SetTarget(const Aws::String& value) { m_targetHasBeenSet = true; m_target = value; } /** *

The target Region or the Amazon Resource Name (ARN) of the target Outpost for * the snapshot copies.

Use this parameter instead of TargetRegion. * Do not specify both.

*/ inline void SetTarget(Aws::String&& value) { m_targetHasBeenSet = true; m_target = std::move(value); } /** *

The target Region or the Amazon Resource Name (ARN) of the target Outpost for * the snapshot copies.

Use this parameter instead of TargetRegion. * Do not specify both.

*/ inline void SetTarget(const char* value) { m_targetHasBeenSet = true; m_target.assign(value); } /** *

The target Region or the Amazon Resource Name (ARN) of the target Outpost for * the snapshot copies.

Use this parameter instead of TargetRegion. * Do not specify both.

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

The target Region or the Amazon Resource Name (ARN) of the target Outpost for * the snapshot copies.

Use this parameter instead of TargetRegion. * Do not specify both.

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

The target Region or the Amazon Resource Name (ARN) of the target Outpost for * the snapshot copies.

Use this parameter instead of TargetRegion. * Do not specify both.

*/ inline CrossRegionCopyRule& WithTarget(const char* value) { SetTarget(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 KMS key to use for EBS encryption. If * this parameter is not specified, the default KMS key for the account is * used.

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

The Amazon Resource Name (ARN) of the KMS key to use for EBS encryption. If * this parameter is not specified, the default KMS key for the account is * used.

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

The Amazon Resource Name (ARN) of the KMS key to use for EBS encryption. If * this parameter is not specified, the default KMS key for the account is * used.

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

The Amazon Resource Name (ARN) of the KMS key to use for EBS encryption. If * this parameter is not specified, the default KMS key for the account is * used.

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

The Amazon Resource Name (ARN) of the KMS key to use for EBS encryption. If * this parameter is not specified, the default KMS key for the account is * used.

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

The Amazon Resource Name (ARN) of the KMS key to use for EBS encryption. If * this parameter is not specified, the default KMS key for the account is * used.

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

The Amazon Resource Name (ARN) of the KMS key to use for EBS encryption. If * this parameter is not specified, the default KMS key for the account is * used.

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

The Amazon Resource Name (ARN) of the KMS key to use for EBS encryption. If * this parameter is not specified, the default KMS key for the account is * used.

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

Indicates whether to copy all user-defined tags from the source snapshot or * AMI to the cross-Region copy.

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

Indicates whether to copy all user-defined tags from the source snapshot or * AMI to the cross-Region copy.

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

Indicates whether to copy all user-defined tags from the source snapshot or * AMI to the cross-Region copy.

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

Indicates whether to copy all user-defined tags from the source snapshot or * AMI to the cross-Region copy.

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

The retention rule that indicates how long the cross-Region snapshot or AMI * copies are to be retained in the destination Region.

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

The retention rule that indicates how long the cross-Region snapshot or AMI * copies are to be retained in the destination Region.

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

The retention rule that indicates how long the cross-Region snapshot or AMI * copies are to be retained in the destination Region.

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

The retention rule that indicates how long the cross-Region snapshot or AMI * copies are to be retained in the destination Region.

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

The retention rule that indicates how long the cross-Region snapshot or AMI * copies are to be retained in the destination Region.

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

The retention rule that indicates how long the cross-Region snapshot or AMI * copies are to be retained in the destination Region.

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

[AMI policies only] The AMI deprecation rule for cross-Region AMI * copies created by the rule.

*/ inline const CrossRegionCopyDeprecateRule& GetDeprecateRule() const{ return m_deprecateRule; } /** *

[AMI policies only] The AMI deprecation rule for cross-Region AMI * copies created by the rule.

*/ inline bool DeprecateRuleHasBeenSet() const { return m_deprecateRuleHasBeenSet; } /** *

[AMI policies only] The AMI deprecation rule for cross-Region AMI * copies created by the rule.

*/ inline void SetDeprecateRule(const CrossRegionCopyDeprecateRule& value) { m_deprecateRuleHasBeenSet = true; m_deprecateRule = value; } /** *

[AMI policies only] The AMI deprecation rule for cross-Region AMI * copies created by the rule.

*/ inline void SetDeprecateRule(CrossRegionCopyDeprecateRule&& value) { m_deprecateRuleHasBeenSet = true; m_deprecateRule = std::move(value); } /** *

[AMI policies only] The AMI deprecation rule for cross-Region AMI * copies created by the rule.

*/ inline CrossRegionCopyRule& WithDeprecateRule(const CrossRegionCopyDeprecateRule& value) { SetDeprecateRule(value); return *this;} /** *

[AMI policies only] The AMI deprecation rule for cross-Region AMI * copies created by the rule.

*/ inline CrossRegionCopyRule& WithDeprecateRule(CrossRegionCopyDeprecateRule&& value) { SetDeprecateRule(std::move(value)); return *this;} private: Aws::String m_targetRegion; bool m_targetRegionHasBeenSet = false; Aws::String m_target; bool m_targetHasBeenSet = false; bool m_encrypted; bool m_encryptedHasBeenSet = false; Aws::String m_cmkArn; bool m_cmkArnHasBeenSet = false; bool m_copyTags; bool m_copyTagsHasBeenSet = false; CrossRegionCopyRetainRule m_retainRule; bool m_retainRuleHasBeenSet = false; CrossRegionCopyDeprecateRule m_deprecateRule; bool m_deprecateRuleHasBeenSet = false; }; } // namespace Model } // namespace DLM } // namespace Aws