AWS SDK for C++  1.7.146
AWS SDK for C++
AuthorizeSecurityGroupIngressRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 
16 #pragma once
17 #include <aws/ec2/EC2_EXPORTS.h>
18 #include <aws/ec2/EC2Request.h>
22 #include <utility>
23 
24 namespace Aws
25 {
26 namespace EC2
27 {
28 namespace Model
29 {
30 
34  {
35  public:
37 
38  // Service request name is the Operation name which will send this request out,
39  // each operation should has unique request name, so that we can get operation's name from this request.
40  // Note: this is not true for response, multiple operations may have the same response name,
41  // so we can not get operation's name from response.
42  inline virtual const char* GetServiceRequestName() const override { return "AuthorizeSecurityGroupIngress"; }
43 
44  Aws::String SerializePayload() const override;
45 
46  protected:
47  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
48 
49  public:
50 
57  inline const Aws::String& GetCidrIp() const{ return m_cidrIp; }
58 
65  inline bool CidrIpHasBeenSet() const { return m_cidrIpHasBeenSet; }
66 
73  inline void SetCidrIp(const Aws::String& value) { m_cidrIpHasBeenSet = true; m_cidrIp = value; }
74 
81  inline void SetCidrIp(Aws::String&& value) { m_cidrIpHasBeenSet = true; m_cidrIp = std::move(value); }
82 
89  inline void SetCidrIp(const char* value) { m_cidrIpHasBeenSet = true; m_cidrIp.assign(value); }
90 
97  inline AuthorizeSecurityGroupIngressRequest& WithCidrIp(const Aws::String& value) { SetCidrIp(value); return *this;}
98 
105  inline AuthorizeSecurityGroupIngressRequest& WithCidrIp(Aws::String&& value) { SetCidrIp(std::move(value)); return *this;}
106 
113  inline AuthorizeSecurityGroupIngressRequest& WithCidrIp(const char* value) { SetCidrIp(value); return *this;}
114 
115 
123  inline int GetFromPort() const{ return m_fromPort; }
124 
132  inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
133 
141  inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
142 
150  inline AuthorizeSecurityGroupIngressRequest& WithFromPort(int value) { SetFromPort(value); return *this;}
151 
152 
158  inline const Aws::String& GetGroupId() const{ return m_groupId; }
159 
165  inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; }
166 
172  inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; }
173 
179  inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); }
180 
186  inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); }
187 
193  inline AuthorizeSecurityGroupIngressRequest& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;}
194 
200  inline AuthorizeSecurityGroupIngressRequest& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;}
201 
207  inline AuthorizeSecurityGroupIngressRequest& WithGroupId(const char* value) { SetGroupId(value); return *this;}
208 
209 
214  inline const Aws::String& GetGroupName() const{ return m_groupName; }
215 
220  inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
221 
226  inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; }
227 
232  inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); }
233 
238  inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); }
239 
244  inline AuthorizeSecurityGroupIngressRequest& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;}
245 
250  inline AuthorizeSecurityGroupIngressRequest& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;}
251 
256  inline AuthorizeSecurityGroupIngressRequest& WithGroupName(const char* value) { SetGroupName(value); return *this;}
257 
258 
262  inline const Aws::Vector<IpPermission>& GetIpPermissions() const{ return m_ipPermissions; }
263 
267  inline bool IpPermissionsHasBeenSet() const { return m_ipPermissionsHasBeenSet; }
268 
272  inline void SetIpPermissions(const Aws::Vector<IpPermission>& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = value; }
273 
277  inline void SetIpPermissions(Aws::Vector<IpPermission>&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = std::move(value); }
278 
282  inline AuthorizeSecurityGroupIngressRequest& WithIpPermissions(const Aws::Vector<IpPermission>& value) { SetIpPermissions(value); return *this;}
283 
287  inline AuthorizeSecurityGroupIngressRequest& WithIpPermissions(Aws::Vector<IpPermission>&& value) { SetIpPermissions(std::move(value)); return *this;}
288 
292  inline AuthorizeSecurityGroupIngressRequest& AddIpPermissions(const IpPermission& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.push_back(value); return *this; }
293 
297  inline AuthorizeSecurityGroupIngressRequest& AddIpPermissions(IpPermission&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.push_back(std::move(value)); return *this; }
298 
299 
311  inline const Aws::String& GetIpProtocol() const{ return m_ipProtocol; }
312 
324  inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; }
325 
337  inline void SetIpProtocol(const Aws::String& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = value; }
338 
350  inline void SetIpProtocol(Aws::String&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::move(value); }
351 
363  inline void SetIpProtocol(const char* value) { m_ipProtocolHasBeenSet = true; m_ipProtocol.assign(value); }
364 
376  inline AuthorizeSecurityGroupIngressRequest& WithIpProtocol(const Aws::String& value) { SetIpProtocol(value); return *this;}
377 
389  inline AuthorizeSecurityGroupIngressRequest& WithIpProtocol(Aws::String&& value) { SetIpProtocol(std::move(value)); return *this;}
390 
402  inline AuthorizeSecurityGroupIngressRequest& WithIpProtocol(const char* value) { SetIpProtocol(value); return *this;}
403 
404 
413  inline const Aws::String& GetSourceSecurityGroupName() const{ return m_sourceSecurityGroupName; }
414 
423  inline bool SourceSecurityGroupNameHasBeenSet() const { return m_sourceSecurityGroupNameHasBeenSet; }
424 
433  inline void SetSourceSecurityGroupName(const Aws::String& value) { m_sourceSecurityGroupNameHasBeenSet = true; m_sourceSecurityGroupName = value; }
434 
443  inline void SetSourceSecurityGroupName(Aws::String&& value) { m_sourceSecurityGroupNameHasBeenSet = true; m_sourceSecurityGroupName = std::move(value); }
444 
453  inline void SetSourceSecurityGroupName(const char* value) { m_sourceSecurityGroupNameHasBeenSet = true; m_sourceSecurityGroupName.assign(value); }
454 
463  inline AuthorizeSecurityGroupIngressRequest& WithSourceSecurityGroupName(const Aws::String& value) { SetSourceSecurityGroupName(value); return *this;}
464 
473  inline AuthorizeSecurityGroupIngressRequest& WithSourceSecurityGroupName(Aws::String&& value) { SetSourceSecurityGroupName(std::move(value)); return *this;}
474 
483  inline AuthorizeSecurityGroupIngressRequest& WithSourceSecurityGroupName(const char* value) { SetSourceSecurityGroupName(value); return *this;}
484 
485 
495  inline const Aws::String& GetSourceSecurityGroupOwnerId() const{ return m_sourceSecurityGroupOwnerId; }
496 
506  inline bool SourceSecurityGroupOwnerIdHasBeenSet() const { return m_sourceSecurityGroupOwnerIdHasBeenSet; }
507 
517  inline void SetSourceSecurityGroupOwnerId(const Aws::String& value) { m_sourceSecurityGroupOwnerIdHasBeenSet = true; m_sourceSecurityGroupOwnerId = value; }
518 
528  inline void SetSourceSecurityGroupOwnerId(Aws::String&& value) { m_sourceSecurityGroupOwnerIdHasBeenSet = true; m_sourceSecurityGroupOwnerId = std::move(value); }
529 
539  inline void SetSourceSecurityGroupOwnerId(const char* value) { m_sourceSecurityGroupOwnerIdHasBeenSet = true; m_sourceSecurityGroupOwnerId.assign(value); }
540 
550  inline AuthorizeSecurityGroupIngressRequest& WithSourceSecurityGroupOwnerId(const Aws::String& value) { SetSourceSecurityGroupOwnerId(value); return *this;}
551 
561  inline AuthorizeSecurityGroupIngressRequest& WithSourceSecurityGroupOwnerId(Aws::String&& value) { SetSourceSecurityGroupOwnerId(std::move(value)); return *this;}
562 
572  inline AuthorizeSecurityGroupIngressRequest& WithSourceSecurityGroupOwnerId(const char* value) { SetSourceSecurityGroupOwnerId(value); return *this;}
573 
574 
582  inline int GetToPort() const{ return m_toPort; }
583 
591  inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
592 
600  inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
601 
609  inline AuthorizeSecurityGroupIngressRequest& WithToPort(int value) { SetToPort(value); return *this;}
610 
611 
618  inline bool GetDryRun() const{ return m_dryRun; }
619 
626  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
627 
634  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
635 
642  inline AuthorizeSecurityGroupIngressRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
643 
644  private:
645 
646  Aws::String m_cidrIp;
647  bool m_cidrIpHasBeenSet;
648 
649  int m_fromPort;
650  bool m_fromPortHasBeenSet;
651 
652  Aws::String m_groupId;
653  bool m_groupIdHasBeenSet;
654 
655  Aws::String m_groupName;
656  bool m_groupNameHasBeenSet;
657 
658  Aws::Vector<IpPermission> m_ipPermissions;
659  bool m_ipPermissionsHasBeenSet;
660 
661  Aws::String m_ipProtocol;
662  bool m_ipProtocolHasBeenSet;
663 
664  Aws::String m_sourceSecurityGroupName;
665  bool m_sourceSecurityGroupNameHasBeenSet;
666 
667  Aws::String m_sourceSecurityGroupOwnerId;
668  bool m_sourceSecurityGroupOwnerIdHasBeenSet;
669 
670  int m_toPort;
671  bool m_toPortHasBeenSet;
672 
673  bool m_dryRun;
674  bool m_dryRunHasBeenSet;
675  };
676 
677 } // namespace Model
678 } // namespace EC2
679 } // namespace Aws
AuthorizeSecurityGroupIngressRequest & WithGroupName(Aws::String &&value)
AuthorizeSecurityGroupIngressRequest & WithCidrIp(const Aws::String &value)
AuthorizeSecurityGroupIngressRequest & WithSourceSecurityGroupName(const Aws::String &value)
AuthorizeSecurityGroupIngressRequest & WithGroupName(const Aws::String &value)
AuthorizeSecurityGroupIngressRequest & WithSourceSecurityGroupOwnerId(Aws::String &&value)
AuthorizeSecurityGroupIngressRequest & WithGroupName(const char *value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
AuthorizeSecurityGroupIngressRequest & WithToPort(int value)
AuthorizeSecurityGroupIngressRequest & WithDryRun(bool value)
AuthorizeSecurityGroupIngressRequest & WithCidrIp(const char *value)
AuthorizeSecurityGroupIngressRequest & WithGroupId(const Aws::String &value)
AuthorizeSecurityGroupIngressRequest & WithFromPort(int value)
AuthorizeSecurityGroupIngressRequest & WithIpPermissions(const Aws::Vector< IpPermission > &value)
AuthorizeSecurityGroupIngressRequest & WithIpPermissions(Aws::Vector< IpPermission > &&value)
AuthorizeSecurityGroupIngressRequest & WithIpProtocol(const Aws::String &value)
AuthorizeSecurityGroupIngressRequest & AddIpPermissions(IpPermission &&value)
AuthorizeSecurityGroupIngressRequest & WithSourceSecurityGroupOwnerId(const Aws::String &value)
AuthorizeSecurityGroupIngressRequest & WithCidrIp(Aws::String &&value)
AuthorizeSecurityGroupIngressRequest & WithSourceSecurityGroupName(Aws::String &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:107
AuthorizeSecurityGroupIngressRequest & WithIpProtocol(Aws::String &&value)
AuthorizeSecurityGroupIngressRequest & AddIpPermissions(const IpPermission &value)
AuthorizeSecurityGroupIngressRequest & WithIpProtocol(const char *value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:38
AuthorizeSecurityGroupIngressRequest & WithGroupId(Aws::String &&value)
AuthorizeSecurityGroupIngressRequest & WithSourceSecurityGroupOwnerId(const char *value)
AuthorizeSecurityGroupIngressRequest & WithGroupId(const char *value)
AuthorizeSecurityGroupIngressRequest & WithSourceSecurityGroupName(const char *value)