Queries tables in instances, such as MaxCompute projects and ApsaraDB RDS instances, that you authorize Data Security Center (DSC) to access.

Description

When you call the DescribeTables operation to query tables, you can specify parameters such as Name and RiskLevelId to filter tables.

QPS limits

You can send up to 10 requests per second to call this operation by using your Alibaba Cloud account. If you send excessive requests, throttling is implemented, and your business may be affected.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeTables

The operation that you want to perform. Set the value to DescribeTables.

Lang String No zh_cn

The natural language of the request and response. Default value: en_us. Valid values:

  • zh_cn: simplified Chinese
  • en_us: English
Name String No test

The keyword that is used to filter tables. DSC retrieves tables based on the keyword that you enter in fuzzy match mode.

For example, if you enter test, all tables whose names contain test are retrieved.

ProductId Long No 1

The ID of the service to which the table belongs. You can call the DescribDataAssets operation to obtain the ID of the service.

ProductCode String No MaxCompute

The name of the service to which the table belongs, such as MaxCompute, OSS, and RDS-MySQL. For more information about the types of data assets from which DSC can scan for sensitive data, see Supported data assets.

RiskLevelId Long No 2

The risk level ID of the table.

Each risk level ID has a corresponding risk level name. For example, a risk level ID of 2 indicates the medium risk level. Valid values:

  • 1: S1, indicating the low risk level
  • 2: S2, indicating the medium risk level
  • 3: S3, indicating the high risk level
  • 4: S4, indicating the highest risk level
RuleId Long No 333322

The ID of the sensitive data detection rule that is used to identify the table. You can call the DescribeRules operation to obtain the ID of the sensitive data detection rule.

InstanceId Long No 1

The ID of the instance to which the table belongs. You can call the DescribeInstances operation to obtain the ID of the instance.

PackageId Long No 555555

The ID of the package to which the table belongs. You can call the DescribePackages operation to obtain the ID of the package.

PageSize Integer No 10

The number of entries to return on each page. Default value: 10.

CurrentPage Integer No 1

The number of the page to return. Default value: 1

ServiceRegionId String No cn-hangzhou

The region in which DSC is activated. For more information, see Supported regions.

Response parameters

Parameter Type Example Description
CurrentPage Integer 1

The page number of the returned page.

Items Array of Table

The information about the retrieved tables.

CreationTime Long 1536751124000

The time when the table was created. Unit: milliseconds.

Id Long 222

The unique ID of the table.

InstanceDescription String Description

The description of the instance.

InstanceId Long 1

The ID of the instance to which the table belongs.

InstanceName String Instance 1

The name of the instance to which the table belongs.

Name String gxdata

The name of the table.

Owner String dtdep-239-******

The Alibaba Cloud account that owns the table.

ProductCode String MaxCompute

The name of the service to which the table belongs, such as MaxCompute, OSS, and RDS-MySQL. For more information about the types of data assets from which DSC can scan for sensitive data, see Supported data assets.

ProductId String 1

The ID of the service to which the table belongs.

RiskLevelId Long 2

The risk level ID of the table.

Each risk level ID has a corresponding risk level name. For example, a risk level ID of 2 indicates the medium risk level. Valid values:

  • 1: S1, indicating the low risk level
  • 2: S2, indicating the medium risk level
  • 3: S3, indicating the high risk level
  • 4: S4, indicating the highest risk level
RiskLevelName String Highest risk level

The risk level of the table. Each risk level name has a corresponding risk level ID. For example, the ID of the highest risk level is 4. For more information about the risk level name and the risk level ID, see the description of the RiskLevelId parameter.

RuleList Array of Rule

The information about the sensitive data detection rules that are hit.

Count Long 12

The total number of rules.

Name String Rule name

The name of the rule.

RiskLevelId Long 1

The risk level ID of the instance that hits the sensitive data detection rule.

Each risk level ID has a corresponding risk level name. Valid values:

  • 1: S1, indicating the low risk level
  • 2: S2, indicating the medium risk level
  • 3: S3, indicating the high risk level
  • 4: S4, indicating the highest risk level
Sensitive Boolean true

Indicates whether the table contains sensitive fields. Valid values:

  • true: The table contains sensitive fields.
  • false: The table does not contain sensitive fields.
SensitiveCount Integer 32

The total number of sensitive fields in the table.

SensitiveRatio String 21%

The percentage of sensitive fields in the table.

TenantName String Tenant 1

The name of the tenant.

TotalCount Integer 1234

The total number of fields in the table.

PageSize Integer 10

The number of entries returned per page.

RequestId String 769FB3C1-F4C9-42DF-9B72-7077A8989C13

The ID of the request.

TotalCount Integer 13

The total number of returned entries.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeTables
&<Common request parameters>

Sample success responses

XML format

<TotalCount>13</TotalCount>
<PageSize>10</PageSize>
<RequestId>769FB3C1-F4C9-42DF-9B72-7077A8989C13</RequestId>
<CurrentPage>1</CurrentPage>
<Items>
    <Owner>dtdep-239-******</Owner>
    <ProductCode>MaxCompute</ProductCode>
    <InstanceId>1</InstanceId>
    <TenantName>Tenant 1</TenantName>
    <SensitiveRatio>21%</SensitiveRatio>
    <ProductId>1</ProductId>
    <RiskLevelId>2</RiskLevelId>
    <Name>gxdata</Name>
    <InstanceName>Instance 1</InstanceName>
    <TotalCount>1234</TotalCount>
    <CreationTime>1536751124000</CreationTime>
    <Sensitive>true</Sensitive>
    <RiskLevelName>Highest risk level</RiskLevelName>
    <InstanceDescription>Description</InstanceDescription>
    <Id>222</Id>
    <SensitiveCount>32</SensitiveCount>
    <RuleList>
        <Count>12</Count>
        <RiskLevelId>1</RiskLevelId>
        <Name> Rule name </Name>
    </RuleList>
</Items>

JSON format

{
    "TotalCount": 13,
    "PageSize": 10,
    "RequestId": "769FB3C1-F4C9-42DF-9B72-7077A8989C13",
    "CurrentPage": 1,
    "Items": {
        "Owner": "dtdep-239-******",
        "ProductCode": "MaxCompute",
        "InstanceId": 1,
        "TenantName": "Tenant 1",
        "SensitiveRatio": "21%",
        "ProductId": 1,
        "RiskLevelId": 2,
        "Name": "gxdata",
        "InstanceName": "Instance 1",
        "TotalCount": 1234,
        "CreationTime": 1536751124000,
        "Sensitive": true,
        "RiskLevelName": "Highest risk level",
        "InstanceDescription": "Description",
        "Id": 222,
        "SensitiveCount": 32,
        "RuleList": {
            "Count": 12,
            "RiskLevelId": 1,
            "Name": "Rule name"
        }
    }
}

Error codes

For a list of error codes, visit the API Error Center.