Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.ec2.model
Class CreateNetworkAclEntryRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.CreateNetworkAclEntryRequest

public class CreateNetworkAclEntryRequest
extends AmazonWebServiceRequest

Container for the parameters to the CreateNetworkAclEntry operation.

Creates an entry (i.e., rule) in a network ACL with a rule number you specify. 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, Amazon VPC processes the entries in the ACL according to the rule numbers, in ascending order.

Important: We recommend that you leave room between the rules (e.g., 100, 110, 120, etc.), and not number them sequentially (101, 102, 103, etc.). This allows you to easily add a new 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 a new entry and delete the old one.

For more information about network ACLs, go to Network ACLs in the Amazon Virtual Private Cloud User Guide.

See Also:
AmazonEC2.createNetworkAclEntry(CreateNetworkAclEntryRequest)

Constructor Summary
CreateNetworkAclEntryRequest()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getCidrBlock()
          The CIDR range to allow or deny, in CIDR notation (e.g., 172.16.0.0/24).
 java.lang.Boolean getEgress()
          Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).
 IcmpTypeCode getIcmpTypeCode()
          ICMP values.
 java.lang.String getNetworkAclId()
          ID of the ACL where the entry will be created.
 PortRange getPortRange()
          Port ranges.
 java.lang.String getProtocol()
          IP protocol the rule applies to.
 java.lang.String getRuleAction()
          Whether to allow or deny traffic that matches the rule.
 java.lang.Integer getRuleNumber()
          Rule number to assign to the entry (e.g., 100).
 int hashCode()
           
 java.lang.Boolean isEgress()
          Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).
 void setCidrBlock(java.lang.String cidrBlock)
          The CIDR range to allow or deny, in CIDR notation (e.g., 172.16.0.0/24).
 void setEgress(java.lang.Boolean egress)
          Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).
 void setIcmpTypeCode(IcmpTypeCode icmpTypeCode)
          ICMP values.
 void setNetworkAclId(java.lang.String networkAclId)
          ID of the ACL where the entry will be created.
 void setPortRange(PortRange portRange)
          Port ranges.
 void setProtocol(java.lang.String protocol)
          IP protocol the rule applies to.
 void setRuleAction(RuleAction ruleAction)
          Whether to allow or deny traffic that matches the rule.
 void setRuleAction(java.lang.String ruleAction)
          Whether to allow or deny traffic that matches the rule.
 void setRuleNumber(java.lang.Integer ruleNumber)
          Rule number to assign to the entry (e.g., 100).
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateNetworkAclEntryRequest withCidrBlock(java.lang.String cidrBlock)
          The CIDR range to allow or deny, in CIDR notation (e.g., 172.16.0.0/24).
 CreateNetworkAclEntryRequest withEgress(java.lang.Boolean egress)
          Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).
 CreateNetworkAclEntryRequest withIcmpTypeCode(IcmpTypeCode icmpTypeCode)
          ICMP values.
 CreateNetworkAclEntryRequest withNetworkAclId(java.lang.String networkAclId)
          ID of the ACL where the entry will be created.
 CreateNetworkAclEntryRequest withPortRange(PortRange portRange)
          Port ranges.
 CreateNetworkAclEntryRequest withProtocol(java.lang.String protocol)
          IP protocol the rule applies to.
 CreateNetworkAclEntryRequest withRuleAction(RuleAction ruleAction)
          Whether to allow or deny traffic that matches the rule.
 CreateNetworkAclEntryRequest withRuleAction(java.lang.String ruleAction)
          Whether to allow or deny traffic that matches the rule.
 CreateNetworkAclEntryRequest withRuleNumber(java.lang.Integer ruleNumber)
          Rule number to assign to the entry (e.g., 100).
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateNetworkAclEntryRequest

public CreateNetworkAclEntryRequest()
Method Detail

getNetworkAclId

public java.lang.String getNetworkAclId()
ID of the ACL where the entry will be created.

Returns:
ID of the ACL where the entry will be created.

setNetworkAclId

public void setNetworkAclId(java.lang.String networkAclId)
ID of the ACL where the entry will be created.

Parameters:
networkAclId - ID of the ACL where the entry will be created.

withNetworkAclId

public CreateNetworkAclEntryRequest withNetworkAclId(java.lang.String networkAclId)
ID of the ACL where the entry will be created.

Returns a reference to this object so that method calls can be chained together.

Parameters:
networkAclId - ID of the ACL where the entry will be created.
Returns:
A reference to this updated object so that method calls can be chained together.

getRuleNumber

public java.lang.Integer getRuleNumber()
Rule number to assign to the entry (e.g., 100). ACL entries are processed in ascending order by rule number.

Returns:
Rule number to assign to the entry (e.g., 100). ACL entries are processed in ascending order by rule number.

setRuleNumber

public void setRuleNumber(java.lang.Integer ruleNumber)
Rule number to assign to the entry (e.g., 100). ACL entries are processed in ascending order by rule number.

Parameters:
ruleNumber - Rule number to assign to the entry (e.g., 100). ACL entries are processed in ascending order by rule number.

withRuleNumber

public CreateNetworkAclEntryRequest withRuleNumber(java.lang.Integer ruleNumber)
Rule number to assign to the entry (e.g., 100). ACL entries are processed in ascending order by rule number.

Returns a reference to this object so that method calls can be chained together.

Parameters:
ruleNumber - Rule number to assign to the entry (e.g., 100). ACL entries are processed in ascending order by rule number.
Returns:
A reference to this updated object so that method calls can be chained together.

getProtocol

public java.lang.String getProtocol()
IP protocol the rule applies to. Valid Values: tcp, udp, icmp or an IP protocol number.

Returns:
IP protocol the rule applies to. Valid Values: tcp, udp, icmp or an IP protocol number.

setProtocol

public void setProtocol(java.lang.String protocol)
IP protocol the rule applies to. Valid Values: tcp, udp, icmp or an IP protocol number.

Parameters:
protocol - IP protocol the rule applies to. Valid Values: tcp, udp, icmp or an IP protocol number.

withProtocol

public CreateNetworkAclEntryRequest withProtocol(java.lang.String protocol)
IP protocol the rule applies to. Valid Values: tcp, udp, icmp or an IP protocol number.

Returns a reference to this object so that method calls can be chained together.

Parameters:
protocol - IP protocol the rule applies to. Valid Values: tcp, udp, icmp or an IP protocol number.
Returns:
A reference to this updated object so that method calls can be chained together.

getRuleAction

public java.lang.String getRuleAction()
Whether to allow or deny traffic that matches the rule.

Constraints:
Allowed Values: allow, deny

Returns:
Whether to allow or deny traffic that matches the rule.
See Also:
RuleAction

setRuleAction

public void setRuleAction(java.lang.String ruleAction)
Whether to allow or deny traffic that matches the rule.

Constraints:
Allowed Values: allow, deny

Parameters:
ruleAction - Whether to allow or deny traffic that matches the rule.
See Also:
RuleAction

withRuleAction

public CreateNetworkAclEntryRequest withRuleAction(java.lang.String ruleAction)
Whether to allow or deny traffic that matches the rule.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: allow, deny

Parameters:
ruleAction - Whether to allow or deny traffic that matches the rule.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
RuleAction

setRuleAction

public void setRuleAction(RuleAction ruleAction)
Whether to allow or deny traffic that matches the rule.

Constraints:
Allowed Values: allow, deny

Parameters:
ruleAction - Whether to allow or deny traffic that matches the rule.
See Also:
RuleAction

withRuleAction

public CreateNetworkAclEntryRequest withRuleAction(RuleAction ruleAction)
Whether to allow or deny traffic that matches the rule.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: allow, deny

Parameters:
ruleAction - Whether to allow or deny traffic that matches the rule.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
RuleAction

isEgress

public java.lang.Boolean isEgress()
Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).

Returns:
Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).

setEgress

public void setEgress(java.lang.Boolean egress)
Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).

Parameters:
egress - Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).

withEgress

public CreateNetworkAclEntryRequest withEgress(java.lang.Boolean egress)
Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).

Returns a reference to this object so that method calls can be chained together.

Parameters:
egress - Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).
Returns:
A reference to this updated object so that method calls can be chained together.

getEgress

public java.lang.Boolean getEgress()
Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).

Returns:
Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false).

getCidrBlock

public java.lang.String getCidrBlock()
The CIDR range to allow or deny, in CIDR notation (e.g., 172.16.0.0/24).

Returns:
The CIDR range to allow or deny, in CIDR notation (e.g., 172.16.0.0/24).

setCidrBlock

public void setCidrBlock(java.lang.String cidrBlock)
The CIDR range to allow or deny, in CIDR notation (e.g., 172.16.0.0/24).

Parameters:
cidrBlock - The CIDR range to allow or deny, in CIDR notation (e.g., 172.16.0.0/24).

withCidrBlock

public CreateNetworkAclEntryRequest withCidrBlock(java.lang.String cidrBlock)
The CIDR range to allow or deny, in CIDR notation (e.g., 172.16.0.0/24).

Returns a reference to this object so that method calls can be chained together.

Parameters:
cidrBlock - The CIDR range to allow or deny, in CIDR notation (e.g., 172.16.0.0/24).
Returns:
A reference to this updated object so that method calls can be chained together.

getIcmpTypeCode

public IcmpTypeCode getIcmpTypeCode()
ICMP values.

Returns:
ICMP values.

setIcmpTypeCode

public void setIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP values.

Parameters:
icmpTypeCode - ICMP values.

withIcmpTypeCode

public CreateNetworkAclEntryRequest withIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
icmpTypeCode - ICMP values.
Returns:
A reference to this updated object so that method calls can be chained together.

getPortRange

public PortRange getPortRange()
Port ranges.

Returns:
Port ranges.

setPortRange

public void setPortRange(PortRange portRange)
Port ranges.

Parameters:
portRange - Port ranges.

withPortRange

public CreateNetworkAclEntryRequest withPortRange(PortRange portRange)
Port ranges.

Returns a reference to this object so that method calls can be chained together.

Parameters:
portRange - Port ranges.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.