Amazon Elastic Compute Cloud
API Reference (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

ReplaceNetworkAclAssociation

Description

Changes which network ACL a subnet is associated with. By default when you create a subnet, it's automatically associated with the default network ACL. For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

Request Parameters

AssociationId

The ID representing the current association between the original network ACL and the subnet.

Type: String

Default: None

Required: Yes

NetworkAclId

The ID of the new ACL to associate with the subnet.

Type: String

Default: None

Required: Yes

Response Elements

The following elements are returned in a ReplaceNetworkAclAssociationResponse element.

requestId

The ID of the request.

Type: xsd:string

newAssociationId

The ID of the new association.

Type: xsd:string

Examples

Example Request

This example starts with a network ACL associated with a subnet, and a corresponding association ID aclassoc-e5b95c8c. You want to associate a different network ACL (acl-5fb85d36) with the subnet. The result is a new association ID representing the new association.

https://ec2.amazonaws.com/?Action=ReplaceNetworkAclAssociation
&AssociationId=aclassoc-e5b95c8c
&NetworkAclId=acl-5fb85d36
&AUTHPARAMS

Example Response

<ReplaceNetworkAclAssociationResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
   <newAssociationId>aclassoc-17b85d7e</newAssociationId>
</ReplaceNetworkAclAssociationResponse>