/**
* 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
If the protocol is TCP or UDP, this is the start of the port range. If the * protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all * ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all * ICMP/ICMPv6 codes.
*/ inline int GetFromPort() const{ return m_fromPort; } /** *If the protocol is TCP or UDP, this is the start of the port range. If the * protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all * ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all * ICMP/ICMPv6 codes.
*/ inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; } /** *If the protocol is TCP or UDP, this is the start of the port range. If the * protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all * ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all * ICMP/ICMPv6 codes.
*/ inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; } /** *If the protocol is TCP or UDP, this is the start of the port range. If the * protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all * ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all * ICMP/ICMPv6 codes.
*/ inline IpPermission& WithFromPort(int value) { SetFromPort(value); return *this;} /** *The IP protocol name (tcp
, udp
, icmp
,
* icmpv6
) or number (see Protocol
* Numbers).
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).
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).
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).
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).
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).
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).
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).
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; } /** *The IPv6 ranges.
*/ inline const Aws::VectorThe IPv6 ranges.
*/ inline bool Ipv6RangesHasBeenSet() const { return m_ipv6RangesHasBeenSet; } /** *The IPv6 ranges.
*/ inline void SetIpv6Ranges(const Aws::VectorThe IPv6 ranges.
*/ inline void SetIpv6Ranges(Aws::VectorThe IPv6 ranges.
*/ inline IpPermission& WithIpv6Ranges(const Aws::VectorThe IPv6 ranges.
*/ inline IpPermission& WithIpv6Ranges(Aws::VectorThe IPv6 ranges.
*/ inline IpPermission& AddIpv6Ranges(const Ipv6Range& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(value); return *this; } /** *The IPv6 ranges.
*/ inline IpPermission& AddIpv6Ranges(Ipv6Range&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(std::move(value)); return *this; } /** *The prefix list IDs.
*/ inline const Aws::VectorThe prefix list IDs.
*/ inline bool PrefixListIdsHasBeenSet() const { return m_prefixListIdsHasBeenSet; } /** *The prefix list IDs.
*/ inline void SetPrefixListIds(const Aws::VectorThe prefix list IDs.
*/ inline void SetPrefixListIds(Aws::VectorThe prefix list IDs.
*/ inline IpPermission& WithPrefixListIds(const Aws::VectorThe prefix list IDs.
*/ inline IpPermission& WithPrefixListIds(Aws::VectorThe prefix list IDs.
*/ inline IpPermission& AddPrefixListIds(const PrefixListId& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(value); return *this; } /** *The prefix list IDs.
*/ inline IpPermission& AddPrefixListIds(PrefixListId&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(std::move(value)); return *this; } /** *If the protocol is TCP or UDP, this is the end of the port range. If the * protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all * ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all * ICMP/ICMPv6 codes.
*/ inline int GetToPort() const{ return m_toPort; } /** *If the protocol is TCP or UDP, this is the end of the port range. If the * protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all * ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all * ICMP/ICMPv6 codes.
*/ inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; } /** *If the protocol is TCP or UDP, this is the end of the port range. If the * protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all * ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all * ICMP/ICMPv6 codes.
*/ inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; } /** *If the protocol is TCP or UDP, this is the end of the port range. If the * protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all * ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all * ICMP/ICMPv6 codes.
*/ inline IpPermission& WithToPort(int value) { SetToPort(value); return *this;} /** *The security group and Amazon Web Services account ID pairs.
*/ inline const Aws::VectorThe security group and Amazon Web Services account ID pairs.
*/ inline bool UserIdGroupPairsHasBeenSet() const { return m_userIdGroupPairsHasBeenSet; } /** *The security group and Amazon Web Services account ID pairs.
*/ inline void SetUserIdGroupPairs(const Aws::VectorThe security group and Amazon Web Services account ID pairs.
*/ inline void SetUserIdGroupPairs(Aws::VectorThe security group and Amazon Web Services account ID pairs.
*/ inline IpPermission& WithUserIdGroupPairs(const Aws::VectorThe security group and Amazon Web Services account ID pairs.
*/ inline IpPermission& WithUserIdGroupPairs(Aws::VectorThe security group and Amazon Web Services account ID pairs.
*/ inline IpPermission& AddUserIdGroupPairs(const UserIdGroupPair& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(value); return *this; } /** *The security group and Amazon Web Services 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 = false; Aws::String m_ipProtocol; bool m_ipProtocolHasBeenSet = false; Aws::Vector