All Products
Search
Document Center

Data Management:ListColumns

Last Updated:Aug 28, 2026

Queries the columns of a table.

Operation description

Available only for database instances in Security Collaboration control mode.

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:ListColumns

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Tid

integer

No

The tenant ID. Call GetUserActiveTenant to obtain this ID.

3***

TableId

string

Yes

The table ID. Call ListTables to obtain this ID.

39281****

Logic

boolean

No

Whether the database is a logical database. Valid values:

  • true: Logical database.

  • false: Physical database.

false

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

0AD9AC55-5873-474A-9F33-4285806A3619

ErrorCode

string

The error code.

UnknownError

ColumnList

object

Column

array<object>

Column details.

object

Details of each column.

ColumnType

string

Column data type.

varchar

AutoIncrement

boolean

Whether the column auto-increments. Valid values:

  • true: Auto-increments.

  • false: Does not auto-increment.

false

ColumnId

string

The column ID.

62589****

DefaultValue

string

Default value of the column.

def_value

Sensitive

boolean

Whether the column is sensitive. Valid values:

  • true: Sensitive.

  • false: Not sensitive.

false

ColumnName

string

The name of the column.

name

SecurityLevel

string

Column security level. Valid values:

  • INNER: Internal, not sensitive.

  • SENSITIVE: Sensitive.

  • CONFIDENTIAL: Confidential.

INNER

Description

string

Column description.

test

DataPrecision

integer

Precision (number of valid digits).

0

DataScale

integer

Scale (number of decimal places).

0

FunctionType

string

Masking algorithm type. Valid values:

  • null: No masking.

  • DEFAULT: Full masking.

  • FIX_POS: Fixed-position masking.

  • FIX_CHAR: Fixed-character replacement.

DEFAULT

Nullable

boolean

Whether the column allows null values. Valid values:

  • true: Allows null.

  • false: Does not allow null.

false

DataLength

integer

Field length.

4

ErrorMessage

string

The error message.

UnknownError

Success

boolean

Whether the request succeeded. Valid values:

  • true: Succeeded.

  • false: Failed.

true

Examples

Success response

JSON format

{
  "RequestId": "0AD9AC55-5873-474A-9F33-4285806A3619",
  "ErrorCode": "UnknownError",
  "ColumnList": {
    "Column": [
      {
        "ColumnType": "varchar",
        "AutoIncrement": false,
        "ColumnId": "62589****",
        "DefaultValue": "def_value",
        "Sensitive": false,
        "ColumnName": "name",
        "SecurityLevel": "INNER",
        "Description": "test",
        "DataPrecision": 0,
        "DataScale": 0,
        "FunctionType": "DEFAULT",
        "Nullable": false,
        "DataLength": 4
      }
    ]
  },
  "ErrorMessage": "UnknownError",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.