AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
CreateImageRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/ec2/model/TagSpecification.h>
12#include <aws/ec2/model/BlockDeviceMapping.h>
13#include <utility>
14
15namespace Aws
16{
17namespace EC2
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_EC2_API CreateImageRequest();
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateImage"; }
34
35 AWS_EC2_API Aws::String SerializePayload() const override;
36
37 protected:
38 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
39
40 public:
41
43
56 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
57 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
58 inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
59 inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
62 inline CreateImageRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
63 inline CreateImageRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
65
67
73 inline bool GetDryRun() const{ return m_dryRun; }
74 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
75 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
76 inline CreateImageRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
78
80
83 inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
84 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
85 inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
86 inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
87 inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
88 inline CreateImageRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
89 inline CreateImageRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
90 inline CreateImageRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
92
94
99 inline const Aws::String& GetName() const{ return m_name; }
100 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
101 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
102 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
103 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
104 inline CreateImageRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
105 inline CreateImageRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
106 inline CreateImageRequest& WithName(const char* value) { SetName(value); return *this;}
108
110
113 inline const Aws::String& GetDescription() const{ return m_description; }
114 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
115 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
116 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
117 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
118 inline CreateImageRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
119 inline CreateImageRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
120 inline CreateImageRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
122
124
136 inline bool GetNoReboot() const{ return m_noReboot; }
137 inline bool NoRebootHasBeenSet() const { return m_noRebootHasBeenSet; }
138 inline void SetNoReboot(bool value) { m_noRebootHasBeenSet = true; m_noReboot = value; }
139 inline CreateImageRequest& WithNoReboot(bool value) { SetNoReboot(value); return *this;}
141
143
155 inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const{ return m_blockDeviceMappings; }
156 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
157 inline void SetBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping>& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = value; }
158 inline void SetBlockDeviceMappings(Aws::Vector<BlockDeviceMapping>&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = std::move(value); }
161 inline CreateImageRequest& AddBlockDeviceMappings(const BlockDeviceMapping& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(value); return *this; }
162 inline CreateImageRequest& AddBlockDeviceMappings(BlockDeviceMapping&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(std::move(value)); return *this; }
164 private:
165
166 Aws::Vector<TagSpecification> m_tagSpecifications;
167 bool m_tagSpecificationsHasBeenSet = false;
168
169 bool m_dryRun;
170 bool m_dryRunHasBeenSet = false;
171
172 Aws::String m_instanceId;
173 bool m_instanceIdHasBeenSet = false;
174
175 Aws::String m_name;
176 bool m_nameHasBeenSet = false;
177
178 Aws::String m_description;
179 bool m_descriptionHasBeenSet = false;
180
181 bool m_noReboot;
182 bool m_noRebootHasBeenSet = false;
183
184 Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
185 bool m_blockDeviceMappingsHasBeenSet = false;
186 };
187
188} // namespace Model
189} // namespace EC2
190} // namespace Aws
void SetBlockDeviceMappings(Aws::Vector< BlockDeviceMapping > &&value)
CreateImageRequest & WithBlockDeviceMappings(const Aws::Vector< BlockDeviceMapping > &value)
CreateImageRequest & WithDescription(const char *value)
void SetInstanceId(const Aws::String &value)
CreateImageRequest & WithName(const char *value)
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
void SetDescription(const Aws::String &value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetDescription() const
CreateImageRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
CreateImageRequest & WithBlockDeviceMappings(Aws::Vector< BlockDeviceMapping > &&value)
CreateImageRequest & AddTagSpecifications(const TagSpecification &value)
const Aws::Vector< BlockDeviceMapping > & GetBlockDeviceMappings() const
CreateImageRequest & WithNoReboot(bool value)
CreateImageRequest & WithName(const Aws::String &value)
void SetInstanceId(Aws::String &&value)
CreateImageRequest & WithDescription(const Aws::String &value)
const Aws::String & GetName() const
CreateImageRequest & AddBlockDeviceMappings(BlockDeviceMapping &&value)
CreateImageRequest & WithDryRun(bool value)
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
void SetName(const Aws::String &value)
CreateImageRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
CreateImageRequest & WithInstanceId(Aws::String &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
void SetDescription(Aws::String &&value)
CreateImageRequest & AddBlockDeviceMappings(const BlockDeviceMapping &value)
CreateImageRequest & WithDescription(Aws::String &&value)
CreateImageRequest & AddTagSpecifications(TagSpecification &&value)
CreateImageRequest & WithInstanceId(const Aws::String &value)
AWS_EC2_API Aws::String SerializePayload() const override
CreateImageRequest & WithInstanceId(const char *value)
CreateImageRequest & WithName(Aws::String &&value)
const Aws::String & GetInstanceId() const
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
void SetBlockDeviceMappings(const Aws::Vector< BlockDeviceMapping > &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector