/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class ReplaceNetworkAclEntryRequest : public EC2Request { public: AWS_EC2_API ReplaceNetworkAclEntryRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ReplaceNetworkAclEntry"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The IPv4 network range to allow or deny, in CIDR notation (for example * 172.16.0.0/24).

*/ inline const Aws::String& GetCidrBlock() const{ return m_cidrBlock; } /** *

The IPv4 network range to allow or deny, in CIDR notation (for example * 172.16.0.0/24).

*/ inline bool CidrBlockHasBeenSet() const { return m_cidrBlockHasBeenSet; } /** *

The IPv4 network range to allow or deny, in CIDR notation (for example * 172.16.0.0/24).

*/ inline void SetCidrBlock(const Aws::String& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = value; } /** *

The IPv4 network range to allow or deny, in CIDR notation (for example * 172.16.0.0/24).

*/ inline void SetCidrBlock(Aws::String&& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = std::move(value); } /** *

The IPv4 network range to allow or deny, in CIDR notation (for example * 172.16.0.0/24).

*/ inline void SetCidrBlock(const char* value) { m_cidrBlockHasBeenSet = true; m_cidrBlock.assign(value); } /** *

The IPv4 network range to allow or deny, in CIDR notation (for example * 172.16.0.0/24).

*/ inline ReplaceNetworkAclEntryRequest& WithCidrBlock(const Aws::String& value) { SetCidrBlock(value); return *this;} /** *

The IPv4 network range to allow or deny, in CIDR notation (for example * 172.16.0.0/24).

*/ inline ReplaceNetworkAclEntryRequest& WithCidrBlock(Aws::String&& value) { SetCidrBlock(std::move(value)); return *this;} /** *

The IPv4 network range to allow or deny, in CIDR notation (for example * 172.16.0.0/24).

*/ inline ReplaceNetworkAclEntryRequest& WithCidrBlock(const char* value) { SetCidrBlock(value); return *this;} /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline ReplaceNetworkAclEntryRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

Indicates whether to replace the egress rule.

Default: If no value is * specified, we replace the ingress rule.

*/ inline bool GetEgress() const{ return m_egress; } /** *

Indicates whether to replace the egress rule.

Default: If no value is * specified, we replace the ingress rule.

*/ inline bool EgressHasBeenSet() const { return m_egressHasBeenSet; } /** *

Indicates whether to replace the egress rule.

Default: If no value is * specified, we replace the ingress rule.

*/ inline void SetEgress(bool value) { m_egressHasBeenSet = true; m_egress = value; } /** *

Indicates whether to replace the egress rule.

Default: If no value is * specified, we replace the ingress rule.

*/ inline ReplaceNetworkAclEntryRequest& WithEgress(bool value) { SetEgress(value); return *this;} /** *

ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying * protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

*/ inline const IcmpTypeCode& GetIcmpTypeCode() const{ return m_icmpTypeCode; } /** *

ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying * protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

*/ inline bool IcmpTypeCodeHasBeenSet() const { return m_icmpTypeCodeHasBeenSet; } /** *

ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying * protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

*/ inline void SetIcmpTypeCode(const IcmpTypeCode& value) { m_icmpTypeCodeHasBeenSet = true; m_icmpTypeCode = value; } /** *

ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying * protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

*/ inline void SetIcmpTypeCode(IcmpTypeCode&& value) { m_icmpTypeCodeHasBeenSet = true; m_icmpTypeCode = std::move(value); } /** *

ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying * protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

*/ inline ReplaceNetworkAclEntryRequest& WithIcmpTypeCode(const IcmpTypeCode& value) { SetIcmpTypeCode(value); return *this;} /** *

ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying * protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

*/ inline ReplaceNetworkAclEntryRequest& WithIcmpTypeCode(IcmpTypeCode&& value) { SetIcmpTypeCode(std::move(value)); return *this;} /** *

The IPv6 network range to allow or deny, in CIDR notation (for example * 2001:bd8:1234:1a00::/64).

*/ inline const Aws::String& GetIpv6CidrBlock() const{ return m_ipv6CidrBlock; } /** *

The IPv6 network range to allow or deny, in CIDR notation (for example * 2001:bd8:1234:1a00::/64).

*/ inline bool Ipv6CidrBlockHasBeenSet() const { return m_ipv6CidrBlockHasBeenSet; } /** *

The IPv6 network range to allow or deny, in CIDR notation (for example * 2001:bd8:1234:1a00::/64).

*/ inline void SetIpv6CidrBlock(const Aws::String& value) { m_ipv6CidrBlockHasBeenSet = true; m_ipv6CidrBlock = value; } /** *

The IPv6 network range to allow or deny, in CIDR notation (for example * 2001:bd8:1234:1a00::/64).

*/ inline void SetIpv6CidrBlock(Aws::String&& value) { m_ipv6CidrBlockHasBeenSet = true; m_ipv6CidrBlock = std::move(value); } /** *

The IPv6 network range to allow or deny, in CIDR notation (for example * 2001:bd8:1234:1a00::/64).

*/ inline void SetIpv6CidrBlock(const char* value) { m_ipv6CidrBlockHasBeenSet = true; m_ipv6CidrBlock.assign(value); } /** *

The IPv6 network range to allow or deny, in CIDR notation (for example * 2001:bd8:1234:1a00::/64).

*/ inline ReplaceNetworkAclEntryRequest& WithIpv6CidrBlock(const Aws::String& value) { SetIpv6CidrBlock(value); return *this;} /** *

The IPv6 network range to allow or deny, in CIDR notation (for example * 2001:bd8:1234:1a00::/64).

*/ inline ReplaceNetworkAclEntryRequest& WithIpv6CidrBlock(Aws::String&& value) { SetIpv6CidrBlock(std::move(value)); return *this;} /** *

The IPv6 network range to allow or deny, in CIDR notation (for example * 2001:bd8:1234:1a00::/64).

*/ inline ReplaceNetworkAclEntryRequest& WithIpv6CidrBlock(const char* value) { SetIpv6CidrBlock(value); return *this;} /** *

The ID of the ACL.

*/ inline const Aws::String& GetNetworkAclId() const{ return m_networkAclId; } /** *

The ID of the ACL.

*/ inline bool NetworkAclIdHasBeenSet() const { return m_networkAclIdHasBeenSet; } /** *

The ID of the ACL.

*/ inline void SetNetworkAclId(const Aws::String& value) { m_networkAclIdHasBeenSet = true; m_networkAclId = value; } /** *

The ID of the ACL.

*/ inline void SetNetworkAclId(Aws::String&& value) { m_networkAclIdHasBeenSet = true; m_networkAclId = std::move(value); } /** *

The ID of the ACL.

*/ inline void SetNetworkAclId(const char* value) { m_networkAclIdHasBeenSet = true; m_networkAclId.assign(value); } /** *

The ID of the ACL.

*/ inline ReplaceNetworkAclEntryRequest& WithNetworkAclId(const Aws::String& value) { SetNetworkAclId(value); return *this;} /** *

The ID of the ACL.

*/ inline ReplaceNetworkAclEntryRequest& WithNetworkAclId(Aws::String&& value) { SetNetworkAclId(std::move(value)); return *this;} /** *

The ID of the ACL.

*/ inline ReplaceNetworkAclEntryRequest& WithNetworkAclId(const char* value) { SetNetworkAclId(value); return *this;} /** *

TCP or UDP protocols: The range of ports the rule applies to. Required if * specifying protocol 6 (TCP) or 17 (UDP).

*/ inline const PortRange& GetPortRange() const{ return m_portRange; } /** *

TCP or UDP protocols: The range of ports the rule applies to. Required if * specifying protocol 6 (TCP) or 17 (UDP).

*/ inline bool PortRangeHasBeenSet() const { return m_portRangeHasBeenSet; } /** *

TCP or UDP protocols: The range of ports the rule applies to. Required if * specifying protocol 6 (TCP) or 17 (UDP).

*/ inline void SetPortRange(const PortRange& value) { m_portRangeHasBeenSet = true; m_portRange = value; } /** *

TCP or UDP protocols: The range of ports the rule applies to. Required if * specifying protocol 6 (TCP) or 17 (UDP).

*/ inline void SetPortRange(PortRange&& value) { m_portRangeHasBeenSet = true; m_portRange = std::move(value); } /** *

TCP or UDP protocols: The range of ports the rule applies to. Required if * specifying protocol 6 (TCP) or 17 (UDP).

*/ inline ReplaceNetworkAclEntryRequest& WithPortRange(const PortRange& value) { SetPortRange(value); return *this;} /** *

TCP or UDP protocols: The range of ports the rule applies to. Required if * specifying protocol 6 (TCP) or 17 (UDP).

*/ inline ReplaceNetworkAclEntryRequest& WithPortRange(PortRange&& value) { SetPortRange(std::move(value)); return *this;} /** *

The protocol number. A value of "-1" means all protocols. If you specify "-1" * or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on * all ports is allowed, regardless of any ports or ICMP types or codes that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, * traffic for all ICMP types and codes allowed, regardless of any that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, * you must specify an ICMP type and code.

*/ inline const Aws::String& GetProtocol() const{ return m_protocol; } /** *

The protocol number. A value of "-1" means all protocols. If you specify "-1" * or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on * all ports is allowed, regardless of any ports or ICMP types or codes that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, * traffic for all ICMP types and codes allowed, regardless of any that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, * you must specify an ICMP type and code.

*/ inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; } /** *

The protocol number. A value of "-1" means all protocols. If you specify "-1" * or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on * all ports is allowed, regardless of any ports or ICMP types or codes that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, * traffic for all ICMP types and codes allowed, regardless of any that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, * you must specify an ICMP type and code.

*/ inline void SetProtocol(const Aws::String& value) { m_protocolHasBeenSet = true; m_protocol = value; } /** *

The protocol number. A value of "-1" means all protocols. If you specify "-1" * or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on * all ports is allowed, regardless of any ports or ICMP types or codes that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, * traffic for all ICMP types and codes allowed, regardless of any that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, * you must specify an ICMP type and code.

*/ inline void SetProtocol(Aws::String&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); } /** *

The protocol number. A value of "-1" means all protocols. If you specify "-1" * or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on * all ports is allowed, regardless of any ports or ICMP types or codes that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, * traffic for all ICMP types and codes allowed, regardless of any that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, * you must specify an ICMP type and code.

*/ inline void SetProtocol(const char* value) { m_protocolHasBeenSet = true; m_protocol.assign(value); } /** *

The protocol number. A value of "-1" means all protocols. If you specify "-1" * or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on * all ports is allowed, regardless of any ports or ICMP types or codes that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, * traffic for all ICMP types and codes allowed, regardless of any that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, * you must specify an ICMP type and code.

*/ inline ReplaceNetworkAclEntryRequest& WithProtocol(const Aws::String& value) { SetProtocol(value); return *this;} /** *

The protocol number. A value of "-1" means all protocols. If you specify "-1" * or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on * all ports is allowed, regardless of any ports or ICMP types or codes that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, * traffic for all ICMP types and codes allowed, regardless of any that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, * you must specify an ICMP type and code.

*/ inline ReplaceNetworkAclEntryRequest& WithProtocol(Aws::String&& value) { SetProtocol(std::move(value)); return *this;} /** *

The protocol number. A value of "-1" means all protocols. If you specify "-1" * or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on * all ports is allowed, regardless of any ports or ICMP types or codes that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, * traffic for all ICMP types and codes allowed, regardless of any that you * specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, * you must specify an ICMP type and code.

*/ inline ReplaceNetworkAclEntryRequest& WithProtocol(const char* value) { SetProtocol(value); return *this;} /** *

Indicates whether to allow or deny the traffic that matches the rule.

*/ inline const RuleAction& GetRuleAction() const{ return m_ruleAction; } /** *

Indicates whether to allow or deny the traffic that matches the rule.

*/ inline bool RuleActionHasBeenSet() const { return m_ruleActionHasBeenSet; } /** *

Indicates whether to allow or deny the traffic that matches the rule.

*/ inline void SetRuleAction(const RuleAction& value) { m_ruleActionHasBeenSet = true; m_ruleAction = value; } /** *

Indicates whether to allow or deny the traffic that matches the rule.

*/ inline void SetRuleAction(RuleAction&& value) { m_ruleActionHasBeenSet = true; m_ruleAction = std::move(value); } /** *

Indicates whether to allow or deny the traffic that matches the rule.

*/ inline ReplaceNetworkAclEntryRequest& WithRuleAction(const RuleAction& value) { SetRuleAction(value); return *this;} /** *

Indicates whether to allow or deny the traffic that matches the rule.

*/ inline ReplaceNetworkAclEntryRequest& WithRuleAction(RuleAction&& value) { SetRuleAction(std::move(value)); return *this;} /** *

The rule number of the entry to replace.

*/ inline int GetRuleNumber() const{ return m_ruleNumber; } /** *

The rule number of the entry to replace.

*/ inline bool RuleNumberHasBeenSet() const { return m_ruleNumberHasBeenSet; } /** *

The rule number of the entry to replace.

*/ inline void SetRuleNumber(int value) { m_ruleNumberHasBeenSet = true; m_ruleNumber = value; } /** *

The rule number of the entry to replace.

*/ inline ReplaceNetworkAclEntryRequest& WithRuleNumber(int value) { SetRuleNumber(value); return *this;} private: Aws::String m_cidrBlock; bool m_cidrBlockHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; bool m_egress; bool m_egressHasBeenSet = false; IcmpTypeCode m_icmpTypeCode; bool m_icmpTypeCodeHasBeenSet = false; Aws::String m_ipv6CidrBlock; bool m_ipv6CidrBlockHasBeenSet = false; Aws::String m_networkAclId; bool m_networkAclIdHasBeenSet = false; PortRange m_portRange; bool m_portRangeHasBeenSet = false; Aws::String m_protocol; bool m_protocolHasBeenSet = false; RuleAction m_ruleAction; bool m_ruleActionHasBeenSet = false; int m_ruleNumber; bool m_ruleNumberHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws