/** * 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 EC2 { namespace Model { /** */ class CreateRestoreImageTaskRequest : public EC2Request { public: AWS_EC2_API CreateRestoreImageTaskRequest(); // 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 "CreateRestoreImageTask"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The name of the Amazon S3 bucket that contains the stored AMI object.

*/ inline const Aws::String& GetBucket() const{ return m_bucket; } /** *

The name of the Amazon S3 bucket that contains the stored AMI object.

*/ inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; } /** *

The name of the Amazon S3 bucket that contains the stored AMI object.

*/ inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; } /** *

The name of the Amazon S3 bucket that contains the stored AMI object.

*/ inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); } /** *

The name of the Amazon S3 bucket that contains the stored AMI object.

*/ inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); } /** *

The name of the Amazon S3 bucket that contains the stored AMI object.

*/ inline CreateRestoreImageTaskRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;} /** *

The name of the Amazon S3 bucket that contains the stored AMI object.

*/ inline CreateRestoreImageTaskRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;} /** *

The name of the Amazon S3 bucket that contains the stored AMI object.

*/ inline CreateRestoreImageTaskRequest& WithBucket(const char* value) { SetBucket(value); return *this;} /** *

The name of the stored AMI object in the bucket.

*/ inline const Aws::String& GetObjectKey() const{ return m_objectKey; } /** *

The name of the stored AMI object in the bucket.

*/ inline bool ObjectKeyHasBeenSet() const { return m_objectKeyHasBeenSet; } /** *

The name of the stored AMI object in the bucket.

*/ inline void SetObjectKey(const Aws::String& value) { m_objectKeyHasBeenSet = true; m_objectKey = value; } /** *

The name of the stored AMI object in the bucket.

*/ inline void SetObjectKey(Aws::String&& value) { m_objectKeyHasBeenSet = true; m_objectKey = std::move(value); } /** *

The name of the stored AMI object in the bucket.

*/ inline void SetObjectKey(const char* value) { m_objectKeyHasBeenSet = true; m_objectKey.assign(value); } /** *

The name of the stored AMI object in the bucket.

*/ inline CreateRestoreImageTaskRequest& WithObjectKey(const Aws::String& value) { SetObjectKey(value); return *this;} /** *

The name of the stored AMI object in the bucket.

*/ inline CreateRestoreImageTaskRequest& WithObjectKey(Aws::String&& value) { SetObjectKey(std::move(value)); return *this;} /** *

The name of the stored AMI object in the bucket.

*/ inline CreateRestoreImageTaskRequest& WithObjectKey(const char* value) { SetObjectKey(value); return *this;} /** *

The name for the restored AMI. The name must be unique for AMIs in the Region * for this account. If you do not provide a name, the new AMI gets the same name * as the original AMI.

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

The name for the restored AMI. The name must be unique for AMIs in the Region * for this account. If you do not provide a name, the new AMI gets the same name * as the original AMI.

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

The name for the restored AMI. The name must be unique for AMIs in the Region * for this account. If you do not provide a name, the new AMI gets the same name * as the original AMI.

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

The name for the restored AMI. The name must be unique for AMIs in the Region * for this account. If you do not provide a name, the new AMI gets the same name * as the original AMI.

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

The name for the restored AMI. The name must be unique for AMIs in the Region * for this account. If you do not provide a name, the new AMI gets the same name * as the original AMI.

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

The name for the restored AMI. The name must be unique for AMIs in the Region * for this account. If you do not provide a name, the new AMI gets the same name * as the original AMI.

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

The name for the restored AMI. The name must be unique for AMIs in the Region * for this account. If you do not provide a name, the new AMI gets the same name * as the original AMI.

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

The name for the restored AMI. The name must be unique for AMIs in the Region * for this account. If you do not provide a name, the new AMI gets the same name * as the original AMI.

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

The tags to apply to the AMI and snapshots on restoration. You can tag the * AMI, the snapshots, or both.

  • To tag the AMI, the value for * ResourceType must be image.

  • To tag * the snapshots, the value for ResourceType must be * snapshot. The same tag is applied to all of the snapshots that are * created.

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

The tags to apply to the AMI and snapshots on restoration. You can tag the * AMI, the snapshots, or both.

  • To tag the AMI, the value for * ResourceType must be image.

  • To tag * the snapshots, the value for ResourceType must be * snapshot. The same tag is applied to all of the snapshots that are * created.

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

The tags to apply to the AMI and snapshots on restoration. You can tag the * AMI, the snapshots, or both.

  • To tag the AMI, the value for * ResourceType must be image.

  • To tag * the snapshots, the value for ResourceType must be * snapshot. The same tag is applied to all of the snapshots that are * created.

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

The tags to apply to the AMI and snapshots on restoration. You can tag the * AMI, the snapshots, or both.

  • To tag the AMI, the value for * ResourceType must be image.

  • To tag * the snapshots, the value for ResourceType must be * snapshot. The same tag is applied to all of the snapshots that are * created.

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

The tags to apply to the AMI and snapshots on restoration. You can tag the * AMI, the snapshots, or both.

  • To tag the AMI, the value for * ResourceType must be image.

  • To tag * the snapshots, the value for ResourceType must be * snapshot. The same tag is applied to all of the snapshots that are * created.

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

The tags to apply to the AMI and snapshots on restoration. You can tag the * AMI, the snapshots, or both.

  • To tag the AMI, the value for * ResourceType must be image.

  • To tag * the snapshots, the value for ResourceType must be * snapshot. The same tag is applied to all of the snapshots that are * created.

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

The tags to apply to the AMI and snapshots on restoration. You can tag the * AMI, the snapshots, or both.

  • To tag the AMI, the value for * ResourceType must be image.

  • To tag * the snapshots, the value for ResourceType must be * snapshot. The same tag is applied to all of the snapshots that are * created.

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

The tags to apply to the AMI and snapshots on restoration. You can tag the * AMI, the snapshots, or both.

  • To tag the AMI, the value for * ResourceType must be image.

  • To tag * the snapshots, the value for ResourceType must be * snapshot. The same tag is applied to all of the snapshots that are * created.

*/ inline CreateRestoreImageTaskRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(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 CreateRestoreImageTaskRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} private: Aws::String m_bucket; bool m_bucketHasBeenSet = false; Aws::String m_objectKey; bool m_objectKeyHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws