public class CreateNetworkAclEntryRequest extends AmazonWebServiceRequest implements java.io.Serializable, DryRunSupportedRequest<CreateNetworkAclEntryRequest>
CreateNetworkAclEntry operation
.
Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of ingress rules and a separate set of egress rules.
We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.
After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.
For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide .
Constructor and Description |
---|
CreateNetworkAclEntryRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCidrBlock()
The network range to allow or deny, in CIDR notation (for example
172.16.0.0/24 ). |
Request<CreateNetworkAclEntryRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.lang.Boolean |
getEgress()
Indicates whether this is an egress rule (rule is applied to traffic
leaving the subnet).
|
IcmpTypeCode |
getIcmpTypeCode()
ICMP protocol: The ICMP type and code.
|
java.lang.String |
getNetworkAclId()
The ID of the network ACL.
|
PortRange |
getPortRange()
TCP or UDP protocols: The range of ports the rule applies to.
|
java.lang.String |
getProtocol()
The protocol.
|
java.lang.String |
getRuleAction()
Indicates whether to allow or deny the traffic that matches the rule.
|
java.lang.Integer |
getRuleNumber()
The rule number for the entry (for example, 100).
|
int |
hashCode() |
java.lang.Boolean |
isEgress()
Indicates whether this is an egress rule (rule is applied to traffic
leaving the subnet).
|
void |
setCidrBlock(java.lang.String cidrBlock)
The network range to allow or deny, in CIDR notation (for example
172.16.0.0/24 ). |
void |
setEgress(java.lang.Boolean egress)
Indicates whether this is an egress rule (rule is applied to traffic
leaving the subnet).
|
void |
setIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP protocol: The ICMP type and code.
|
void |
setNetworkAclId(java.lang.String networkAclId)
The ID of the network ACL.
|
void |
setPortRange(PortRange portRange)
TCP or UDP protocols: The range of ports the rule applies to.
|
void |
setProtocol(java.lang.String protocol)
The protocol.
|
void |
setRuleAction(RuleAction ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
|
void |
setRuleAction(java.lang.String ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
|
void |
setRuleNumber(java.lang.Integer ruleNumber)
The rule number for the entry (for example, 100).
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateNetworkAclEntryRequest |
withCidrBlock(java.lang.String cidrBlock)
The network range to allow or deny, in CIDR notation (for example
172.16.0.0/24 ). |
CreateNetworkAclEntryRequest |
withEgress(java.lang.Boolean egress)
Indicates whether this is an egress rule (rule is applied to traffic
leaving the subnet).
|
CreateNetworkAclEntryRequest |
withIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP protocol: The ICMP type and code.
|
CreateNetworkAclEntryRequest |
withNetworkAclId(java.lang.String networkAclId)
The ID of the network ACL.
|
CreateNetworkAclEntryRequest |
withPortRange(PortRange portRange)
TCP or UDP protocols: The range of ports the rule applies to.
|
CreateNetworkAclEntryRequest |
withProtocol(java.lang.String protocol)
The protocol.
|
CreateNetworkAclEntryRequest |
withRuleAction(RuleAction ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
|
CreateNetworkAclEntryRequest |
withRuleAction(java.lang.String ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
|
CreateNetworkAclEntryRequest |
withRuleNumber(java.lang.Integer ruleNumber)
The rule number for the entry (for example, 100).
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getNetworkAclId()
public void setNetworkAclId(java.lang.String networkAclId)
networkAclId
- The ID of the network ACL.public CreateNetworkAclEntryRequest withNetworkAclId(java.lang.String networkAclId)
Returns a reference to this object so that method calls can be chained together.
networkAclId
- The ID of the network ACL.public java.lang.Integer getRuleNumber()
Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.
Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.
public void setRuleNumber(java.lang.Integer ruleNumber)
Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.
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.
public CreateNetworkAclEntryRequest withRuleNumber(java.lang.Integer ruleNumber)
Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.
Returns a reference to this object so that method calls can be chained together.
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.
public java.lang.String getProtocol()
public void setProtocol(java.lang.String protocol)
protocol
- The protocol. A value of -1 means all protocols.public CreateNetworkAclEntryRequest withProtocol(java.lang.String protocol)
Returns a reference to this object so that method calls can be chained together.
protocol
- The protocol. A value of -1 means all protocols.public java.lang.String getRuleAction()
Constraints:
Allowed Values: allow, deny
RuleAction
public void setRuleAction(java.lang.String ruleAction)
Constraints:
Allowed Values: allow, deny
ruleAction
- Indicates whether to allow or deny the traffic that matches the rule.RuleAction
public CreateNetworkAclEntryRequest withRuleAction(java.lang.String ruleAction)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: allow, deny
ruleAction
- Indicates whether to allow or deny the traffic that matches the rule.RuleAction
public void setRuleAction(RuleAction ruleAction)
Constraints:
Allowed Values: allow, deny
ruleAction
- Indicates whether to allow or deny the traffic that matches the rule.RuleAction
public CreateNetworkAclEntryRequest withRuleAction(RuleAction ruleAction)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: allow, deny
ruleAction
- Indicates whether to allow or deny the traffic that matches the rule.RuleAction
public java.lang.Boolean isEgress()
public void setEgress(java.lang.Boolean egress)
egress
- Indicates whether this is an egress rule (rule is applied to traffic
leaving the subnet).public CreateNetworkAclEntryRequest withEgress(java.lang.Boolean egress)
Returns a reference to this object so that method calls can be chained together.
egress
- Indicates whether this is an egress rule (rule is applied to traffic
leaving the subnet).public java.lang.Boolean getEgress()
public java.lang.String getCidrBlock()
172.16.0.0/24
).172.16.0.0/24
).public void setCidrBlock(java.lang.String cidrBlock)
172.16.0.0/24
).cidrBlock
- The network range to allow or deny, in CIDR notation (for example
172.16.0.0/24
).public CreateNetworkAclEntryRequest withCidrBlock(java.lang.String cidrBlock)
172.16.0.0/24
).
Returns a reference to this object so that method calls can be chained together.
cidrBlock
- The network range to allow or deny, in CIDR notation (for example
172.16.0.0/24
).public IcmpTypeCode getIcmpTypeCode()
public void setIcmpTypeCode(IcmpTypeCode icmpTypeCode)
icmpTypeCode
- ICMP protocol: The ICMP type and code. Required if specifying ICMP for
the protocol.public CreateNetworkAclEntryRequest withIcmpTypeCode(IcmpTypeCode icmpTypeCode)
Returns a reference to this object so that method calls can be chained together.
icmpTypeCode
- ICMP protocol: The ICMP type and code. Required if specifying ICMP for
the protocol.public PortRange getPortRange()
public void setPortRange(PortRange portRange)
portRange
- TCP or UDP protocols: The range of ports the rule applies to.public CreateNetworkAclEntryRequest withPortRange(PortRange portRange)
Returns a reference to this object so that method calls can be chained together.
portRange
- TCP or UDP protocols: The range of ports the rule applies to.public Request<CreateNetworkAclEntryRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<CreateNetworkAclEntryRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.