Class NetworkAclEntry
- java.lang.Object
-
- com.amazonaws.services.ec2.model.NetworkAclEntry
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class NetworkAclEntry extends Object implements Serializable, Cloneable
Describes an entry in a network ACL.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NetworkAclEntry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkAclEntry
clone()
boolean
equals(Object obj)
String
getCidrBlock()
The network range to allow or deny, in CIDR notation.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.String
getProtocol()
The protocol.String
getRuleAction()
Indicates whether to allow or deny the traffic that matches the rule.Integer
getRuleNumber()
The rule number for the entry.int
hashCode()
Boolean
isEgress()
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).void
setCidrBlock(String cidrBlock)
The network range to allow or deny, in CIDR notation.void
setEgress(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(String protocol)
The protocol.void
setRuleAction(RuleAction ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.void
setRuleAction(String ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.void
setRuleNumber(Integer ruleNumber)
The rule number for the entry.String
toString()
Returns a string representation of this object; useful for testing and debugging.NetworkAclEntry
withCidrBlock(String cidrBlock)
The network range to allow or deny, in CIDR notation.NetworkAclEntry
withEgress(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(String protocol)
The protocol.NetworkAclEntry
withRuleAction(RuleAction ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.NetworkAclEntry
withRuleAction(String ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.NetworkAclEntry
withRuleNumber(Integer ruleNumber)
The rule number for the entry.
-
-
-
Method Detail
-
setRuleNumber
public void setRuleNumber(Integer ruleNumber)
The rule number for the entry. ACL entries are processed in ascending order by rule number.
- Parameters:
ruleNumber
- The rule number for the entry. ACL entries are processed in ascending order by rule number.
-
getRuleNumber
public Integer getRuleNumber()
The rule number for the entry. ACL entries are processed in ascending order by rule number.
- Returns:
- The rule number for the entry. ACL entries are processed in ascending order by rule number.
-
withRuleNumber
public NetworkAclEntry withRuleNumber(Integer ruleNumber)
The rule number for the entry. ACL entries are processed in ascending order by rule number.
- Parameters:
ruleNumber
- The rule number for the entry. ACL entries are processed in ascending order by rule number.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setProtocol
public void setProtocol(String protocol)
The protocol. A value of
-1
means all protocols.- Parameters:
protocol
- The protocol. A value of-1
means all protocols.
-
getProtocol
public String getProtocol()
The protocol. A value of
-1
means all protocols.- Returns:
- The protocol. A value of
-1
means all protocols.
-
withProtocol
public NetworkAclEntry withProtocol(String protocol)
The protocol. A value of
-1
means all protocols.- Parameters:
protocol
- The protocol. A value of-1
means all protocols.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRuleAction
public void setRuleAction(String ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
- Parameters:
ruleAction
- Indicates whether to allow or deny the traffic that matches the rule.- See Also:
RuleAction
-
getRuleAction
public String getRuleAction()
Indicates whether to allow or deny the traffic that matches the rule.
- Returns:
- Indicates whether to allow or deny the traffic that matches the rule.
- See Also:
RuleAction
-
withRuleAction
public NetworkAclEntry withRuleAction(String ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
- Parameters:
ruleAction
- Indicates whether to allow or deny the traffic that matches the rule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
RuleAction
-
setRuleAction
public void setRuleAction(RuleAction ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
- Parameters:
ruleAction
- Indicates whether to allow or deny the traffic that matches the rule.- See Also:
RuleAction
-
withRuleAction
public NetworkAclEntry withRuleAction(RuleAction ruleAction)
Indicates whether to allow or deny the traffic that matches the rule.
- Parameters:
ruleAction
- Indicates whether to allow or deny the traffic that matches the rule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
RuleAction
-
setEgress
public void setEgress(Boolean egress)
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
- Parameters:
egress
- Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
-
getEgress
public Boolean getEgress()
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
- Returns:
- Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
-
withEgress
public NetworkAclEntry withEgress(Boolean egress)
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
- Parameters:
egress
- Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isEgress
public Boolean isEgress()
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
- Returns:
- Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
-
setCidrBlock
public void setCidrBlock(String cidrBlock)
The network range to allow or deny, in CIDR notation.
- Parameters:
cidrBlock
- The network range to allow or deny, in CIDR notation.
-
getCidrBlock
public String getCidrBlock()
The network range to allow or deny, in CIDR notation.
- Returns:
- The network range to allow or deny, in CIDR notation.
-
withCidrBlock
public NetworkAclEntry withCidrBlock(String cidrBlock)
The network range to allow or deny, in CIDR notation.
- Parameters:
cidrBlock
- The network range to allow or deny, in CIDR notation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIcmpTypeCode
public void setIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP protocol: The ICMP type and code.
- Parameters:
icmpTypeCode
- ICMP protocol: The ICMP type and code.
-
getIcmpTypeCode
public IcmpTypeCode getIcmpTypeCode()
ICMP protocol: The ICMP type and code.
- Returns:
- ICMP protocol: The ICMP type and code.
-
withIcmpTypeCode
public NetworkAclEntry withIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP protocol: The ICMP type and code.
- Parameters:
icmpTypeCode
- ICMP protocol: The ICMP type and code.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPortRange
public void setPortRange(PortRange portRange)
TCP or UDP protocols: The range of ports the rule applies to.
- Parameters:
portRange
- TCP or UDP protocols: The range of ports the rule applies to.
-
getPortRange
public PortRange getPortRange()
TCP or UDP protocols: The range of ports the rule applies to.
- Returns:
- TCP or UDP protocols: The range of ports the rule applies to.
-
withPortRange
public NetworkAclEntry withPortRange(PortRange portRange)
TCP or UDP protocols: The range of ports the rule applies to.
- Parameters:
portRange
- TCP or UDP protocols: The range of ports the rule applies to.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public NetworkAclEntry clone()
-
-