Removes tags from the specified Resource Orchestration Service (ROS) resources.
This topic provides an example on how to remove all tags from a stack that is deployed
in the China (Hangzhou) region. In this example, the ID of the stack is 46ec7b78-9d5e-4b21-aefd-448c90aa****
.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UntagResources |
The operation that you want to perform. Set the value to UntagResources. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the tag. You can call the DescribeRegions operation to query the most recent region list. |
ResourceType | String | Yes | stack |
The type of the resource. Valid values:
|
All | Boolean | No | true |
Specifies whether to remove all tags from the resources. This parameter takes effect when the TagKey.N parameter is not specified in the request. Default value: false. Valid values:
|
ResourceId.N | String | Yes | 46ec7b78-9d5e-4b21-aefd-448c90aa**** |
The ID of resource N. Note If you set the ResourceType parameter to stackgroup, you must use the name of the
stack group as the resource ID.
|
TagKey.N | String | No | FinanceDept |
The value of tag N. Valid values of N: 1 to 20. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | C46FF5A8-C5F0-4024-8262-B16B639225A0 |
The ID of the request. |
Examples
Sample requests
http(s)://ros.aliyuncs.com/?Action=UntagResources
&RegionId=cn-hangzhou
&ResourceType=stack
&All=true
&ResourceId=["46ec7b78-9d5e-4b21-aefd-448c90aa****"]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UntagResourcesResponse>
<RequestId>C46FF5A8-C5F0-4024-8262-B16B639225A0</RequestId>
</UntagResourcesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "C46FF5A8-C5F0-4024-8262-B16B639225A0"
}
Error codes
For a list of error codes, see Service error codes.
HTTP status code |
Error code |
Error message |
Description |
---|---|---|---|
400 |
InvalidParameter |
The specified parameter ResourceType is invalid, {reason}. |
The error message returned because the specified ResourceType parameter is invalid. reason indicates the cause of the error. |
400 |
InvalidParameter |
The specified parameter ResourceIds is invalid, {reason}. |
The error message returned because the specified resource IDs do not exist or failed to be validated. reason indicates the cause of the error. |
400 |
InvalidParameter |
The specified parameter Tags is invalid, {reason}. |
The error message returned because the specified Tags parameter is invalid. reason indicates the cause of the error. |
400 |
Duplicate.TagKey |
The Tag.N.Key contain duplicate key. |
The error message returned because the specified tag key already exists. Specify a unique tag key. |