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

Define and configure the output AMIs of the pipeline.

See * Also:

AWS * API Reference

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

The name of the output AMI.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the output AMI.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the output AMI.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the output AMI.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the output AMI.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the output AMI.

*/ inline AmiDistributionConfiguration& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the output AMI.

*/ inline AmiDistributionConfiguration& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the output AMI.

*/ inline AmiDistributionConfiguration& WithName(const char* value) { SetName(value); return *this;} /** *

The description of the AMI distribution configuration. Minimum and maximum * length are in characters.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the AMI distribution configuration. Minimum and maximum * length are in characters.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the AMI distribution configuration. Minimum and maximum * length are in characters.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the AMI distribution configuration. Minimum and maximum * length are in characters.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the AMI distribution configuration. Minimum and maximum * length are in characters.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the AMI distribution configuration. Minimum and maximum * length are in characters.

*/ inline AmiDistributionConfiguration& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the AMI distribution configuration. Minimum and maximum * length are in characters.

*/ inline AmiDistributionConfiguration& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the AMI distribution configuration. Minimum and maximum * length are in characters.

*/ inline AmiDistributionConfiguration& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The ID of an account to which you want to distribute an image.

*/ inline const Aws::Vector& GetTargetAccountIds() const{ return m_targetAccountIds; } /** *

The ID of an account to which you want to distribute an image.

*/ inline bool TargetAccountIdsHasBeenSet() const { return m_targetAccountIdsHasBeenSet; } /** *

The ID of an account to which you want to distribute an image.

*/ inline void SetTargetAccountIds(const Aws::Vector& value) { m_targetAccountIdsHasBeenSet = true; m_targetAccountIds = value; } /** *

The ID of an account to which you want to distribute an image.

*/ inline void SetTargetAccountIds(Aws::Vector&& value) { m_targetAccountIdsHasBeenSet = true; m_targetAccountIds = std::move(value); } /** *

The ID of an account to which you want to distribute an image.

*/ inline AmiDistributionConfiguration& WithTargetAccountIds(const Aws::Vector& value) { SetTargetAccountIds(value); return *this;} /** *

The ID of an account to which you want to distribute an image.

*/ inline AmiDistributionConfiguration& WithTargetAccountIds(Aws::Vector&& value) { SetTargetAccountIds(std::move(value)); return *this;} /** *

The ID of an account to which you want to distribute an image.

*/ inline AmiDistributionConfiguration& AddTargetAccountIds(const Aws::String& value) { m_targetAccountIdsHasBeenSet = true; m_targetAccountIds.push_back(value); return *this; } /** *

The ID of an account to which you want to distribute an image.

*/ inline AmiDistributionConfiguration& AddTargetAccountIds(Aws::String&& value) { m_targetAccountIdsHasBeenSet = true; m_targetAccountIds.push_back(std::move(value)); return *this; } /** *

The ID of an account to which you want to distribute an image.

*/ inline AmiDistributionConfiguration& AddTargetAccountIds(const char* value) { m_targetAccountIdsHasBeenSet = true; m_targetAccountIds.push_back(value); return *this; } /** *

The tags to apply to AMIs distributed to this Region.

*/ inline const Aws::Map& GetAmiTags() const{ return m_amiTags; } /** *

The tags to apply to AMIs distributed to this Region.

*/ inline bool AmiTagsHasBeenSet() const { return m_amiTagsHasBeenSet; } /** *

The tags to apply to AMIs distributed to this Region.

*/ inline void SetAmiTags(const Aws::Map& value) { m_amiTagsHasBeenSet = true; m_amiTags = value; } /** *

The tags to apply to AMIs distributed to this Region.

*/ inline void SetAmiTags(Aws::Map&& value) { m_amiTagsHasBeenSet = true; m_amiTags = std::move(value); } /** *

The tags to apply to AMIs distributed to this Region.

*/ inline AmiDistributionConfiguration& WithAmiTags(const Aws::Map& value) { SetAmiTags(value); return *this;} /** *

The tags to apply to AMIs distributed to this Region.

*/ inline AmiDistributionConfiguration& WithAmiTags(Aws::Map&& value) { SetAmiTags(std::move(value)); return *this;} /** *

The tags to apply to AMIs distributed to this Region.

*/ inline AmiDistributionConfiguration& AddAmiTags(const Aws::String& key, const Aws::String& value) { m_amiTagsHasBeenSet = true; m_amiTags.emplace(key, value); return *this; } /** *

The tags to apply to AMIs distributed to this Region.

*/ inline AmiDistributionConfiguration& AddAmiTags(Aws::String&& key, const Aws::String& value) { m_amiTagsHasBeenSet = true; m_amiTags.emplace(std::move(key), value); return *this; } /** *

The tags to apply to AMIs distributed to this Region.

*/ inline AmiDistributionConfiguration& AddAmiTags(const Aws::String& key, Aws::String&& value) { m_amiTagsHasBeenSet = true; m_amiTags.emplace(key, std::move(value)); return *this; } /** *

The tags to apply to AMIs distributed to this Region.

*/ inline AmiDistributionConfiguration& AddAmiTags(Aws::String&& key, Aws::String&& value) { m_amiTagsHasBeenSet = true; m_amiTags.emplace(std::move(key), std::move(value)); return *this; } /** *

The tags to apply to AMIs distributed to this Region.

*/ inline AmiDistributionConfiguration& AddAmiTags(const char* key, Aws::String&& value) { m_amiTagsHasBeenSet = true; m_amiTags.emplace(key, std::move(value)); return *this; } /** *

The tags to apply to AMIs distributed to this Region.

*/ inline AmiDistributionConfiguration& AddAmiTags(Aws::String&& key, const char* value) { m_amiTagsHasBeenSet = true; m_amiTags.emplace(std::move(key), value); return *this; } /** *

The tags to apply to AMIs distributed to this Region.

*/ inline AmiDistributionConfiguration& AddAmiTags(const char* key, const char* value) { m_amiTagsHasBeenSet = true; m_amiTags.emplace(key, value); return *this; } /** *

The KMS key identifier used to encrypt the distributed image.

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

The KMS key identifier used to encrypt the distributed image.

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

The KMS key identifier used to encrypt the distributed image.

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

The KMS key identifier used to encrypt the distributed image.

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

The KMS key identifier used to encrypt the distributed image.

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

The KMS key identifier used to encrypt the distributed image.

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

The KMS key identifier used to encrypt the distributed image.

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

The KMS key identifier used to encrypt the distributed image.

*/ inline AmiDistributionConfiguration& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} /** *

Launch permissions can be used to configure which Amazon Web Services * accounts can use the AMI to launch instances.

*/ inline const LaunchPermissionConfiguration& GetLaunchPermission() const{ return m_launchPermission; } /** *

Launch permissions can be used to configure which Amazon Web Services * accounts can use the AMI to launch instances.

*/ inline bool LaunchPermissionHasBeenSet() const { return m_launchPermissionHasBeenSet; } /** *

Launch permissions can be used to configure which Amazon Web Services * accounts can use the AMI to launch instances.

*/ inline void SetLaunchPermission(const LaunchPermissionConfiguration& value) { m_launchPermissionHasBeenSet = true; m_launchPermission = value; } /** *

Launch permissions can be used to configure which Amazon Web Services * accounts can use the AMI to launch instances.

*/ inline void SetLaunchPermission(LaunchPermissionConfiguration&& value) { m_launchPermissionHasBeenSet = true; m_launchPermission = std::move(value); } /** *

Launch permissions can be used to configure which Amazon Web Services * accounts can use the AMI to launch instances.

*/ inline AmiDistributionConfiguration& WithLaunchPermission(const LaunchPermissionConfiguration& value) { SetLaunchPermission(value); return *this;} /** *

Launch permissions can be used to configure which Amazon Web Services * accounts can use the AMI to launch instances.

*/ inline AmiDistributionConfiguration& WithLaunchPermission(LaunchPermissionConfiguration&& value) { SetLaunchPermission(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Vector m_targetAccountIds; bool m_targetAccountIdsHasBeenSet = false; Aws::Map m_amiTags; bool m_amiTagsHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; LaunchPermissionConfiguration m_launchPermission; bool m_launchPermissionHasBeenSet = false; }; } // namespace Model } // namespace imagebuilder } // namespace Aws