All Products
Search
Document Center

WUYING Workspace:TagResources

Last Updated:Apr 08, 2024

Adds tags to cloud computers. This allows you to filter and manage cloud computers by tag.

Operation description

If TagKey is specified, the new TagValue value overrides the original TagValue value.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ResourceTypestringYes

The type of the resource.

Valid values:

  • ALIYUN::GWS::INSTANCE: cloud computer.
ALIYUN::GWS::INSTANCE
ResourceIdarrayYes

The resource IDs, which are cloud computer IDs. You can specify 1 to 50 IDs.

stringYes

The resource ID, which is the cloud computer ID.

ecd-ia2zw38bi6cm7****
Tagobject []Yes

The tags that you want to add to the cloud computers. You can specify 1 to 20 tags.

KeystringNo

The tag keys. The tag key cannot be an empty string. The tag key can be up to 128 characters in length. It cannot start with acs: or aliyun and cannot contain http:// or https://.

TestKey
ValuestringNo

The tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length. It cannot start with acs: and cannot contain http:// or https://.

TestValue

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****

Examples

Sample success responses

JSONformat

{
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-04-17The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.