AWS SDK for C++  1.9.129
AWS SDK for C++
CreateImageRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace EC2
18 {
19 namespace Model
20 {
21 
25  {
26  public:
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::String SerializePayload() const override;
36 
37  protected:
38  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
39 
40  public:
41 
47  inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const{ return m_blockDeviceMappings; }
48 
54  inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
55 
61  inline void SetBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping>& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = value; }
62 
68  inline void SetBlockDeviceMappings(Aws::Vector<BlockDeviceMapping>&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = std::move(value); }
69 
75  inline CreateImageRequest& WithBlockDeviceMappings(const Aws::Vector<BlockDeviceMapping>& value) { SetBlockDeviceMappings(value); return *this;}
76 
82  inline CreateImageRequest& WithBlockDeviceMappings(Aws::Vector<BlockDeviceMapping>&& value) { SetBlockDeviceMappings(std::move(value)); return *this;}
83 
89  inline CreateImageRequest& AddBlockDeviceMappings(const BlockDeviceMapping& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(value); return *this; }
90 
96  inline CreateImageRequest& AddBlockDeviceMappings(BlockDeviceMapping&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.push_back(std::move(value)); return *this; }
97 
98 
102  inline const Aws::String& GetDescription() const{ return m_description; }
103 
107  inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
108 
112  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
113 
117  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
118 
122  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
123 
127  inline CreateImageRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
128 
132  inline CreateImageRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
133 
137  inline CreateImageRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
138 
139 
146  inline bool GetDryRun() const{ return m_dryRun; }
147 
154  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
155 
162  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
163 
170  inline CreateImageRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
171 
172 
176  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
177 
181  inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
182 
186  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
187 
191  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
192 
196  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
197 
201  inline CreateImageRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
202 
206  inline CreateImageRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
207 
211  inline CreateImageRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
212 
213 
219  inline const Aws::String& GetName() const{ return m_name; }
220 
226  inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
227 
233  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
234 
240  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
241 
247  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
248 
254  inline CreateImageRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
255 
261  inline CreateImageRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
262 
268  inline CreateImageRequest& WithName(const char* value) { SetName(value); return *this;}
269 
270 
279  inline bool GetNoReboot() const{ return m_noReboot; }
280 
289  inline bool NoRebootHasBeenSet() const { return m_noRebootHasBeenSet; }
290 
299  inline void SetNoReboot(bool value) { m_noRebootHasBeenSet = true; m_noReboot = value; }
300 
309  inline CreateImageRequest& WithNoReboot(bool value) { SetNoReboot(value); return *this;}
310 
311 
325  inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
326 
340  inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
341 
355  inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
356 
370  inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
371 
385  inline CreateImageRequest& WithTagSpecifications(const Aws::Vector<TagSpecification>& value) { SetTagSpecifications(value); return *this;}
386 
400  inline CreateImageRequest& WithTagSpecifications(Aws::Vector<TagSpecification>&& value) { SetTagSpecifications(std::move(value)); return *this;}
401 
415  inline CreateImageRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
416 
430  inline CreateImageRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
431 
432  private:
433 
434  Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
435  bool m_blockDeviceMappingsHasBeenSet;
436 
437  Aws::String m_description;
438  bool m_descriptionHasBeenSet;
439 
440  bool m_dryRun;
441  bool m_dryRunHasBeenSet;
442 
443  Aws::String m_instanceId;
444  bool m_instanceIdHasBeenSet;
445 
446  Aws::String m_name;
447  bool m_nameHasBeenSet;
448 
449  bool m_noReboot;
450  bool m_noRebootHasBeenSet;
451 
452  Aws::Vector<TagSpecification> m_tagSpecifications;
453  bool m_tagSpecificationsHasBeenSet;
454  };
455 
456 } // namespace Model
457 } // namespace EC2
458 } // namespace Aws
TagSpecification.h
Aws::EC2::Model::CreateImageRequest::BlockDeviceMappingsHasBeenSet
bool BlockDeviceMappingsHasBeenSet() const
Definition: CreateImageRequest.h:54
Aws::EC2::Model::CreateImageRequest::TagSpecificationsHasBeenSet
bool TagSpecificationsHasBeenSet() const
Definition: CreateImageRequest.h:340
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::CreateImageRequest::WithDryRun
CreateImageRequest & WithDryRun(bool value)
Definition: CreateImageRequest.h:170
Aws::EC2::Model::CreateImageRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: CreateImageRequest.h:154
Aws::EC2::Model::CreateImageRequest::SetTagSpecifications
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
Definition: CreateImageRequest.h:370
BlockDeviceMapping.h
Aws::EC2::Model::CreateImageRequest::SetInstanceId
void SetInstanceId(const Aws::String &value)
Definition: CreateImageRequest.h:186
Aws::EC2::Model::CreateImageRequest::WithInstanceId
CreateImageRequest & WithInstanceId(const Aws::String &value)
Definition: CreateImageRequest.h:201
Aws::EC2::Model::CreateImageRequest::GetTagSpecifications
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
Definition: CreateImageRequest.h:325
Aws::EC2::Model::CreateImageRequest::GetDescription
const Aws::String & GetDescription() const
Definition: CreateImageRequest.h:102
Aws::EC2::Model::CreateImageRequest::GetInstanceId
const Aws::String & GetInstanceId() const
Definition: CreateImageRequest.h:176
Aws::EC2::Model::CreateImageRequest::WithInstanceId
CreateImageRequest & WithInstanceId(const char *value)
Definition: CreateImageRequest.h:211
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::CreateImageRequest::WithBlockDeviceMappings
CreateImageRequest & WithBlockDeviceMappings(const Aws::Vector< BlockDeviceMapping > &value)
Definition: CreateImageRequest.h:75
Aws::EC2::Model::CreateImageRequest::AddTagSpecifications
CreateImageRequest & AddTagSpecifications(TagSpecification &&value)
Definition: CreateImageRequest.h:430
Aws::EC2::Model::CreateImageRequest::SetNoReboot
void SetNoReboot(bool value)
Definition: CreateImageRequest.h:299
Aws::EC2::Model::CreateImageRequest::SetName
void SetName(const char *value)
Definition: CreateImageRequest.h:247
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSVector.h
Aws::EC2::Model::CreateImageRequest::SetName
void SetName(Aws::String &&value)
Definition: CreateImageRequest.h:240
Aws::EC2::Model::CreateImageRequest::WithInstanceId
CreateImageRequest & WithInstanceId(Aws::String &&value)
Definition: CreateImageRequest.h:206
Aws::EC2::Model::CreateImageRequest::WithDescription
CreateImageRequest & WithDescription(Aws::String &&value)
Definition: CreateImageRequest.h:132
Aws::EC2::Model::CreateImageRequest::AddTagSpecifications
CreateImageRequest & AddTagSpecifications(const TagSpecification &value)
Definition: CreateImageRequest.h:415
Aws::EC2::Model::CreateImageRequest::GetDryRun
bool GetDryRun() const
Definition: CreateImageRequest.h:146
Aws::EC2::Model::CreateImageRequest::SetBlockDeviceMappings
void SetBlockDeviceMappings(const Aws::Vector< BlockDeviceMapping > &value)
Definition: CreateImageRequest.h:61
Aws::EC2::Model::CreateImageRequest::WithBlockDeviceMappings
CreateImageRequest & WithBlockDeviceMappings(Aws::Vector< BlockDeviceMapping > &&value)
Definition: CreateImageRequest.h:82
Aws::EC2::Model::CreateImageRequest::NoRebootHasBeenSet
bool NoRebootHasBeenSet() const
Definition: CreateImageRequest.h:289
Aws::EC2::Model::CreateImageRequest::WithDescription
CreateImageRequest & WithDescription(const char *value)
Definition: CreateImageRequest.h:137
EC2Request.h
Aws::EC2::Model::CreateImageRequest::SetName
void SetName(const Aws::String &value)
Definition: CreateImageRequest.h:233
Aws::EC2::Model::CreateImageRequest::NameHasBeenSet
bool NameHasBeenSet() const
Definition: CreateImageRequest.h:226
Aws::EC2::Model::CreateImageRequest::AddBlockDeviceMappings
CreateImageRequest & AddBlockDeviceMappings(BlockDeviceMapping &&value)
Definition: CreateImageRequest.h:96
Aws::EC2::Model::CreateImageRequest::InstanceIdHasBeenSet
bool InstanceIdHasBeenSet() const
Definition: CreateImageRequest.h:181
Aws::EC2::Model::CreateImageRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
AWSString.h
Aws::EC2::Model::CreateImageRequest::SetDescription
void SetDescription(Aws::String &&value)
Definition: CreateImageRequest.h:117
Aws::EC2::Model::CreateImageRequest::SetDescription
void SetDescription(const Aws::String &value)
Definition: CreateImageRequest.h:112
Aws::EC2::Model::CreateImageRequest::GetNoReboot
bool GetNoReboot() const
Definition: CreateImageRequest.h:279
Aws::EC2::Model::CreateImageRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreateImageRequest.h:33
Aws::EC2::Model::CreateImageRequest::WithName
CreateImageRequest & WithName(const Aws::String &value)
Definition: CreateImageRequest.h:254
Aws::EC2::Model::BlockDeviceMapping
Definition: BlockDeviceMapping.h:34
Aws::EC2::Model::CreateImageRequest::SetInstanceId
void SetInstanceId(Aws::String &&value)
Definition: CreateImageRequest.h:191
Aws::EC2::Model::CreateImageRequest::SetDryRun
void SetDryRun(bool value)
Definition: CreateImageRequest.h:162
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::CreateImageRequest::SetInstanceId
void SetInstanceId(const char *value)
Definition: CreateImageRequest.h:196
Aws::EC2::Model::CreateImageRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::CreateImageRequest::DescriptionHasBeenSet
bool DescriptionHasBeenSet() const
Definition: CreateImageRequest.h:107
Aws::EC2::Model::CreateImageRequest::SetTagSpecifications
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: CreateImageRequest.h:355
Aws::EC2::Model::CreateImageRequest::WithName
CreateImageRequest & WithName(const char *value)
Definition: CreateImageRequest.h:268
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::CreateImageRequest::WithName
CreateImageRequest & WithName(Aws::String &&value)
Definition: CreateImageRequest.h:261
Aws::EC2::Model::CreateImageRequest::GetName
const Aws::String & GetName() const
Definition: CreateImageRequest.h:219
Aws::EC2::Model::CreateImageRequest::CreateImageRequest
CreateImageRequest()
Aws::EC2::Model::CreateImageRequest::GetBlockDeviceMappings
const Aws::Vector< BlockDeviceMapping > & GetBlockDeviceMappings() const
Definition: CreateImageRequest.h:47
Aws::EC2::Model::CreateImageRequest::SetBlockDeviceMappings
void SetBlockDeviceMappings(Aws::Vector< BlockDeviceMapping > &&value)
Definition: CreateImageRequest.h:68
Aws::EC2::Model::TagSpecification
Definition: TagSpecification.h:35
Aws::EC2::Model::CreateImageRequest
Definition: CreateImageRequest.h:25
EC2_EXPORTS.h
Aws::EC2::Model::CreateImageRequest::WithTagSpecifications
CreateImageRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: CreateImageRequest.h:385
Aws::EC2::Model::CreateImageRequest::SetDescription
void SetDescription(const char *value)
Definition: CreateImageRequest.h:122
Aws::EC2::Model::CreateImageRequest::WithTagSpecifications
CreateImageRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
Definition: CreateImageRequest.h:400
Aws::EC2::Model::CreateImageRequest::AddBlockDeviceMappings
CreateImageRequest & AddBlockDeviceMappings(const BlockDeviceMapping &value)
Definition: CreateImageRequest.h:89
Aws::EC2::Model::CreateImageRequest::WithDescription
CreateImageRequest & WithDescription(const Aws::String &value)
Definition: CreateImageRequest.h:127
Aws::EC2::Model::CreateImageRequest::WithNoReboot
CreateImageRequest & WithNoReboot(bool value)
Definition: CreateImageRequest.h:309