All Products
Search
Document Center

ApsaraDB for MyBase:TagResources

Last Updated:Mar 01, 2024

Adds tags to hosts.

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 of the host.

ap-southeast-1
ResourceIdarrayYes

The ID of host N. You can specify multiple host IDs.

stringYes

The ID of host N. You can specify multiple host IDs. N specifies the serial number of the host. Examples:

  • ResourceId.1 specifies the ID of the first host.
  • ResourceId.2 specifies the ID of the second host.
ch-bp1yp3mqggn8****
Tagobject []Yes

The tags.

KeystringYes

The key of tag N.

  • N specifies the serial number of the tag. Examples:

    • Tag.1.Key specifies the key of the first tag.
    • Tag.2.Key specifies the key of the second tag.
  • If no tag key exists, a key is automatically created.

demokey
ValuestringYes

The value of tag N.

  • N specifies the serial number of the tag. Examples:

    • Tag.1.Value specifies the value of the first tag.
    • Tag.2.Value specifies the value of the second tag.
  • If no tag value exists, a value is automatically created.

demovalue
ResourceTypestringYes

The resource type. Set the value to DEDICATEDHOST.

DEDICATEDHOST

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

4B938011-874B-5F54-8B9E-7E2A08B3AA13

Examples

Sample success responses

JSONformat

{
  "RequestId": "4B938011-874B-5F54-8B9E-7E2A08B3AA13"
}

Error codes

HTTP status codeError codeError messageDescription
400OperationDenied.QuotaExceedThe Tags parameter number is exceed. Valid is 20.The Tags parameter number is exceed. Valid is 20.
400NoPermission.SystemTagThe operator is not permission for the system tagThe operator is not permission for the system tag
400InvalidParameter.TagValueThe Tag.%s.Value parameter - %s is invalidThe Tag.%s.Value parameter - %s is invalid
400InvalidParameter.TagKeyThe Tag.%s.Key parameter - %s is invalidThe Tag.%s.Key parameter - %s is invalid
400NumberExceed.ResourceIdsThe ResourceIds parameter's number is exceed , Valid : 50-
400InvalidTagValue.MalformedThe specified parameter "Tag.n.Value" is not valid.-
400InvalidDedicatedHostId.NotFoundThe parameter - ResourceIds.N is not found.The parameter - ResourceIds.N is not found.
400InvalidParameter.ResourceTypeThe specified parameter "ResourceType" is not valid.-
400NumberExceed.TagsThe Tags parameter's number is exceed, Valid : 20.-
400MissingParameter.ResourceIdsThe parameter - ResourceIds.N should not be null.The parameter - ResourceIds.N should not be null.
400Duplicate.TagKeyThe Tag.N.Key contain duplicate key.-
400InvalidTagKey.MalformedThe Tag.N.Key parameter is invalid.-

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