You need to enable JavaScript to run this app.
Server Migration Center

Server Migration Center

Copy page
Download PDF
Tags
TagResources - Creates tags
Copy page
Download PDF
TagResources - Creates tags
Call the TagResources operation to create and associate tags for the specified SMC migration source and migration task.​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the request parameters specific to this operation and some common parameters are listed below. For more information, refer to Common parameters.​
Action string required Sample value: TagResources​
The action that you want to perform. Value: TagResources.​
​
Version string required Sample value: 2020-04-01​
The API version. Value: 2020-04-01.​
​
ClientToken string Optional Sample value: 333456899ff****​
The ClientToken is used to ensure the request idempotency. The client automatically generates a token to ensure that the token is unique among different requests. This prevents repeated actions due to multiple client retries when the call of the API action times out or an internal server error occurs.​
Value: Only ASCII characters are supported. The length is no more than 64 ASCII characters.​
​
ResourceIds.N string[] required Sample value: ResourceIds.1=job-3tiegs1y963vj0****&ResourceIds.2=job-4segs15yts2ls****​
Resource ID.​
  • Argument - N: indicates the serial number of the resource. Valid range: 1-50.​
  • Separate multiple resources with ampersands (&).​
​
ResourceType string required Sample value: migrationjob​
The resource type. Valid values:​
  • migrationsource: Migration source.​
  • migrationjob: Migration task.​
​
Tags.N.Key string[] required Sample value: Tags.1.Key=k1&Tags.2.Key=k2​
The tag key of the tag associated with the resource.​
  • Parameter - N: Indicates the serial number of the tag key. Value range: 1–20.​
  • Separate multiple tag keys with &.​
  • Naming rules:​
  • It cannot start with any case of volc: or sys:.​
Tag keys starting with volc: or sys: are reserved by the system and cannot be created.​
  • It can contain only language characters, digits, spaces, and English symbols of " _", ".", ":", "/", "=", "+", "-", and "@".​
  • It must be 1 to 128 characters in length.​
​
Tags.N.Value string[] Optional Sample value: Tags.1.Value=v1&Tags.2.Value=v2​
The tag value of the tag associated with the resource.​
  • Argument - N: specifies the serial number of the tag value. Valid range: 1–20.​
  • Separate multiple key values with ampersands (&).​
  • Naming rules:​
  • Only language characters, digits, spaces, and English symbols of " _", ".", ":", "/", "=", "+", "-", and "@" are allowed.​
  • It can be empty. Length limit: 0-256 characters.​
​
​
​
Response parameters​
Only the response parameters specific to this operation are listed below. For more information, refer to the response structure.​
OperationDetails object[] Sample value: --​
The operation details.​
Error object Sample value: --​
The error message for the resource being operated on.​
Code string Sample value: InvalidResourceId.NotFound​
The error code for the failure of a specific request during batch operations. Value:​
  • InvalidResourceIds.NotFound: The specified resource does not exist.​
  • InvalidActionOrVersion: The requested operation does not exist.​
  • MissingParameter.ResourceIds: The resource ID cannot be empty.​
tip​
Each Code corresponds to a Message in sequence.​
​
Message string Sample value: The specified ResourceId does not exist.​
The error information for the failure of a specific request during batch operations. Value:​
  • The specified resourceids do not exist.: The specified resources do not exist.​
  • Could not find operation %s for version %s.: The requested operation does not exist.​
  • The required parameter resourceids is not supplied.: The parameter resourceids cannot be empty.​
​
​
ResourceId string Sample value: job-3tiegs1y963vj0****​
The ID of the target resource.​
​
​
​
​
Sample request​
​
GET /?Action=TagResources&Version=2020-04-01&ResourceType=migrationjob&ResourceIds.1=job-3tiegs1y963vj0****&ResourceIds.2=job-4segs15yts2ls****&Tags.1.Key=key1&Tags.2.Key=k2&Tags.1.Value=v1&Tags.2.Value=2 HTTP/1.1​
Host: smc.volcengineapi.com​
Region: cn-beijing​
Service: smc​
​
Sample response​
​
{​
"ResponseMetadata":{​
"RequestId":"202306021637410F150D*****",​
"Action":"TagResources",​
"Version":"2020-04-01",​
"Service":"smc",​
"Region":"cn-beijing"​
},​
"Result":{​
"OperationDetails":[​
{​
"Error":null,​
"ResourceId":"job-3tiegs1y963vj0****"​
},​
{​
"Error":{​
"Code":"InvalidResourceId.NotFound",​
"Message":"The specified ResourceId does not exist."​
},​
"ResourceId":"job-4segs15yts2ls****"​
}​
]​
}​
}​
​
Error codes​
The table below lists the business-related error codes of the operation. For more information, refer to Common error codes.​
​
Status code​
Error code​
Error message​
Description​
400​
InvalidResourceIds.NotFound​
The specified resourceids do not exist.​
The specified resource does not exist.​
400​
InvalidTagValue.Malformed​
The specified TagValue is malformed.​
The specified tag value is invalid.​
400​
LimitExceeded.MaximumResourceIds​
You've reached the limit on the number of ResourceIds that you can set.​
The number of specified resource IDs exceeds the upper limit.​
400​
LimitExceeded.MaximumTags​
You've reached the limit on the number of tags that you can create.​
The specified tag number exceeds the maximum limit.​
400​
MissingParameter.Tags​
The required parameter tags is not supplied.​
The tag parameter can not be empty.​
400​
InvalidTagKey.Malformed​
The specified TagKey is malformed.​
The specified TagKey value is invalid.​
404​
InvalidActionOrVersion​
Could not find operation %s for version %s.​
The requested API does not exist.​
409​
InvalidTagKey.Conflict​
The specified TagKey already exists.​
The specified tag key already exists.​
​
Last updated: 2026.01.26 17:53:16