public class NetworkAclEntry
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Describes an entry in a network ACL.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
cidrBlock
The network range to allow or deny, in CIDR notation.
|
private java.lang.Boolean |
egress
Indicates whether the rule is an egress rule (applied to traffic leaving
the subnet).
|
private IcmpTypeCode |
icmpTypeCode
ICMP protocol: The ICMP type and code.
|
private PortRange |
portRange
TCP or UDP protocols: The range of ports the rule applies to.
|
private java.lang.String |
protocol
The protocol.
|
private java.lang.String |
ruleAction
Indicates whether to allow or deny the traffic that matches the rule.
|
private java.lang.Integer |
ruleNumber
The rule number for the entry.
|
Constructor and Description |
---|
NetworkAclEntry() |
Modifier and Type | Method and Description |
---|---|
NetworkAclEntry |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCidrBlock()
The network range to allow or deny, in CIDR notation.
|
java.lang.Boolean |
getEgress()
Indicates whether the rule is an egress rule (applied to traffic leaving
the subnet).
|
IcmpTypeCode |
getIcmpTypeCode()
ICMP protocol: The ICMP type and code.
|
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.
|
int |
hashCode() |
java.lang.Boolean |
isEgress()
Indicates whether the rule is an egress rule (applied to traffic leaving
the subnet).
|
void |
setCidrBlock(java.lang.String cidrBlock)
The network range to allow or deny, in CIDR notation.
|
void |
setEgress(java.lang.Boolean egress)
Indicates whether the rule is an egress rule (applied to traffic leaving
the subnet).
|
void |
setIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP protocol: The ICMP type and code.
|
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.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
NetworkAclEntry |
withCidrBlock(java.lang.String cidrBlock)
The network range to allow or deny, in CIDR notation.
|
NetworkAclEntry |
withEgress(java.lang.Boolean egress)
Indicates whether the rule is an egress rule (applied to traffic leaving
the subnet).
|
NetworkAclEntry |
withIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP protocol: The ICMP type and code.
|
NetworkAclEntry |
withPortRange(PortRange portRange)
TCP or UDP protocols: The range of ports the rule applies to.
|
NetworkAclEntry |
withProtocol(java.lang.String protocol)
The protocol.
|
NetworkAclEntry |
withRuleAction(RuleAction ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
|
NetworkAclEntry |
withRuleAction(java.lang.String ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
|
NetworkAclEntry |
withRuleNumber(java.lang.Integer ruleNumber)
The rule number for the entry.
|
private java.lang.Integer ruleNumber
The rule number for the entry. ACL entries are processed in ascending order by rule number.
private java.lang.String protocol
The protocol. A value of -1
means all protocols.
private java.lang.String ruleAction
Indicates whether to allow or deny the traffic that matches the rule.
private java.lang.Boolean egress
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
private java.lang.String cidrBlock
The network range to allow or deny, in CIDR notation.
private IcmpTypeCode icmpTypeCode
ICMP protocol: The ICMP type and code.
private PortRange portRange
TCP or UDP protocols: The range of ports the rule applies to.
public void setRuleNumber(java.lang.Integer ruleNumber)
The rule number for the entry. ACL entries are processed in ascending order by rule number.
ruleNumber
- The rule number for the entry. ACL entries are processed in
ascending order by rule number.public java.lang.Integer getRuleNumber()
The rule number for the entry. ACL entries are processed in ascending order by rule number.
public NetworkAclEntry withRuleNumber(java.lang.Integer ruleNumber)
The rule number for the entry. ACL entries are processed in ascending order by rule number.
ruleNumber
- The rule number for the entry. ACL entries are processed in
ascending order by rule number.public void setProtocol(java.lang.String protocol)
The protocol. A value of -1
means all protocols.
protocol
- The protocol. A value of -1
means all protocols.public java.lang.String getProtocol()
The protocol. A value of -1
means all protocols.
-1
means all protocols.public NetworkAclEntry withProtocol(java.lang.String protocol)
The protocol. A value of -1
means all protocols.
protocol
- The protocol. A value of -1
means all protocols.public void setRuleAction(java.lang.String ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
ruleAction
- Indicates whether to allow or deny the traffic that matches the
rule.RuleAction
public java.lang.String getRuleAction()
Indicates whether to allow or deny the traffic that matches the rule.
RuleAction
public NetworkAclEntry withRuleAction(java.lang.String ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
ruleAction
- Indicates whether to allow or deny the traffic that matches the
rule.RuleAction
public void setRuleAction(RuleAction ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
ruleAction
- Indicates whether to allow or deny the traffic that matches the
rule.RuleAction
public NetworkAclEntry withRuleAction(RuleAction ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
ruleAction
- Indicates whether to allow or deny the traffic that matches the
rule.RuleAction
public void setEgress(java.lang.Boolean egress)
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
egress
- Indicates whether the rule is an egress rule (applied to traffic
leaving the subnet).public java.lang.Boolean getEgress()
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
public NetworkAclEntry withEgress(java.lang.Boolean egress)
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
egress
- Indicates whether the rule is an egress rule (applied to traffic
leaving the subnet).public java.lang.Boolean isEgress()
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
public void setCidrBlock(java.lang.String cidrBlock)
The network range to allow or deny, in CIDR notation.
cidrBlock
- The network range to allow or deny, in CIDR notation.public java.lang.String getCidrBlock()
The network range to allow or deny, in CIDR notation.
public NetworkAclEntry withCidrBlock(java.lang.String cidrBlock)
The network range to allow or deny, in CIDR notation.
cidrBlock
- The network range to allow or deny, in CIDR notation.public void setIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP protocol: The ICMP type and code.
icmpTypeCode
- ICMP protocol: The ICMP type and code.public IcmpTypeCode getIcmpTypeCode()
ICMP protocol: The ICMP type and code.
public NetworkAclEntry withIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP protocol: The ICMP type and code.
icmpTypeCode
- ICMP protocol: The ICMP type and code.public void setPortRange(PortRange portRange)
TCP or UDP protocols: The range of ports the rule applies to.
portRange
- TCP or UDP protocols: The range of ports the rule applies to.public PortRange getPortRange()
TCP or UDP protocols: The range of ports the rule applies to.
public NetworkAclEntry withPortRange(PortRange portRange)
TCP or UDP protocols: The range of ports the rule applies to.
portRange
- TCP or UDP protocols: The range of ports the rule applies to.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public NetworkAclEntry clone()
clone
in class java.lang.Object