ListTagMetaAsset

Updated at:

Retrieves the database and table information added to the data center of a DataAgent workspace.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dms:ListTagMetaAsset

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Tid

integer

No

The tenant ID.

Note

You can obtain the tenant ID by hovering over the profile picture in the upper-right corner of the system. For more information, see View tenant information.

3***

TagName

string

Yes

The tag name. To retrieve the database and table information in a DataAgent workspace, pass the value in the following format: sys::DMS-DA::${DataAgentRegionId}::space:${DataAgentWorkspaceId}.

sys::DMS-DA::cn-hangzhou::space:abcde

MetaType

string

Yes

The metadata type.

  • To retrieve the database list, set this parameter to META_DATABASE.

  • To retrieve the table list of a specific database, set this parameter to META_TABLE.

META_DATABASE

MetaParentId

string

No

The parent MetaId of the asset.

  • To retrieve the database list on the left side of the DataAgent data center, you do not need to specify this parameter.

  • To retrieve the table list of a specific database, set this parameter to the corresponding dbId.

123456

SearchKey

string

No

The search keyword. Fuzzy search is supported.

test

PageNumber

integer

Yes

The page number.

1

PageSize

integer

Yes

The number of entries per page.

50

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931

ErrorCode

string

The error code. This parameter is returned when an error occurs.

UnknownError

ErrorMessage

string

The error message returned when the request fails.

UnknownError

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Data

array<object>

The returned data.

array<object>

The returned data.

MetaType

string

The metadata type. Valid values:

  • META_DATABASE: database information.

  • META_TABLE: table information.

META_DATABASE

MetaEntityAttrs

object

The metadata entity attributes. When MetaType is set to META_DATABASE, the following information is included:

  • schemaName: the database name. For PostgreSQL databases, this is the schema name.

  • catalogName: the catalog name. For PostgreSQL databases, this is the database name.

  • dbId: the DMS database ID.

  • instanceResourceId: the instance resource ID. If the database is an ApsaraDB RDS instance, this value is the RDS instance ID.

  • dbType: the DMS database type.

When MetaType is set to META_TABLE, the following information is included:

  • schemaName: the database name. For PostgreSQL databases, this is the schema name.

  • catalogName: the catalog name. For PostgreSQL databases, this is the database name.

  • dbId: the DMS database ID.

  • dbType: the DMS database type.

  • tableName: the table name.

  • tableSchemaName: the table schema name. This parameter is valid only for SQL Server databases.

{"schemaName": "test"}

TotalCount

integer

The total number of records that meet the specified conditions.

100

Examples

Success response

JSON format

{
  "RequestId": "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": true,
  "Data": [
    {
      "MetaType": "META_DATABASE",
      "MetaEntityAttrs": {
        "schemaName": "test"
      }
    }
  ],
  "TotalCount": 100
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.