/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateNetworkAclEntryRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateNetworkAclEntryRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
DryRunSupportedRequest
* The IPv4 network range to allow or deny, in CIDR notation (for example
* Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).
*
* ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6)
* with an IPv6 CIDR block.
*
* The IPv6 network range to allow or deny, in CIDR notation (for example
* The ID of the network ACL.
*
* TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17
* (UDP).
*
* 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.
*
* Indicates whether to allow or deny the traffic that matches the rule.
*
* The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.
*
* Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.
*
* The IPv4 network range to allow or deny, in CIDR notation (for example
* The IPv4 network range to allow or deny, in CIDR notation (for example
* The IPv4 network range to allow or deny, in CIDR notation (for example
* Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).
*
* Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).
*
* Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).
*
* Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).
*
* ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6)
* with an IPv6 CIDR block.
*
* ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6)
* with an IPv6 CIDR block.
*
* ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6)
* with an IPv6 CIDR block.
*
* The IPv6 network range to allow or deny, in CIDR notation (for example
* The IPv6 network range to allow or deny, in CIDR notation (for example
* The IPv6 network range to allow or deny, in CIDR notation (for example
* The ID of the network ACL.
*
* The ID of the network ACL.
*
* The ID of the network ACL.
*
* TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17
* (UDP).
*
* TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17
* (UDP).
*
* TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17
* (UDP).
*
* 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.
*
* 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.
*
* 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.
*
* Indicates whether to allow or deny the traffic that matches the rule.
*
* Indicates whether to allow or deny the traffic that matches the rule.
*
* Indicates whether to allow or deny the traffic that matches the rule.
*
* Indicates whether to allow or deny the traffic that matches the rule.
*
* Indicates whether to allow or deny the traffic that matches the rule.
*
* The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.
*
* Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.
* 172.16.0.0/24
). We modify the
* specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
, we modify it
* to 100.68.0.0/18
.
* 2001:db8:1234:1a00::/64
).
* 172.16.0.0/24
). We modify the
* specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
, we modify it
* to 100.68.0.0/18
.
* 172.16.0.0/24
). We
* modify the specified CIDR block to its canonical form; for example, if you specify
* 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
*/
public void setCidrBlock(String cidrBlock) {
this.cidrBlock = cidrBlock;
}
/**
* 172.16.0.0/24
). We modify the
* specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
, we modify it
* to 100.68.0.0/18
.
* 172.16.0.0/24
). We
* modify the specified CIDR block to its canonical form; for example, if you specify
* 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
*/
public String getCidrBlock() {
return this.cidrBlock;
}
/**
* 172.16.0.0/24
). We modify the
* specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
, we modify it
* to 100.68.0.0/18
.
* 172.16.0.0/24
). We
* modify the specified CIDR block to its canonical form; for example, if you specify
* 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNetworkAclEntryRequest withCidrBlock(String cidrBlock) {
setCidrBlock(cidrBlock);
return this;
}
/**
* 2001:db8:1234:1a00::/64
).
* 2001:db8:1234:1a00::/64
).
*/
public void setIpv6CidrBlock(String ipv6CidrBlock) {
this.ipv6CidrBlock = ipv6CidrBlock;
}
/**
* 2001:db8:1234:1a00::/64
).
* 2001:db8:1234:1a00::/64
).
*/
public String getIpv6CidrBlock() {
return this.ipv6CidrBlock;
}
/**
* 2001:db8:1234:1a00::/64
).
* 2001:db8:1234:1a00::/64
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNetworkAclEntryRequest withIpv6CidrBlock(String ipv6CidrBlock) {
setIpv6CidrBlock(ipv6CidrBlock);
return this;
}
/**
*
* Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use. */ public void setRuleNumber(Integer ruleNumber) { this.ruleNumber = ruleNumber; } /** *
* The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number. *
** Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use. *
* * @return The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule * number. ** Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use. */ public Integer getRuleNumber() { return this.ruleNumber; } /** *
* The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number. *
** Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use. *
* * @param ruleNumber * The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule * number. *
* Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNetworkAclEntryRequest withRuleNumber(Integer ruleNumber) {
setRuleNumber(ruleNumber);
return this;
}
/**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/
@Override
public Request