AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
AuthorizeSecurityGroupIngressRequest.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/IpPermission.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 AuthorizeSecurityGroupIngressRequest() = 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 "AuthorizeSecurityGroupIngress"; }
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
57 inline const Aws::String& GetCidrIp() const { return m_cidrIp; }
58 inline bool CidrIpHasBeenSet() const { return m_cidrIpHasBeenSet; }
59 template<typename CidrIpT = Aws::String>
60 void SetCidrIp(CidrIpT&& value) { m_cidrIpHasBeenSet = true; m_cidrIp = std::forward<CidrIpT>(value); }
61 template<typename CidrIpT = Aws::String>
62 AuthorizeSecurityGroupIngressRequest& WithCidrIp(CidrIpT&& value) { SetCidrIp(std::forward<CidrIpT>(value)); return *this;}
64
66
72 inline int GetFromPort() const { return m_fromPort; }
73 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
74 inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
75 inline AuthorizeSecurityGroupIngressRequest& WithFromPort(int value) { SetFromPort(value); return *this;}
77
79
82 inline const Aws::String& GetGroupId() const { return m_groupId; }
83 inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; }
84 template<typename GroupIdT = Aws::String>
85 void SetGroupId(GroupIdT&& value) { m_groupIdHasBeenSet = true; m_groupId = std::forward<GroupIdT>(value); }
86 template<typename GroupIdT = Aws::String>
87 AuthorizeSecurityGroupIngressRequest& WithGroupId(GroupIdT&& value) { SetGroupId(std::forward<GroupIdT>(value)); return *this;}
89
91
97 inline const Aws::String& GetGroupName() const { return m_groupName; }
98 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
99 template<typename GroupNameT = Aws::String>
100 void SetGroupName(GroupNameT&& value) { m_groupNameHasBeenSet = true; m_groupName = std::forward<GroupNameT>(value); }
101 template<typename GroupNameT = Aws::String>
102 AuthorizeSecurityGroupIngressRequest& WithGroupName(GroupNameT&& value) { SetGroupName(std::forward<GroupNameT>(value)); return *this;}
104
106
109 inline const Aws::Vector<IpPermission>& GetIpPermissions() const { return m_ipPermissions; }
110 inline bool IpPermissionsHasBeenSet() const { return m_ipPermissionsHasBeenSet; }
111 template<typename IpPermissionsT = Aws::Vector<IpPermission>>
112 void SetIpPermissions(IpPermissionsT&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = std::forward<IpPermissionsT>(value); }
113 template<typename IpPermissionsT = Aws::Vector<IpPermission>>
114 AuthorizeSecurityGroupIngressRequest& WithIpPermissions(IpPermissionsT&& value) { SetIpPermissions(std::forward<IpPermissionsT>(value)); return *this;}
115 template<typename IpPermissionsT = IpPermission>
116 AuthorizeSecurityGroupIngressRequest& AddIpPermissions(IpPermissionsT&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.emplace_back(std::forward<IpPermissionsT>(value)); return *this; }
118
120
130 inline const Aws::String& GetIpProtocol() const { return m_ipProtocol; }
131 inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; }
132 template<typename IpProtocolT = Aws::String>
133 void SetIpProtocol(IpProtocolT&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::forward<IpProtocolT>(value); }
134 template<typename IpProtocolT = Aws::String>
135 AuthorizeSecurityGroupIngressRequest& WithIpProtocol(IpProtocolT&& value) { SetIpProtocol(std::forward<IpProtocolT>(value)); return *this;}
137
139
144 inline const Aws::String& GetSourceSecurityGroupName() const { return m_sourceSecurityGroupName; }
145 inline bool SourceSecurityGroupNameHasBeenSet() const { return m_sourceSecurityGroupNameHasBeenSet; }
146 template<typename SourceSecurityGroupNameT = Aws::String>
147 void SetSourceSecurityGroupName(SourceSecurityGroupNameT&& value) { m_sourceSecurityGroupNameHasBeenSet = true; m_sourceSecurityGroupName = std::forward<SourceSecurityGroupNameT>(value); }
148 template<typename SourceSecurityGroupNameT = Aws::String>
149 AuthorizeSecurityGroupIngressRequest& WithSourceSecurityGroupName(SourceSecurityGroupNameT&& value) { SetSourceSecurityGroupName(std::forward<SourceSecurityGroupNameT>(value)); return *this;}
151
153
159 inline const Aws::String& GetSourceSecurityGroupOwnerId() const { return m_sourceSecurityGroupOwnerId; }
160 inline bool SourceSecurityGroupOwnerIdHasBeenSet() const { return m_sourceSecurityGroupOwnerIdHasBeenSet; }
161 template<typename SourceSecurityGroupOwnerIdT = Aws::String>
162 void SetSourceSecurityGroupOwnerId(SourceSecurityGroupOwnerIdT&& value) { m_sourceSecurityGroupOwnerIdHasBeenSet = true; m_sourceSecurityGroupOwnerId = std::forward<SourceSecurityGroupOwnerIdT>(value); }
163 template<typename SourceSecurityGroupOwnerIdT = Aws::String>
164 AuthorizeSecurityGroupIngressRequest& WithSourceSecurityGroupOwnerId(SourceSecurityGroupOwnerIdT&& value) { SetSourceSecurityGroupOwnerId(std::forward<SourceSecurityGroupOwnerIdT>(value)); return *this;}
166
168
175 inline int GetToPort() const { return m_toPort; }
176 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
177 inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
178 inline AuthorizeSecurityGroupIngressRequest& WithToPort(int value) { SetToPort(value); return *this;}
180
182
185 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
186 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
187 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
188 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
189 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
190 AuthorizeSecurityGroupIngressRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
191 template<typename TagSpecificationsT = TagSpecification>
192 AuthorizeSecurityGroupIngressRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
194
196
202 inline bool GetDryRun() const { return m_dryRun; }
203 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
204 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
205 inline AuthorizeSecurityGroupIngressRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
207 private:
208
209 Aws::String m_cidrIp;
210 bool m_cidrIpHasBeenSet = false;
211
212 int m_fromPort{0};
213 bool m_fromPortHasBeenSet = false;
214
215 Aws::String m_groupId;
216 bool m_groupIdHasBeenSet = false;
217
218 Aws::String m_groupName;
219 bool m_groupNameHasBeenSet = false;
220
221 Aws::Vector<IpPermission> m_ipPermissions;
222 bool m_ipPermissionsHasBeenSet = false;
223
224 Aws::String m_ipProtocol;
225 bool m_ipProtocolHasBeenSet = false;
226
227 Aws::String m_sourceSecurityGroupName;
228 bool m_sourceSecurityGroupNameHasBeenSet = false;
229
230 Aws::String m_sourceSecurityGroupOwnerId;
231 bool m_sourceSecurityGroupOwnerIdHasBeenSet = false;
232
233 int m_toPort{0};
234 bool m_toPortHasBeenSet = false;
235
236 Aws::Vector<TagSpecification> m_tagSpecifications;
237 bool m_tagSpecificationsHasBeenSet = false;
238
239 bool m_dryRun{false};
240 bool m_dryRunHasBeenSet = false;
241 };
242
243} // namespace Model
244} // namespace EC2
245} // namespace Aws
AuthorizeSecurityGroupIngressRequest & WithGroupId(GroupIdT &&value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
AuthorizeSecurityGroupIngressRequest & WithDryRun(bool value)
AuthorizeSecurityGroupIngressRequest & WithGroupName(GroupNameT &&value)
AuthorizeSecurityGroupIngressRequest & AddIpPermissions(IpPermissionsT &&value)
AuthorizeSecurityGroupIngressRequest & WithCidrIp(CidrIpT &&value)
AuthorizeSecurityGroupIngressRequest & WithFromPort(int value)
AuthorizeSecurityGroupIngressRequest & AddTagSpecifications(TagSpecificationsT &&value)
AuthorizeSecurityGroupIngressRequest & WithIpProtocol(IpProtocolT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
AuthorizeSecurityGroupIngressRequest & WithSourceSecurityGroupOwnerId(SourceSecurityGroupOwnerIdT &&value)
AuthorizeSecurityGroupIngressRequest & WithSourceSecurityGroupName(SourceSecurityGroupNameT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
AuthorizeSecurityGroupIngressRequest & WithTagSpecifications(TagSpecificationsT &&value)
AuthorizeSecurityGroupIngressRequest & WithIpPermissions(IpPermissionsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector