| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Replaces an entry (i.e., rule) in a network ACL. For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide.
NetworkAclIdThe ID of the ACL.
Type: String
Default: None
Required: Yes
RuleNumberThe rule number of the entry to replace.
Type: Integer
Default: None
Required: Yes
ProtocolThe IP protocol the rule applies to. You can use -1 to mean all protocols.
Type: Integer
Valid values: -1 or a protocol number (see Protocol Numbers).
Required: Yes
RuleActionIndicates whether to allow or deny traffic that matches the rule.
Type: String
Default: None
Valid values: allow | deny
Required: Yes
EgressIndicates whether this rule applies to egress traffic from the subnet
(true) or ingress traffic to the subnet
(false).
Type: Boolean
Default: false
Valid values: true | false
Required: No
CidrBlockThe CIDR range to allow or deny, in CIDR notation (for example, 172.16.0.0/24).
Type: String
Default: None
Required: Yes
Icmp.CodeFor the ICMP protocol, the ICMP code. You can use -1 to specify all ICMP codes for the given ICMP type.
Type: Integer
Default: None
Required: Conditional
Condition: Required if specifying 1 (ICMP) for the
protocol.
Icmp.TypeFor the ICMP protocol, the ICMP type. You can use -1 to specify all ICMP types.
Type: Integer
Default: None
Required: Conditional
Condition: Required if specifying 1 (ICMP) for the
protocol.
PortRange.FromThe first port in the range.
Type: Integer
Default: None
Required: Conditional
Condition: Required if specifying 6 (TCP) or
17 (UDP) for the protocol.
PortRange.ToThe last port in the range.
Type: Integer
Default: None
Required: Conditional
Condition: Required if specifying 6 (TCP) or
17 (UDP) for the protocol.
The following elements are returned in a
ReplaceNetworkAclEntryResponse element.
requestIdThe ID of the request.
Type: xsd:string
returnReturns true if the request succeeds. Otherwise, returns an error.
Type: xsd:boolean
This example replaces the egress entry numbered 110 in the network ACL with ID acl-2cb85d45. The new rule denies egress traffic destined for anywhere (0.0.0.0/0) on TCP port 139.
https://ec2.amazonaws.com/?Action=ReplaceNetworkAclEntry &NetworkAclId=acl-2cb85d45 &RuleNumber=110 &Protocol=tcp &RuleAction=deny &Egress=true &CidrBlock=0.0.0.0/0 &PortRange.From=139 &PortRange.To=139 &AUTHPARAMS
<ReplaceNetworkAclEntryResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <return>true</return> </ReplaceNetworkAclEntryResponse>