AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateSnapshotsRequest.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/AWSString.h>
10#include <aws/ec2/model/InstanceSpecification.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/ec2/model/CopyTagsFromSource.h>
13#include <aws/ec2/model/SnapshotLocationEnum.h>
14#include <aws/ec2/model/TagSpecification.h>
15#include <utility>
16
17namespace Aws
18{
19namespace EC2
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_EC2_API CreateSnapshotsRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "CreateSnapshots"; }
36
37 AWS_EC2_API Aws::String SerializePayload() const override;
38
39 protected:
40 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
41
42 public:
43
45
48 inline const Aws::String& GetDescription() const { return m_description; }
49 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
50 template<typename DescriptionT = Aws::String>
51 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
52 template<typename DescriptionT = Aws::String>
53 CreateSnapshotsRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
55
57
61 inline const InstanceSpecification& GetInstanceSpecification() const { return m_instanceSpecification; }
62 inline bool InstanceSpecificationHasBeenSet() const { return m_instanceSpecificationHasBeenSet; }
63 template<typename InstanceSpecificationT = InstanceSpecification>
64 void SetInstanceSpecification(InstanceSpecificationT&& value) { m_instanceSpecificationHasBeenSet = true; m_instanceSpecification = std::forward<InstanceSpecificationT>(value); }
65 template<typename InstanceSpecificationT = InstanceSpecification>
66 CreateSnapshotsRequest& WithInstanceSpecification(InstanceSpecificationT&& value) { SetInstanceSpecification(std::forward<InstanceSpecificationT>(value)); return *this;}
68
70
81 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
82 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
83 template<typename OutpostArnT = Aws::String>
84 void SetOutpostArn(OutpostArnT&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::forward<OutpostArnT>(value); }
85 template<typename OutpostArnT = Aws::String>
86 CreateSnapshotsRequest& WithOutpostArn(OutpostArnT&& value) { SetOutpostArn(std::forward<OutpostArnT>(value)); return *this;}
88
90
93 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
94 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
95 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
96 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
97 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
98 CreateSnapshotsRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
99 template<typename TagSpecificationsT = TagSpecification>
100 CreateSnapshotsRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
102
104
110 inline bool GetDryRun() const { return m_dryRun; }
111 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
112 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
113 inline CreateSnapshotsRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
115
117
120 inline CopyTagsFromSource GetCopyTagsFromSource() const { return m_copyTagsFromSource; }
121 inline bool CopyTagsFromSourceHasBeenSet() const { return m_copyTagsFromSourceHasBeenSet; }
122 inline void SetCopyTagsFromSource(CopyTagsFromSource value) { m_copyTagsFromSourceHasBeenSet = true; m_copyTagsFromSource = value; }
125
127
135 inline SnapshotLocationEnum GetLocation() const { return m_location; }
136 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
137 inline void SetLocation(SnapshotLocationEnum value) { m_locationHasBeenSet = true; m_location = value; }
140 private:
141
142 Aws::String m_description;
143 bool m_descriptionHasBeenSet = false;
144
145 InstanceSpecification m_instanceSpecification;
146 bool m_instanceSpecificationHasBeenSet = false;
147
148 Aws::String m_outpostArn;
149 bool m_outpostArnHasBeenSet = false;
150
151 Aws::Vector<TagSpecification> m_tagSpecifications;
152 bool m_tagSpecificationsHasBeenSet = false;
153
154 bool m_dryRun{false};
155 bool m_dryRunHasBeenSet = false;
156
158 bool m_copyTagsFromSourceHasBeenSet = false;
159
161 bool m_locationHasBeenSet = false;
162 };
163
164} // namespace Model
165} // namespace EC2
166} // 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