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

Defines a custom base AMI and block device mapping configurations of an * instance used for building and testing container images.

See * Also:

AWS * API Reference

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

The AMI ID to use as the base image for a container build and test instance. * If not specified, Image Builder will use the appropriate ECS-optimized AMI as a * base image.

*/ inline const Aws::String& GetImage() const{ return m_image; } /** *

The AMI ID to use as the base image for a container build and test instance. * If not specified, Image Builder will use the appropriate ECS-optimized AMI as a * base image.

*/ inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; } /** *

The AMI ID to use as the base image for a container build and test instance. * If not specified, Image Builder will use the appropriate ECS-optimized AMI as a * base image.

*/ inline void SetImage(const Aws::String& value) { m_imageHasBeenSet = true; m_image = value; } /** *

The AMI ID to use as the base image for a container build and test instance. * If not specified, Image Builder will use the appropriate ECS-optimized AMI as a * base image.

*/ inline void SetImage(Aws::String&& value) { m_imageHasBeenSet = true; m_image = std::move(value); } /** *

The AMI ID to use as the base image for a container build and test instance. * If not specified, Image Builder will use the appropriate ECS-optimized AMI as a * base image.

*/ inline void SetImage(const char* value) { m_imageHasBeenSet = true; m_image.assign(value); } /** *

The AMI ID to use as the base image for a container build and test instance. * If not specified, Image Builder will use the appropriate ECS-optimized AMI as a * base image.

*/ inline InstanceConfiguration& WithImage(const Aws::String& value) { SetImage(value); return *this;} /** *

The AMI ID to use as the base image for a container build and test instance. * If not specified, Image Builder will use the appropriate ECS-optimized AMI as a * base image.

*/ inline InstanceConfiguration& WithImage(Aws::String&& value) { SetImage(std::move(value)); return *this;} /** *

The AMI ID to use as the base image for a container build and test instance. * If not specified, Image Builder will use the appropriate ECS-optimized AMI as a * base image.

*/ inline InstanceConfiguration& WithImage(const char* value) { SetImage(value); return *this;} /** *

Defines the block devices to attach for building an instance from this Image * Builder AMI.

*/ inline const Aws::Vector& GetBlockDeviceMappings() const{ return m_blockDeviceMappings; } /** *

Defines the block devices to attach for building an instance from this Image * Builder AMI.

*/ inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; } /** *

Defines the block devices to attach for building an instance from this Image * Builder AMI.

*/ inline void SetBlockDeviceMappings(const Aws::Vector& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = value; } /** *

Defines the block devices to attach for building an instance from this Image * Builder AMI.

*/ inline void SetBlockDeviceMappings(Aws::Vector&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = std::move(value); } /** *

Defines the block devices to attach for building an instance from this Image * Builder AMI.

*/ inline InstanceConfiguration& WithBlockDeviceMappings(const Aws::Vector& value) { SetBlockDeviceMappings(value); return *this;} /** *

Defines the block devices to attach for building an instance from this Image * Builder AMI.

*/ inline InstanceConfiguration& WithBlockDeviceMappings(Aws::Vector&& value) { SetBlockDeviceMappings(std::move(value)); return *this;} /** *

Defines the block devices to attach for building an instance from this Image * Builder AMI.

*/ inline InstanceConfiguration& AddBlockDeviceMappings(const InstanceBlockDeviceMapping& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(value); return *this; } /** *

Defines the block devices to attach for building an instance from this Image * Builder AMI.

*/ inline InstanceConfiguration& AddBlockDeviceMappings(InstanceBlockDeviceMapping&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(std::move(value)); return *this; } private: Aws::String m_image; bool m_imageHasBeenSet = false; Aws::Vector m_blockDeviceMappings; bool m_blockDeviceMappingsHasBeenSet = false; }; } // namespace Model } // namespace imagebuilder } // namespace Aws