Authorizes Data Security Center (DSC) to scan a data asset, such as a project, a database, and an Object Storage Service (OSS) bucket.

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 CreateDataLimit

The operation that you want to perform.

Set the value to CreateDataLimit.

ResourceType Integer Yes 1

The type of the service to which the data asset belongs. Valid values:

  • 1: MaxCompute
  • 2: OSS
  • 5: Relational Database Service (RDS)
Lang String No zh

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

  • zh: Chinese
  • en: English
ServiceRegionId String No cn-hangzhou

The region ID of the data asset. Valid values:

  • cn-beijing: China (Beijing)
  • cn-zhangjiakou: China (Zhangjiakou)
  • cn-huhehaote: China (Hohhot)
  • cn-hangzhou: China (Hangzhou)
  • cn-shanghai: China (Shanghai)
  • cn-shenzhen: China (Shenzhen)
  • cn-hongkong: China (Hong Kong)
ParentId String No test-11**

The name of the data asset.

UserName String No yhm

The username that is used to connect to the database.

Password String No passwd

The password that is used to connect to the database.

AuditStatus Integer No 1

Specifies whether to enable the log auditing feature. Valid values:

  • 0: no
  • 1: yes
AutoScan Integer No 1

Specifies whether to automatically trigger a re-scan after a rule is modified. Valid values:

  • 0: no
  • 1: yes
Note When a re-scan is triggered, DSC scans all data in your data asset.
LogStoreDay Integer No 30

The retention period of raw logs after you enable the log auditing feature. Unit: day. Valid values:

  • 30
  • 90
  • 180
  • 365
EngineType String No MySQL

The type of the database. Valid values:

  • MySQL
  • SQLServer
Port Integer No 3306

The port that is used to connect to the database.

Response parameters

Parameter Type Example Description
Id Integer 1

The ID of the data asset.

RequestId String 7C3AC882-E5A8-4855-BE77-B6837B695EF1

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<CreateDataLimitResponse>
  <Id>1</Id>
  <RequestId>7C3AC882-E5A8-4855-BE77-B6837B695EF1</RequestId>
</CreateDataLimitResponse>

JSON format

{
    "Id":1,
    "RequestId":"7C3AC882-E5A8-4855-BE77-B6837B695EF1"
}

Error codes

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