/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Describes a security group rule.See Also:
AWS
* API Reference
The ID of the security group rule.
*/ inline const Aws::String& GetSecurityGroupRuleId() const{ return m_securityGroupRuleId; } /** *The ID of the security group rule.
*/ inline bool SecurityGroupRuleIdHasBeenSet() const { return m_securityGroupRuleIdHasBeenSet; } /** *The ID of the security group rule.
*/ inline void SetSecurityGroupRuleId(const Aws::String& value) { m_securityGroupRuleIdHasBeenSet = true; m_securityGroupRuleId = value; } /** *The ID of the security group rule.
*/ inline void SetSecurityGroupRuleId(Aws::String&& value) { m_securityGroupRuleIdHasBeenSet = true; m_securityGroupRuleId = std::move(value); } /** *The ID of the security group rule.
*/ inline void SetSecurityGroupRuleId(const char* value) { m_securityGroupRuleIdHasBeenSet = true; m_securityGroupRuleId.assign(value); } /** *The ID of the security group rule.
*/ inline SecurityGroupRule& WithSecurityGroupRuleId(const Aws::String& value) { SetSecurityGroupRuleId(value); return *this;} /** *The ID of the security group rule.
*/ inline SecurityGroupRule& WithSecurityGroupRuleId(Aws::String&& value) { SetSecurityGroupRuleId(std::move(value)); return *this;} /** *The ID of the security group rule.
*/ inline SecurityGroupRule& WithSecurityGroupRuleId(const char* value) { SetSecurityGroupRuleId(value); return *this;} /** *The ID of the security group.
*/ inline const Aws::String& GetGroupId() const{ return m_groupId; } /** *The ID of the security group.
*/ inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; } /** *The ID of the security group.
*/ inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; } /** *The ID of the security group.
*/ inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); } /** *The ID of the security group.
*/ inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); } /** *The ID of the security group.
*/ inline SecurityGroupRule& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;} /** *The ID of the security group.
*/ inline SecurityGroupRule& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;} /** *The ID of the security group.
*/ inline SecurityGroupRule& WithGroupId(const char* value) { SetGroupId(value); return *this;} /** *The ID of the Amazon Web Services account that owns the security group.
*/ inline const Aws::String& GetGroupOwnerId() const{ return m_groupOwnerId; } /** *The ID of the Amazon Web Services account that owns the security group.
*/ inline bool GroupOwnerIdHasBeenSet() const { return m_groupOwnerIdHasBeenSet; } /** *The ID of the Amazon Web Services account that owns the security group.
*/ inline void SetGroupOwnerId(const Aws::String& value) { m_groupOwnerIdHasBeenSet = true; m_groupOwnerId = value; } /** *The ID of the Amazon Web Services account that owns the security group.
*/ inline void SetGroupOwnerId(Aws::String&& value) { m_groupOwnerIdHasBeenSet = true; m_groupOwnerId = std::move(value); } /** *The ID of the Amazon Web Services account that owns the security group.
*/ inline void SetGroupOwnerId(const char* value) { m_groupOwnerIdHasBeenSet = true; m_groupOwnerId.assign(value); } /** *The ID of the Amazon Web Services account that owns the security group.
*/ inline SecurityGroupRule& WithGroupOwnerId(const Aws::String& value) { SetGroupOwnerId(value); return *this;} /** *The ID of the Amazon Web Services account that owns the security group.
*/ inline SecurityGroupRule& WithGroupOwnerId(Aws::String&& value) { SetGroupOwnerId(std::move(value)); return *this;} /** *The ID of the Amazon Web Services account that owns the security group.
*/ inline SecurityGroupRule& WithGroupOwnerId(const char* value) { SetGroupOwnerId(value); return *this;} /** *Indicates whether the security group rule is an outbound rule.
*/ inline bool GetIsEgress() const{ return m_isEgress; } /** *Indicates whether the security group rule is an outbound rule.
*/ inline bool IsEgressHasBeenSet() const { return m_isEgressHasBeenSet; } /** *Indicates whether the security group rule is an outbound rule.
*/ inline void SetIsEgress(bool value) { m_isEgressHasBeenSet = true; m_isEgress = value; } /** *Indicates whether the security group rule is an outbound rule.
*/ inline SecurityGroupRule& WithIsEgress(bool value) { SetIsEgress(value); return *this;} /** *The IP protocol name (tcp
, udp
, icmp
,
* icmpv6
) or number (see Protocol
* Numbers).
Use -1
to specify all protocols.
The IP protocol name (tcp
, udp
, icmp
,
* icmpv6
) or number (see Protocol
* Numbers).
Use -1
to specify all protocols.
The IP protocol name (tcp
, udp
, icmp
,
* icmpv6
) or number (see Protocol
* Numbers).
Use -1
to specify all protocols.
The IP protocol name (tcp
, udp
, icmp
,
* icmpv6
) or number (see Protocol
* Numbers).
Use -1
to specify all protocols.
The IP protocol name (tcp
, udp
, icmp
,
* icmpv6
) or number (see Protocol
* Numbers).
Use -1
to specify all protocols.
The IP protocol name (tcp
, udp
, icmp
,
* icmpv6
) or number (see Protocol
* Numbers).
Use -1
to specify all protocols.
The IP protocol name (tcp
, udp
, icmp
,
* icmpv6
) or number (see Protocol
* Numbers).
Use -1
to specify all protocols.
The IP protocol name (tcp
, udp
, icmp
,
* icmpv6
) or number (see Protocol
* Numbers).
Use -1
to specify all protocols.
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 SecurityGroupRule& WithFromPort(int value) { SetFromPort(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 type number. 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 type number. 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 type number. 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 type number. A value of -1 indicates all * ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all * ICMP/ICMPv6 codes.
*/ inline SecurityGroupRule& WithToPort(int value) { SetToPort(value); return *this;} /** *The IPv4 CIDR range.
*/ inline const Aws::String& GetCidrIpv4() const{ return m_cidrIpv4; } /** *The IPv4 CIDR range.
*/ inline bool CidrIpv4HasBeenSet() const { return m_cidrIpv4HasBeenSet; } /** *The IPv4 CIDR range.
*/ inline void SetCidrIpv4(const Aws::String& value) { m_cidrIpv4HasBeenSet = true; m_cidrIpv4 = value; } /** *The IPv4 CIDR range.
*/ inline void SetCidrIpv4(Aws::String&& value) { m_cidrIpv4HasBeenSet = true; m_cidrIpv4 = std::move(value); } /** *The IPv4 CIDR range.
*/ inline void SetCidrIpv4(const char* value) { m_cidrIpv4HasBeenSet = true; m_cidrIpv4.assign(value); } /** *The IPv4 CIDR range.
*/ inline SecurityGroupRule& WithCidrIpv4(const Aws::String& value) { SetCidrIpv4(value); return *this;} /** *The IPv4 CIDR range.
*/ inline SecurityGroupRule& WithCidrIpv4(Aws::String&& value) { SetCidrIpv4(std::move(value)); return *this;} /** *The IPv4 CIDR range.
*/ inline SecurityGroupRule& WithCidrIpv4(const char* value) { SetCidrIpv4(value); return *this;} /** *The IPv6 CIDR range.
*/ inline const Aws::String& GetCidrIpv6() const{ return m_cidrIpv6; } /** *The IPv6 CIDR range.
*/ inline bool CidrIpv6HasBeenSet() const { return m_cidrIpv6HasBeenSet; } /** *The IPv6 CIDR range.
*/ inline void SetCidrIpv6(const Aws::String& value) { m_cidrIpv6HasBeenSet = true; m_cidrIpv6 = value; } /** *The IPv6 CIDR range.
*/ inline void SetCidrIpv6(Aws::String&& value) { m_cidrIpv6HasBeenSet = true; m_cidrIpv6 = std::move(value); } /** *The IPv6 CIDR range.
*/ inline void SetCidrIpv6(const char* value) { m_cidrIpv6HasBeenSet = true; m_cidrIpv6.assign(value); } /** *The IPv6 CIDR range.
*/ inline SecurityGroupRule& WithCidrIpv6(const Aws::String& value) { SetCidrIpv6(value); return *this;} /** *The IPv6 CIDR range.
*/ inline SecurityGroupRule& WithCidrIpv6(Aws::String&& value) { SetCidrIpv6(std::move(value)); return *this;} /** *The IPv6 CIDR range.
*/ inline SecurityGroupRule& WithCidrIpv6(const char* value) { SetCidrIpv6(value); return *this;} /** *The ID of the prefix list.
*/ inline const Aws::String& GetPrefixListId() const{ return m_prefixListId; } /** *The ID of the prefix list.
*/ inline bool PrefixListIdHasBeenSet() const { return m_prefixListIdHasBeenSet; } /** *The ID of the prefix list.
*/ inline void SetPrefixListId(const Aws::String& value) { m_prefixListIdHasBeenSet = true; m_prefixListId = value; } /** *The ID of the prefix list.
*/ inline void SetPrefixListId(Aws::String&& value) { m_prefixListIdHasBeenSet = true; m_prefixListId = std::move(value); } /** *The ID of the prefix list.
*/ inline void SetPrefixListId(const char* value) { m_prefixListIdHasBeenSet = true; m_prefixListId.assign(value); } /** *The ID of the prefix list.
*/ inline SecurityGroupRule& WithPrefixListId(const Aws::String& value) { SetPrefixListId(value); return *this;} /** *The ID of the prefix list.
*/ inline SecurityGroupRule& WithPrefixListId(Aws::String&& value) { SetPrefixListId(std::move(value)); return *this;} /** *The ID of the prefix list.
*/ inline SecurityGroupRule& WithPrefixListId(const char* value) { SetPrefixListId(value); return *this;} /** *Describes the security group that is referenced in the rule.
*/ inline const ReferencedSecurityGroup& GetReferencedGroupInfo() const{ return m_referencedGroupInfo; } /** *Describes the security group that is referenced in the rule.
*/ inline bool ReferencedGroupInfoHasBeenSet() const { return m_referencedGroupInfoHasBeenSet; } /** *Describes the security group that is referenced in the rule.
*/ inline void SetReferencedGroupInfo(const ReferencedSecurityGroup& value) { m_referencedGroupInfoHasBeenSet = true; m_referencedGroupInfo = value; } /** *Describes the security group that is referenced in the rule.
*/ inline void SetReferencedGroupInfo(ReferencedSecurityGroup&& value) { m_referencedGroupInfoHasBeenSet = true; m_referencedGroupInfo = std::move(value); } /** *Describes the security group that is referenced in the rule.
*/ inline SecurityGroupRule& WithReferencedGroupInfo(const ReferencedSecurityGroup& value) { SetReferencedGroupInfo(value); return *this;} /** *Describes the security group that is referenced in the rule.
*/ inline SecurityGroupRule& WithReferencedGroupInfo(ReferencedSecurityGroup&& value) { SetReferencedGroupInfo(std::move(value)); return *this;} /** *The security group rule description.
*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *The security group rule description.
*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *The security group rule description.
*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *The security group rule description.
*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *The security group rule description.
*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *The security group rule description.
*/ inline SecurityGroupRule& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *The security group rule description.
*/ inline SecurityGroupRule& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *The security group rule description.
*/ inline SecurityGroupRule& WithDescription(const char* value) { SetDescription(value); return *this;} /** *The tags applied to the security group rule.
*/ inline const Aws::VectorThe tags applied to the security group rule.
*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *The tags applied to the security group rule.
*/ inline void SetTags(const Aws::VectorThe tags applied to the security group rule.
*/ inline void SetTags(Aws::VectorThe tags applied to the security group rule.
*/ inline SecurityGroupRule& WithTags(const Aws::VectorThe tags applied to the security group rule.
*/ inline SecurityGroupRule& WithTags(Aws::VectorThe tags applied to the security group rule.
*/ inline SecurityGroupRule& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *The tags applied to the security group rule.
*/ inline SecurityGroupRule& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_securityGroupRuleId; bool m_securityGroupRuleIdHasBeenSet = false; Aws::String m_groupId; bool m_groupIdHasBeenSet = false; Aws::String m_groupOwnerId; bool m_groupOwnerIdHasBeenSet = false; bool m_isEgress; bool m_isEgressHasBeenSet = false; Aws::String m_ipProtocol; bool m_ipProtocolHasBeenSet = false; int m_fromPort; bool m_fromPortHasBeenSet = false; int m_toPort; bool m_toPortHasBeenSet = false; Aws::String m_cidrIpv4; bool m_cidrIpv4HasBeenSet = false; Aws::String m_cidrIpv6; bool m_cidrIpv6HasBeenSet = false; Aws::String m_prefixListId; bool m_prefixListIdHasBeenSet = false; ReferencedSecurityGroup m_referencedGroupInfo; bool m_referencedGroupInfoHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Vector