@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AwsEc2NetworkAclEntry extends Object implements Serializable, Cloneable, StructuredPojo
A rule for the network ACL. Each rule allows or denies access based on the IP address, traffic direction, port, and protocol.
Constructor and Description |
---|
AwsEc2NetworkAclEntry() |
Modifier and Type | Method and Description |
---|---|
AwsEc2NetworkAclEntry |
clone() |
boolean |
equals(Object obj) |
String |
getCidrBlock()
The IPV4 network range for which to deny or allow access.
|
Boolean |
getEgress()
Whether the rule is an egress rule.
|
IcmpTypeCode |
getIcmpTypeCode()
The Internet Control Message Protocol (ICMP) type and code for which to deny or allow access.
|
String |
getIpv6CidrBlock()
The IPV6 network range for which to deny or allow access.
|
PortRangeFromTo |
getPortRange()
For TCP or UDP protocols, the range of ports that the rule applies to.
|
String |
getProtocol()
The protocol that the rule applies to.
|
String |
getRuleAction()
Whether the rule is used to allow access or deny access.
|
Integer |
getRuleNumber()
The rule number.
|
int |
hashCode() |
Boolean |
isEgress()
Whether the rule is an egress rule.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setCidrBlock(String cidrBlock)
The IPV4 network range for which to deny or allow access.
|
void |
setEgress(Boolean egress)
Whether the rule is an egress rule.
|
void |
setIcmpTypeCode(IcmpTypeCode icmpTypeCode)
The Internet Control Message Protocol (ICMP) type and code for which to deny or allow access.
|
void |
setIpv6CidrBlock(String ipv6CidrBlock)
The IPV6 network range for which to deny or allow access.
|
void |
setPortRange(PortRangeFromTo portRange)
For TCP or UDP protocols, the range of ports that the rule applies to.
|
void |
setProtocol(String protocol)
The protocol that the rule applies to.
|
void |
setRuleAction(String ruleAction)
Whether the rule is used to allow access or deny access.
|
void |
setRuleNumber(Integer ruleNumber)
The rule number.
|
String |
toString()
Returns a string representation of this object.
|
AwsEc2NetworkAclEntry |
withCidrBlock(String cidrBlock)
The IPV4 network range for which to deny or allow access.
|
AwsEc2NetworkAclEntry |
withEgress(Boolean egress)
Whether the rule is an egress rule.
|
AwsEc2NetworkAclEntry |
withIcmpTypeCode(IcmpTypeCode icmpTypeCode)
The Internet Control Message Protocol (ICMP) type and code for which to deny or allow access.
|
AwsEc2NetworkAclEntry |
withIpv6CidrBlock(String ipv6CidrBlock)
The IPV6 network range for which to deny or allow access.
|
AwsEc2NetworkAclEntry |
withPortRange(PortRangeFromTo portRange)
For TCP or UDP protocols, the range of ports that the rule applies to.
|
AwsEc2NetworkAclEntry |
withProtocol(String protocol)
The protocol that the rule applies to.
|
AwsEc2NetworkAclEntry |
withRuleAction(String ruleAction)
Whether the rule is used to allow access or deny access.
|
AwsEc2NetworkAclEntry |
withRuleNumber(Integer ruleNumber)
The rule number.
|
public void setCidrBlock(String cidrBlock)
The IPV4 network range for which to deny or allow access.
cidrBlock
- The IPV4 network range for which to deny or allow access.public String getCidrBlock()
The IPV4 network range for which to deny or allow access.
public AwsEc2NetworkAclEntry withCidrBlock(String cidrBlock)
The IPV4 network range for which to deny or allow access.
cidrBlock
- The IPV4 network range for which to deny or allow access.public void setEgress(Boolean egress)
Whether the rule is an egress rule. An egress rule is a rule that applies to traffic that leaves the subnet.
egress
- Whether the rule is an egress rule. An egress rule is a rule that applies to traffic that leaves the
subnet.public Boolean getEgress()
Whether the rule is an egress rule. An egress rule is a rule that applies to traffic that leaves the subnet.
public AwsEc2NetworkAclEntry withEgress(Boolean egress)
Whether the rule is an egress rule. An egress rule is a rule that applies to traffic that leaves the subnet.
egress
- Whether the rule is an egress rule. An egress rule is a rule that applies to traffic that leaves the
subnet.public Boolean isEgress()
Whether the rule is an egress rule. An egress rule is a rule that applies to traffic that leaves the subnet.
public void setIcmpTypeCode(IcmpTypeCode icmpTypeCode)
The Internet Control Message Protocol (ICMP) type and code for which to deny or allow access.
icmpTypeCode
- The Internet Control Message Protocol (ICMP) type and code for which to deny or allow access.public IcmpTypeCode getIcmpTypeCode()
The Internet Control Message Protocol (ICMP) type and code for which to deny or allow access.
public AwsEc2NetworkAclEntry withIcmpTypeCode(IcmpTypeCode icmpTypeCode)
The Internet Control Message Protocol (ICMP) type and code for which to deny or allow access.
icmpTypeCode
- The Internet Control Message Protocol (ICMP) type and code for which to deny or allow access.public void setIpv6CidrBlock(String ipv6CidrBlock)
The IPV6 network range for which to deny or allow access.
ipv6CidrBlock
- The IPV6 network range for which to deny or allow access.public String getIpv6CidrBlock()
The IPV6 network range for which to deny or allow access.
public AwsEc2NetworkAclEntry withIpv6CidrBlock(String ipv6CidrBlock)
The IPV6 network range for which to deny or allow access.
ipv6CidrBlock
- The IPV6 network range for which to deny or allow access.public void setPortRange(PortRangeFromTo portRange)
For TCP or UDP protocols, the range of ports that the rule applies to.
portRange
- For TCP or UDP protocols, the range of ports that the rule applies to.public PortRangeFromTo getPortRange()
For TCP or UDP protocols, the range of ports that the rule applies to.
public AwsEc2NetworkAclEntry withPortRange(PortRangeFromTo portRange)
For TCP or UDP protocols, the range of ports that the rule applies to.
portRange
- For TCP or UDP protocols, the range of ports that the rule applies to.public void setProtocol(String protocol)
The protocol that the rule applies to. To deny or allow access to all protocols, use the value -1.
protocol
- The protocol that the rule applies to. To deny or allow access to all protocols, use the value -1.public String getProtocol()
The protocol that the rule applies to. To deny or allow access to all protocols, use the value -1.
public AwsEc2NetworkAclEntry withProtocol(String protocol)
The protocol that the rule applies to. To deny or allow access to all protocols, use the value -1.
protocol
- The protocol that the rule applies to. To deny or allow access to all protocols, use the value -1.public void setRuleAction(String ruleAction)
Whether the rule is used to allow access or deny access.
ruleAction
- Whether the rule is used to allow access or deny access.public String getRuleAction()
Whether the rule is used to allow access or deny access.
public AwsEc2NetworkAclEntry withRuleAction(String ruleAction)
Whether the rule is used to allow access or deny access.
ruleAction
- Whether the rule is used to allow access or deny access.public void setRuleNumber(Integer ruleNumber)
The rule number. The rules are processed in order by their number.
ruleNumber
- The rule number. The rules are processed in order by their number.public Integer getRuleNumber()
The rule number. The rules are processed in order by their number.
public AwsEc2NetworkAclEntry withRuleNumber(Integer ruleNumber)
The rule number. The rules are processed in order by their number.
ruleNumber
- The rule number. The rules are processed in order by their number.public String toString()
toString
in class Object
Object.toString()
public AwsEc2NetworkAclEntry clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.