Queries the instances, such as MaxCompute projects, ApsaraDB RDS instances, and Object Storage Service (OSS) buckets, that you authorize Data Security Center (DSC) to access.

Usage notes

When you call the DescribeInstances operation, you can specify parameters such as Name and RiskLevelId to query instances that meet filter conditions.

Limits

You can call this operation up to 10 times per second per account. When the number of calls to this operation per second exceeds the limit, throttling is triggered. Throttling may affect your business. We recommend that you take note of the limit on this operation.

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 DescribeInstances

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

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 data

The keyword that is used to search for instances. DSC searches for instances based on the keyword that you specify in fuzzy match mode. For example, if you specify data, all instances whose names contain data are queried.

ProductId Long No 1

The ID of the service to which the instances to be queried belong. You can call the DescribeDataAssets operation to query the ID.

RiskLevelId Long No 2

The risk level ID of the instances that you want to query. A higher risk level indicates that the identified data is more sensitive. Valid values:

  • 1: indicates that no sensitive data is identified, which brings no risks.
  • 2: indicates that the sensitive data brings level 1 risks.
  • 3: indicates that the sensitive data brings level 2 risks.
  • 4: indicates that the sensitive data brings level 3 risks.
  • 5: indicates that the sensitive data brings level 4 risks.
  • 6: indicates that the sensitive data brings level 5 risks.
  • 7: indicates that the sensitive data brings level 6 risks.
  • 8: indicates that the sensitive data brings level 7 risks.
  • 9: indicates that the sensitive data brings level 8 risks.
  • 10: indicates that the sensitive data brings level 9 risks.
  • 11: indicates that the sensitive data brings level 10 risks.
RuleId Long No 1111111

The ID of the sensitive data detection rule that the instances to be queried hit. You can call the DescribeRules operation and obtain the ID of the sensitive data identification rule from the Id response parameter.

ServiceRegionId String No cn-hangzhou

The region where the instances to be queried reside. For more information, see Supported regions.

FeatureType Integer No 1

This parameter is deprecated.

ProductCode String No RDS

The name of the service to which the instances to be queried belong, such as MaxCompute, OSS, and ApsaraDB RDS. For more information about supported services, see Supported data assets.

PageSize Integer No 10

The maximum number of instances that can be returned on each page. Default value: 10.

CurrentPage Integer No 1

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

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

Parameter Type Example Description
CurrentPage Integer 1

The page number of the current page.

RequestId String 71064826-726F-4ADA-B879-05D8055476FB

The ID of the request.

PageSize Integer 10

The number of the instances on each page.

TotalCount Integer 231

The total number of the instances that were queried.

Items Array of Instance N/A

The details of the instances that were queried.

CreationTime Long 1637226782000

The time when the instance was created. This value is a UNIX timestamp. Unit: milliseconds.

LastFinishTime Long 1637622793000

The time when the instance was last scanned. This value is a UNIX timestamp. Unit: milliseconds.

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

The Alibaba Cloud account to which the instance belongs.

TenantName String Tenant 1

The name of the tenant.

Protection Boolean false

The protection status of the instance. Valid values:

  • true: The instance is being protected.
  • false: The instance is not protected.
DepartName String ***DemoCenter

The name of the department to which the instance belongs.

Labelsec Boolean true

The security status of the instance. Valid values:

  • true: The instance is secure.
  • false: The instance is insecure.
RiskLevelId Long 2

The risk level ID of the instance. A higher risk level indicates that the identified data is more sensitive.

  • 1: indicates that no sensitive data is identified, which brings no risks.
  • 2: indicates that the sensitive data brings level 1 risks.
  • 3: indicates that the sensitive data brings level 2 risks.
  • 4: indicates that the sensitive data brings level 3 risks.
  • 5: indicates that the sensitive data brings level 4 risks.
  • 6: indicates that the sensitive data brings level 5 risks.
  • 7: indicates that the sensitive data brings level 6 risks.
  • 8: indicates that the sensitive data brings level 7 risks.
  • 9: indicates that the sensitive data brings level 8 risks.
  • 10: indicates that the sensitive data brings level 9 risks.
  • 11: indicates that the sensitive data brings level 10 risks.
