Removes tags from a specified resource.

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.

ResourceId.N RepeatList Yes 03e08484f0

The ID of the resource. Valid values of N: 1 to 50.

ResourceType String Yes filesystem

The type of the resource. For example, set the value to filesystem.

TagKey.N RepeatList No nastest

The key of the tag. Valid values of N: 1 to 20.

All Boolean No false

Specifies whether to remove all tags. This parameter takes effect only when the TagKey.N parameter is not specified. Valid values:

  • true: removes all tags from their resources. No operations are performed on the resources which do not have tags. Then a success response is returned.
  • false: performs no operations. A success response is returned.

Response parameters

Parameter Type Example Description
RequestId String 2D69A58F-345C-4FDE-88E4-BF5189484043

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=UntagResources
&ResourceId.1=03e08484f0
&ResourceType=ALIYUN::NAS::FILESYSTEM
&<Common request parameters>

Sample success responses

XML format

<UntagResourcesResponse>
      <RequestId>2D69A58F-345C-4FDE-88E4-BF5189484043</RequestId>
</UntagResourcesResponse>

JSON format

{
        "RequestId": "2D69A58F-345C-4FDE-88E4-BF5189484043"
}

Error codes

HttpCode Error code Error message Description
400 NumberExceed.ResourceIds The maximum number of ResourceIds is exceeded. The maximum is 50. The error message returned because the number of resource IDs has exceeded the upper limit. You can enter a maximum of 50 resource IDs.
400 Duplicate.ResourceId The request contains duplicated ResourceId. The error message returned because the resource ID already exists.
400 MissingParameter.ResourceIds You must specify ResourceIds. The error message returned because the ResourceId parameter is not specified.
400 InvalidParameter.TagKey The specified Tag.n.Key is invalid. The error message returned because the value of the TagKey parameter is invalid.
400 InvalidParameter.TagValue The specified Tag.n.Value is invalid. The error message returned because the value of the TagValue parameter is invalid.
400 Duplicate.TagKey The Tag.N.Key contains a duplicated key. The error message returned because the value of the TagKey parameter already exists.

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