AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
AuthorizeSecurityGroupEgressRequest.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/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/ec2/model/TagSpecification.h>
12#include <aws/ec2/model/IpPermission.h>
13#include <utility>
14
15namespace Aws
16{
17namespace EC2
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_EC2_API AuthorizeSecurityGroupEgressRequest() = 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 "AuthorizeSecurityGroupEgress"; }
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::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
47 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
48 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
49 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
50 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
51 AuthorizeSecurityGroupEgressRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
52 template<typename TagSpecificationsT = TagSpecification>
53 AuthorizeSecurityGroupEgressRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
55
57
63 inline bool GetDryRun() const { return m_dryRun; }
64 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
65 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
66 inline AuthorizeSecurityGroupEgressRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
68
70
73 inline const Aws::String& GetGroupId() const { return m_groupId; }
74 inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; }
75 template<typename GroupIdT = Aws::String>
76 void SetGroupId(GroupIdT&& value) { m_groupIdHasBeenSet = true; m_groupId = std::forward<GroupIdT>(value); }
77 template<typename GroupIdT = Aws::String>
78 AuthorizeSecurityGroupEgressRequest& WithGroupId(GroupIdT&& value) { SetGroupId(std::forward<GroupIdT>(value)); return *this;}
80
82
85 inline const Aws::String& GetSourceSecurityGroupName() const { return m_sourceSecurityGroupName; }
86 inline bool SourceSecurityGroupNameHasBeenSet() const { return m_sourceSecurityGroupNameHasBeenSet; }
87 template<typename SourceSecurityGroupNameT = Aws::String>
88 void SetSourceSecurityGroupName(SourceSecurityGroupNameT&& value) { m_sourceSecurityGroupNameHasBeenSet = true; m_sourceSecurityGroupName = std::forward<SourceSecurityGroupNameT>(value); }
89 template<typename SourceSecurityGroupNameT = Aws::String>
90 AuthorizeSecurityGroupEgressRequest& WithSourceSecurityGroupName(SourceSecurityGroupNameT&& value) { SetSourceSecurityGroupName(std::forward<SourceSecurityGroupNameT>(value)); return *this;}
92
94
97 inline const Aws::String& GetSourceSecurityGroupOwnerId() const { return m_sourceSecurityGroupOwnerId; }
98 inline bool SourceSecurityGroupOwnerIdHasBeenSet() const { return m_sourceSecurityGroupOwnerIdHasBeenSet; }
99 template<typename SourceSecurityGroupOwnerIdT = Aws::String>
100 void SetSourceSecurityGroupOwnerId(SourceSecurityGroupOwnerIdT&& value) { m_sourceSecurityGroupOwnerIdHasBeenSet = true; m_sourceSecurityGroupOwnerId = std::forward<SourceSecurityGroupOwnerIdT>(value); }
101 template<typename SourceSecurityGroupOwnerIdT = Aws::String>
102 AuthorizeSecurityGroupEgressRequest& WithSourceSecurityGroupOwnerId(SourceSecurityGroupOwnerIdT&& value) { SetSourceSecurityGroupOwnerId(std::forward<SourceSecurityGroupOwnerIdT>(value)); return *this;}
104
106
109 inline const Aws::String& GetIpProtocol() const { return m_ipProtocol; }
110 inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; }
111 template<typename IpProtocolT = Aws::String>
112 void SetIpProtocol(IpProtocolT&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::forward<IpProtocolT>(value); }
113 template<typename IpProtocolT = Aws::String>
114 AuthorizeSecurityGroupEgressRequest& WithIpProtocol(IpProtocolT&& value) { SetIpProtocol(std::forward<IpProtocolT>(value)); return *this;}
116
118
121 inline int GetFromPort() const { return m_fromPort; }
122 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
123 inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
124 inline AuthorizeSecurityGroupEgressRequest& WithFromPort(int value) { SetFromPort(value); return *this;}
126
128
131 inline int GetToPort() const { return m_toPort; }
132 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
133 inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
134 inline AuthorizeSecurityGroupEgressRequest& WithToPort(int value) { SetToPort(value); return *this;}
136
138
141 inline const Aws::String& GetCidrIp() const { return m_cidrIp; }
142 inline bool CidrIpHasBeenSet() const { return m_cidrIpHasBeenSet; }
143 template<typename CidrIpT = Aws::String>
144 void SetCidrIp(CidrIpT&& value) { m_cidrIpHasBeenSet = true; m_cidrIp = std::forward<CidrIpT>(value); }
145 template<typename CidrIpT = Aws::String>
146 AuthorizeSecurityGroupEgressRequest& WithCidrIp(CidrIpT&& value) { SetCidrIp(std::forward<CidrIpT>(value)); return *this;}
148
150
153 inline const Aws::Vector<IpPermission>& GetIpPermissions() const { return m_ipPermissions; }
154 inline bool IpPermissionsHasBeenSet() const { return m_ipPermissionsHasBeenSet; }
155 template<typename IpPermissionsT = Aws::Vector<IpPermission>>
156 void SetIpPermissions(IpPermissionsT&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = std::forward<IpPermissionsT>(value); }
157 template<typename IpPermissionsT = Aws::Vector<IpPermission>>
158 AuthorizeSecurityGroupEgressRequest& WithIpPermissions(IpPermissionsT&& value) { SetIpPermissions(std::forward<IpPermissionsT>(value)); return *this;}
159 template<typename IpPermissionsT = IpPermission>
160 AuthorizeSecurityGroupEgressRequest& AddIpPermissions(IpPermissionsT&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.emplace_back(std::forward<IpPermissionsT>(value)); return *this; }
162 private:
163
164 Aws::Vector<TagSpecification> m_tagSpecifications;
165 bool m_tagSpecificationsHasBeenSet = false;
166
167 bool m_dryRun{false};
168 bool m_dryRunHasBeenSet = false;
169
170 Aws::String m_groupId;
171 bool m_groupIdHasBeenSet = false;
172
173 Aws::String m_sourceSecurityGroupName;
174 bool m_sourceSecurityGroupNameHasBeenSet = false;
175
176 Aws::String m_sourceSecurityGroupOwnerId;
177 bool m_sourceSecurityGroupOwnerIdHasBeenSet = false;
178
179 Aws::String m_ipProtocol;
180 bool m_ipProtocolHasBeenSet = false;
181
182 int m_fromPort{0};
183 bool m_fromPortHasBeenSet = false;
184
185 int m_toPort{0};
186 bool m_toPortHasBeenSet = false;
187
188 Aws::String m_cidrIp;
189 bool m_cidrIpHasBeenSet = false;
190
191 Aws::Vector<IpPermission> m_ipPermissions;
192 bool m_ipPermissionsHasBeenSet = false;
193 };
194
195} // namespace Model
196} // namespace EC2
197} // namespace Aws
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
AuthorizeSecurityGroupEgressRequest & WithSourceSecurityGroupName(SourceSecurityGroupNameT &&value)
AuthorizeSecurityGroupEgressRequest & WithToPort(int value)
AuthorizeSecurityGroupEgressRequest & AddTagSpecifications(TagSpecificationsT &&value)
AuthorizeSecurityGroupEgressRequest & AddIpPermissions(IpPermissionsT &&value)
AuthorizeSecurityGroupEgressRequest & WithGroupId(GroupIdT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
AuthorizeSecurityGroupEgressRequest & WithSourceSecurityGroupOwnerId(SourceSecurityGroupOwnerIdT &&value)
AuthorizeSecurityGroupEgressRequest & WithIpPermissions(IpPermissionsT &&value)
AuthorizeSecurityGroupEgressRequest & WithCidrIp(CidrIpT &&value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
AuthorizeSecurityGroupEgressRequest & WithDryRun(bool value)
AuthorizeSecurityGroupEgressRequest & WithTagSpecifications(TagSpecificationsT &&value)
AuthorizeSecurityGroupEgressRequest & WithFromPort(int value)
AuthorizeSecurityGroupEgressRequest & WithIpProtocol(IpProtocolT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector