AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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/TagSpecification.h>
12#include <utility>
13
14namespace Aws
15{
16namespace EC2
17{
18namespace Model
19{
20
24 {
25 public:
26 AWS_EC2_API CreateSnapshotRequest();
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 "CreateSnapshot"; }
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:
40
42
45 inline const Aws::String& GetDescription() const{ return m_description; }
46 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
47 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
48 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
49 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
50 inline CreateSnapshotRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
51 inline CreateSnapshotRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
52 inline CreateSnapshotRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
54
56
70 inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; }
71 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
72 inline void SetOutpostArn(const Aws::String& value) { m_outpostArnHasBeenSet = true; m_outpostArn = value; }
73 inline void SetOutpostArn(Aws::String&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::move(value); }
74 inline void SetOutpostArn(const char* value) { m_outpostArnHasBeenSet = true; m_outpostArn.assign(value); }
75 inline CreateSnapshotRequest& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;}
76 inline CreateSnapshotRequest& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;}
77 inline CreateSnapshotRequest& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;}
79
81
84 inline const Aws::String& GetVolumeId() const{ return m_volumeId; }
85 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
86 inline void SetVolumeId(const Aws::String& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; }
87 inline void SetVolumeId(Aws::String&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::move(value); }
88 inline void SetVolumeId(const char* value) { m_volumeIdHasBeenSet = true; m_volumeId.assign(value); }
89 inline CreateSnapshotRequest& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;}
90 inline CreateSnapshotRequest& WithVolumeId(Aws::String&& value) { SetVolumeId(std::move(value)); return *this;}
91 inline CreateSnapshotRequest& WithVolumeId(const char* value) { SetVolumeId(value); return *this;}
93
95
98 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
99 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
100 inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
101 inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
104 inline CreateSnapshotRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
105 inline CreateSnapshotRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
107
109
115 inline bool GetDryRun() const{ return m_dryRun; }
116 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
117 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
118 inline CreateSnapshotRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
120 private:
121
122 Aws::String m_description;
123 bool m_descriptionHasBeenSet = false;
124
125 Aws::String m_outpostArn;
126 bool m_outpostArnHasBeenSet = false;
127
128 Aws::String m_volumeId;
129 bool m_volumeIdHasBeenSet = false;
130
131 Aws::Vector<TagSpecification> m_tagSpecifications;
132 bool m_tagSpecificationsHasBeenSet = false;
133
134 bool m_dryRun;
135 bool m_dryRunHasBeenSet = false;
136 };
137
138} // namespace Model
139} // namespace EC2
140} // namespace Aws
CreateSnapshotRequest & WithOutpostArn(const char *value)
CreateSnapshotRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
CreateSnapshotRequest & WithDescription(const Aws::String &value)
CreateSnapshotRequest & WithDescription(Aws::String &&value)
AWS_EC2_API Aws::String SerializePayload() const override
CreateSnapshotRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
CreateSnapshotRequest & WithOutpostArn(Aws::String &&value)
CreateSnapshotRequest & AddTagSpecifications(const TagSpecification &value)
CreateSnapshotRequest & AddTagSpecifications(TagSpecification &&value)
void SetDescription(const Aws::String &value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateSnapshotRequest & WithDescription(const char *value)
CreateSnapshotRequest & WithVolumeId(Aws::String &&value)
CreateSnapshotRequest & WithOutpostArn(const Aws::String &value)
virtual const char * GetServiceRequestName() const override
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
void SetOutpostArn(const Aws::String &value)
CreateSnapshotRequest & WithVolumeId(const char *value)
void SetVolumeId(const Aws::String &value)
CreateSnapshotRequest & WithDryRun(bool value)
CreateSnapshotRequest & WithVolumeId(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector