AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateSnapshotRequest.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/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/model/SnapshotLocationEnum.h>
12#include <aws/ec2/model/TagSpecification.h>
13#include <utility>
14
15namespace Aws
16{
17namespace EC2
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_EC2_API CreateSnapshotRequest() = default;
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 "CreateSnapshot"; }
34
35 AWS_EC2_API Aws::String SerializePayload() const override;
36
37 protected:
38 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
39
40 public:
41
43
46 inline const Aws::String& GetDescription() const { return m_description; }
47 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
48 template<typename DescriptionT = Aws::String>
49 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
50 template<typename DescriptionT = Aws::String>
51 CreateSnapshotRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
53
55
66 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
67 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
68 template<typename OutpostArnT = Aws::String>
69 void SetOutpostArn(OutpostArnT&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::forward<OutpostArnT>(value); }
70 template<typename OutpostArnT = Aws::String>
71 CreateSnapshotRequest& WithOutpostArn(OutpostArnT&& value) { SetOutpostArn(std::forward<OutpostArnT>(value)); return *this;}
73
75
78 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
79 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
80 template<typename VolumeIdT = Aws::String>
81 void SetVolumeId(VolumeIdT&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::forward<VolumeIdT>(value); }
82 template<typename VolumeIdT = Aws::String>
83 CreateSnapshotRequest& WithVolumeId(VolumeIdT&& value) { SetVolumeId(std::forward<VolumeIdT>(value)); return *this;}
85
87
90 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
91 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
92 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
93 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
94 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
95 CreateSnapshotRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
96 template<typename TagSpecificationsT = TagSpecification>
97 CreateSnapshotRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
99
101
109 inline SnapshotLocationEnum GetLocation() const { return m_location; }
110 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
111 inline void SetLocation(SnapshotLocationEnum value) { m_locationHasBeenSet = true; m_location = value; }
114
116
122 inline bool GetDryRun() const { return m_dryRun; }
123 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
124 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
125 inline CreateSnapshotRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
127 private:
128
129 Aws::String m_description;
130 bool m_descriptionHasBeenSet = false;
131
132 Aws::String m_outpostArn;
133 bool m_outpostArnHasBeenSet = false;
134
135 Aws::String m_volumeId;
136 bool m_volumeIdHasBeenSet = false;
137
138 Aws::Vector<TagSpecification> m_tagSpecifications;
139 bool m_tagSpecificationsHasBeenSet = false;
140
142 bool m_locationHasBeenSet = false;
143
144 bool m_dryRun{false};
145 bool m_dryRunHasBeenSet = false;
146 };
147
148} // namespace Model
149} // namespace EC2
150} // 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