ProductId String 5

The ID of the service to which the instance belongs.

Name String gxdata

The name of the instance.

TotalCount Integer 231

The total number of data objects in the instance. For example, if the instance is an ApsaraDB RDS instance, the value indicates the total number of tables in all databases of the instance.

InstanceDescription String Instance information

The description of the instance.

RuleName String *** rule

The name of the sensitive data detection rule that the instance hits.

Sensitive Boolean true

Indicates whether the instance contains sensitive data. Valid values:

  • true: The instance contains sensitive data.
  • false: The instance does not contain sensitive data.
RiskLevelName String Sensitive data at level 1

The risk level name of the instance.

OdpsRiskLevelName String 1

This parameter is deprecated.

SensitiveCount Integer 123

The total number of sensitive data objects in the instance. For example, if the instance is an ApsaraDB RDS instance, the value indicates the total number of sensitive tables in all databases of the instance.

Id Long 11111

The unique ID of the instance, which is recorded in DSC.

ProductCode String RDS

The name of the service to which the instance belongs, such as MaxCompute, OSS, and ApsaraDB RDS. For more information about supported services, see Supported data assets.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeInstances
&Lang=zh_cn
&Name=data
&ProductId=1
&RiskLevelId=2
&RuleId=1111111
&ServiceRegionId=cn-hangzhou
&FeatureType=1
&ProductCode=RDS
&PageSize=10
&CurrentPage=1
&<Common request parameters>

Sample responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeInstancesResponse>
    <CurrentPage>1</CurrentPage>
    <RequestId>71064826-726F-4ADA-B879-05D8055476FB</RequestId>
    <PageSize>10</PageSize>
    <TotalCount>231</TotalCount>
    <Items>
        <CreationTime>1637226782000</CreationTime>
        <LastFinishTime>1637622793000</LastFinishTime>
        <Owner>dtdep-239-******</Owner>
        <TenantName>Tenant 1</TenantName>
        <Protection>false</Protection>
        <DepartName>***DemoCenter</DepartName>
        <Labelsec>true</Labelsec>
        <RiskLevelId>2</RiskLevelId>
        <ProductId>5</ProductId>
        <Name>gxdata</Name>
        <TotalCount>231</TotalCount>
        <InstanceDescription>Instance information</InstanceDescription>
        <RuleName>*** rule</RuleName>
        <Sensitive>true</Sensitive>
        <RiskLevelName> Sensitive data at level 1</RiskLevelName>
        <OdpsRiskLevelName>1</OdpsRiskLevelName>
        <SensitiveCount>123</SensitiveCount>
        <Id>11111</Id>
        <ProductCode>RDS</ProductCode>
    </Items>
</DescribeInstancesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "CurrentPage" : 1,
  "RequestId" : "71064826-726F-4ADA-B879-05D8055476FB",
  "PageSize" : 10,
  "TotalCount" : 231,
  "Items" : [ {
    "CreationTime" : 1637226782000,
    "LastFinishTime" : 1637622793000,
    "Owner" : "dtdep-239-******",
    "TenantName" : "Tenant 1",
    "Protection" : false,
    "DepartName" : "***DemoCenter",
    "Labelsec" : true,
    "RiskLevelId" : 2,
    "ProductId" : "5",
    "Name" : "gxdata",
    "TotalCount" : 231,
    "InstanceDescription" : "Instance information",
    "RuleName" : "*** rule",
    "Sensitive" : true,
    "RiskLevelName" : "Sensitive data at level 1",
    "OdpsRiskLevelName" : "1",
    "SensitiveCount" : 123,
    "Id" : 11111,
    "ProductCode" : "RDS"
  } ]
}

Error codes

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