All Products
Search
Document Center

ApsaraDB for MyBase:ListTagResources

Last Updated:Aug 28, 2026

Queries tags bound to hosts.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the host.

ap-southeast-1

ResourceType

string

Yes

The resource type. Set the value to DEDICATEDHOST.

DEDICATEDHOST

ResourceId

array

No

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

string

No

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-t4n4dcdvu6840****

Tag

array<object>

No

The tags.

object

No

Key

string

No

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.

  • You must specify one of this parameter and ResourceId.N.

demokey

Value

string

No

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

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

2853CAA0-D7A2-5CAB-B3A8-BDE2994F320C

TagResources

array<object>

The queried tags.

object

TagValue

string

The tag value.

demovalue

ResourceType

string

The resource type.

The value ALIYUN::CDDC::DEDICATEDHOST indicates an ApsaraDB for MyBase host.

ALIYUN::CDDC::DEDICATEDHOST

ResourceId

string

The host ID.

ch-t4n4dcdvu6840****

TagKey

string

The key of tag N.

demokey

Examples

Success response

JSON format

{
  "RequestId": "2853CAA0-D7A2-5CAB-B3A8-BDE2994F320C",
  "TagResources": [
    {
      "TagValue": "demovalue",
      "ResourceType": "ALIYUN::CDDC::DEDICATEDHOST",
      "ResourceId": "ch-t4n4dcdvu6840****",
      "TagKey": "demokey"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingResourceType The specified parameter ResourceType is not valid.
400 MissParameter.TagOrResourceId The parameter Tag.n or ResourceId.n is needed.
400 InvalidParameter.TagValue The Tag.%s.Value parameter - %s is invalid The Tag.%s.Value parameter - %s is invalid
400 InvalidParameter.TagKey The Tag.%s.Key parameter - %s is invalid The Tag.%s.Key parameter - %s is invalid
400 NumberExceed.ResourceIds The ResourceIds parameter's number is exceed , Valid : 50
400 InvalidTagValue.Malformed The specified parameter "Tag.n.Value" is not valid.
400 InvalidDedicatedHostId.NotFound The parameter - ResourceIds.N is not found. The parameter - ResourceIds.N is not found.
400 InvalidParameter.ResourceType The specified parameter "ResourceType" is not valid.
400 NumberExceed.Tags The Tags parameter's number is exceed, Valid : 20.
400 MissingParameter.ResourceIds The parameter - ResourceIds.N should not be null. The parameter - ResourceIds.N should not be null.
400 Duplicate.TagKey The Tag.N.Key contain duplicate key.
400 InvalidTagKey.Malformed The Tag.N.Key parameter is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.