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

The proposed access control configuration for an Amazon RDS DB snapshot. You * can propose a configuration for a new Amazon RDS DB snapshot or an Amazon RDS DB * snapshot that you own by specifying the RdsDbSnapshotAttributeValue * and optional KMS encryption key. For more information, see ModifyDBSnapshotAttribute.

See * Also:

AWS * API Reference

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

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline const Aws::Map& GetAttributes() const{ return m_attributes; } /** *

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } /** *

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline void SetAttributes(const Aws::Map& value) { m_attributesHasBeenSet = true; m_attributes = value; } /** *

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline void SetAttributes(Aws::Map&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } /** *

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline RdsDbSnapshotConfiguration& WithAttributes(const Aws::Map& value) { SetAttributes(value); return *this;} /** *

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline RdsDbSnapshotConfiguration& WithAttributes(Aws::Map&& value) { SetAttributes(std::move(value)); return *this;} /** *

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline RdsDbSnapshotConfiguration& AddAttributes(const Aws::String& key, const RdsDbSnapshotAttributeValue& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline RdsDbSnapshotConfiguration& AddAttributes(Aws::String&& key, const RdsDbSnapshotAttributeValue& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline RdsDbSnapshotConfiguration& AddAttributes(const Aws::String& key, RdsDbSnapshotAttributeValue&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline RdsDbSnapshotConfiguration& AddAttributes(Aws::String&& key, RdsDbSnapshotAttributeValue&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; } /** *

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline RdsDbSnapshotConfiguration& AddAttributes(const char* key, RdsDbSnapshotAttributeValue&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

The names and values of manual DB snapshot attributes. Manual DB snapshot * attributes are used to authorize other Amazon Web Services accounts to restore a * manual DB snapshot. The only valid value for attributeName for the * attribute map is restore.

*/ inline RdsDbSnapshotConfiguration& AddAttributes(const char* key, const RdsDbSnapshotAttributeValue& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key * identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

*
  • If the configuration is for an existing Amazon RDS DB snapshot and * you do not specify the kmsKeyId, or you specify an empty string, * then the access preview uses the existing kmsKeyId of the * snapshot.

  • If the access preview is for a new resource and you * do not specify the specify the kmsKeyId, then the access preview * considers the snapshot as unencrypted.

*/ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** *

The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key * identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

*
  • If the configuration is for an existing Amazon RDS DB snapshot and * you do not specify the kmsKeyId, or you specify an empty string, * then the access preview uses the existing kmsKeyId of the * snapshot.

  • If the access preview is for a new resource and you * do not specify the specify the kmsKeyId, then the access preview * considers the snapshot as unencrypted.

*/ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** *

The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key * identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

*
  • If the configuration is for an existing Amazon RDS DB snapshot and * you do not specify the kmsKeyId, or you specify an empty string, * then the access preview uses the existing kmsKeyId of the * snapshot.

  • If the access preview is for a new resource and you * do not specify the specify the kmsKeyId, then the access preview * considers the snapshot as unencrypted.

*/ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; } /** *

The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key * identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

*
  • If the configuration is for an existing Amazon RDS DB snapshot and * you do not specify the kmsKeyId, or you specify an empty string, * then the access preview uses the existing kmsKeyId of the * snapshot.

  • If the access preview is for a new resource and you * do not specify the specify the kmsKeyId, then the access preview * considers the snapshot as unencrypted.

*/ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); } /** *

The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key * identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

*
  • If the configuration is for an existing Amazon RDS DB snapshot and * you do not specify the kmsKeyId, or you specify an empty string, * then the access preview uses the existing kmsKeyId of the * snapshot.

  • If the access preview is for a new resource and you * do not specify the specify the kmsKeyId, then the access preview * considers the snapshot as unencrypted.

*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); } /** *

The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key * identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

*
  • If the configuration is for an existing Amazon RDS DB snapshot and * you do not specify the kmsKeyId, or you specify an empty string, * then the access preview uses the existing kmsKeyId of the * snapshot.

  • If the access preview is for a new resource and you * do not specify the specify the kmsKeyId, then the access preview * considers the snapshot as unencrypted.

*/ inline RdsDbSnapshotConfiguration& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key * identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

*
  • If the configuration is for an existing Amazon RDS DB snapshot and * you do not specify the kmsKeyId, or you specify an empty string, * then the access preview uses the existing kmsKeyId of the * snapshot.

  • If the access preview is for a new resource and you * do not specify the specify the kmsKeyId, then the access preview * considers the snapshot as unencrypted.

*/ inline RdsDbSnapshotConfiguration& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key * identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

*
  • If the configuration is for an existing Amazon RDS DB snapshot and * you do not specify the kmsKeyId, or you specify an empty string, * then the access preview uses the existing kmsKeyId of the * snapshot.

  • If the access preview is for a new resource and you * do not specify the specify the kmsKeyId, then the access preview * considers the snapshot as unencrypted.

*/ inline RdsDbSnapshotConfiguration& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} private: Aws::Map m_attributes; bool m_attributesHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; }; } // namespace Model } // namespace AccessAnalyzer } // namespace Aws