All Products
Search
Document Center

ApsaraDB RDS:DescribeDBInstanceByTags

Last Updated:Nov 22, 2024

Queries information about the tags that are added to an instance.

Operation description

Supported database engines

  • MySQL
  • PostgreSQL
  • SQL Server
  • MariaDB

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
rds:DescribeDBInstanceByTagsget
*DBInstance
acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

ETnLKlblzczshOTUbOCz*****
proxyIdstringNo

A deprecated parameter.

None
RegionIdstringYes

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

cn-hangzhou
DBInstanceIdstringNo

The instance ID. You can call the DescribeDBInstances operation to query the instance ID.

rm-uf6w**********
PageSizeintegerNo

The number of entries per page. Valid values: 30 to 100. Default value: 30.

10
PageNumberintegerNo

The page number. Pages start from page 1.

Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

1AD222E9-E606-4A42-BF6D-8A4442913CEF
PageNumberinteger

The page number.

1
PageRecordCountinteger

The number of entries per page.

10
TotalRecordCountinteger

The total number of entries returned.

30
Itemsarray<object>

The details about the instance.

DBInstanceTagobject

The details about the instance.

DBInstanceIdstring

The instance ID.

rm-uf6w**********
Tagsarray<object>

The details about the tag.

Tagobject

The tag details.

TagValuestring

The tag value.

value1
TagKeystring

The tag key.

key1

Examples

Sample success responses

JSONformat

{
  "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
  "PageNumber": 1,
  "PageRecordCount": 10,
  "TotalRecordCount": 30,
  "Items": {
    "DBInstanceTag": [
      {
        "DBInstanceId": "rm-uf6w**********",
        "Tags": {
          "Tag": [
            {
              "TagValue": "value1",
              "TagKey": "key1"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400Tag.NoRegionIdExistthe region Id can not be blank.The RegionId parameter cannot be empty. Specify this parameter.
400Tag.NoTagInfoExistall the tags and tagN parameters is null.The key and value of the tag are invalid. Specify a valid key and a valid value.
400Tag.TagKeyCanNotBeAlltag key can not be all.The operation failed. Check the value of the TagKey parameter.
400Tag.TagKeyDuplextag key must be sole in one operation.The tag has been added to the RDS instance. Define a different tag.
400Tag.NoDBInstanceIdExistthe dbinstance Id can not be blank.The database instance ID must not be empty.
400Tag.TooManyDBInstanceIdsthe dbinstance Ids is more than 30.The number of database instance ID must not exceed 30.
400Tag.TooManyTagsForOneInstancetotal 10 tags can be added to one resource.The number of tags exceeds the maximum number of tags that is allowed. The maximum number is 10.
400Tag.SetTagInfoAtTwoParamtersonly tags or tagN parameter could be setted.The settings of the tag are invalid.
400Tag.Allow5TagInfosonly 5 tags allowed in one operation.The operation failed. You can specify up to five tags at a time.
400Tag.TagKeyIsBlanktag key can not be blank.The tag is invalid. The key of the tag cannot be left unspecified.
400Tag.TagKeyStartWith.aliyuntag key and value can not be started with aliyun.The tag is invalid. The key of the tag cannot start with aliyun.
400Tag.TagKeyTooLongthe max tag key s length is 64.The key of the tag exceeds 64 characters in length. Modify the key of the tag.
400Tag.TagValueTooLongthe max tag value is length is 128.The value of the tag exceeds the maximum length that is allowed. The maximum length is 128 characters. Modify the value of the tag.
400Tag.InvalidTagsParamtertags parameter is invalid.The key and value of the tag are invalid. Specify a valid key and a valid value.
400Tag.MalformedThe specified parameter Tag is not valid.The key and value of the tag are invalid. Specify a valid key and a valid value.
400Tag.MalformedThe specified parameter Value is not valid.The key and value of the tag are invalid. Specify a valid key and a valid value.
404InvalidDBInstanceId.NotFoundThe DBInstanceId provided does not exist in our records.The RDS instance cannot be found. Check whether the RDS instance is created and whether the RDS instance has not been deleted.
404InvalidDBInstanceName.NotFoundThe database instance does not exist.The name of the RDS instance cannot be found. Check the name of the RDS instance.

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

Change history

Change timeSummary of changesOperation
2024-11-20API Description Update. The Error code has changedView Change Details
2022-09-01The Error code has changedView Change Details
2022-06-13Add OperationView Change Details