Detaches tags from the specified hosts.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | UntagResources |
The operation that you want to perform. Set the value to UntagResources. |
RegionId | String | Yes | ap-southeast-1 |
The region ID of the host. |
All | Boolean | No | false |
Specifies whether to detach all tags from the host. Valid values:
Note If you specify both this parameter and the TagKey.N parameter, this parameter does
not take effect.
|
ResourceType | String | Yes | DEDICATEDHOST |
The type of the resource. Set the value to DEDICATEDHOST. |
ResourceId.N | String | Yes | ch-t4n4dcdvu6840**** |
The ID of host N. You can specify multiple host IDs. N specifies the sequence number of the host. The following examples are provided: ResourceId.1 specifies the ID of the first host. ResourceId.2 specifies the ID of the second host. |
TagKey.N | String | No | demokey |
The key of tag N.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | B74AD197-214C-50F2-BF7D-B13632EE4D75 |
The ID of the request. |
Examples
Sample requests
http(s)://cddc.aliyuncs.com/?Action=UntagResources
&RegionId=ap-southeast-1
&ResourceId=["ch-t4n4dcdvu6840****"]
&TagKey=[]
&All=false
&ResourceType=DEDICATEDHOST
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UntagResourcesResponse>
<RequestId>B74AD197-214C-50F2-BF7D-B13632EE4D75</RequestId>
</UntagResourcesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "B74AD197-214C-50F2-BF7D-B13632EE4D75"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | NoPermission.SystemTag | The operator is not permission for the system tag | The error message returned because you cannot perform operations on system tags. |
400 | InvalidParameter.TagValue | The Tag.%s.Value parameter - %s is invalid | The error message returned because the specified tag value is a null value or exceeds 128 characters in length. |
400 | InvalidParameter.TagKey | The Tag.%s.Key parameter - %s is invalid | The error message returned because the specified tag key is a null value or exceeds 128 characters in length. |
400 | InvalidDedicatedHostId.NotFound | The parameter - ResourceIds.N is not found. | The error message returned because the resource that corresponds to the specified resource ID cannot be found. |
400 | MissingParameter.ResourceIds | The parameter - ResourceIds.N should not be null. | The error message returned because the resource IDs cannot be null values. |
For a list of error codes, visit the API Error Center.