Associates a network ACL with a VSwitch.

Make the API call

You can use OpenAPI Explorer to make API calls, search for API calls, perform debugging, and generate SDK example code.

Request parameters

Parameter Type Required? Example value Description
Action String  Yes AssociateNetworkAcl

The name of this action. Valid value: AssociateNetworkAcl.

NetworkAclId String  Yes nacl-a2do9e413e0spxscd****

The ID of the network ACL.

RegionId String  Yes cn-hangzhou

The region of the network ACL. To query the region ID, call DescribeRegions.

ClientToken String  No 123e4567-e89b-12d3-a456-426655440000

Ensures the idempotence of the request. The value of this parameter is generated by the client and is unique among different requests. The ClientToken parameter must be no more than 64 ASCII characters in length.

Resource.N.ResourceId String  No vsw-bp1de348lntdwbgnh****

The ID of the associated resource.

Resource.N.ResourceType String  No VSwitch

The type of the associated resource. Valid value: VSwitch.

Response parameters

Parameter Type Example value Description
RequestId String  4CF20CC7-D1FC-425B-A15B-DF7C8E2131A7

The ID of the request.

Examples

Request example


http(s)://[Endpoint]/? Action=AssociateNetworkAcl
&NetworkAclId=nacl-a2do9e413e0spxscd****
&RegionId=cn-hangzhou
&<Common request parameters>

Response example

XML format

<AssociateNetworkAclResponse>
     <RequestId>4CF20CC7-D1FC-425B-A15B-DF7C8E2131A7</RequestId>
</AssociateNetworkAclResponse>

JSON format

{
	"RequestId":"4CF20CC7-D1FC-425B-A15B-DF7C8E2131A7"
}

Errors

HTTP status code Error code Error message Description
500 InternalError The request processing has failed due to some unknown error. The request failed to be processed due to unknown errors.

For a list of error codes, visit the API Error Center.