All Products
Search
Document Center

Data Security Center:CreateScanTask

Last Updated:Nov 17, 2022

Creates a custom scanning task. The custom scanning task is used to scan data assets on which Data Security Center (DSC) is granted the scanning permissions for sensitive data.

Operation Description

Usage notes

You can call this operation to create a custom scanning task for authorized data assets. You can customize the interval between two consecutive scanning tasks and the time when the scanning task is run next time.

QPS limit

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DataLimitIdlongYes

The unique ID of the data asset, such as an instance, a database, and a bucket. You can call the DescribeDataLimits operation to query the unique ID.

1
IntervalDayintegerYes

The interval between two consecutive custom scanning tasks. Unit: day. Valid values: 1 to 2147483648.

1
RunHourintegerYes

The time when the scanning task is run next time. Unit: hours.

12
RunMinuteintegerYes

The time when the scanning task is run next time. Unit: minutes.

30
TaskNamestringYes

The name of the scanning task.

scan-test-sample
TaskUserNamestringNo

The account used to create the scanning task.

demo
OssScanPathstringNo

The data to be scanned in the Object Storage Service (OSS) bucket. Prefixes, suffixes, and regular expressions are supported.

/test/test
ScanRangeintegerYes

The matching rule that specifies the scanning scope of the custom scanning task. This parameter takes effect only if you set the ScanRangeContent parameter. Valid values:

  • 0: fully matches
  • 1: matches by prefix
  • 2: matches by suffix
  • 3: matches by regular expression
0
ScanRangeContentstringYes

The data to be scanned in a structured data asset. Prefixes, suffixes, and regular expressions are supported.

datamask/
ResourceTypelongYes

The type of the service to which the data asset belongs. Valid values include 1, 2, 3, 4, and 5. A value of 1 indicates MaxCompute. A value of 2 indicates OSS. A value of 3 indicates AnalyticDB for MySQL. A value of 4 indicates Tablestore. A value of 5 indicates ApsaraDB RDS.

2
LangstringNo

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

  • zh: Chinese

  • en: English

zh

Response parameters

ParameterTypeDescriptionExample
object
Idinteger

The ID of the custom scanning task.

100
RequestIdstring

The ID of the request.

B1F2BB1F-04EC-5D36-B136-B4DE17FD8DE0

Example

Normal return example

JSONFormat

{
  "Id": 100,
  "RequestId": "B1F2BB1F-04EC-5D36-B136-B4DE17FD8DE0"
}

Error codes

For a list of error codes, visit the API error center.