Disassociates a network access control list (ACL) from a vSwitch.

Usage notes

  • UnassociateNetworkAcl is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the DescribeNetworkAclAttributes operation to query the status of a network ACL:
    • If the network ACL is in the UNBINDING state, the network ACL is being disassociated from the vSwitch.
    • If the network ACL is in the UNBINDED state, the network ACL is disassociated from the vSwitch.
  • You cannot repeatedly call the UnassociateNetworkAcl operation to disassociate a network ACL from a vSwitch within the specified period of time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Resource.N.ResourceType String Yes VSwitch

The type of the resource from which you want to disassociate the network ACL. Set the value to VSwitch.

Valid values of N: 0 to 29. You can disassociate a network ACL from at most 30 resources at a time.

Resource.N.ResourceId String Yes vsw-bp1de348lntdw****

The ID of the resource from which you want to disassociate the network ACL.

NetworkAclId String Yes nacl-a2do9e413e0sp****

The ID of the network ACL that you want to disassociate from a resource.

RegionId String Yes cn-hangzhou

The region ID of the network ACL.

You can call the DescribeRegions operation to query the most recent region list.

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

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Note If you do not set this parameter, the system uses the value of RequestId as ClientToken. RequestId may be different for each API request.
Action String Yes UnassociateNetworkAcl

The operation that you want to perform. Set the value to UnassociateNetworkAcl.

Response parameters

Parameter Type Example Description
RequestId String AD024BAA-2D91-48FD-810B-8FB7489B6EE6

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Resource=[{"ResourceType":"VSwitch","ResourceId":"vsw-bp1de348lntdw****"}]
&NetworkAclId=nacl-a2do9e413e0sp****
&RegionId=cn-hangzhou
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&Action=UnassociateNetworkAcl
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UnassociateNetworkAclResponse>
    <RequestId>AD024BAA-2D91-48FD-810B-8FB7489B6EE6</RequestId>
</UnassociateNetworkAclResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "AD024BAA-2D91-48FD-810B-8FB7489B6EE6"
}

Error codes

HttpCode Error code Error message Description
400 InvalidNetworkAcl.NotFound The special Network Acl is not found. The error message returned because the network ACL is not found.
400 Mismatch.NetworkAclAndVSwitch The specified network ACL and vSwitch are not matched. The error message returned because the specified network ACL is not associated with a vSwitch.
500 InternalError The request processing has failed due to some unknown error. The error message returned because some unknown errors occurred.

For a list of error codes, see Service error codes.