/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Describes a set of permissions for a security group rule.See
* Also:
AWS
* API Reference
The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type
* number. A value of -1 indicates all ICMP/ICMPv6 types. If you
* specify all ICMP/ICMPv6 types, you must specify all codes.
The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type
* number. A value of -1 indicates all ICMP/ICMPv6 types. If you
* specify all ICMP/ICMPv6 types, you must specify all codes.
The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type
* number. A value of -1 indicates all ICMP/ICMPv6 types. If you
* specify all ICMP/ICMPv6 types, you must specify all codes.
The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type
* number. A value of -1 indicates all ICMP/ICMPv6 types. If you
* specify all ICMP/ICMPv6 types, you must specify all codes.
The IP protocol name (tcp, udp, icmp,
* icmpv6) or number (see Protocol
* Numbers).
[VPC only] Use -1 to specify all protocols.
* When authorizing security group rules, specifying -1 or a protocol
* number other than tcp, udp, icmp, or
* icmpv6 allows traffic on all ports, regardless of any port range
* you specify. For tcp, udp, and icmp, you
* must specify a port range. For icmpv6, the port range is optional;
* if you omit the port range, traffic for all types and codes is allowed.
The IP protocol name (tcp, udp, icmp,
* icmpv6) or number (see Protocol
* Numbers).
[VPC only] Use -1 to specify all protocols.
* When authorizing security group rules, specifying -1 or a protocol
* number other than tcp, udp, icmp, or
* icmpv6 allows traffic on all ports, regardless of any port range
* you specify. For tcp, udp, and icmp, you
* must specify a port range. For icmpv6, the port range is optional;
* if you omit the port range, traffic for all types and codes is allowed.
The IP protocol name (tcp, udp, icmp,
* icmpv6) or number (see Protocol
* Numbers).
[VPC only] Use -1 to specify all protocols.
* When authorizing security group rules, specifying -1 or a protocol
* number other than tcp, udp, icmp, or
* icmpv6 allows traffic on all ports, regardless of any port range
* you specify. For tcp, udp, and icmp, you
* must specify a port range. For icmpv6, the port range is optional;
* if you omit the port range, traffic for all types and codes is allowed.
The IP protocol name (tcp, udp, icmp,
* icmpv6) or number (see Protocol
* Numbers).
[VPC only] Use -1 to specify all protocols.
* When authorizing security group rules, specifying -1 or a protocol
* number other than tcp, udp, icmp, or
* icmpv6 allows traffic on all ports, regardless of any port range
* you specify. For tcp, udp, and icmp, you
* must specify a port range. For icmpv6, the port range is optional;
* if you omit the port range, traffic for all types and codes is allowed.
The IP protocol name (tcp, udp, icmp,
* icmpv6) or number (see Protocol
* Numbers).
[VPC only] Use -1 to specify all protocols.
* When authorizing security group rules, specifying -1 or a protocol
* number other than tcp, udp, icmp, or
* icmpv6 allows traffic on all ports, regardless of any port range
* you specify. For tcp, udp, and icmp, you
* must specify a port range. For icmpv6, the port range is optional;
* if you omit the port range, traffic for all types and codes is allowed.
The IP protocol name (tcp, udp, icmp,
* icmpv6) or number (see Protocol
* Numbers).
[VPC only] Use -1 to specify all protocols.
* When authorizing security group rules, specifying -1 or a protocol
* number other than tcp, udp, icmp, or
* icmpv6 allows traffic on all ports, regardless of any port range
* you specify. For tcp, udp, and icmp, you
* must specify a port range. For icmpv6, the port range is optional;
* if you omit the port range, traffic for all types and codes is allowed.
The IP protocol name (tcp, udp, icmp,
* icmpv6) or number (see Protocol
* Numbers).
[VPC only] Use -1 to specify all protocols.
* When authorizing security group rules, specifying -1 or a protocol
* number other than tcp, udp, icmp, or
* icmpv6 allows traffic on all ports, regardless of any port range
* you specify. For tcp, udp, and icmp, you
* must specify a port range. For icmpv6, the port range is optional;
* if you omit the port range, traffic for all types and codes is allowed.
The IP protocol name (tcp, udp, icmp,
* icmpv6) or number (see Protocol
* Numbers).
[VPC only] Use -1 to specify all protocols.
* When authorizing security group rules, specifying -1 or a protocol
* number other than tcp, udp, icmp, or
* icmpv6 allows traffic on all ports, regardless of any port range
* you specify. For tcp, udp, and icmp, you
* must specify a port range. For icmpv6, the port range is optional;
* if you omit the port range, traffic for all types and codes is allowed.
The IPv4 ranges.
*/ inline const Aws::VectorThe IPv4 ranges.
*/ inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; } /** *The IPv4 ranges.
*/ inline void SetIpRanges(const Aws::VectorThe IPv4 ranges.
*/ inline void SetIpRanges(Aws::VectorThe IPv4 ranges.
*/ inline IpPermission& WithIpRanges(const Aws::VectorThe IPv4 ranges.
*/ inline IpPermission& WithIpRanges(Aws::VectorThe IPv4 ranges.
*/ inline IpPermission& AddIpRanges(const IpRange& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; } /** *The IPv4 ranges.
*/ inline IpPermission& AddIpRanges(IpRange&& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(std::move(value)); return *this; } /** *[VPC only] The IPv6 ranges.
*/ inline const Aws::Vector[VPC only] The IPv6 ranges.
*/ inline bool Ipv6RangesHasBeenSet() const { return m_ipv6RangesHasBeenSet; } /** *[VPC only] The IPv6 ranges.
*/ inline void SetIpv6Ranges(const Aws::Vector[VPC only] The IPv6 ranges.
*/ inline void SetIpv6Ranges(Aws::Vector[VPC only] The IPv6 ranges.
*/ inline IpPermission& WithIpv6Ranges(const Aws::Vector[VPC only] The IPv6 ranges.
*/ inline IpPermission& WithIpv6Ranges(Aws::Vector[VPC only] The IPv6 ranges.
*/ inline IpPermission& AddIpv6Ranges(const Ipv6Range& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(value); return *this; } /** *[VPC only] The IPv6 ranges.
*/ inline IpPermission& AddIpv6Ranges(Ipv6Range&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(std::move(value)); return *this; } /** *[VPC only] The prefix list IDs.
*/ inline const Aws::Vector[VPC only] The prefix list IDs.
*/ inline bool PrefixListIdsHasBeenSet() const { return m_prefixListIdsHasBeenSet; } /** *[VPC only] The prefix list IDs.
*/ inline void SetPrefixListIds(const Aws::Vector[VPC only] The prefix list IDs.
*/ inline void SetPrefixListIds(Aws::Vector[VPC only] The prefix list IDs.
*/ inline IpPermission& WithPrefixListIds(const Aws::Vector[VPC only] The prefix list IDs.
*/ inline IpPermission& WithPrefixListIds(Aws::Vector[VPC only] The prefix list IDs.
*/ inline IpPermission& AddPrefixListIds(const PrefixListId& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(value); return *this; } /** *[VPC only] The prefix list IDs.
*/ inline IpPermission& AddPrefixListIds(PrefixListId&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(std::move(value)); return *this; } /** *The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
* A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all
* ICMP/ICMPv6 types, you must specify all codes.
The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
* A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all
* ICMP/ICMPv6 types, you must specify all codes.
The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
* A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all
* ICMP/ICMPv6 types, you must specify all codes.
The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
* A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all
* ICMP/ICMPv6 types, you must specify all codes.
The security group and AWS account ID pairs.
*/ inline const Aws::VectorThe security group and AWS account ID pairs.
*/ inline bool UserIdGroupPairsHasBeenSet() const { return m_userIdGroupPairsHasBeenSet; } /** *The security group and AWS account ID pairs.
*/ inline void SetUserIdGroupPairs(const Aws::VectorThe security group and AWS account ID pairs.
*/ inline void SetUserIdGroupPairs(Aws::VectorThe security group and AWS account ID pairs.
*/ inline IpPermission& WithUserIdGroupPairs(const Aws::VectorThe security group and AWS account ID pairs.
*/ inline IpPermission& WithUserIdGroupPairs(Aws::VectorThe security group and AWS account ID pairs.
*/ inline IpPermission& AddUserIdGroupPairs(const UserIdGroupPair& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(value); return *this; } /** *The security group and AWS account ID pairs.
*/ inline IpPermission& AddUserIdGroupPairs(UserIdGroupPair&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(std::move(value)); return *this; } private: int m_fromPort; bool m_fromPortHasBeenSet; Aws::String m_ipProtocol; bool m_ipProtocolHasBeenSet; Aws::Vector