/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class ExportImageRequest : public EC2Request { public: AWS_EC2_API ExportImageRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ExportImage"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

Token to enable idempotency for export image requests.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

Token to enable idempotency for export image requests.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

Token to enable idempotency for export image requests.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

Token to enable idempotency for export image requests.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

Token to enable idempotency for export image requests.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

Token to enable idempotency for export image requests.

*/ inline ExportImageRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

Token to enable idempotency for export image requests.

*/ inline ExportImageRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

Token to enable idempotency for export image requests.

*/ inline ExportImageRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

A description of the image being exported. The maximum length is 255 * characters.

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

A description of the image being exported. The maximum length is 255 * characters.

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

A description of the image being exported. The maximum length is 255 * characters.

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

A description of the image being exported. The maximum length is 255 * characters.

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

A description of the image being exported. The maximum length is 255 * characters.

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

A description of the image being exported. The maximum length is 255 * characters.

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

A description of the image being exported. The maximum length is 255 * characters.

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

A description of the image being exported. The maximum length is 255 * characters.

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

The disk image format.

*/ inline const DiskImageFormat& GetDiskImageFormat() const{ return m_diskImageFormat; } /** *

The disk image format.

*/ inline bool DiskImageFormatHasBeenSet() const { return m_diskImageFormatHasBeenSet; } /** *

The disk image format.

*/ inline void SetDiskImageFormat(const DiskImageFormat& value) { m_diskImageFormatHasBeenSet = true; m_diskImageFormat = value; } /** *

The disk image format.

*/ inline void SetDiskImageFormat(DiskImageFormat&& value) { m_diskImageFormatHasBeenSet = true; m_diskImageFormat = std::move(value); } /** *

The disk image format.

*/ inline ExportImageRequest& WithDiskImageFormat(const DiskImageFormat& value) { SetDiskImageFormat(value); return *this;} /** *

The disk image format.

*/ inline ExportImageRequest& WithDiskImageFormat(DiskImageFormat&& value) { SetDiskImageFormat(std::move(value)); return *this;} /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline ExportImageRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

The ID of the image.

*/ inline const Aws::String& GetImageId() const{ return m_imageId; } /** *

The ID of the image.

*/ inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; } /** *

The ID of the image.

*/ inline void SetImageId(const Aws::String& value) { m_imageIdHasBeenSet = true; m_imageId = value; } /** *

The ID of the image.

*/ inline void SetImageId(Aws::String&& value) { m_imageIdHasBeenSet = true; m_imageId = std::move(value); } /** *

The ID of the image.

*/ inline void SetImageId(const char* value) { m_imageIdHasBeenSet = true; m_imageId.assign(value); } /** *

The ID of the image.

*/ inline ExportImageRequest& WithImageId(const Aws::String& value) { SetImageId(value); return *this;} /** *

The ID of the image.

*/ inline ExportImageRequest& WithImageId(Aws::String&& value) { SetImageId(std::move(value)); return *this;} /** *

The ID of the image.

*/ inline ExportImageRequest& WithImageId(const char* value) { SetImageId(value); return *this;} /** *

The Amazon S3 bucket for the destination image. The destination bucket must * exist.

*/ inline const ExportTaskS3LocationRequest& GetS3ExportLocation() const{ return m_s3ExportLocation; } /** *

The Amazon S3 bucket for the destination image. The destination bucket must * exist.

*/ inline bool S3ExportLocationHasBeenSet() const { return m_s3ExportLocationHasBeenSet; } /** *

The Amazon S3 bucket for the destination image. The destination bucket must * exist.

*/ inline void SetS3ExportLocation(const ExportTaskS3LocationRequest& value) { m_s3ExportLocationHasBeenSet = true; m_s3ExportLocation = value; } /** *

The Amazon S3 bucket for the destination image. The destination bucket must * exist.

*/ inline void SetS3ExportLocation(ExportTaskS3LocationRequest&& value) { m_s3ExportLocationHasBeenSet = true; m_s3ExportLocation = std::move(value); } /** *

The Amazon S3 bucket for the destination image. The destination bucket must * exist.

*/ inline ExportImageRequest& WithS3ExportLocation(const ExportTaskS3LocationRequest& value) { SetS3ExportLocation(value); return *this;} /** *

The Amazon S3 bucket for the destination image. The destination bucket must * exist.

*/ inline ExportImageRequest& WithS3ExportLocation(ExportTaskS3LocationRequest&& value) { SetS3ExportLocation(std::move(value)); return *this;} /** *

The name of the role that grants VM Import/Export permission to export images * to your Amazon S3 bucket. If this parameter is not specified, the default role * is named 'vmimport'.

*/ inline const Aws::String& GetRoleName() const{ return m_roleName; } /** *

The name of the role that grants VM Import/Export permission to export images * to your Amazon S3 bucket. If this parameter is not specified, the default role * is named 'vmimport'.

*/ inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; } /** *

The name of the role that grants VM Import/Export permission to export images * to your Amazon S3 bucket. If this parameter is not specified, the default role * is named 'vmimport'.

*/ inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; } /** *

The name of the role that grants VM Import/Export permission to export images * to your Amazon S3 bucket. If this parameter is not specified, the default role * is named 'vmimport'.

*/ inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = std::move(value); } /** *

The name of the role that grants VM Import/Export permission to export images * to your Amazon S3 bucket. If this parameter is not specified, the default role * is named 'vmimport'.

*/ inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); } /** *

The name of the role that grants VM Import/Export permission to export images * to your Amazon S3 bucket. If this parameter is not specified, the default role * is named 'vmimport'.

*/ inline ExportImageRequest& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;} /** *

The name of the role that grants VM Import/Export permission to export images * to your Amazon S3 bucket. If this parameter is not specified, the default role * is named 'vmimport'.

*/ inline ExportImageRequest& WithRoleName(Aws::String&& value) { SetRoleName(std::move(value)); return *this;} /** *

The name of the role that grants VM Import/Export permission to export images * to your Amazon S3 bucket. If this parameter is not specified, the default role * is named 'vmimport'.

*/ inline ExportImageRequest& WithRoleName(const char* value) { SetRoleName(value); return *this;} /** *

The tags to apply to the export image task during creation.

*/ inline const Aws::Vector& GetTagSpecifications() const{ return m_tagSpecifications; } /** *

The tags to apply to the export image task during creation.

*/ inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } /** *

The tags to apply to the export image task during creation.

*/ inline void SetTagSpecifications(const Aws::Vector& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } /** *

The tags to apply to the export image task during creation.

*/ inline void SetTagSpecifications(Aws::Vector&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } /** *

The tags to apply to the export image task during creation.

*/ inline ExportImageRequest& WithTagSpecifications(const Aws::Vector& value) { SetTagSpecifications(value); return *this;} /** *

The tags to apply to the export image task during creation.

*/ inline ExportImageRequest& WithTagSpecifications(Aws::Vector&& value) { SetTagSpecifications(std::move(value)); return *this;} /** *

The tags to apply to the export image task during creation.

*/ inline ExportImageRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } /** *

The tags to apply to the export image task during creation.

*/ inline ExportImageRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } private: Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; DiskImageFormat m_diskImageFormat; bool m_diskImageFormatHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::String m_imageId; bool m_imageIdHasBeenSet = false; ExportTaskS3LocationRequest m_s3ExportLocation; bool m_s3ExportLocationHasBeenSet = false; Aws::String m_roleName; bool m_roleNameHasBeenSet = false; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws