com.amazonaws.services.ec2.model
Class CreateNetworkAclEntryRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.CreateNetworkAclEntryRequest
All Implemented Interfaces:
DryRunSupportedRequest<CreateNetworkAclEntryRequest>, java.io.Serializable

public class CreateNetworkAclEntryRequest
extends AmazonWebServiceRequest
implements java.io.Serializable, DryRunSupportedRequest<CreateNetworkAclEntryRequest>

Container for the parameters to the 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 .

See Also:
AmazonEC2.createNetworkAclEntry(CreateNetworkAclEntryRequest), Serialized Form

Constructor Summary
CreateNetworkAclEntryRequest()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getCidrBlock()
          The network range to allow or deny, in CIDR notation.
 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 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.
 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 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.
 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 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).
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
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()
The ID of the ACL.

Returns:
The ID of the ACL.

setNetworkAclId

public void setNetworkAclId(java.lang.String networkAclId)
The ID of the ACL.

Parameters:
networkAclId - The ID of the ACL.

withNetworkAclId

public CreateNetworkAclEntryRequest withNetworkAclId(java.lang.String networkAclId)
The ID of the ACL.

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

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

getRuleNumber

public java.lang.Integer getRuleNumber()
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

Returns:
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


setRuleNumber

public void setRuleNumber(java.lang.Integer 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

Parameters:
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


withRuleNumber

public CreateNetworkAclEntryRequest withRuleNumber(java.lang.Integer 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

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

Parameters:
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

Returns:
A reference to this updated object so that method calls can be chained together.

getProtocol

public java.lang.String getProtocol()
The protocol. A value of -1 means all protocols.

Returns:
The protocol. A value of -1 means all protocols.

setProtocol

public void setProtocol(java.lang.String protocol)
The protocol. A value of -1 means all protocols.

Parameters:
protocol - The protocol. A value of -1 means all protocols.

withProtocol

public CreateNetworkAclEntryRequest withProtocol(java.lang.String protocol)
The protocol. A value of -1 means all protocols.

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

Parameters:
protocol - The protocol. A value of -1 means all protocols.
Returns:
A reference to this updated object so that method calls can be chained together.

getRuleAction

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

Constraints:
Allowed Values: allow, deny

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

setRuleAction

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

Constraints:
Allowed Values: allow, deny

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

withRuleAction

public CreateNetworkAclEntryRequest withRuleAction(java.lang.String ruleAction)
Indicates whether to allow or deny the 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 - Indicates whether to allow or deny the 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)
Indicates whether to allow or deny the traffic that matches the rule.

Constraints:
Allowed Values: allow, deny

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

withRuleAction

public CreateNetworkAclEntryRequest withRuleAction(RuleAction ruleAction)
Indicates whether to allow or deny the 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 - Indicates whether to allow or deny the 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()
Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

Returns:
Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

setEgress

public void setEgress(java.lang.Boolean egress)
Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

Parameters:
egress - Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

withEgress

public CreateNetworkAclEntryRequest withEgress(java.lang.Boolean egress)
Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

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

Parameters:
egress - Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).
Returns:
A reference to this updated object so that method calls can be chained together.

getEgress

public java.lang.Boolean getEgress()
Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

Returns:
Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

getCidrBlock

public java.lang.String getCidrBlock()
The network range to allow or deny, in CIDR notation.

Returns:
The network range to allow or deny, in CIDR notation.

setCidrBlock

public void setCidrBlock(java.lang.String cidrBlock)
The network range to allow or deny, in CIDR notation.

Parameters:
cidrBlock - The network range to allow or deny, in CIDR notation.

withCidrBlock

public CreateNetworkAclEntryRequest withCidrBlock(java.lang.String cidrBlock)
The network range to allow or deny, in CIDR notation.

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

Parameters:
cidrBlock - The network range to allow or deny, in CIDR notation.
Returns:
A reference to this updated object so that method calls can be chained together.

getIcmpTypeCode

public IcmpTypeCode getIcmpTypeCode()
ICMP protocol: The ICMP type and code.

Returns:
ICMP protocol: The ICMP type and code.

setIcmpTypeCode

public void setIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP protocol: The ICMP type and code.

Parameters:
icmpTypeCode - ICMP protocol: The ICMP type and code.

withIcmpTypeCode

public CreateNetworkAclEntryRequest withIcmpTypeCode(IcmpTypeCode icmpTypeCode)
ICMP protocol: The ICMP type and code.

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

Parameters:
icmpTypeCode - ICMP protocol: The ICMP type and code.
Returns:
A reference to this updated object so that method calls can be chained together.

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.

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.

withPortRange

public CreateNetworkAclEntryRequest withPortRange(PortRange portRange)
TCP or UDP protocols: The range of ports the rule applies to.

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

Parameters:
portRange - TCP or UDP protocols: The range of ports the rule applies to.
Returns:
A reference to this updated object so that method calls can be chained together.

getDryRunRequest

public Request<CreateNetworkAclEntryRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.

Specified by:
getDryRunRequest in interface DryRunSupportedRequest<CreateNetworkAclEntryRequest>

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.