AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreateSnapshotRequest.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/SnapshotLocationEnum.h>
12#include <aws/ec2/model/TagSpecification.h>
13
14#include <utility>
15
16namespace Aws {
17namespace EC2 {
18namespace Model {
19
23 public:
24 AWS_EC2_API CreateSnapshotRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "CreateSnapshot"; }
31
32 AWS_EC2_API Aws::String SerializePayload() const override;
33
34 protected:
35 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
36
37 public:
39
42 inline const Aws::String& GetDescription() const { return m_description; }
43 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
44 template <typename DescriptionT = Aws::String>
45 void SetDescription(DescriptionT&& value) {
46 m_descriptionHasBeenSet = true;
47 m_description = std::forward<DescriptionT>(value);
48 }
49 template <typename DescriptionT = Aws::String>
50 CreateSnapshotRequest& WithDescription(DescriptionT&& value) {
51 SetDescription(std::forward<DescriptionT>(value));
52 return *this;
53 }
55
57
68 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
69 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
70 template <typename OutpostArnT = Aws::String>
71 void SetOutpostArn(OutpostArnT&& value) {
72 m_outpostArnHasBeenSet = true;
73 m_outpostArn = std::forward<OutpostArnT>(value);
74 }
75 template <typename OutpostArnT = Aws::String>
76 CreateSnapshotRequest& WithOutpostArn(OutpostArnT&& value) {
77 SetOutpostArn(std::forward<OutpostArnT>(value));
78 return *this;
79 }
81
83
86 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
87 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
88 template <typename VolumeIdT = Aws::String>
89 void SetVolumeId(VolumeIdT&& value) {
90 m_volumeIdHasBeenSet = true;
91 m_volumeId = std::forward<VolumeIdT>(value);
92 }
93 template <typename VolumeIdT = Aws::String>
94 CreateSnapshotRequest& WithVolumeId(VolumeIdT&& value) {
95 SetVolumeId(std::forward<VolumeIdT>(value));
96 return *this;
97 }
99
101
104 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
105 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
106 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
107 void SetTagSpecifications(TagSpecificationsT&& value) {
108 m_tagSpecificationsHasBeenSet = true;
109 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
110 }
111 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
112 CreateSnapshotRequest& WithTagSpecifications(TagSpecificationsT&& value) {
113 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
114 return *this;
115 }
116 template <typename TagSpecificationsT = TagSpecification>
117 CreateSnapshotRequest& AddTagSpecifications(TagSpecificationsT&& value) {
118 m_tagSpecificationsHasBeenSet = true;
119 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
120 return *this;
121 }
123
125
133 inline SnapshotLocationEnum GetLocation() const { return m_location; }
134 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
136 m_locationHasBeenSet = true;
137 m_location = value;
138 }
140 SetLocation(value);
141 return *this;
142 }
144
146
152 inline bool GetDryRun() const { return m_dryRun; }
153 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
154 inline void SetDryRun(bool value) {
155 m_dryRunHasBeenSet = true;
156 m_dryRun = value;
157 }
158 inline CreateSnapshotRequest& WithDryRun(bool value) {
159 SetDryRun(value);
160 return *this;
161 }
163 private:
164 Aws::String m_description;
165
166 Aws::String m_outpostArn;
167
168 Aws::String m_volumeId;
169
170 Aws::Vector<TagSpecification> m_tagSpecifications;
171
173
174 bool m_dryRun{false};
175 bool m_descriptionHasBeenSet = false;
176 bool m_outpostArnHasBeenSet = false;
177 bool m_volumeIdHasBeenSet = false;
178 bool m_tagSpecificationsHasBeenSet = false;
179 bool m_locationHasBeenSet = false;
180 bool m_dryRunHasBeenSet = false;
181};
182
183} // namespace Model
184} // namespace EC2
185} // namespace Aws
void SetLocation(SnapshotLocationEnum value)
CreateSnapshotRequest & WithTagSpecifications(TagSpecificationsT &&value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
AWS_EC2_API CreateSnapshotRequest()=default
AWS_EC2_API Aws::String SerializePayload() const override
void SetTagSpecifications(TagSpecificationsT &&value)
CreateSnapshotRequest & WithDescription(DescriptionT &&value)
CreateSnapshotRequest & WithLocation(SnapshotLocationEnum value)
CreateSnapshotRequest & WithOutpostArn(OutpostArnT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateSnapshotRequest & AddTagSpecifications(TagSpecificationsT &&value)
CreateSnapshotRequest & WithVolumeId(VolumeIdT &&value)
virtual const char * GetServiceRequestName() const override
CreateSnapshotRequest & WithDryRun(bool value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector