AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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/ec2/model/SnapshotLocationEnum.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/ec2/model/TagSpecification.h>
13#include <aws/ec2/model/BlockDeviceMapping.h>
14#include <utility>
15
16namespace Aws
17{
18namespace EC2
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_EC2_API CreateImageRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateImage"; }
35
36 AWS_EC2_API Aws::String SerializePayload() const override;
37
38 protected:
39 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40
41 public:
42
44
57 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
58 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
59 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
60 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
61 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
62 CreateImageRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
63 template<typename TagSpecificationsT = TagSpecification>
64 CreateImageRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
66
68
77 inline SnapshotLocationEnum GetSnapshotLocation() const { return m_snapshotLocation; }
78 inline bool SnapshotLocationHasBeenSet() const { return m_snapshotLocationHasBeenSet; }
79 inline void SetSnapshotLocation(SnapshotLocationEnum value) { m_snapshotLocationHasBeenSet = true; m_snapshotLocation = value; }
82
84
90 inline bool GetDryRun() const { return m_dryRun; }
91 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
92 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
93 inline CreateImageRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
95
97
100 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
101 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
102 template<typename InstanceIdT = Aws::String>
103 void SetInstanceId(InstanceIdT&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::forward<InstanceIdT>(value); }
104 template<typename InstanceIdT = Aws::String>
105 CreateImageRequest& WithInstanceId(InstanceIdT&& value) { SetInstanceId(std::forward<InstanceIdT>(value)); return *this;}
107
109
114 inline const Aws::String& GetName() const { return m_name; }
115 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
116 template<typename NameT = Aws::String>
117 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
118 template<typename NameT = Aws::String>
119 CreateImageRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
121
123
126 inline const Aws::String& GetDescription() const { return m_description; }
127 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
128 template<typename DescriptionT = Aws::String>
129 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
130 template<typename DescriptionT = Aws::String>
131 CreateImageRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
133
135
147 inline bool GetNoReboot() const { return m_noReboot; }
148 inline bool NoRebootHasBeenSet() const { return m_noRebootHasBeenSet; }
149 inline void SetNoReboot(bool value) { m_noRebootHasBeenSet = true; m_noReboot = value; }
150 inline CreateImageRequest& WithNoReboot(bool value) { SetNoReboot(value); return *this;}
152
154
166 inline const Aws::Vector<BlockDeviceMapping>& GetBlockDeviceMappings() const { return m_blockDeviceMappings; }
167 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
168 template<typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
169 void SetBlockDeviceMappings(BlockDeviceMappingsT&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings = std::forward<BlockDeviceMappingsT>(value); }
170 template<typename BlockDeviceMappingsT = Aws::Vector<BlockDeviceMapping>>
171 CreateImageRequest& WithBlockDeviceMappings(BlockDeviceMappingsT&& value) { SetBlockDeviceMappings(std::forward<BlockDeviceMappingsT>(value)); return *this;}
172 template<typename BlockDeviceMappingsT = BlockDeviceMapping>
173 CreateImageRequest& AddBlockDeviceMappings(BlockDeviceMappingsT&& value) { m_blockDeviceMappingsHasBeenSet = true; m_blockDeviceMappings.emplace_back(std::forward<BlockDeviceMappingsT>(value)); return *this; }
175 private:
176
177 Aws::Vector<TagSpecification> m_tagSpecifications;
178 bool m_tagSpecificationsHasBeenSet = false;
179
181 bool m_snapshotLocationHasBeenSet = false;
182
183 bool m_dryRun{false};
184 bool m_dryRunHasBeenSet = false;
185
186 Aws::String m_instanceId;
187 bool m_instanceIdHasBeenSet = false;
188
189 Aws::String m_name;
190 bool m_nameHasBeenSet = false;
191
192 Aws::String m_description;
193 bool m_descriptionHasBeenSet = false;
194
195 bool m_noReboot{false};
196 bool m_noRebootHasBeenSet = false;
197
198 Aws::Vector<BlockDeviceMapping> m_blockDeviceMappings;
199 bool m_blockDeviceMappingsHasBeenSet = false;
200 };
201
202} // namespace Model
203} // namespace EC2
204} // namespace Aws
CreateImageRequest & WithSnapshotLocation(SnapshotLocationEnum value)
CreateImageRequest & AddBlockDeviceMappings(BlockDeviceMappingsT &&value)
CreateImageRequest & WithTagSpecifications(TagSpecificationsT &&value)
CreateImageRequest & WithInstanceId(InstanceIdT &&value)
void SetInstanceId(InstanceIdT &&value)
CreateImageRequest & WithName(NameT &&value)
CreateImageRequest & WithDescription(DescriptionT &&value)
AWS_EC2_API CreateImageRequest()=default
CreateImageRequest & AddTagSpecifications(TagSpecificationsT &&value)
SnapshotLocationEnum GetSnapshotLocation() const
virtual const char * GetServiceRequestName() const override
const Aws::String & GetDescription() const
const Aws::Vector< BlockDeviceMapping > & GetBlockDeviceMappings() const
CreateImageRequest & WithNoReboot(bool value)
CreateImageRequest & WithBlockDeviceMappings(BlockDeviceMappingsT &&value)
const Aws::String & GetName() const
CreateImageRequest & WithDryRun(bool value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
void SetSnapshotLocation(SnapshotLocationEnum value)
void SetBlockDeviceMappings(BlockDeviceMappingsT &&value)
void SetDescription(DescriptionT &&value)
void SetTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
const Aws::String & GetInstanceId() const
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector