All Products
Search
Document Center

Data Management:GetMetaTableDetailInfo

Last Updated:Nov 28, 2024

Queries the details of columns and indexes in a table.

Operation description

You can call this operation only for database instances whose control mode is Security Collaboration.

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
dms:GetMetaTableDetailInfoget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TidlongNo

The ID of the tenant.

Note To view the ID of the tenant, move the pointer over the profile picture in the upper-right corner of the Data Management (DMS) console. For more information, see the View information about the current tenant section of the Manage DMS tenants topic.
123
TableGuidstringYes

The GUID of the table in Data Management (DMS).

Note
  • You can call the ListLogicTables operation with ReturnGuid set to true to query the GUIDs of logical tables in a specific logical database.

  • You can call the ListTables operation with ReturnGuid set to true to query the GUIDs of tables in a specific physical database.

IDB_L_9032.db-test.yuyang_test

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

E881CB2F-DE42-42E5-90EB-8B3173DCB9B9
DetailInfoobject

The details of the table.

IndexListarray<object>

The list of indexes.

Indexobject
IndexColumnsarray

The index column.

ColumnNamesstring

The fields in the index.

id
IndexNamestring

The name of the index.

PRIMARY
Uniqueboolean

Indicates whether the index is unique. Valid values:

  • true: The index is unique.
  • false: The index is not unique.
false
IndexTypestring

The type of the index. Examples: Primary, Unique, and Normal.

Primary
IndexIdstring

The ID of the index.

123
ColumnListarray<object>

The columns in the table.

Columnobject
ColumnNamestring

The name of the column.

id
Descriptionstring

The description of the column.

test
DataScaleinteger

The scale of the column.

0
DataPrecisioninteger

The precision of the field.

0
ColumnTypestring

The data type of the column. Examples: Bigint, Int, and Varchar.

bigint(20) unsigned
AutoIncrementboolean

Indicates whether the column is an auto-increment column. Valid values:

  • true: The column is an auto-increment column.
  • false: The column is not an auto-increment column.
true
Positionstring

The position of the field in the table.

1
Nullableboolean

Indicates whether the column is nullable. Valid values:

  • true: The column is nullable.
  • false: The column is not nullable.
false
ColumnIdstring

The ID of the column.

191234849
DataLengthlong

The length of the field.

0
ErrorCodestring

The error code returned.

UnknownError
ErrorMessagestring

The error message returned.

UnknownError
Successboolean

Indicates whether the request was successful.

true

Examples

Sample success responses

JSONformat

{
  "RequestId": "E881CB2F-DE42-42E5-90EB-8B3173DCB9B9",
  "DetailInfo": {
    "IndexList": [
      {
        "IndexColumns": [
          "id"
        ],
        "IndexName": "PRIMARY",
        "Unique": false,
        "IndexType": "Primary",
        "IndexId": "123"
      }
    ],
    "ColumnList": [
      {
        "ColumnName": "id",
        "Description": "test",
        "DataScale": 0,
        "DataPrecision": 0,
        "ColumnType": "bigint(20) unsigned",
        "AutoIncrement": true,
        "Position": "1",
        "Nullable": false,
        "ColumnId": "191234849",
        "DataLength": 0
      }
    ]
  },
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": true
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history