Removes tags that are attached to Server Migration Center (SMC) resources. The SMC resources consist of migration sources and migration tasks.
Description
You can call this operation to remove tags that are attached to one or more SMC resources and deletes the tags if the tags are no longer in use.
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 | sourceserver | The type of the SMC resource. Valid values:
|
All | Boolean | No | false | Specifies whether to remove all tags that are attached to the specified SMC resource. This parameter is valid only if you do not set the
Default value: false. |
ResourceId.N | String | No | s-bp12tueadp5ndleg**** | The ID of the SMC resource. SMC resources consist of migration sources and migration tasks. Valid values of N: 1 to 50. |
TagKey.N | String | No | smc | The key of tag N. Tag keys are case-sensitive. Valid values of N: 1 to 20. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 2D69A58F-345C-4FDE-88E4-BF518948**** | The ID of the request. |
Examples
Sample requests
http(s)://smc.aliyuncs.com/?Action=UntagResources
&ResourceType=sourceserver
&All=false
&ResourceId=["s-bp12tueadp5ndleg****"]
&TagKey=["smc"]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UntagResourcesResponse>
<RequestId>2D69A58F-345C-4FDE-88E4-BF518948****</RequestId>
</UntagResourcesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "2D69A58F-345C-4FDE-88E4-BF518948****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | NumberExceed.Tags | The maximum number of the Tag parameters cannot exceed 20. | The error message returned because the number of specified tags exceeds the upper limit of 20. |
400 | MissingParameter.ResourceType | You must specify ResourceType. | The error message returned because the resource type is not specified. |
400 | InvalidResourceType.NotFound | The specified ResourceType does not exist. | The error message returned because the resource type does not exist. |
400 | NumberExceed.ResourceIds | The maximum number of ResourceId parameters cannot exceed 50. | The error message returned because the number of specified resource IDs exceeds the upper limit of 50. |
400 | Duplicate.ResourceId | The ResourceId contains duplicate values. | The error message returned because duplicate resource IDs are specified. |
400 | InvalidResourceId.NotFound | The specified ResourceIds do not exist. | The error message returned because the specified resource does not exist. |
For a list of error codes, see Service error codes.