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

The proposed access control configuration for an Amazon EBS volume snapshot. * You can propose a configuration for a new Amazon EBS volume snapshot or an * Amazon EBS volume snapshot that you own by specifying the user IDs, groups, and * optional KMS encryption key. For more information, see ModifySnapshotAttribute.

See * Also:

AWS * API Reference

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

The IDs of the Amazon Web Services accounts that have access to the Amazon * EBS volume snapshot.

  • If the configuration is for an existing * Amazon EBS volume snapshot and you do not specify the userIds, then * the access preview uses the existing shared userIds for the * snapshot.

  • If the access preview is for a new resource and you * do not specify the userIds, then the access preview considers the * snapshot without any userIds.

  • To propose deletion * of existing shared accountIds, you can specify an empty list for * userIds.

*/ inline const Aws::Vector& GetUserIds() const{ return m_userIds; } /** *

The IDs of the Amazon Web Services accounts that have access to the Amazon * EBS volume snapshot.

  • If the configuration is for an existing * Amazon EBS volume snapshot and you do not specify the userIds, then * the access preview uses the existing shared userIds for the * snapshot.

  • If the access preview is for a new resource and you * do not specify the userIds, then the access preview considers the * snapshot without any userIds.

  • To propose deletion * of existing shared accountIds, you can specify an empty list for * userIds.

*/ inline bool UserIdsHasBeenSet() const { return m_userIdsHasBeenSet; } /** *

The IDs of the Amazon Web Services accounts that have access to the Amazon * EBS volume snapshot.

  • If the configuration is for an existing * Amazon EBS volume snapshot and you do not specify the userIds, then * the access preview uses the existing shared userIds for the * snapshot.

  • If the access preview is for a new resource and you * do not specify the userIds, then the access preview considers the * snapshot without any userIds.

  • To propose deletion * of existing shared accountIds, you can specify an empty list for * userIds.

*/ inline void SetUserIds(const Aws::Vector& value) { m_userIdsHasBeenSet = true; m_userIds = value; } /** *

The IDs of the Amazon Web Services accounts that have access to the Amazon * EBS volume snapshot.

  • If the configuration is for an existing * Amazon EBS volume snapshot and you do not specify the userIds, then * the access preview uses the existing shared userIds for the * snapshot.

  • If the access preview is for a new resource and you * do not specify the userIds, then the access preview considers the * snapshot without any userIds.

  • To propose deletion * of existing shared accountIds, you can specify an empty list for * userIds.

*/ inline void SetUserIds(Aws::Vector&& value) { m_userIdsHasBeenSet = true; m_userIds = std::move(value); } /** *

The IDs of the Amazon Web Services accounts that have access to the Amazon * EBS volume snapshot.

  • If the configuration is for an existing * Amazon EBS volume snapshot and you do not specify the userIds, then * the access preview uses the existing shared userIds for the * snapshot.

  • If the access preview is for a new resource and you * do not specify the userIds, then the access preview considers the * snapshot without any userIds.

  • To propose deletion * of existing shared accountIds, you can specify an empty list for * userIds.

*/ inline EbsSnapshotConfiguration& WithUserIds(const Aws::Vector& value) { SetUserIds(value); return *this;} /** *

The IDs of the Amazon Web Services accounts that have access to the Amazon * EBS volume snapshot.

  • If the configuration is for an existing * Amazon EBS volume snapshot and you do not specify the userIds, then * the access preview uses the existing shared userIds for the * snapshot.

  • If the access preview is for a new resource and you * do not specify the userIds, then the access preview considers the * snapshot without any userIds.

  • To propose deletion * of existing shared accountIds, you can specify an empty list for * userIds.

*/ inline EbsSnapshotConfiguration& WithUserIds(Aws::Vector&& value) { SetUserIds(std::move(value)); return *this;} /** *

The IDs of the Amazon Web Services accounts that have access to the Amazon * EBS volume snapshot.

  • If the configuration is for an existing * Amazon EBS volume snapshot and you do not specify the userIds, then * the access preview uses the existing shared userIds for the * snapshot.

  • If the access preview is for a new resource and you * do not specify the userIds, then the access preview considers the * snapshot without any userIds.

  • To propose deletion * of existing shared accountIds, you can specify an empty list for * userIds.

*/ inline EbsSnapshotConfiguration& AddUserIds(const Aws::String& value) { m_userIdsHasBeenSet = true; m_userIds.push_back(value); return *this; } /** *

The IDs of the Amazon Web Services accounts that have access to the Amazon * EBS volume snapshot.

  • If the configuration is for an existing * Amazon EBS volume snapshot and you do not specify the userIds, then * the access preview uses the existing shared userIds for the * snapshot.

  • If the access preview is for a new resource and you * do not specify the userIds, then the access preview considers the * snapshot without any userIds.

  • To propose deletion * of existing shared accountIds, you can specify an empty list for * userIds.

*/ inline EbsSnapshotConfiguration& AddUserIds(Aws::String&& value) { m_userIdsHasBeenSet = true; m_userIds.push_back(std::move(value)); return *this; } /** *

The IDs of the Amazon Web Services accounts that have access to the Amazon * EBS volume snapshot.

  • If the configuration is for an existing * Amazon EBS volume snapshot and you do not specify the userIds, then * the access preview uses the existing shared userIds for the * snapshot.

  • If the access preview is for a new resource and you * do not specify the userIds, then the access preview considers the * snapshot without any userIds.

  • To propose deletion * of existing shared accountIds, you can specify an empty list for * userIds.

*/ inline EbsSnapshotConfiguration& AddUserIds(const char* value) { m_userIdsHasBeenSet = true; m_userIds.push_back(value); return *this; } /** *

The groups that have access to the Amazon EBS volume snapshot. If the value * all is specified, then the Amazon EBS volume snapshot is * public.

  • If the configuration is for an existing Amazon EBS * volume snapshot and you do not specify the groups, then the access * preview uses the existing shared groups for the snapshot.

  • *
  • If the access preview is for a new resource and you do not specify the * groups, then the access preview considers the snapshot without any * groups.

  • To propose deletion of existing shared * groups, you can specify an empty list for groups.

    *
*/ inline const Aws::Vector& GetGroups() const{ return m_groups; } /** *

The groups that have access to the Amazon EBS volume snapshot. If the value * all is specified, then the Amazon EBS volume snapshot is * public.

  • If the configuration is for an existing Amazon EBS * volume snapshot and you do not specify the groups, then the access * preview uses the existing shared groups for the snapshot.

  • *
  • If the access preview is for a new resource and you do not specify the * groups, then the access preview considers the snapshot without any * groups.

  • To propose deletion of existing shared * groups, you can specify an empty list for groups.

    *
*/ inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; } /** *

The groups that have access to the Amazon EBS volume snapshot. If the value * all is specified, then the Amazon EBS volume snapshot is * public.

  • If the configuration is for an existing Amazon EBS * volume snapshot and you do not specify the groups, then the access * preview uses the existing shared groups for the snapshot.

  • *
  • If the access preview is for a new resource and you do not specify the * groups, then the access preview considers the snapshot without any * groups.

  • To propose deletion of existing shared * groups, you can specify an empty list for groups.

    *
*/ inline void SetGroups(const Aws::Vector& value) { m_groupsHasBeenSet = true; m_groups = value; } /** *

The groups that have access to the Amazon EBS volume snapshot. If the value * all is specified, then the Amazon EBS volume snapshot is * public.

  • If the configuration is for an existing Amazon EBS * volume snapshot and you do not specify the groups, then the access * preview uses the existing shared groups for the snapshot.

  • *
  • If the access preview is for a new resource and you do not specify the * groups, then the access preview considers the snapshot without any * groups.

  • To propose deletion of existing shared * groups, you can specify an empty list for groups.

    *
*/ inline void SetGroups(Aws::Vector&& value) { m_groupsHasBeenSet = true; m_groups = std::move(value); } /** *

The groups that have access to the Amazon EBS volume snapshot. If the value * all is specified, then the Amazon EBS volume snapshot is * public.

  • If the configuration is for an existing Amazon EBS * volume snapshot and you do not specify the groups, then the access * preview uses the existing shared groups for the snapshot.

  • *
  • If the access preview is for a new resource and you do not specify the * groups, then the access preview considers the snapshot without any * groups.

  • To propose deletion of existing shared * groups, you can specify an empty list for groups.

    *
*/ inline EbsSnapshotConfiguration& WithGroups(const Aws::Vector& value) { SetGroups(value); return *this;} /** *

The groups that have access to the Amazon EBS volume snapshot. If the value * all is specified, then the Amazon EBS volume snapshot is * public.

  • If the configuration is for an existing Amazon EBS * volume snapshot and you do not specify the groups, then the access * preview uses the existing shared groups for the snapshot.

  • *
  • If the access preview is for a new resource and you do not specify the * groups, then the access preview considers the snapshot without any * groups.

  • To propose deletion of existing shared * groups, you can specify an empty list for groups.

    *
*/ inline EbsSnapshotConfiguration& WithGroups(Aws::Vector&& value) { SetGroups(std::move(value)); return *this;} /** *

The groups that have access to the Amazon EBS volume snapshot. If the value * all is specified, then the Amazon EBS volume snapshot is * public.

  • If the configuration is for an existing Amazon EBS * volume snapshot and you do not specify the groups, then the access * preview uses the existing shared groups for the snapshot.

  • *
  • If the access preview is for a new resource and you do not specify the * groups, then the access preview considers the snapshot without any * groups.

  • To propose deletion of existing shared * groups, you can specify an empty list for groups.

    *
*/ inline EbsSnapshotConfiguration& AddGroups(const Aws::String& value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; } /** *

The groups that have access to the Amazon EBS volume snapshot. If the value * all is specified, then the Amazon EBS volume snapshot is * public.

  • If the configuration is for an existing Amazon EBS * volume snapshot and you do not specify the groups, then the access * preview uses the existing shared groups for the snapshot.

  • *
  • If the access preview is for a new resource and you do not specify the * groups, then the access preview considers the snapshot without any * groups.

  • To propose deletion of existing shared * groups, you can specify an empty list for groups.

    *
*/ inline EbsSnapshotConfiguration& AddGroups(Aws::String&& value) { m_groupsHasBeenSet = true; m_groups.push_back(std::move(value)); return *this; } /** *

The groups that have access to the Amazon EBS volume snapshot. If the value * all is specified, then the Amazon EBS volume snapshot is * public.

  • If the configuration is for an existing Amazon EBS * volume snapshot and you do not specify the groups, then the access * preview uses the existing shared groups for the snapshot.

  • *
  • If the access preview is for a new resource and you do not specify the * groups, then the access preview considers the snapshot without any * groups.

  • To propose deletion of existing shared * groups, you can specify an empty list for groups.

    *
*/ inline EbsSnapshotConfiguration& AddGroups(const char* value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; } /** *

The KMS key identifier for an encrypted Amazon EBS volume 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 EBS volume * 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 kmsKeyId, 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 EBS volume 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 EBS volume * 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 kmsKeyId, the access preview considers the * snapshot as unencrypted.

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

The KMS key identifier for an encrypted Amazon EBS volume 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 EBS volume * 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 kmsKeyId, 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 EBS volume 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 EBS volume * 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 kmsKeyId, 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 EBS volume 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 EBS volume * 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 kmsKeyId, 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 EBS volume 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 EBS volume * 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 kmsKeyId, the access preview considers the * snapshot as unencrypted.

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

The KMS key identifier for an encrypted Amazon EBS volume 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 EBS volume * 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 kmsKeyId, the access preview considers the * snapshot as unencrypted.

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

The KMS key identifier for an encrypted Amazon EBS volume 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 EBS volume * 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 kmsKeyId, the access preview considers the * snapshot as unencrypted.

*/ inline EbsSnapshotConfiguration& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} private: Aws::Vector m_userIds; bool m_userIdsHasBeenSet = false; Aws::Vector m_groups; bool m_groupsHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; }; } // namespace Model } // namespace AccessAnalyzer } // namespace Aws