AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
CreateSnapshotsRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/ec2/EC2Request.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/CopyTagsFromSource.h>
12#include <aws/ec2/model/InstanceSpecification.h>
13#include <aws/ec2/model/SnapshotLocationEnum.h>
14#include <aws/ec2/model/TagSpecification.h>
15
16#include <utility>
17
18namespace Aws {
19namespace EC2 {
20namespace Model {
21
25 public:
26 AWS_EC2_API CreateSnapshotsRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreateSnapshots"; }
33
34 AWS_EC2_API Aws::String SerializePayload() const override;
35
36 protected:
37 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
38
39 public:
41
44 inline const Aws::String& GetDescription() const { return m_description; }
45 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
46 template <typename DescriptionT = Aws::String>
47 void SetDescription(DescriptionT&& value) {
48 m_descriptionHasBeenSet = true;
49 m_description = std::forward<DescriptionT>(value);
50 }
51 template <typename DescriptionT = Aws::String>
52 CreateSnapshotsRequest& WithDescription(DescriptionT&& value) {
53 SetDescription(std::forward<DescriptionT>(value));
54 return *this;
55 }
57
59
63 inline const InstanceSpecification& GetInstanceSpecification() const { return m_instanceSpecification; }
64 inline bool InstanceSpecificationHasBeenSet() const { return m_instanceSpecificationHasBeenSet; }
65 template <typename InstanceSpecificationT = InstanceSpecification>
66 void SetInstanceSpecification(InstanceSpecificationT&& value) {
67 m_instanceSpecificationHasBeenSet = true;
68 m_instanceSpecification = std::forward<InstanceSpecificationT>(value);
69 }
70 template <typename InstanceSpecificationT = InstanceSpecification>
71 CreateSnapshotsRequest& WithInstanceSpecification(InstanceSpecificationT&& value) {
72 SetInstanceSpecification(std::forward<InstanceSpecificationT>(value));
73 return *this;
74 }
76
78
89 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
90 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
91 template <typename OutpostArnT = Aws::String>
92 void SetOutpostArn(OutpostArnT&& value) {
93 m_outpostArnHasBeenSet = true;
94 m_outpostArn = std::forward<OutpostArnT>(value);
95 }
96 template <typename OutpostArnT = Aws::String>
97 CreateSnapshotsRequest& WithOutpostArn(OutpostArnT&& value) {
98 SetOutpostArn(std::forward<OutpostArnT>(value));
99 return *this;
100 }
102
104
107 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
108 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
109 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
110 void SetTagSpecifications(TagSpecificationsT&& value) {
111 m_tagSpecificationsHasBeenSet = true;
112 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
113 }
114 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
115 CreateSnapshotsRequest& WithTagSpecifications(TagSpecificationsT&& value) {
116 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
117 return *this;
118 }
119 template <typename TagSpecificationsT = TagSpecification>
120 CreateSnapshotsRequest& AddTagSpecifications(TagSpecificationsT&& value) {
121 m_tagSpecificationsHasBeenSet = true;
122 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
123 return *this;
124 }
126
128
134 inline bool GetDryRun() const { return m_dryRun; }
135 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
136 inline void SetDryRun(bool value) {
137 m_dryRunHasBeenSet = true;
138 m_dryRun = value;
139 }
140 inline CreateSnapshotsRequest& WithDryRun(bool value) {
141 SetDryRun(value);
142 return *this;
143 }
145
147
150 inline CopyTagsFromSource GetCopyTagsFromSource() const { return m_copyTagsFromSource; }
151 inline bool CopyTagsFromSourceHasBeenSet() const { return m_copyTagsFromSourceHasBeenSet; }
153 m_copyTagsFromSourceHasBeenSet = true;
154 m_copyTagsFromSource = value;
155 }
158 return *this;
159 }
161
163
171 inline SnapshotLocationEnum GetLocation() const { return m_location; }
172 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
174 m_locationHasBeenSet = true;
175 m_location = value;
176 }
178 SetLocation(value);
179 return *this;
180 }
182 private:
183 Aws::String m_description;
184
185 InstanceSpecification m_instanceSpecification;
186
187 Aws::String m_outpostArn;
188
189 Aws::Vector<TagSpecification> m_tagSpecifications;
190
191 bool m_dryRun{false};
192
194
196 bool m_descriptionHasBeenSet = false;
197 bool m_instanceSpecificationHasBeenSet = false;
198 bool m_outpostArnHasBeenSet = false;
199 bool m_tagSpecificationsHasBeenSet = false;
200 bool m_dryRunHasBeenSet = false;
201 bool m_copyTagsFromSourceHasBeenSet = false;
202 bool m_locationHasBeenSet = false;
203};
204
205} // namespace Model
206} // namespace EC2
207} // namespace Aws
CreateSnapshotsRequest & WithInstanceSpecification(InstanceSpecificationT &&value)
void SetInstanceSpecification(InstanceSpecificationT &&value)
void SetTagSpecifications(TagSpecificationsT &&value)
CreateSnapshotsRequest & WithOutpostArn(OutpostArnT &&value)
CreateSnapshotsRequest & WithDryRun(bool value)
CreateSnapshotsRequest & WithLocation(SnapshotLocationEnum value)
void SetLocation(SnapshotLocationEnum value)
const InstanceSpecification & GetInstanceSpecification() const
AWS_EC2_API CreateSnapshotsRequest()=default
CreateSnapshotsRequest & WithDescription(DescriptionT &&value)
virtual const char * GetServiceRequestName() const override
CreateSnapshotsRequest & WithTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
AWS_EC2_API Aws::String SerializePayload() const override
CreateSnapshotsRequest & AddTagSpecifications(TagSpecificationsT &&value)
CreateSnapshotsRequest & WithCopyTagsFromSource(CopyTagsFromSource value)
void SetCopyTagsFromSource(CopyTagsFromSource value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector