Removes one or more tags from resources.

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
Action String Yes UnTagResources

The operation that you want to perform.

Set the value to UnTagResources.

ResourceType String Yes loadbalancer

The type of the resource. Valid values:

  • acl: a network access control list (ACL)
  • loadbalancer: an Application Load Balancer (ALB) instance
  • securitypolicy: a security policy
  • servergroup: a server group
ResourceId Array of String Yes d-2ze1ot4ah7xjyv0d****

The ID of the resource from which you want to remove tags.

Tag Array No

The tags that you want to remove.

Key String No env

The key of the tag that you want to remove. It can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

Value String No product

The value of the tag that you want to remove. It can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

TagKey Array of String No env

The tag keys. It can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

All Boolean No false

Specifies whether to remove all tags from the specified resource. Valid values:

  • true: removes all tags from the resource.
  • false: does not remove all tags from the specified resource. This is the default value.

Response parameters

Parameter Type Example Description
RequestId String 593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UnTagResources
&ResourceType=loadbalancer
&ResourceId=["d-2ze1ot4ah7xjyv0d****"]
&Tag=[{"Key":"env","Value":"product"}]
&TagKey=["env"]
&All=false
&Common request parameters

Sample success responses

XML format

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

<UnTagResourcesResponse>
    <RequestId>593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3</RequestId>
</UnTagResourcesResponse>

JSON format

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

{
  "RequestId" : "593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3"
}

Error codes

HttpCode Error code Error message Description
404 ResourceNotFound.Acl The specified resource %s is not found. The error message returned because the specified resource %s does not exist.
404 ResourceNotFound.LoadBalancer The specified resource %s is not found. The error message returned because the specified resource %s does not exist.
404 ResourceNotFound.SecurityPolicy The specified resource %s is not found. The error message returned because the specified resource %s does not exist.
404 ResourceNotFound.ServerGroup The specified resource %s is not found. The error message returned because the specified resource %s does not exist.

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