This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-ec2/include/aws/ec2/model/CreateImageRequest.h

326 lines
13 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/ec2/EC2_EXPORTS.h>
#include <aws/ec2/EC2Request.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/ec2/model/BlockDeviceMapping.h>
#include <utility>
namespace Aws
{
namespace EC2
{
namespace Model
{
/**
*/
class AWS_EC2_API CreateImageRequest : public EC2Request
{
public:
CreateImageRequest();
// 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 "CreateImage"; }
Aws::String SerializePayload() const override;
protected:
void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
public:
/**
* <p>The block device mappings. This parameter cannot be used to modify the
* encryption status of existing volumes or snapshots. To create an AMI with
* encrypted snapshots, use the <a>CopyImage</a> action.</p>
*/
inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const{ return m_blockDeviceMappings; }
/**
* <p>The block device mappings. This parameter cannot be used to modify the
* encryption status of existing volumes or snapshots. To create an AMI with
* encrypted snapshots, use the <a>CopyImage</a> action.</p>
*/
inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
/**
* <p>The block device mappings. This parameter cannot be used to modify the
* encryption status of existing volumes or snapshots. To create an AMI with
* encrypted snapshots, use the <a>CopyImage</a> action.</p>
*/
inline void SetBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping>& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = value; }
/**
* <p>The block device mappings. This parameter cannot be used to modify the
* encryption status of existing volumes or snapshots. To create an AMI with
* encrypted snapshots, use the <a>CopyImage</a> action.</p>
*/
inline void SetBlockDeviceMappings(Aws::Vector<BlockDeviceMapping>&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = std::move(value); }
/**
* <p>The block device mappings. This parameter cannot be used to modify the
* encryption status of existing volumes or snapshots. To create an AMI with
* encrypted snapshots, use the <a>CopyImage</a> action.</p>
*/
inline CreateImageRequest& WithBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping>& value) { SetBlockDeviceMappings(value); return *this;}
/**
* <p>The block device mappings. This parameter cannot be used to modify the
* encryption status of existing volumes or snapshots. To create an AMI with
* encrypted snapshots, use the <a>CopyImage</a> action.</p>
*/
inline CreateImageRequest& WithBlockDeviceMappings(Aws::Vector<BlockDeviceMapping>&& value) { SetBlockDeviceMappings(std::move(value)); return *this;}
/**
* <p>The block device mappings. This parameter cannot be used to modify the
* encryption status of existing volumes or snapshots. To create an AMI with
* encrypted snapshots, use the <a>CopyImage</a> action.</p>
*/
inline CreateImageRequest& AddBlockDeviceMappings(const BlockDeviceMapping& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(value); return *this; }
/**
* <p>The block device mappings. This parameter cannot be used to modify the
* encryption status of existing volumes or snapshots. To create an AMI with
* encrypted snapshots, use the <a>CopyImage</a> action.</p>
*/
inline CreateImageRequest& AddBlockDeviceMappings(BlockDeviceMapping&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(std::move(value)); return *this; }
/**
* <p>A description for the new image.</p>
*/
inline const Aws::String& GetDescription() const{ return m_description; }
/**
* <p>A description for the new image.</p>
*/
inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
/**
* <p>A description for the new image.</p>
*/
inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
/**
* <p>A description for the new image.</p>
*/
inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
/**
* <p>A description for the new image.</p>
*/
inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
/**
* <p>A description for the new image.</p>
*/
inline CreateImageRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
/**
* <p>A description for the new image.</p>
*/
inline CreateImageRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
/**
* <p>A description for the new image.</p>
*/
inline CreateImageRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
/**
* <p>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 <code>DryRunOperation</code>.
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
*/
inline bool GetDryRun() const{ return m_dryRun; }
/**
* <p>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 <code>DryRunOperation</code>.
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
*/
inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
/**
* <p>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 <code>DryRunOperation</code>.
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
*/
inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
/**
* <p>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 <code>DryRunOperation</code>.
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
*/
inline CreateImageRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
/**
* <p>The ID of the instance.</p>
*/
inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
/**
* <p>The ID of the instance.</p>
*/
inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
/**
* <p>The ID of the instance.</p>
*/
inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
/**
* <p>The ID of the instance.</p>
*/
inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
/**
* <p>The ID of the instance.</p>
*/
inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
/**
* <p>The ID of the instance.</p>
*/
inline CreateImageRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
/**
* <p>The ID of the instance.</p>
*/
inline CreateImageRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
/**
* <p>The ID of the instance.</p>
*/
inline CreateImageRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
/**
* <p>A name for the new image.</p> <p>Constraints: 3-128 alphanumeric characters,
* parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/),
* dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>A name for the new image.</p> <p>Constraints: 3-128 alphanumeric characters,
* parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/),
* dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>A name for the new image.</p> <p>Constraints: 3-128 alphanumeric characters,
* parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/),
* dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>A name for the new image.</p> <p>Constraints: 3-128 alphanumeric characters,
* parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/),
* dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>A name for the new image.</p> <p>Constraints: 3-128 alphanumeric characters,
* parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/),
* dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>A name for the new image.</p> <p>Constraints: 3-128 alphanumeric characters,
* parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/),
* dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
*/
inline CreateImageRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>A name for the new image.</p> <p>Constraints: 3-128 alphanumeric characters,
* parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/),
* dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
*/
inline CreateImageRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>A name for the new image.</p> <p>Constraints: 3-128 alphanumeric characters,
* parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/),
* dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>
*/
inline CreateImageRequest& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>By default, Amazon EC2 attempts to shut down and reboot the instance before
* creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut
* down the instance before creating the image. When this option is used, file
* system integrity on the created image can't be guaranteed.</p>
*/
inline bool GetNoReboot() const{ return m_noReboot; }
/**
* <p>By default, Amazon EC2 attempts to shut down and reboot the instance before
* creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut
* down the instance before creating the image. When this option is used, file
* system integrity on the created image can't be guaranteed.</p>
*/
inline bool NoRebootHasBeenSet() const { return m_noRebootHasBeenSet; }
/**
* <p>By default, Amazon EC2 attempts to shut down and reboot the instance before
* creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut
* down the instance before creating the image. When this option is used, file
* system integrity on the created image can't be guaranteed.</p>
*/
inline void SetNoReboot(bool value) { m_noRebootHasBeenSet = true; m_noReboot = value; }
/**
* <p>By default, Amazon EC2 attempts to shut down and reboot the instance before
* creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut
* down the instance before creating the image. When this option is used, file
* system integrity on the created image can't be guaranteed.</p>
*/
inline CreateImageRequest& WithNoReboot(bool value) { SetNoReboot(value); return *this;}
private:
Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
bool m_blockDeviceMappingsHasBeenSet;
Aws::String m_description;
bool m_descriptionHasBeenSet;
bool m_dryRun;
bool m_dryRunHasBeenSet;
Aws::String m_instanceId;
bool m_instanceIdHasBeenSet;
Aws::String m_name;
bool m_nameHasBeenSet;
bool m_noReboot;
bool m_noRebootHasBeenSet;
};
} // namespace Model
} // namespace EC2
} // namespace Aws