sddp-20190103/main.tea (5,949 lines of code) (raw):
/**
*
*/
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;
extends OpenApi;
init(config: OpenApi.Config){
super(config);
@endpointRule = 'regional';
@endpointMap = {
'cn-hongkong' = 'sddp-api.cn-hongkong.aliyuncs.com',
};
checkConfig(config);
@endpoint = getEndpoint('sddp', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}
function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
if (!Util.empty(endpoint)) {
return endpoint;
}
if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
return endpointMap[regionId];
}
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model CreateConfigRequest {
code?: string(name='Code', description='The code of the common configuration item. Valid values:
* **access_failed_cnt**: the maximum number of access attempts allowed when Data Security Center (DSC) fails to access an unauthorized resource.
* **access_permission_exprie_max_days**: the maximum idle period allowed for access permissions before an alert is triggered.
* **log_datasize_avg_days**: the minimum percentage of the volume of logs of a specific type generated on the current day to the average volume of logs generated in the previous 10 days before an alert is triggered.', example='access_failed_cnt'),
description?: string(name='Description', description='The description of the common configuration item.', example='Maximum number of access attempts allowed when DSC fails to access an unauthorized resource: 10'),
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
sourceIp?: string(name='SourceIp', description='This parameter is deprecated.', example='39.170.XX.XX'),
value?: string(name='Value', description='The value of the common configuration item. The meaning of this parameter varies with the value of the Code parameter.
* If you set the Code parameter to **access_failed_cnt**, the Value parameter specifies the maximum number of access attempts allowed when DSC fails to access an unauthorized resource.
* If you set the Code parameter to **access_permission_exprie_max_days**, the Value parameter specifies the maximum idle period allowed for access permissions before an alert is triggered.
* If you set the Code parameter to **log_datasize_avg_days**, the Value parameter specifies the minimum percentage of the volume of logs of a specific type generated on the current day to the average amount of logs generated in the previous 10 days before an alert is triggered.', example='30'),
}
model CreateConfigResponseBody = {
id?: long(name='Id', description='The ID of the common alert configuration.', example='12300'),
requestId?: string(name='RequestId', description='The ID of the request.', example='208B016D-4CB9-4A85-96A5-0B8ED1EBF271'),
}
model CreateConfigResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateConfigResponseBody(name='body'),
}
/**
* @summary Modifies the configurations of a common configuration item for alerts.
*
* @description You can call this operation to create or restore configurations based on the codes of common configuration items. This allows you to manage the configurations of common configuration items.
* # Limits
* 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.
*
* @param request CreateConfigRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateConfigResponse
*/
async function createConfigWithOptions(request: CreateConfigRequest, runtime: Util.RuntimeOptions): CreateConfigResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.code)) {
query['Code'] = request.code;
}
if (!Util.isUnset(request.description)) {
query['Description'] = request.description;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.sourceIp)) {
query['SourceIp'] = request.sourceIp;
}
if (!Util.isUnset(request.value)) {
query['Value'] = request.value;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateConfig',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Modifies the configurations of a common configuration item for alerts.
*
* @description You can call this operation to create or restore configurations based on the codes of common configuration items. This allows you to manage the configurations of common configuration items.
* # Limits
* 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.
*
* @param request CreateConfigRequest
* @return CreateConfigResponse
*/
async function createConfig(request: CreateConfigRequest): CreateConfigResponse {
var runtime = new Util.RuntimeOptions{};
return createConfigWithOptions(request, runtime);
}
model CreateDataLimitRequest {
auditStatus?: int32(name='AuditStatus', description='Specifies whether to enable the security audit feature. Valid values:
* **0**: no
* **1**: yes', example='1'),
autoScan?: int32(name='AutoScan', description='Specifies whether to automatically trigger a re-scan after a rule is modified. Valid values:
* **0**: no
* **1**: yes
> When a re-scan is triggered, DSC scans all data in your data asset.', example='1'),
certificatePermission?: string(name='CertificatePermission', description='The permissions. Valid values:
* **ReadOnly**: read-only permissions
* **ReadWrite**: read and write permissions', example='ReadOnly'),
enable?: int32(name='Enable', description='Specifies whether to enable sensitive data detection. Valid values:
* **1**: yes
* **0**: no
> If this is your first time to authorize DSC to access the data asset, the default value is 1. If this is not your first time to authorize DSC to access the data asset, the default value is the same as that used in the last authorization operation. Both 1 and 0 are possible.', example='1'),
engineType?: string(name='EngineType', description='The database engine that is run by the instance. Valid values:
* **MySQL**
* **SQLServer**', example='MySQL'),
eventStatus?: int32(name='EventStatus', description='Specifies whether to enable anomalous event detection. Valid values:
* **0**: no
* **1**: yes (default)', example='1'),
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='2'),
instantlyScan?: boolean(name='InstantlyScan', description='Specifies whether to immediately scan the authorized asset. Valid values:
* **false**
* **true**', example='false'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
logStoreDay?: int32(name='LogStoreDay', description='The retention period of raw logs after you enable the security audit feature. Unit: days. Valid values:
* **30**
* **90**
* **180**
* **365**', example='30'),
ocrStatus?: int32(name='OcrStatus', description='Specifies whether to enable optical character recognition (OCR). Valid values:
* **1**: yes
* **0**: no', example='0'),
parentId?: string(name='ParentId', description='The name of the asset. The value is a connection string. It consists of an instance ID and a database name, which are separated by a comma (,). This parameter is required.', example='test-11**'),
password?: string(name='Password', description='The password that is used to access the database.', example='passwd'),
port?: int32(name='Port', description='The port that is used to connect to the database.', example='3306'),
resourceType?: int32(name='ResourceType', description='The type of service to which the data asset belongs. Valid values:
* **1** :MaxCompute
* **2**: Object Storage Service (OSS)
* **3**: AnalyticDB for MySQL
* **4** :Tablestore
* **5**: ApsaraDB RDS
This parameter is required.', example='1'),
samplingSize?: int32(name='SamplingSize', description='The number of sensitive data samples that are collected after sensitive data detection is enabled. Valid values:
* **0**
* **5**
* **10**', example='0'),
serviceRegionId?: string(name='ServiceRegionId', description='The region in which the data asset resides. 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)', example='cn-hangzhou'),
sourceIp?: string(name='SourceIp', description='This parameter is deprecated.', example='39.170.XX.XX'),
userName?: string(name='UserName', description='The username that is used to access the database.', example='yhm'),
}
model CreateDataLimitResponseBody = {
id?: int32(name='Id', description='The ID of the data asset.', example='1'),
requestId?: string(name='RequestId', description='The ID of the request.', example='7C3AC882-E5A8-4855-BE77-B6837B695EF1'),
}
model CreateDataLimitResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateDataLimitResponseBody(name='body'),
}
/**
* @summary Authorizes Data Security Center (DSC) to scan data assets. The data assets can be a database, a project, or a bucket.
*
* @description You can call this operation to authorize DSC to scan data assets to ensure the security of the data assets.
* ## [](#qps-)Limits
* 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.
*
* @param request CreateDataLimitRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateDataLimitResponse
*/
async function createDataLimitWithOptions(request: CreateDataLimitRequest, runtime: Util.RuntimeOptions): CreateDataLimitResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.auditStatus)) {
query['AuditStatus'] = request.auditStatus;
}
if (!Util.isUnset(request.autoScan)) {
query['AutoScan'] = request.autoScan;
}
if (!Util.isUnset(request.certificatePermission)) {
query['CertificatePermission'] = request.certificatePermission;
}
if (!Util.isUnset(request.enable)) {
query['Enable'] = request.enable;
}
if (!Util.isUnset(request.engineType)) {
query['EngineType'] = request.engineType;
}
if (!Util.isUnset(request.eventStatus)) {
query['EventStatus'] = request.eventStatus;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.instantlyScan)) {
query['InstantlyScan'] = request.instantlyScan;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.logStoreDay)) {
query['LogStoreDay'] = request.logStoreDay;
}
if (!Util.isUnset(request.ocrStatus)) {
query['OcrStatus'] = request.ocrStatus;
}
if (!Util.isUnset(request.parentId)) {
query['ParentId'] = request.parentId;
}
if (!Util.isUnset(request.password)) {
query['Password'] = request.password;
}
if (!Util.isUnset(request.port)) {
query['Port'] = request.port;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.samplingSize)) {
query['SamplingSize'] = request.samplingSize;
}
if (!Util.isUnset(request.serviceRegionId)) {
query['ServiceRegionId'] = request.serviceRegionId;
}
if (!Util.isUnset(request.sourceIp)) {
query['SourceIp'] = request.sourceIp;
}
if (!Util.isUnset(request.userName)) {
query['UserName'] = request.userName;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateDataLimit',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Authorizes Data Security Center (DSC) to scan data assets. The data assets can be a database, a project, or a bucket.
*
* @description You can call this operation to authorize DSC to scan data assets to ensure the security of the data assets.
* ## [](#qps-)Limits
* 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.
*
* @param request CreateDataLimitRequest
* @return CreateDataLimitResponse
*/
async function createDataLimit(request: CreateDataLimitRequest): CreateDataLimitResponse {
var runtime = new Util.RuntimeOptions{};
return createDataLimitWithOptions(request, runtime);
}
model CreateRuleRequest {
category?: int32(name='Category', description='The content type of the sensitive data detection rule. Valid values:
* **0**: keyword
* **2**: regular expression', example='0'),
content?: string(name='Content', description='The content of the sensitive data detection rule. You can specify a regular expression or keywords that are used to match sensitive fields or text.
This parameter is required.', example='(?:\\\\\\\\D|^)((?:(?:25[0-4]|2[0-4]\\\\\\\\d|1\\\\\\\\d{2}|[1-9]\\\\\\\\d{1})\\\\\\\\.)(?:(?:25[0-5]|2[0-4]\\\\\\\\d|[01]?\\\\\\\\d?\\\\\\\\d)\\\\\\\\.){2}(?:25[0-5]|2[0-4]\\\\\\\\d|1[0-9]\\\\\\\\d|[1-9]\\\\\\\\d|[1-9]))(?:\\\\\\\\D|$)'),
contentCategory?: int32(name='ContentCategory', description='The type of the content in the sensitive data detection rule. Valid values include **1**, **2**, **3**, **4**, and **5**. The value 1 indicates attempts to exploit SQL injections. The value 2 indicates bypass by using SQL injections. The value 3 indicates abuse of stored procedures. The value 4 indicates buffer overflow. The value 5 indicates SQL injections based on errors.', example='1'),
description?: string(name='Description', description='The description of the rule.', example='ID card'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh**: Chinese
* **en**: English', example='zh'),
matchType?: int32(name='MatchType', description='The match type. Valid values:
* **1**: rule-based match
* **2**: dictionary-based match', example='1'),
modelRuleIds?: string(name='ModelRuleIds', description='The IDs of the models for sensitive data audit.', example='1452'),
name?: string(name='Name', description='The name of the sensitive data detection rule.
This parameter is required.', example='rule-tst'),
productCode?: string(name='ProductCode', description='The name of the service to which data in the column of the table belongs. Valid values include **MaxCompute**, **OSS**, **ADS**, **OTS**, and **RDS**.', example='RDS'),
productId?: long(name='ProductId', description='The ID of the service to which the data asset belongs. Valid values include **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates Object Storage Service (OSS). The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='2'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the sensitive data that hits the sensitive data detection rule. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='2'),
ruleType?: int32(name='RuleType', description='The type of the sensitive data detection rule. Valid values:
* **1**: sensitive data detection rule
* **2**: audit rule
* **3**: anomalous event detection rule
* **99**: custom rule', example='1'),
sourceIp?: string(name='SourceIp', description='This parameter is deprecated.', example='39.170.XX.XX'),
statExpress?: string(name='StatExpress', description='The statistical expression.', example='1'),
status?: int32(name='Status', description='Specifies whether to enable the sensitive data detection rule. Valid values:
* **1**: yes
* **0**: no', example='1'),
supportForm?: int32(name='SupportForm', description='The type of the data asset. Valid values:
* **0**: all data assets
* **1**: structured data asset
* **2**: unstructured data asset
> If you set the parameter to 1 or 2, rules that support all data assets and rules that support the queried data asset type are returned.', example='1'),
target?: string(name='Target', description='The code of the service to which the sensitive data detection rule is applied. Valid values include **MaxCompute**, **OSS**, **ADS**, **OTS**, and **RDS**.', example='MaxCompute'),
templateRuleIds?: string(name='TemplateRuleIds', description='The IDs of the templates that are used to audit sensitive data.', example='1'),
warnLevel?: int32(name='WarnLevel', description='The risk level of the alert that is triggered. Valid values:
* **1**: low
* **2**: medium
* **3**: high', example='2'),
}
model CreateRuleResponseBody = {
id?: int32(name='Id', description='The unique ID of the sensitive data detection rule.', example='1'),
requestId?: string(name='RequestId', description='The ID of the request.', example='208B016D-4CB9-4A85-96A5-0B8ED1EBF271'),
}
model CreateRuleResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateRuleResponseBody(name='body'),
}
/**
* @summary Creates a custom sensitive data detection rule.
*
* @param request CreateRuleRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateRuleResponse
*/
async function createRuleWithOptions(request: CreateRuleRequest, runtime: Util.RuntimeOptions): CreateRuleResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.category)) {
query['Category'] = request.category;
}
if (!Util.isUnset(request.content)) {
query['Content'] = request.content;
}
if (!Util.isUnset(request.contentCategory)) {
query['ContentCategory'] = request.contentCategory;
}
if (!Util.isUnset(request.description)) {
query['Description'] = request.description;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.matchType)) {
query['MatchType'] = request.matchType;
}
if (!Util.isUnset(request.modelRuleIds)) {
query['ModelRuleIds'] = request.modelRuleIds;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.productCode)) {
query['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.productId)) {
query['ProductId'] = request.productId;
}
if (!Util.isUnset(request.riskLevelId)) {
query['RiskLevelId'] = request.riskLevelId;
}
if (!Util.isUnset(request.ruleType)) {
query['RuleType'] = request.ruleType;
}
if (!Util.isUnset(request.sourceIp)) {
query['SourceIp'] = request.sourceIp;
}
if (!Util.isUnset(request.statExpress)) {
query['StatExpress'] = request.statExpress;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
if (!Util.isUnset(request.supportForm)) {
query['SupportForm'] = request.supportForm;
}
if (!Util.isUnset(request.target)) {
query['Target'] = request.target;
}
if (!Util.isUnset(request.templateRuleIds)) {
query['TemplateRuleIds'] = request.templateRuleIds;
}
if (!Util.isUnset(request.warnLevel)) {
query['WarnLevel'] = request.warnLevel;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateRule',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Creates a custom sensitive data detection rule.
*
* @param request CreateRuleRequest
* @return CreateRuleResponse
*/
async function createRule(request: CreateRuleRequest): CreateRuleResponse {
var runtime = new Util.RuntimeOptions{};
return createRuleWithOptions(request, runtime);
}
model CreateScanTaskRequest {
dataLimitId?: long(name='DataLimitId', description='The unique ID of the data asset, such as an instance, a database, and a bucket. You can call the [DescribeDataLimits](~~DescribeDataLimits~~) operation to query the unique ID.
This parameter is required.', example='1'),
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
intervalDay?: int32(name='IntervalDay', description='The interval between two consecutive custom scan tasks. Unit: days. Valid values: 1 to 2147483648.
This parameter is required.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response.
* **zh**: Chinese
* **en**: English', example='zh'),
ossScanPath?: string(name='OssScanPath', description='The data to be scanned in the Object Storage Service (OSS) bucket. Prefix match, suffix match, and regular expression match are supported.', example='/test/test'),
resourceType?: long(name='ResourceType', description='The type of the service to which the data assets to be scanned belong. Valid values include **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates OSS. The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.
This parameter is required.', example='2'),
runHour?: int32(name='RunHour', description='The time when the scan task is executed next time. Unit: hours.
This parameter is required.', example='12'),
runMinute?: int32(name='RunMinute', description='The time when the scan task is executed next time. Unit: minutes.
This parameter is required.', example='30'),
scanRange?: int32(name='ScanRange', description='The matching rule that specifies the scan scope of the custom scan task. This parameter takes effect only if you set the **ScanRangeContent** parameter. Valid values:
* **0**: exact match
* **1**: prefix match
* **2**: suffix match
* **3**: regular expression match
This parameter is required.', example='0'),
scanRangeContent?: string(name='ScanRangeContent', description='The data to be scanned in a structured data asset. Prefix match, suffix match, and regular expression match are supported.
This parameter is required.', example='datamask/'),
sourceIp?: string(name='SourceIp', description='This parameter is deprecated.', example='39.170.XX.XX'),
taskName?: string(name='TaskName', description='The name of the scan task.
This parameter is required.', example='scan-test-sample****'),
taskUserName?: string(name='TaskUserName', description='The account that is used to create the scan task.', example='demo'),
}
model CreateScanTaskResponseBody = {
id?: int32(name='Id', description='The ID of the custom scan task.', example='100'),
requestId?: string(name='RequestId', description='The ID of the request.', example='B1F2BB1F-04EC-5D36-B136-B4DE17FD8DE0'),
}
model CreateScanTaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateScanTaskResponseBody(name='body'),
}
/**
* @summary Creates a custom scan task. The custom scan task is used to scan data assets on which Data Security Center (DSC) is granted the scan permissions for sensitive data.
*
* @description You can call this operation to create a custom scan task for authorized data assets. You can customize the interval between two consecutive scan tasks and the time when the scan task is executed next time.
* # Limits
* 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.
*
* @param request CreateScanTaskRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateScanTaskResponse
*/
async function createScanTaskWithOptions(request: CreateScanTaskRequest, runtime: Util.RuntimeOptions): CreateScanTaskResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.dataLimitId)) {
query['DataLimitId'] = request.dataLimitId;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.intervalDay)) {
query['IntervalDay'] = request.intervalDay;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.ossScanPath)) {
query['OssScanPath'] = request.ossScanPath;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.runHour)) {
query['RunHour'] = request.runHour;
}
if (!Util.isUnset(request.runMinute)) {
query['RunMinute'] = request.runMinute;
}
if (!Util.isUnset(request.scanRange)) {
query['ScanRange'] = request.scanRange;
}
if (!Util.isUnset(request.scanRangeContent)) {
query['ScanRangeContent'] = request.scanRangeContent;
}
if (!Util.isUnset(request.sourceIp)) {
query['SourceIp'] = request.sourceIp;
}
if (!Util.isUnset(request.taskName)) {
query['TaskName'] = request.taskName;
}
if (!Util.isUnset(request.taskUserName)) {
query['TaskUserName'] = request.taskUserName;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateScanTask',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Creates a custom scan task. The custom scan task is used to scan data assets on which Data Security Center (DSC) is granted the scan permissions for sensitive data.
*
* @description You can call this operation to create a custom scan task for authorized data assets. You can customize the interval between two consecutive scan tasks and the time when the scan task is executed next time.
* # Limits
* 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.
*
* @param request CreateScanTaskRequest
* @return CreateScanTaskResponse
*/
async function createScanTask(request: CreateScanTaskRequest): CreateScanTaskResponse {
var runtime = new Util.RuntimeOptions{};
return createScanTaskWithOptions(request, runtime);
}
model CreateSlrRoleRequest {
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='2'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Simplified Chinese
* **en_us**: English', example='zh_cn'),
sourceIp?: string(name='SourceIp', description='This parameter is deprecated.', example='39.170.XX.XX'),
}
model CreateSlrRoleResponseBody = {
hasPermission?: boolean(name='HasPermission', description='Indicates whether the service-linked role was created. Valid values:
* **true**: yes
* **false**: no', example='true'),
requestId?: string(name='RequestId', description='The ID of the request, which is used to locate and troubleshoot issues.', example='208B016D-4CB9-4A85-96A5-0B8ED1EBF271'),
}
model CreateSlrRoleResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateSlrRoleResponseBody(name='body'),
}
/**
* @summary Creates a service-linked role for Data Security Center (DSC) to grant DSC the permissions to access data assets in other services.
*
* @description You can call this operation to allow DSC to access the data assets in services such as Object Storage Service (OSS), ApsaraDB RDS, and MaxCompute. After you call this operation, the system automatically creates a service-linked role named AliyunServiceRoleForSDDP and attaches the AliyunServiceRolePolicyForSDDP policy to the role.
* # Limits
* 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.
*
* @param request CreateSlrRoleRequest
* @param runtime runtime options for this request RuntimeOptions
* @return CreateSlrRoleResponse
*/
async function createSlrRoleWithOptions(request: CreateSlrRoleRequest, runtime: Util.RuntimeOptions): CreateSlrRoleResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.sourceIp)) {
query['SourceIp'] = request.sourceIp;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CreateSlrRole',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Creates a service-linked role for Data Security Center (DSC) to grant DSC the permissions to access data assets in other services.
*
* @description You can call this operation to allow DSC to access the data assets in services such as Object Storage Service (OSS), ApsaraDB RDS, and MaxCompute. After you call this operation, the system automatically creates a service-linked role named AliyunServiceRoleForSDDP and attaches the AliyunServiceRolePolicyForSDDP policy to the role.
* # Limits
* 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.
*
* @param request CreateSlrRoleRequest
* @return CreateSlrRoleResponse
*/
async function createSlrRole(request: CreateSlrRoleRequest): CreateSlrRoleResponse {
var runtime = new Util.RuntimeOptions{};
return createSlrRoleWithOptions(request, runtime);
}
model DeleteDataLimitRequest {
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
id?: long(name='Id', description='The ID of the data asset.
You can call the DescribeDataLimits operation to query the IDs of data assets. The value of the Id response parameter indicates the ID of a data asset.
This parameter is required.', example='12033'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
sourceIp?: string(name='SourceIp', description='This parameter is deprecated.', example='39.170.XX.XX'),
}
model DeleteDataLimitResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='7C3AC882-E5A8-4855-BE77-B6837B695EF1'),
}
model DeleteDataLimitResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteDataLimitResponseBody(name='body'),
}
/**
* @summary Revokes the scan permissions on a data asset. The data asset can be a database, an instance, or a bucket.
*
* @description You can call this operation to revoke the permissions on a data asset from Data Security Center (DSC).
* # Limits
* 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.
*
* @param request DeleteDataLimitRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteDataLimitResponse
*/
async function deleteDataLimitWithOptions(request: DeleteDataLimitRequest, runtime: Util.RuntimeOptions): DeleteDataLimitResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.sourceIp)) {
query['SourceIp'] = request.sourceIp;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteDataLimit',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Revokes the scan permissions on a data asset. The data asset can be a database, an instance, or a bucket.
*
* @description You can call this operation to revoke the permissions on a data asset from Data Security Center (DSC).
* # Limits
* 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.
*
* @param request DeleteDataLimitRequest
* @return DeleteDataLimitResponse
*/
async function deleteDataLimit(request: DeleteDataLimitRequest): DeleteDataLimitResponse {
var runtime = new Util.RuntimeOptions{};
return deleteDataLimitWithOptions(request, runtime);
}
model DeleteRuleRequest {
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
id?: long(name='Id', description='The ID of the sensitive data detection rule.
This parameter is required.', example='122300'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values: **zh** and **en**. The value zh indicates Chinese, and the value en indicates English.', example='zh'),
sourceIp?: string(name='SourceIp', description='This parameter is deprecated.', example='39.170.XX.XX'),
}
model DeleteRuleResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='7C3AC882-E5A8-4855-BE77-B6837B6*****'),
}
model DeleteRuleResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteRuleResponseBody(name='body'),
}
/**
* @summary Deletes a custom sensitive data detection rule from Data Security Center (DSC).
*
* @param request DeleteRuleRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DeleteRuleResponse
*/
async function deleteRuleWithOptions(request: DeleteRuleRequest, runtime: Util.RuntimeOptions): DeleteRuleResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.sourceIp)) {
query['SourceIp'] = request.sourceIp;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteRule',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Deletes a custom sensitive data detection rule from Data Security Center (DSC).
*
* @param request DeleteRuleRequest
* @return DeleteRuleResponse
*/
async function deleteRule(request: DeleteRuleRequest): DeleteRuleResponse {
var runtime = new Util.RuntimeOptions{};
return deleteRuleWithOptions(request, runtime);
}
model DescribeCategoryTemplateListRequest {
currentPage?: int32(name='CurrentPage', example='1'),
featureType?: int32(name='FeatureType'),
lang?: string(name='Lang', example='zh_cn'),
pageSize?: int32(name='PageSize', example='10'),
usageScenario?: int32(name='UsageScenario', example='1'),
}
model DescribeCategoryTemplateListResponseBody = {
currentPage?: int32(name='CurrentPage', example='1'),
items?: [
{
currentRiskLevel?: int32(name='CurrentRiskLevel', example='5'),
description?: string(name='Description', example='description'),
gmtCreate?: long(name='GmtCreate', example='1582992000000'),
gmtModified?: long(name='GmtModified', example='1545277010000'),
id?: long(name='Id', example='1'),
maxCategoryLevel?: int32(name='MaxCategoryLevel', example='2'),
maxRiskLevel?: int32(name='MaxRiskLevel', example='5'),
name?: string(name='Name', example='built-in template'),
status?: int32(name='Status', example='1'),
supportEdit?: int32(name='SupportEdit', example='0'),
type?: int32(name='Type', example='6'),
}
](name='Items'),
pageSize?: int32(name='PageSize', example='10'),
requestId?: string(name='RequestId', example='8491DBFD-48C0-4E11-B6FC-6F38921244A9'),
totalCount?: int32(name='TotalCount', example='12'),
}
model DescribeCategoryTemplateListResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeCategoryTemplateListResponseBody(name='body'),
}
/**
* @param request DescribeCategoryTemplateListRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeCategoryTemplateListResponse
*/
async function describeCategoryTemplateListWithOptions(request: DescribeCategoryTemplateListRequest, runtime: Util.RuntimeOptions): DescribeCategoryTemplateListResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.usageScenario)) {
query['UsageScenario'] = request.usageScenario;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeCategoryTemplateList',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @param request DescribeCategoryTemplateListRequest
* @return DescribeCategoryTemplateListResponse
*/
async function describeCategoryTemplateList(request: DescribeCategoryTemplateListRequest): DescribeCategoryTemplateListResponse {
var runtime = new Util.RuntimeOptions{};
return describeCategoryTemplateListWithOptions(request, runtime);
}
model DescribeCategoryTemplateRuleListRequest {
currentPage?: int32(name='CurrentPage', description='The number of the page to return. Default value: **1**.', example='1'),
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Simplified Chinese
* **en_us**: English', example='zh_cn'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Default value: **10**.', example='10'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the data that is not compliant with the rule. Valid values: **1** to **11**. Default value: **null**.
* **1**: No sensitive data is detected.
* **2**: specifies the S1 sensitivity level.
* **3**: specifies the S2 sensitivity level.
* **4**: specifies the S3 sensitivity level.
* **5**: specifies the S4 sensitivity level.
* **6**: specifies the S5 sensitivity level.
* **7**: specifies the S6 sensitivity level.
* **8**: specifies the S7 sensitivity level.
* **9**: specifies the S8 sensitivity level.
* **10**: specifies the S9 sensitivity level.
* **11**: specifies the S10 sensitivity level.
* **null**: specifies all preceding sensitivity levels.', example='2'),
status?: int32(name='Status', description='The status of the rule. Default value: **null**. Valid values:
* **0**: disabled
* **1**: enabled
* **null**: all states', example='1'),
}
model DescribeCategoryTemplateRuleListResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
description?: string(name='Description', description='The description of the rule.', example='Rule for identifying ID card numbers'),
id?: long(name='Id', description='The unique ID of the rule.', example='100'),
identificationRuleIds?: string(name='IdentificationRuleIds', description='The IDs of sensitive data types. Multiple IDs are separated by commas (,).', example='1001,1002'),
identificationScope?: string(name='IdentificationScope', description='The scan scope of the rule. The value is a JSON array of the STRING type. Each element in a JSON array indicates a scan scope that contains the following fields:
* **Asset**: the data asset type. Valid values: RDS, DRDS, PolarDB, OTS, ADB, and OceanBase. The value is of the STRING type.
* **Content**: the scan scope. The value is of the STRING type. Each element in a JSON array indicates a scan scope that contains the following fields:
* **Range**: the matching condition. Valid values: Instance, database, table, column, project, bucket, and object. The value project is valid only for data assets in MaxCompute. The values bucket and object are valid only for data assets in Object Storage Service (OSS). The value of this parameter is of the STRING type.
* **Operator**: the operator. Valid values: equals, regex, prefix, and suffix. The operator equals indicates a full match. The operator regex indicates a match by regular expression. The operator prefix indicates a match by prefix. The operator suffix indicates a match by suffix.
* **Value**: the matching content. The value is of the STRING type.', example='[{"Asset":"RDS","Content":[{"Range":"database","Operator":"regex","Value":"register"}]},{"Asset":"RDS","Content":[{"Range":"table","Operator":"regex","Value":"register"}]},{"Asset":"RDS","Content":[{"Range":"column","Operator":"regex","Value":"register"}]},{"Asset":"ODPS","Content":[{"Range":"project","Operator":"regex","Value":"register"}]},{"Asset":"ODPS","Content":[{"Range":"table","Operator":"regex","Value":"register"}]},{"Asset":"ODPS","Content":[{"Range":"column","Operator":"regex","Value":"register"}]}]'),
name?: string(name='Name', description='The name of the rule.', example='ID card number'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the data that is not compliant with the rule. Valid values: **1** to **11**.
* **1**: No sensitive data is detected.
* **2**: indicates the S1 sensitivity level.
* **3**: indicates the S2 sensitivity level.
* **4**: indicates the S3 sensitivity level.
* **5**: indicates the S4 sensitivity level.
* **6**: indicates the S5 sensitivity level.
* **7**: indicates the S6 sensitivity level.
* **8**: indicates the S7 sensitivity level.
* **9**: indicates the S8 sensitivity level.
* **10**: indicates the S9 sensitivity level.
* **11**: indicates the S10 sensitivity level.
* **null**: indicates all preceding sensitivity levels.', example='2'),
status?: int32(name='Status', description='The status of the rule. Valid values:
* **0**: disabled
* **1**: enabled
* **null**: all states', example='1'),
}
](name='Items', description='The list of rules.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
requestId?: string(name='RequestId', description='The ID of the request.', example='136082B3-B21F-5E9D-B68E-991FFD205D24'),
totalCount?: int32(name='TotalCount', description='The total number of rules in the template.', example='10'),
}
model DescribeCategoryTemplateRuleListResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeCategoryTemplateRuleListResponseBody(name='body'),
}
/**
* @summary Queries rules in a classification template by page.
*
* @description You can call this operation to query rules in a classification template.
* # Limits
* 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.
*
* @param request DescribeCategoryTemplateRuleListRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeCategoryTemplateRuleListResponse
*/
async function describeCategoryTemplateRuleListWithOptions(request: DescribeCategoryTemplateRuleListRequest, runtime: Util.RuntimeOptions): DescribeCategoryTemplateRuleListResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.riskLevelId)) {
query['RiskLevelId'] = request.riskLevelId;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeCategoryTemplateRuleList',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries rules in a classification template by page.
*
* @description You can call this operation to query rules in a classification template.
* # Limits
* 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.
*
* @param request DescribeCategoryTemplateRuleListRequest
* @return DescribeCategoryTemplateRuleListResponse
*/
async function describeCategoryTemplateRuleList(request: DescribeCategoryTemplateRuleListRequest): DescribeCategoryTemplateRuleListResponse {
var runtime = new Util.RuntimeOptions{};
return describeCategoryTemplateRuleListWithOptions(request, runtime);
}
model DescribeColumnsRequest {
currentPage?: int32(name='CurrentPage', description='The page number of the page to return.', example='1'),
engineType?: string(name='EngineType', description='The engine type. Valid values:
* **MySQL**
* **MariaDB**
* **Oracle**
* **PostgreSQL**
* **SQLServer**', example='MySQL'),
instanceId?: long(name='InstanceId', description='The ID of the instance to which data in the column of the table belongs.
> You can call the [DescribeInstances](~~DescribeRules~~) operation to query the IDs of instances.', example='1'),
instanceName?: string(name='InstanceName', description='The name of the instance to which data in the column of the table belongs.', example='rm-bp17t1htja573l5i8****'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
modelTagId?: string(name='ModelTagId', description='The data tag.
* 101: personal sensitive information
* 102: personal information', example='101'),
name?: string(name='Name', description='The search keyword. Fuzzy match is supported.
For example, if you enter **test**, all columns whose names contain **test** are retrieved.', example='test'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='10'),
productCode?: string(name='ProductCode', description='The name of the service to which data in the column of the table belongs. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='MaxCompute'),
productId?: string(name='ProductId', description='The ID of the service to which the data object belongs. Valid values:
* **1**: MaxCompute
* **2**: Object Storage Service (OSS)
* **3**: AnalyticDB for MySQL
* **4**: Tablestore (OTS)
* **5**: ApsaraDB RDS
* **6**: self-managed database
* **7**: PolarDB for Xscale (PolarDB-X)
* **8**: PolarDB
* **9**: AnalyticDB for PostgreSQL
* **10**: ApsaraDB for OceanBase
* **11**: ApsaraDB for MongoDB
* **25**: ApsaraDB for Redis', example='5'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the sensitive data that hits the sensitive data detection rule. Valid values:
* **1**: N/A
* **2**: S1
* **3**: S2
* **4**: S3
* **5**: S4', example='2'),
ruleId?: long(name='RuleId', description='The ID of the sensitive data detection rule that data in the column of the table hits.
> You can call the [DescribeRules](~~DescribeRules~~) operation to query the IDs of sensitive data detection rules.', example='11111'),
ruleName?: string(name='RuleName', description='The name of the sensitive data detection rule that data in the column of the table hits.', example='ID card number (the Chinese mainland)'),
sensLevelName?: string(name='SensLevelName', description='The name of the sensitivity level of the data that hits the sensitive data detection rule. Valid values:
* **N/A**: No sensitive data is detected.
* **S1**: indicates the low sensitivity level.
* **S2**: indicates the medium sensitivity level.
* **S3**: indicates the high sensitivity level.
* **S4**: indicates the highest sensitivity level.', example='S2'),
tableId?: long(name='TableId', description='The ID of the table to which the column belongs.
> You can call the [DescribeTables](~~DescribeTables~~) operation to query the IDs of tables.', example='11132334'),
tableName?: string(name='TableName', description='The name of the table.', example='it_table'),
templateId?: string(name='TemplateId', description='The ID of the industry-specific classification template.
> You can call the [DescribeCategoryTemplateList](https://help.aliyun.com/document_detail/2399296.html) operation to obtain the IDs of industry-specific classification templates.', example='5'),
templateRuleId?: string(name='TemplateRuleId', description='The ID of the template rule that is hit.
> You can call the [DescribeCategoryTemplateRuleList](https://help.aliyun.com/document_detail/410143.html) operation to obtain the IDs of hit template rules.', example='1542'),
}
model DescribeColumnsResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
creationTime?: long(name='CreationTime', description='The time when the data in the column of the table is created. Unit: milliseconds.', example='1536751124000'),
dataType?: string(name='DataType', description='The type of data in the column of the table.', example='String'),
engineType?: string(name='EngineType'),
id?: string(name='Id', description='The ID of the column of the table.', example='268'),
instanceId?: long(name='InstanceId', description='The ID of the instance to which data in the column of the table belongs.', example='1'),
instanceName?: string(name='InstanceName', description='The name of the instance to which data in the column of the table belongs.', example='rm-bp17t1htja573l5i8****'),
maskingStatus?: int32(name='MaskingStatus'),
modelTags?: [
{
id?: long(name='Id', description='The tag ID.
* **101**: sensitive personal information
* **102**: personal information
* **103**: important information', example='101'),
name?: string(name='Name', description='The tag name.
* Sensitive personal information
* Personal information
* Important information', example='personal sensitive data'),
}
](name='ModelTags', description='A list of tags for data that hits the recognition model.'),
name?: string(name='Name', description='The name of the column of the table.', example='gxdata'),
odpsRiskLevelName?: string(name='OdpsRiskLevelName', description='The name of the sensitivity level for asset. Valid values:
* **N/A**: indicates that no sensitive data is detected.
* **S1**: indicates the low sensitivity level.
* **S2**: indicates the medium sensitivity level.
* **S3**: indicates the high sensitivity level.
* **S4**: indicates the highest sensitivity level.', example='S3'),
odpsRiskLevelValue?: int32(name='OdpsRiskLevelValue', description='The ID of the sensitivity level of the asset. Valid values:
* **1**: N/A
* **2**: S1
* **3**: S2
* **4**: S3
* **5**: S4', example='3'),
productCode?: string(name='ProductCode', description='The name of the service to which data in the column of the table belongs. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='MaxCompute'),
productId?: long(name='ProductId'),
regionId?: string(name='RegionId', description='The region in which the asset resides.', example='cn-***'),
revisionId?: long(name='RevisionId', description='The ID of the revision record.', example='12'),
revisionStatus?: long(name='RevisionStatus', description='Indicates whether the column is revised. Valid values:
* 1: yes
* 0: no', example='1'),
riskLevelId?: long(name='RiskLevelId', description='The ID of the sensitivity level of data in the column of the table. Valid values:
* **1**: N/A
* **2**: S1
* **3**: S2
* **4**: S3
* **5**: S4', example='2'),
riskLevelName?: string(name='RiskLevelName', description='The name of the sensitivity level for data in the column of the table. Valid values:
* **N/A**: indicates that no sensitive data is detected.
* **S1**: indicates the low sensitivity level.
* **S2**: indicates the medium sensitivity level.
* **S3**: indicates the high sensitivity level.
* **S4**: indicates the highest sensitivity level.', example='S2'),
ruleId?: long(name='RuleId', description='The ID of the sensitive data detection rule that data in the column of the table hits.', example='1'),
ruleName?: string(name='RuleName', description='The name of the sensitive data detection rule that data in the column of the table hits.', example='\\\\*\\\\* rule'),
sensLevelName?: string(name='SensLevelName', description='The name of the sensitivity level. Valid values:
* **N/A**: indicates that no sensitive data is detected.
* **S1**: indicates the low sensitivity level.
* **S2**: indicates the medium sensitivity level.
* **S3**: indicates the high sensitivity level.
* **S4**: indicates the highest sensitivity level.', example='S2'),
sensitive?: boolean(name='Sensitive', description='Indicates whether the column contains sensitive data. Valid values:
* true
* false', example='false'),
tableId?: long(name='TableId', description='The ID of the table.', example='123'),
tableName?: string(name='TableName', description='The name of the table to which the revised column belongs.', example='it_table'),
}
](name='Items', description='The columns.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-4******'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='12'),
}
model DescribeColumnsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeColumnsResponseBody(name='body'),
}
/**
* @summary Queries data in the columns of the tables that Data Security Center (DSC) is authorized to access. The tables include the tables of MaxCompute and ApsaraDB RDS.
*
* @description You can call this operation to query the data in columns of a table that may contain sensitive data. This helps you analyze sensitive data.
* ## [](#)Precautions
* The DescribeColumns operation is changed to DescribeColumnsV2. We recommend that you call the DescribeColumnsV2 operation when you develop your applications.
* ## [](#qps)Limits
* Each Alibaba Cloud account can call this operation up to 10 times per second. 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.
*
* @param request DescribeColumnsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeColumnsResponse
*/
async function describeColumnsWithOptions(request: DescribeColumnsRequest, runtime: Util.RuntimeOptions): DescribeColumnsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.engineType)) {
query['EngineType'] = request.engineType;
}
if (!Util.isUnset(request.instanceId)) {
query['InstanceId'] = request.instanceId;
}
if (!Util.isUnset(request.instanceName)) {
query['InstanceName'] = request.instanceName;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.modelTagId)) {
query['ModelTagId'] = request.modelTagId;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.productCode)) {
query['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.productId)) {
query['ProductId'] = request.productId;
}
if (!Util.isUnset(request.riskLevelId)) {
query['RiskLevelId'] = request.riskLevelId;
}
if (!Util.isUnset(request.ruleId)) {
query['RuleId'] = request.ruleId;
}
if (!Util.isUnset(request.ruleName)) {
query['RuleName'] = request.ruleName;
}
if (!Util.isUnset(request.sensLevelName)) {
query['SensLevelName'] = request.sensLevelName;
}
if (!Util.isUnset(request.tableId)) {
query['TableId'] = request.tableId;
}
if (!Util.isUnset(request.tableName)) {
query['TableName'] = request.tableName;
}
if (!Util.isUnset(request.templateId)) {
query['TemplateId'] = request.templateId;
}
if (!Util.isUnset(request.templateRuleId)) {
query['TemplateRuleId'] = request.templateRuleId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeColumns',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries data in the columns of the tables that Data Security Center (DSC) is authorized to access. The tables include the tables of MaxCompute and ApsaraDB RDS.
*
* @description You can call this operation to query the data in columns of a table that may contain sensitive data. This helps you analyze sensitive data.
* ## [](#)Precautions
* The DescribeColumns operation is changed to DescribeColumnsV2. We recommend that you call the DescribeColumnsV2 operation when you develop your applications.
* ## [](#qps)Limits
* Each Alibaba Cloud account can call this operation up to 10 times per second. 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.
*
* @param request DescribeColumnsRequest
* @return DescribeColumnsResponse
*/
async function describeColumns(request: DescribeColumnsRequest): DescribeColumnsResponse {
var runtime = new Util.RuntimeOptions{};
return describeColumnsWithOptions(request, runtime);
}
model DescribeColumnsV2Request {
currentPage?: int32(name='CurrentPage', description='The page number. Default value: **1**.', example='1'),
engineType?: string(name='EngineType'),
instanceId?: long(name='InstanceId', description='The ID of the instance to which data in the column of the table belongs.
> You can call the [DescribeInstances](https://help.aliyun.com/document_detail/141708.html) operation to obtain the ID of the instance to which the data in the column of the table belongs.', example='1'),
instanceName?: string(name='InstanceName', description='The name of the instance to which data in the column of the table belongs.', example='rm-bp17t1htja573l5i8****'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: simplified Chinese
* **en_us**: English', example='zh_cn'),
name?: string(name='Name', description='The search keyword. Fuzzy match is supported.
For example, if you enter **test**, all columns whose names contain **test** are retrieved.', example='test'),
pageSize?: int32(name='PageSize', description='The number of entries per page. Default value: **10**.', example='10'),
productCode?: string(name='ProductCode', description='The name of the service to which data in the column of the table belongs. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='MaxCompute'),
riskLevelId?: long(name='RiskLevelId', description='The ID of the sensitivity level of the data that hits the sensitive data detection rule. Valid values:
* **1**: N/A
* **2**: S1
* **3**: S2
* **4**: S3
* **5**: S4', example='2'),
ruleId?: long(name='RuleId', description='The ID of the sensitive data detection rule that data in the column of the table hits.
> You can call the [DescribeRules](https://help.aliyun.com/document_detail/141389.html) operation to obtain the ID of the sensitive data detection rule.', example='11122200'),
ruleName?: string(name='RuleName', description='The name of the sensitive data detection rule that data in the column of the table hits.', example='name'),
sensLevelName?: string(name='SensLevelName', description='The name of the sensitivity level. Valid values:
* **N/A**: indicates that no sensitive data is detected.
* **S1**: indicates the low sensitivity level.
* **S2**: indicates the medium sensitivity level.
* **S3**: indicates the high sensitivity level.
* **S4**: indicates the highest sensitivity level.', example='S2'),
tableId?: string(name='TableId', description='The ID of the table to which the column belongs.
> You can call the [DescribeTables](https://help.aliyun.com/document_detail/141709.html) operation to obtain the ID of the table.', example='11132334'),
tableName?: string(name='TableName', description='The name of the table.', example='it_table'),
}
model DescribeColumnsV2ResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number. Default value: **1**.', example='1'),
items?: [
{
creationTime?: long(name='CreationTime', description='The time when the data in the column of the table is created. Unit: milliseconds.', example='1536751124000'),
dataType?: string(name='DataType', description='The type of data in the column of the table.', example='varchar'),
engineType?: string(name='EngineType'),
id?: string(name='Id', description='The ID of the column of the table.', example='111111'),
instanceId?: long(name='InstanceId', description='The ID of the instance to which data in the column of the table belongs.', example='1232122'),
instanceName?: string(name='InstanceName', description='The name of the instance to which data in the column of the table belongs.', example='rm-1234'),
maskingStatus?: int32(name='MaskingStatus'),
modelTags?: [
{
id?: long(name='Id', description='The tag ID. Valid values:
* **101**: personal sensitive information
* **102**: personal information
* **107**: general information', example='101'),
name?: string(name='Name', description='The tag name. Valid values:
* Personal sensitive information
* Personal information
* General information', example='personal sensitive information'),
}
](name='ModelTags', description='A list of data tags.'),
name?: string(name='Name', description='The name of the column of the table.', example='obj_id'),
odpsRiskLevelName?: string(name='OdpsRiskLevelName', description='The name of the sensitivity level for asset. Valid values:
* **N/A**: indicates that no sensitive data is detected.
* **S1**: indicates the low sensitivity level.
* **S2**: indicates the medium sensitivity level.
* **S3**: indicates the high sensitivity level.
* **S4**: indicates the highest sensitivity level.', example='S4'),
odpsRiskLevelValue?: int32(name='OdpsRiskLevelValue', description='The ID of the sensitivity level of the asset. Valid values:
* **1**: N/A
* **2**: S1
* **3**: S2
* **4**: S3
* **5**: S4
>The return value <=1 means N/A.', example='3'),
productCode?: string(name='ProductCode', description='The name of the service to which data in the column of the table belongs. Valid values: **MaxCompute, OSS, ADS, OTS, and RDS**.', example='RDS'),
productId?: long(name='ProductId'),
regionId?: string(name='RegionId'),
revisionId?: long(name='RevisionId', description='The ID of the revision record.', example='12'),
revisionStatus?: long(name='RevisionStatus', description='Indicates whether the column is revised. Valid values:
* 1: yes
* 0: no', example='1'),
riskLevelId?: long(name='RiskLevelId', description='The ID of the sensitivity level of data in the column of the table. Valid values:
* **1**: N/A
* **2**: S1
* **3**: S2
* **4**: S3
* **5**: S4
>The return value <=1 means N/A.', example='4'),
riskLevelName?: string(name='RiskLevelName', description='The name of the sensitivity level for data in the column of the table. Valid values:
* **N/A**: indicates that no sensitive data is detected.
* **S1**: indicates the low sensitivity level.
* **S2**: indicates the medium sensitivity level.
* **S3**: indicates the high sensitivity level.
* **S4**: indicates the highest sensitivity level.', example='S1'),
ruleId?: long(name='RuleId', description='The ID of the sensitive data detection rule that data in the column of the table hits.', example='1004'),
ruleName?: string(name='RuleName', description='The name of the sensitive data detection rule that data in the column of the table hits.', example='name'),
sensLevelName?: string(name='SensLevelName', description='The name of the sensitivity level. Valid values:
* **N/A**: indicates that no sensitive data is detected.
* **S1**: indicates the low sensitivity level.
* **S2**: indicates the medium sensitivity level.
* **S3**: indicates the high sensitivity level.
* **S4**: indicates the highest sensitivity level.', example='S2'),
sensitive?: boolean(name='Sensitive', description='Indicates whether the column contains sensitive data. Valid values:
* true
* false', example='true'),
tableId?: long(name='TableId', description='The ID of the table.', example='123'),
tableName?: string(name='TableName', description='The name of the table to which the revised column belongs.', example='it_table'),
}
](name='Items', description='A list of column recognition results of the data table.'),
pageSize?: int32(name='PageSize', description='The number of entries per page. Default value: **10**.', example='10'),
requestId?: string(name='RequestId', description='The request ID.', example='B1F2BB1F-04EC-5D36-B136-B4DE17FD8DE0'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='12'),
}
model DescribeColumnsV2Response = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeColumnsV2ResponseBody(name='body'),
}
/**
* @summary Queries the columns of tables in instances, such as MaxCompute projects and ApsaraDB RDS instances, that you authorize Data Security Center (DSC) to access.
*
* @param request DescribeColumnsV2Request
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeColumnsV2Response
*/
async function describeColumnsV2WithOptions(request: DescribeColumnsV2Request, runtime: Util.RuntimeOptions): DescribeColumnsV2Response {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.engineType)) {
query['EngineType'] = request.engineType;
}
if (!Util.isUnset(request.instanceId)) {
query['InstanceId'] = request.instanceId;
}
if (!Util.isUnset(request.instanceName)) {
query['InstanceName'] = request.instanceName;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.productCode)) {
query['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.riskLevelId)) {
query['RiskLevelId'] = request.riskLevelId;
}
if (!Util.isUnset(request.ruleId)) {
query['RuleId'] = request.ruleId;
}
if (!Util.isUnset(request.ruleName)) {
query['RuleName'] = request.ruleName;
}
if (!Util.isUnset(request.sensLevelName)) {
query['SensLevelName'] = request.sensLevelName;
}
if (!Util.isUnset(request.tableId)) {
query['TableId'] = request.tableId;
}
if (!Util.isUnset(request.tableName)) {
query['TableName'] = request.tableName;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeColumnsV2',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries the columns of tables in instances, such as MaxCompute projects and ApsaraDB RDS instances, that you authorize Data Security Center (DSC) to access.
*
* @param request DescribeColumnsV2Request
* @return DescribeColumnsV2Response
*/
async function describeColumnsV2(request: DescribeColumnsV2Request): DescribeColumnsV2Response {
var runtime = new Util.RuntimeOptions{};
return describeColumnsV2WithOptions(request, runtime);
}
model DescribeConfigsRequest {
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh**: Chinese
* **en**: English', example='zh'),
}
model DescribeConfigsResponseBody = {
configList?: [
{
code?: string(name='Code', description='The code of the common configuration item.', example='1'),
defaultValue?: string(name='DefaultValue', description='The description of the default value for the common configuration item.', example='The volume of logs of a specific type that are generated on the current day is less than 30% of the average volume of logs generated in the previous 10 days.'),
description?: string(name='Description', description='The description of the common configuration item.', example='Anomalous log output'),
id?: long(name='Id', description='The unique ID of the common configuration item.', example='2133'),
value?: string(name='Value', description='The value of the common configuration item.', example='30'),
}
](name='ConfigList', description='An array that consists of common configuration items for alerts.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
}
model DescribeConfigsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeConfigsResponseBody(name='body'),
}
/**
* @summary Queries common configuration items for alerts.
*
* @param request DescribeConfigsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeConfigsResponse
*/
async function describeConfigsWithOptions(request: DescribeConfigsRequest, runtime: Util.RuntimeOptions): DescribeConfigsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeConfigs',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries common configuration items for alerts.
*
* @param request DescribeConfigsRequest
* @return DescribeConfigsResponse
*/
async function describeConfigs(request: DescribeConfigsRequest): DescribeConfigsResponse {
var runtime = new Util.RuntimeOptions{};
return describeConfigsWithOptions(request, runtime);
}
model DescribeDataAssetsRequest {
currentPage?: int32(name='CurrentPage', description='The number of the page to return.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Simplified Chinese
* **en_us**: English', example='zh_cn'),
name?: string(name='Name', description='The keyword that is used to search for data assets. Fuzzy search is supported.', example='test'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Default value: **20**.', example='20'),
rangeId?: int32(name='RangeId', description='The type of the data asset that you want to query. Valid values:
* **1**: MaxCompute project
* **2**: MaxCompute table
* **3**: MaxCompute package
* **11**: AnalyticDB for MySQL database
* **12**: AnalyticDB for MySQL table
* **21**: Object Storage Service (OSS) bucket
* **22**: OSS object
* **31**: Tablestore instance
* **32**: Tablestore table
* **51**: ApsaraDB RDS database
* **52**: ApsaraDB RDS table
* **61**: self-managed database hosted on an Elastic Compute Service (ECS) instance
* **62**: self-managed table hosted on an ECS instance
* **71**: PolarDB-X database
* **72**: PolarDB-X table
* **81**: PolarDB database
* **82**: PolarDB table
* **91**: AnalyticDB for PostgreSQL database
* **92**: AnalyticDB for PostgreSQL table', example='1'),
riskLevels?: string(name='RiskLevels', description='The sensitivity level of the data asset. Separate multiple sensitivity levels with commas (,). Valid values:
* **2**: S1, indicating the low sensitivity level
* **3**: S2, indicating the medium sensitivity level
* **4**: S3, indicating the high sensitivity level
* **5**: S4, indicating the highest sensitivity level', example='2'),
ruleId?: long(name='RuleId', description='The unique ID of the sensitive data detection rule that the data assets to be queried hit.
> If you query sensitive data detection results based on the sensitive data detection rule that the data assets hit, you can call the [DescribeRules](~~DescribeRules~~) operation to query the ID of the sensitive data detection rule.', example='11122200'),
}
model DescribeDataAssetsResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
acl?: string(name='Acl', description='The access control list (ACL) that controls the access permissions on the OSS bucket.
> This parameter is returned only when you set the parameter **RangeId** to **21**.', example='private'),
creationTime?: long(name='CreationTime', description='The time when the data asset was created. Unit: milliseconds.', example='1536751124000'),
dataType?: string(name='DataType', description='The data type of the data asset.', example='OSS_BUCKET'),
id?: string(name='Id', description='The ID of the data asset.', example='268'),
labelsec?: boolean(name='Labelsec', description='The sensitivity tag of the data. The value is fixed as **0**. **0**, **1**, **2**, or **3** is returned for this parameter only when you set the parameter **RangeId** to **1**.
* **0**: unclassified
* **1**: confidential
* **2**: sensitive
* **3**: highly sensitive', example='0'),
name?: string(name='Name', description='The name of the data asset.', example='gxdata'),
objectKey?: string(name='ObjectKey', description='The key value of the OSS object.
> This parameter is returned only when you set the parameter **RangeId** to **22**.', example='Internal'),
odpsRiskLevelName?: string(name='OdpsRiskLevelName', description='The sensitivity level of the MaxCompute data asset. Valid values:
* **S1**: low sensitivity level
* **S2**: medium sensitivity level
* **S3**: high sensitivity level
* **S4**: highest sensitivity level
> This parameter is returned only when you set the parameter **RangeId** to **1**.', example='S4'),
owner?: string(name='Owner', description='The account that owns the data asset.', example='dtdep-239-******'),
productCode?: string(name='ProductCode', description='The name of the service to which the data asset belongs.', example='RDS'),
productId?: string(name='ProductId', description='The ID of the service to which the data asset belongs. Valid values:
* **1**: MaxCompute
* **2**: OSS
* **3**: AnalyticDB for MySQL
* **4**: Tablestore
* **5**: ApsaraDB RDS', example='5'),
protection?: boolean(name='Protection', description='Indicates whether the data protection mechanism is enabled for the data asset. The value is fixed as **false**. **true** or **false** is returned for this parameter only when you set the parameter **RangeId** to **1**.
* **false**: The data protection mechanism is disabled.
* **true**: The data protection mechanism is enabled. Only data inbound is supported. Data outbound is not supported.', example='false'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the data asset. A higher sensitivity level indicates that the identified data is more sensitive. Valid values:
* **1**: No sensitive data is identified.
* **2**: sensitive data at level 1.
* **3**: sensitive data at level 2.
* **3**: sensitive data at level 3.
* **5**: sensitive data at level 4.
* **6**: sensitive data at level 5.
* **7**: sensitive data at level 6.
* **8**: sensitive data at level 7.
* **9**: sensitive data at level 8.
* **10**: sensitive data at level 9.
* **11**: sensitive data at level 10.', example='2'),
riskLevelName?: string(name='RiskLevelName', description='The name of the sensitivity level for the data asset.', example='Medium sensitivity level'),
ruleName?: string(name='RuleName', description='The name of the sensitive data detection rule that the data asset hits.', example='\\\\*\\\\*\\\\* rule'),
sensitive?: boolean(name='Sensitive', description='Indicates whether the data asset contains sensitive data. Valid values:
* **true**: yes
* **false**: no', example='true'),
sensitiveCount?: int32(name='SensitiveCount', description='The total number of sensitive data assets. For example, the value can be the total number of sensitive MaxCompute projects, packages, or tables, the total number of sensitive ApsaraDB RDS databases or tables, or the total number of sensitive OSS buckets or objects.', example='24'),
sensitiveRatio?: string(name='SensitiveRatio', description='The percentage of sensitive data in all data assets.', example='45%'),
totalCount?: int32(name='TotalCount', description='The total number of data assets. For example, the value can be the total number of MaxCompute projects, packages, or tables, the total number of ApsaraDB RDS databases or tables, or the total number of OSS buckets or objects.', example='432'),
}
](name='Items', description='An array that consists of data assets.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='20'),
requestId?: string(name='RequestId', description='The ID of the request.', example='71064826-726F-4ADA-B879-05D8055476FB'),
totalCount?: int32(name='TotalCount', description='The total number of queried data assets that contain sensitive data.', example='1'),
}
model DescribeDataAssetsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDataAssetsResponseBody(name='body'),
}
/**
* @summary Queries the sensitive data detection results of data assets that Data Security Center (DSC) is authorized to access.
*
* @param request DescribeDataAssetsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDataAssetsResponse
*/
async function describeDataAssetsWithOptions(request: DescribeDataAssetsRequest, runtime: Util.RuntimeOptions): DescribeDataAssetsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.rangeId)) {
query['RangeId'] = request.rangeId;
}
if (!Util.isUnset(request.riskLevels)) {
query['RiskLevels'] = request.riskLevels;
}
if (!Util.isUnset(request.ruleId)) {
query['RuleId'] = request.ruleId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDataAssets',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries the sensitive data detection results of data assets that Data Security Center (DSC) is authorized to access.
*
* @param request DescribeDataAssetsRequest
* @return DescribeDataAssetsResponse
*/
async function describeDataAssets(request: DescribeDataAssetsRequest): DescribeDataAssetsResponse {
var runtime = new Util.RuntimeOptions{};
return describeDataAssetsWithOptions(request, runtime);
}
model DescribeDataLimitDetailRequest {
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
id?: long(name='Id', description='The unique ID of the data asset that you want to query.
> You can call the [DescribeDataLimits](~~DescribeDataLimits~~) operation to query the ID of the data asset.
This parameter is required.', example='12300'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh**: Simplified Chinese.
* **en**: English', example='zh'),
networkType?: int32(name='NetworkType', description='The network type of the data asset that you want to query. Valid values:
* **1**: virtual private cloud (VPC)
* **2**: classic network', example='1'),
}
model DescribeDataLimitDetailResponseBody = {
dataLimit?: {
checkStatus?: int32(name='CheckStatus', description='The status of the connectivity test between the data asset and DSC. Valid values:
* **2**: indicates that the data asset was being connected.
* **3**: indicates that the data asset was connected to DSC.
* **4**: indicates that the data asset failed to be connected.', example='3'),
checkStatusName?: string(name='CheckStatusName', description='The result that indicates the status of the connectivity test between the data asset and DSC. Valid values:
* **Passed**
* **Failed**
* **Testing**', example='Passed'),
gmtCreate?: long(name='GmtCreate', description='The time when the data asset was connected to DSC. The value is a UNIX timestamp. Unit: milliseconds.', example='145600000'),
id?: long(name='Id', description='The ID of the data asset.', example='12300'),
localName?: string(name='LocalName', description='The region in which the data asset resides.', example='China (Qingdao)'),
parentId?: string(name='ParentId', description='The ID and name of the data asset in the service to which the data asset belongs.', example='rm-m5eup49p6o274****.RDS_example'),
port?: int32(name='Port', description='The port number that is used to connect to the database.', example='3306'),
regionId?: string(name='RegionId', description='The ID of the region in which the data asset resides.', example='cn-qingdao'),
resourceType?: long(name='ResourceType', description='The type of the service to which the data asset belongs. Valid values:
* **1**: MaxCompute
* **2**: OSS
* **3**: AnalyticDB for MySQL
* **4**: Tablestore
* **5**: ApsaraDB RDS', example='1'),
resourceTypeCode?: string(name='ResourceTypeCode', description='The service to which the data asset belongs. Valid values:
* **MaxCompute**
* **OSS**
* **ADS**
* **OTS**
* **RDS**', example='RDS'),
userName?: string(name='UserName', description='The account of the user who manages the data asset.', example='User01'),
}(name='DataLimit', description='The details of the data asset.'),
requestId?: string(name='RequestId', description='The ID of the request, which is used to locate and troubleshoot issues.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
}
model DescribeDataLimitDetailResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDataLimitDetailResponseBody(name='body'),
}
/**
* @summary Queries the details of a data asset, such as a MaxCompute project, an ApsaraDB RDS database, or an Object Storage Service (OSS) bucket, that you authorize Data Security Center (DSC) to access.
*
* @param request DescribeDataLimitDetailRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDataLimitDetailResponse
*/
async function describeDataLimitDetailWithOptions(request: DescribeDataLimitDetailRequest, runtime: Util.RuntimeOptions): DescribeDataLimitDetailResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.networkType)) {
query['NetworkType'] = request.networkType;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDataLimitDetail',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries the details of a data asset, such as a MaxCompute project, an ApsaraDB RDS database, or an Object Storage Service (OSS) bucket, that you authorize Data Security Center (DSC) to access.
*
* @param request DescribeDataLimitDetailRequest
* @return DescribeDataLimitDetailResponse
*/
async function describeDataLimitDetail(request: DescribeDataLimitDetailRequest): DescribeDataLimitDetailResponse {
var runtime = new Util.RuntimeOptions{};
return describeDataLimitDetailWithOptions(request, runtime);
}
model DescribeDataLimitSetRequest {
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='2'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh_cn**: Simplified Chinese (default)
* **en_us**: English', example='zh_cn'),
parentId?: string(name='ParentId', description='The parent asset ID of the data asset.
You can call the [DescribeDataLimitDetail](~~DescribeDataLimitDetail~~) or [DescribeDataLimits](~~DescribeDataLimits~~) operation to obtain the parent asset ID of the data asset from the value of the **ParentId** parameter.', example='db'),
resourceType?: int32(name='ResourceType', description='The type of service to which the data asset belongs. Valid values:
* **1**: MaxCompute
* **2**: OSS
* **3**: AnalyticDB for MySQL
* **4**: Tablestore
* **5**: ApsaraDB RDS', example='2'),
}
model DescribeDataLimitSetResponseBody = {
dataLimitSet?: {
dataLimitList?: [
{
checkStatus?: int32(name='CheckStatus', description='Indicates whether the test of connectivity between DSC and the data asset is passed.
* **2**: The connectivity test is in progress.
* **3**: The connectivity test is passed.
* **4**: The connectivity test failed.', example='3'),
checkStatusName?: string(name='CheckStatusName', description='The name of the data detection status.', example='Connectivity test status'),
connector?: string(name='Connector', description='The connection string that is used to access the data asset.', example='Connection string'),
gmtCreate?: long(name='GmtCreate', description='The time when the data asset was created. Unit: milliseconds.', example='1625587423000'),
id?: long(name='Id', description='The ID of the data asset.', example='1'),
localName?: string(name='LocalName', description='The region in which the data asset resides.', example='China (Hangzhou)'),
parentId?: string(name='ParentId', description='The parent asset ID of the data asset.', example='db'),
regionId?: string(name='RegionId', description='The region in which the data asset resides.', example='cn-****'),
resourceType?: long(name='ResourceType', description='The type of service to which the data asset belongs. Valid values:
* **1**: MaxCompute
* **2**: OSS
* **3**: AnalyticDB for MySQL
* **4**: Tablestore
* **5**: ApsaraDB RDS', example='2'),
resourceTypeCode?: string(name='ResourceTypeCode', description='The code of the service to which the data asset belongs. Valid values:
* **ODPS**
* **OSS**
* **ADS**
* **OTS**
* **RDS**', example='OSS'),
userName?: string(name='UserName', description='The username that is used to access the data asset.', example='tsts'),
}
](name='DataLimitList', description='An array that consists of data assets that DSC is authorized to scan.'),
ossBucketList?: [
{
bucketName?: string(name='BucketName', description='The name of the OSS bucket to which the OSS object belongs.', example='oss-bucket'),
regionId?: string(name='RegionId', description='The region ID of the OSS object.', example='cn-****'),
}
](name='OssBucketList', description='An array consisting of the OSS objects that DSC is authorized to scan.'),
regionList?: [
{
localName?: string(name='LocalName', description='The name of the region.', example='China (Hangzhou)'),
regionId?: string(name='RegionId', description='The ID of the region.', example='cn-****'),
}
](name='RegionList', description='An array consisting of the regions in which the data assets can be scanned.'),
resourceType?: long(name='ResourceType', description='The type of service to which the data asset belongs. Valid values:
* **1**: MaxCompute
* **2**: OSS
* **3**: AnalyticDB for MySQL
* **4**: Tablestore
* **5**: ApsaraDB RDS', example='2'),
resourceTypeCode?: string(name='ResourceTypeCode', description='The service to which the data asset belongs. Valid values:
* **ODPS**
* **OSS**
* **ADS**
* **OTS**
* **RDS**', example='OSS'),
totalCount?: int32(name='TotalCount', description='The total number of data objects in the data assets.', example='10'),
}(name='DataLimitSet', description='The information about the data asset.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
}
model DescribeDataLimitSetResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDataLimitSetResponseBody(name='body'),
}
/**
* @summary Queries data assets, such as instances, databases, and Object Storage Service (OSS) buckets, that you authorize Data Security Center (DSC) to scan in a service.
*
* @description You can call this operation to query the data assets that are authorized to be scanned. This facilitates resource search and aggregation.
* # Limits
* 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.
*
* @param request DescribeDataLimitSetRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDataLimitSetResponse
*/
async function describeDataLimitSetWithOptions(request: DescribeDataLimitSetRequest, runtime: Util.RuntimeOptions): DescribeDataLimitSetResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.parentId)) {
query['ParentId'] = request.parentId;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDataLimitSet',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries data assets, such as instances, databases, and Object Storage Service (OSS) buckets, that you authorize Data Security Center (DSC) to scan in a service.
*
* @description You can call this operation to query the data assets that are authorized to be scanned. This facilitates resource search and aggregation.
* # Limits
* 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.
*
* @param request DescribeDataLimitSetRequest
* @return DescribeDataLimitSetResponse
*/
async function describeDataLimitSet(request: DescribeDataLimitSetRequest): DescribeDataLimitSetResponse {
var runtime = new Util.RuntimeOptions{};
return describeDataLimitSetWithOptions(request, runtime);
}
model DescribeDataLimitsRequest {
auditStatus?: int32(name='AuditStatus', description='Specifies whether to enable the security audit feature. Valid values:
* **1**: yes
* **0**: no', example='1'),
checkStatus?: int32(name='CheckStatus', description='The data detection status. Valid values:
* **0**: The data detection is ready.
* **1**: The data detection is running.
* **2**: The connectivity test is in progress.
* **3**: The connectivity test passed.
* **4**: The connectivity test failed.', example='3'),
currentPage?: int32(name='CurrentPage', description='The number of the page to return.', example='1'),
datamaskStatus?: int32(name='DatamaskStatus', description='Specifies whether DSC has the data de-identification permissions on the data asset. Valid values:
* **1**: yes
* **0**: no', example='1'),
enable?: int32(name='Enable', description='Specifies whether DSC has the data detection permissions on the data asset. Valid values:
* **1**: yes
* **0**: no', example='1'),
endTime?: long(name='EndTime', description='The end of the time range to query The value is a UNIX timestamp. Unit: milliseconds.', example='1616068534877'),
engineType?: string(name='EngineType', description='The type of the database engine. Valid values include **MySQL**, **SQLServer**, **Oracle**, **PostgreSQL**, and **MongoDB**.', example='MySQL'),
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='2'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh**: Chinese
* **en**: English', example='zh'),
memberAccount?: long(name='MemberAccount', description='The ID of the member.', example='**********8103'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='10'),
parentId?: string(name='ParentId', description='The parent ID of the data asset to be queried. Valid values:
* The name or ID of the MaxCompute project.
* The name or ID of the OSS bucket.
* The name or ID of the ApsaraDB RDS instance or database.', example='1112'),
resourceType?: int32(name='ResourceType', description='The type of the service to which the data asset belongs. This parameter is required. Valid values:
* **1**: MaxCompute
* **2**: Object Storage Service (OSS)
* **3**: AnalyticDB for MySQL
* **4**: Tablestore
* **5**: ApsaraDB RDS
* **6**: self-managed database', example='1'),
serviceRegionId?: string(name='ServiceRegionId', description='The region in which the data asset resides.', example='cn-hangzhou'),
startTime?: long(name='StartTime', description='The beginning of the time range to query The value is a UNIX timestamp. Unit: milliseconds.', example='1616068534877'),
}
model DescribeDataLimitsResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
auditStatus?: int32(name='AuditStatus', description='Indicates whether the security audit feature is enabled. Valid values:
* **1**: yes
* **0**: no', example='1'),
autoScan?: int32(name='AutoScan', description='Indicates whether the data asset can be automatically scanned. Valid values:
* **0**: no
* **1**: yes', example='1'),
checkStatus?: int32(name='CheckStatus', description='The data detection status. Valid values:
* **0**: The data detection is ready.
* **1**: The data detection is running.
* **2**: The connectivity test is in progress.
* **3**: The connectivity test is passed.
* **4**: The connectivity test failed.', example='3'),
checkStatusName?: string(name='CheckStatusName', description='The name of the data detection status.', example='Connectivity test status'),
datamaskStatus?: int32(name='DatamaskStatus', description='Indicates whether DSC has the data de-identification permissions on the data asset. Valid values:
* **1**: yes
* **0**: no', example='1'),
dbVersion?: string(name='DbVersion', description='The database engine version.', example='2.0'),
enable?: int32(name='Enable', description='Indicates whether DSC has the data identification permissions on the data asset. Valid values:
* **1**: yes
* **0**: no', example='1'),
engineType?: string(name='EngineType', description='The type of the database engine. Valid values include **MySQL**, **SQLServer**, **Oracle**, **PostgreSQL**, and **MongoDB**.', example='MySQL'),
errorCode?: string(name='ErrorCode', description='The error code.', example='connect_network_error'),
errorMessage?: string(name='ErrorMessage', description='The reason for the failure.', example='The password is invalid.'),
eventStatus?: int32(name='EventStatus', description='Indicates whether the data leak prevention feature is enabled. Valid values:
* **0**: no
* **1**: yes (default)', example='1'),
gmtCreate?: long(name='GmtCreate', description='The time when the data asset was created. The value is a UNIX timestamp. Unit: milliseconds.', example='145600000'),
id?: long(name='Id', description='The unique ID of the data asset.', example='1'),
instanceDescription?: string(name='InstanceDescription', description='The description of the instance.', example='123'),
instanceId?: string(name='InstanceId', description='The ID of the data asset to which the table belongs.', example='12332'),
lastFinishedTime?: long(name='LastFinishedTime', description='The time when the last scan is performed.
* The value is a UNIX timestamp.
* Unit: milliseconds.', example='145600000'),
lastStartTime?: long(name='LastStartTime', description='The last scan start time of data assets, in milliseconds.', example='145600000'),
localName?: string(name='LocalName', description='The region in which the data asset resides.', example='China (Hangzhou)'),
logStoreDay?: int32(name='LogStoreDay', description='The retention period of raw logs. Unit: days.', example='30'),
memberAccount?: long(name='MemberAccount', description='The ID of the member.', example='**********8103'),
nextStartTime?: long(name='NextStartTime', description='The next time when the data asset is scanned. The value is a UNIX timestamp. Unit: milliseconds.', example='1676620236000'),
ocrStatus?: int32(name='OcrStatus', description='Indicates whether the optical character recognition (OCR) feature is enabled. Valid values:
* **0**: no
* **1**: yes', example='1'),
parentId?: string(name='ParentId', description='The parent ID of the data asset that you want to query. Valid values include **bucket, db, and project**.', example='project'),
port?: int32(name='Port', description='The port number of the self-managed database.', example='3306'),
processStatus?: int32(name='ProcessStatus', description='The status of the data asset scan. Valid values:
* **-1**: invalid
* **0**: waiting
* **1**: being scanned
* **2**: suspended
* **3**: completed', example='3'),
processTotalCount?: int32(name='ProcessTotalCount', description='The total number of data tables or files.', example='100'),
regionId?: string(name='RegionId', description='The region in which the asset resides.', example='cn-hangzhou'),
resourceType?: long(name='ResourceType', description='The type of the service to which the data asset belongs. Valid values:
* **1**: MaxCompute
* **2**: OSS
* **3**: AnalyticDB for MySQL
* **4**: Tablestore
* **5**: ApsaraDB RDS
* **6**: self-managed database', example='5'),
resourceTypeCode?: string(name='ResourceTypeCode', description='The code of the service to which the data asset belongs. Valid values: **MaxCompute, OSS, ADS, OTS, and RDS**.', example='RDS'),
samplingSize?: int32(name='SamplingSize', description='The number of sensitive data samples. Valid values: **0**, **5**, and **10**. Unit: data entries.', example='5'),
securityGroupIdList?: [ string ](name='SecurityGroupIdList', description='A list of the IDs of the security groups that are used by PrivateLink when you install the DSC agent.'),
supportAudit?: boolean(name='SupportAudit', description='Indicates whether the security audit feature is supported. Valid values:
* **true**: yes
* **false**: no', example='true'),
supportDatamask?: boolean(name='SupportDatamask', description='Indicates whether the data de-identification feature is supported. Valid values:
* **true**: yes
* **false**: no', example='true'),
supportEvent?: boolean(name='SupportEvent', description='Indicates whether anomalous event detection is supported. Valid values:
* **true**
* **false**', example='true'),
supportOcr?: boolean(name='SupportOcr', description='Indicates whether OCR is supported. Valid values:
* **true**: yes
* **false**: no', example='true'),
supportScan?: boolean(name='SupportScan', description='Indicates whether the data asset scan feature is supported. Valid values:
* **true**: yes
* **false**: no', example='true'),
tenantName?: string(name='TenantName', description='The alias of the tenant.', example='insta_gram'),
totalCount?: int32(name='TotalCount', description='The total number of fields in the table.', example='100'),
userName?: string(name='UserName', description='The username that is used to access the data asset.', example='tsts'),
vSwitchIdList?: [ string ](name='VSwitchIdList', description='A list of the IDs of the vSwitches that are used by PrivateLink when you install the DSC agent.'),
vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) to which the data asset belongs.', example='vpc-2zevcqke6hh09c41****'),
}
](name='Items', description='The data assets.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989***'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}
model DescribeDataLimitsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDataLimitsResponseBody(name='body'),
}
/**
* @summary Queries the data assets such as instances, databases, or buckets that Data Security Center (DSC) is authorized to access.
*
* @param request DescribeDataLimitsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDataLimitsResponse
*/
async function describeDataLimitsWithOptions(request: DescribeDataLimitsRequest, runtime: Util.RuntimeOptions): DescribeDataLimitsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.auditStatus)) {
query['AuditStatus'] = request.auditStatus;
}
if (!Util.isUnset(request.checkStatus)) {
query['CheckStatus'] = request.checkStatus;
}
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.datamaskStatus)) {
query['DatamaskStatus'] = request.datamaskStatus;
}
if (!Util.isUnset(request.enable)) {
query['Enable'] = request.enable;
}
if (!Util.isUnset(request.endTime)) {
query['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.engineType)) {
query['EngineType'] = request.engineType;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.memberAccount)) {
query['MemberAccount'] = request.memberAccount;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.parentId)) {
query['ParentId'] = request.parentId;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.serviceRegionId)) {
query['ServiceRegionId'] = request.serviceRegionId;
}
if (!Util.isUnset(request.startTime)) {
query['StartTime'] = request.startTime;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDataLimits',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries the data assets such as instances, databases, or buckets that Data Security Center (DSC) is authorized to access.
*
* @param request DescribeDataLimitsRequest
* @return DescribeDataLimitsResponse
*/
async function describeDataLimits(request: DescribeDataLimitsRequest): DescribeDataLimitsResponse {
var runtime = new Util.RuntimeOptions{};
return describeDataLimitsWithOptions(request, runtime);
}
model DescribeDataMaskingRunHistoryRequest {
currentPage?: int32(name='CurrentPage', description='The number of the page to return.', example='1'),
dstType?: int32(name='DstType', description='The type of the service to which the de-identified data belongs. Valid values: **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates OSS. The value indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='2'),
endTime?: long(name='EndTime', description='The end of the time range to query. The value is a UNIX timestamp. Unit: milliseconds.', example='1583856000000'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
mainProcessId?: long(name='MainProcessId', description='The ID of the task.
> If a task has one or more subtasks, the value of the parameter must be the ID of the task. Otherwise, leave this parameter empty.', example='366731'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='10'),
srcTableName?: string(name='SrcTableName', description='The name of the source table.', example='add'),
srcType?: int32(name='SrcType', description='The type of the service to which the data to be de-identified belongs. Valid values: **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates Object Storage Service (OSS). The value indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='2'),
startTime?: long(name='StartTime', description='The beginning of the time range to query. The value is a UNIX timestamp. Unit: milliseconds.', example='1582992000000'),
status?: int32(name='Status', description='The status of the de-identification task. Valid values:
* **-1**: waiting
* **0**: being executed
* **1**: executed
* **2**: failed to be executed
* **3**: terminated
* **4**: partially failed', example='0'),
taskId?: string(name='TaskId', description='The ID of the de-identification task.', example='mt4HBgtw1B******'),
}
model DescribeDataMaskingRunHistoryResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
conflictCount?: long(name='ConflictCount', description='The number of rows that are in conflict with the data to be de-identified in the destination table to which the data to be de-identified is moved.', example='0'),
dstType?: int32(name='DstType', description='The type of the service to which the de-identified data belongs. Valid values: **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates OSS. The value indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='2'),
dstTypeCode?: string(name='DstTypeCode', description='The service that stores the de-identified data. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='OSS'),
endTime?: long(name='EndTime', description='The end time of the de-identification task.', example='1582251233000'),
failCode?: string(name='FailCode', description='The error code that is returned when the de-identification task fails.', example='masking_task_not_found'),
failMsg?: string(name='FailMsg', description='The reason why the de-identification task fails.', example='error'),
hasDownloadFile?: int32(name='HasDownloadFile', description='Indicates whether a file is available for download.
* **1**: yes
* **0**: no', example='1'),
hasSubProcess?: int32(name='HasSubProcess', description='The number of created subtasks.', example='4'),
id?: long(name='Id', description='The ID of the task execution record.', example='1'),
maskingCount?: long(name='MaskingCount', description='The number of rows that are de-identified.', example='100'),
percentage?: int32(name='Percentage', description='The progress of the de-identification task.', example='100'),
runIndex?: int32(name='RunIndex', description='The number of times that the de-identification task is executed.', example='1'),
srcTableName?: string(name='SrcTableName', description='The name of the source table.', example='add'),
srcType?: int32(name='SrcType', description='The type of the service to which the data to be de-identified belongs. Valid values: **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates OSS. The value indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='2'),
srcTypeCode?: string(name='SrcTypeCode', description='The service to which the data to be de-identified belongs. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='OSS'),
startTime?: long(name='StartTime', description='The time when the de-identification task was executed. The value is a UNIX timestamp. Unit: milliseconds.', example='1582251233000'),
status?: int32(name='Status', description='The status of the de-identification task. Valid values:
* **-1**: waiting
* **0**: being executed
* **1**: executed
* **2**: failed to be executed
* **3**: terminated
* **4**: partially failed', example='1'),
taskId?: string(name='TaskId', description='The ID of the identification task.', example='mt4HBgtw1B******'),
type?: int32(name='Type', description='The mode in which the de-identification task is executed. Valid values:
* **1**: manual
* **2**: scheduled', example='1'),
}
](name='Items', description='The execution information about the de-identification task.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-4******'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='100'),
}
model DescribeDataMaskingRunHistoryResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDataMaskingRunHistoryResponseBody(name='body'),
}
/**
* @summary Queries the execution information about a de-identification task.
*
* @description You can call this operation to query the execution information of a static de-identification task, including the status and progress.
* # Limits
* 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.
*
* @param request DescribeDataMaskingRunHistoryRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDataMaskingRunHistoryResponse
*/
async function describeDataMaskingRunHistoryWithOptions(request: DescribeDataMaskingRunHistoryRequest, runtime: Util.RuntimeOptions): DescribeDataMaskingRunHistoryResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.dstType)) {
query['DstType'] = request.dstType;
}
if (!Util.isUnset(request.endTime)) {
query['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.mainProcessId)) {
query['MainProcessId'] = request.mainProcessId;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.srcTableName)) {
query['SrcTableName'] = request.srcTableName;
}
if (!Util.isUnset(request.srcType)) {
query['SrcType'] = request.srcType;
}
if (!Util.isUnset(request.startTime)) {
query['StartTime'] = request.startTime;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
if (!Util.isUnset(request.taskId)) {
query['TaskId'] = request.taskId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDataMaskingRunHistory',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries the execution information about a de-identification task.
*
* @description You can call this operation to query the execution information of a static de-identification task, including the status and progress.
* # Limits
* 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.
*
* @param request DescribeDataMaskingRunHistoryRequest
* @return DescribeDataMaskingRunHistoryResponse
*/
async function describeDataMaskingRunHistory(request: DescribeDataMaskingRunHistoryRequest): DescribeDataMaskingRunHistoryResponse {
var runtime = new Util.RuntimeOptions{};
return describeDataMaskingRunHistoryWithOptions(request, runtime);
}
model DescribeDataMaskingTasksRequest {
currentPage?: int32(name='CurrentPage', description='The page number of the page to return.', example='1'),
dstType?: int32(name='DstType', description='The service to which the data to be de-identified belongs. Valid values include **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates Object Storage Service (OSS). The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='2'),
endTime?: long(name='EndTime', description='The end of the time range during which the de-identification tasks to be queried are created. The value is a UNIX timestamp. Unit: milliseconds.', example='1583856000000'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='10'),
searchKey?: string(name='SearchKey', description='The keyword used to query the de-identification tasks, which can be the task name or ID.', example='test'),
startTime?: long(name='StartTime', description='The beginning of the time range during which the de-identification tasks to be queried are created. The value is a UNIX timestamp. Unit: milliseconds.', example='1582992000000'),
}
model DescribeDataMaskingTasksResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
dstMemberAccount?: long(name='DstMemberAccount', description='The member account to which the desensitization target belongs.', example='192479427903xxxx'),
dstPath?: string(name='DstPath', description='The destination path.'),
dstType?: int32(name='DstType', description='The service to which the data to be de-identified belongs. Valid values: **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates OSS. The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='5'),
dstTypeCode?: string(name='DstTypeCode', description='The type of the service to which the de-identified data belongs. Valid values: **MaxCompute, OSS, ADS, OTS, and RDS**.', example='RDS'),
gmtCreate?: long(name='GmtCreate', description='The time when the de-identification task is created. The value is a UNIX timestamp. Unit: milliseconds.', example='1582992000000'),
hasUnfinishProcess?: boolean(name='HasUnfinishProcess', description='Indicates whether the de-identification task is running.', example='false'),
id?: long(name='Id', description='The task ID.', example='1'),
originalTable?: boolean(name='OriginalTable', description='Indicates whether the source table is de-identified.', example='false'),
owner?: string(name='Owner', description='The user who created the de-identification task.', example='owner'),
runCount?: int32(name='RunCount', description='The number of times that the de-identification task is run.', example='1'),
srcMemberAccount?: long(name='SrcMemberAccount', description='The member account to which the desensitization source belongs.', example='192479427903xxxx'),
srcPath?: string(name='SrcPath', description='The source path.'),
srcType?: int32(name='SrcType', description='The type of the service to which the data to be de-identified belongs. Valid values: **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates OSS. The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='5'),
srcTypeCode?: string(name='SrcTypeCode', description='The type of the service to which the data to be de-identified belongs. Valid values: **MaxCompute, OSS, ADS, OTS, and RDS**.', example='RDS'),
status?: int32(name='Status', description='The status of the task. Valid values:
* **0**: disabled
* **1**: enabled', example='1'),
taskId?: string(name='TaskId', description='The ID of the task.', example='mt4HBgtw1B******'),
taskName?: string(name='TaskName', description='The name of the task.', example='Task name'),
triggerType?: int32(name='TriggerType', description='The mode in which the de-identification task is run. Valid values:
* **1**: manual
* **2**: scheduled
* **3**: manual and scheduled', example='1'),
}
](name='Items', description='A list of de-identification tasks.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-4******'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='100'),
}
model DescribeDataMaskingTasksResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDataMaskingTasksResponseBody(name='body'),
}
/**
* @summary Queries de-identification tasks.
*
* @description You can call this operation to query static de-identification tasks. This facilitates task queries and management.
* # Limits
* 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.
*
* @param request DescribeDataMaskingTasksRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDataMaskingTasksResponse
*/
async function describeDataMaskingTasksWithOptions(request: DescribeDataMaskingTasksRequest, runtime: Util.RuntimeOptions): DescribeDataMaskingTasksResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.dstType)) {
query['DstType'] = request.dstType;
}
if (!Util.isUnset(request.endTime)) {
query['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.searchKey)) {
query['SearchKey'] = request.searchKey;
}
if (!Util.isUnset(request.startTime)) {
query['StartTime'] = request.startTime;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDataMaskingTasks',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries de-identification tasks.
*
* @description You can call this operation to query static de-identification tasks. This facilitates task queries and management.
* # Limits
* 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.
*
* @param request DescribeDataMaskingTasksRequest
* @return DescribeDataMaskingTasksResponse
*/
async function describeDataMaskingTasks(request: DescribeDataMaskingTasksRequest): DescribeDataMaskingTasksResponse {
var runtime = new Util.RuntimeOptions{};
return describeDataMaskingTasksWithOptions(request, runtime);
}
model DescribeDataObjectColumnDetailRequest {
currentPage?: int32(name='CurrentPage', example='1'),
featureType?: int32(name='FeatureType'),
id?: long(name='Id', example='318248'),
lang?: string(name='Lang', example='zh_cn'),
pageSize?: int32(name='PageSize', example='10'),
productId?: long(name='ProductId', example='5'),
templateId?: long(name='TemplateId', example='1'),
}
model DescribeDataObjectColumnDetailResponseBody = {
currentPage?: int32(name='CurrentPage', example='1'),
items?: [
{
categories?: [ string ](name='Categories'),
columnComment?: string(name='ColumnComment', example='column comment'),
columnName?: string(name='ColumnName', example='hide14'),
dataType?: string(name='DataType', example='varchar'),
engineType?: string(name='EngineType'),
id?: string(name='Id', example='1509415150052786176'),
instanceName?: string(name='InstanceName'),
maskingStatus?: int32(name='MaskingStatus'),
modelTags?: [
{
id?: long(name='Id', example='101'),
name?: string(name='Name', example='personal sensitive information'),
}
](name='ModelTags'),
primaryKey?: boolean(name='PrimaryKey', example='true'),
productId?: long(name='ProductId'),
regionId?: string(name='RegionId'),
riskLevelId?: long(name='RiskLevelId', example='2'),
riskLevelName?: string(name='RiskLevelName', example='S1'),
ruleId?: long(name='RuleId', example='1004'),
ruleName?: string(name='RuleName', example='name'),
tableName?: string(name='TableName'),
}
](name='Items'),
pageSize?: int32(name='PageSize', example='10'),
requestId?: string(name='RequestId', example='8C8036CC-961D-514E-88E8-3088B5A50CA9'),
totalCount?: int32(name='TotalCount', example='61'),
}
model DescribeDataObjectColumnDetailResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDataObjectColumnDetailResponseBody(name='body'),
}
/**
* @summary 查看数据对象列详情
*
* @param request DescribeDataObjectColumnDetailRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDataObjectColumnDetailResponse
*/
async function describeDataObjectColumnDetailWithOptions(request: DescribeDataObjectColumnDetailRequest, runtime: Util.RuntimeOptions): DescribeDataObjectColumnDetailResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.productId)) {
query['ProductId'] = request.productId;
}
if (!Util.isUnset(request.templateId)) {
query['TemplateId'] = request.templateId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDataObjectColumnDetail',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary 查看数据对象列详情
*
* @param request DescribeDataObjectColumnDetailRequest
* @return DescribeDataObjectColumnDetailResponse
*/
async function describeDataObjectColumnDetail(request: DescribeDataObjectColumnDetailRequest): DescribeDataObjectColumnDetailResponse {
var runtime = new Util.RuntimeOptions{};
return describeDataObjectColumnDetailWithOptions(request, runtime);
}
model DescribeDataObjectColumnDetailV2Request {
currentPage?: int32(name='CurrentPage', example='1'),
featureType?: int32(name='FeatureType'),
id?: string(name='Id', description='This parameter is required.', example='13456723343'),
lang?: string(name='Lang', example='zh_cn'),
pageSize?: int32(name='PageSize', example='10'),
productId?: long(name='ProductId', example='5'),
templateId?: long(name='TemplateId', description='This parameter is required.', example='1'),
}
model DescribeDataObjectColumnDetailV2ResponseBody = {
currentPage?: int32(name='CurrentPage', example='1'),
items?: [
{
categories?: [ string ](name='Categories'),
columnComment?: string(name='ColumnComment', example='column comment'),
columnName?: string(name='ColumnName', example='hide14'),
dataType?: string(name='DataType', example='varchar'),
engineType?: string(name='EngineType'),
id?: string(name='Id', example='1392973973691383808'),
instanceName?: string(name='InstanceName'),
maskingStatus?: int32(name='MaskingStatus'),
modelTags?: [
{
id?: long(name='Id', example='101'),
name?: string(name='Name', example='personal sensitive information'),
}
](name='ModelTags'),
primaryKey?: boolean(name='PrimaryKey', example='true'),
productId?: long(name='ProductId'),
regionId?: string(name='RegionId'),
riskLevelId?: long(name='RiskLevelId', example='2'),
riskLevelName?: string(name='RiskLevelName', example='S1'),
ruleId?: long(name='RuleId', example='51'),
ruleName?: string(name='RuleName', example='name'),
tableName?: string(name='TableName'),
}
](name='Items'),
pageSize?: int32(name='PageSize', example='10'),
requestId?: string(name='RequestId', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
totalCount?: int32(name='TotalCount', example='231'),
}
model DescribeDataObjectColumnDetailV2Response = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDataObjectColumnDetailV2ResponseBody(name='body'),
}
/**
* @summary 查看数据对象列详情V2
*
* @param request DescribeDataObjectColumnDetailV2Request
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDataObjectColumnDetailV2Response
*/
async function describeDataObjectColumnDetailV2WithOptions(request: DescribeDataObjectColumnDetailV2Request, runtime: Util.RuntimeOptions): DescribeDataObjectColumnDetailV2Response {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.productId)) {
query['ProductId'] = request.productId;
}
if (!Util.isUnset(request.templateId)) {
query['TemplateId'] = request.templateId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDataObjectColumnDetailV2',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary 查看数据对象列详情V2
*
* @param request DescribeDataObjectColumnDetailV2Request
* @return DescribeDataObjectColumnDetailV2Response
*/
async function describeDataObjectColumnDetailV2(request: DescribeDataObjectColumnDetailV2Request): DescribeDataObjectColumnDetailV2Response {
var runtime = new Util.RuntimeOptions{};
return describeDataObjectColumnDetailV2WithOptions(request, runtime);
}
model DescribeDataObjectsRequest {
currentPage?: int32(name='CurrentPage', example='1'),
domainId?: long(name='DomainId', example='2'),
featureType?: int32(name='FeatureType'),
fileCategoryCode?: long(name='FileCategoryCode'),
fileType?: long(name='FileType'),
instanceId?: string(name='InstanceId'),
lang?: string(name='Lang', example='zh_cn'),
memberAccount?: long(name='MemberAccount'),
modelIds?: string(name='ModelIds'),
modelTagIds?: string(name='ModelTagIds', example='101,102'),
pageSize?: int32(name='PageSize', example='10'),
parentCategoryIds?: string(name='ParentCategoryIds', example='234,236,238'),
productIds?: string(name='ProductIds', example='1,5'),
queryName?: string(name='QueryName', example='t_sddp_selfmysql_pers0'),
riskLevels?: string(name='RiskLevels', example='2'),
serviceRegionId?: string(name='ServiceRegionId', example='cn-hangzhou'),
templateId?: long(name='TemplateId', description='This parameter is required.', example='1'),
}
model DescribeDataObjectsResponseBody = {
currentPage?: int32(name='CurrentPage', example='1'),
items?: [
{
categories?: [ string ](name='Categories'),
id?: string(name='Id', example='20000'),
instanceDescription?: string(name='InstanceDescription', example='instance description'),
instanceId?: string(name='InstanceId', example='rm-1234'),
lastModifiedTime?: long(name='LastModifiedTime'),
lastScanTime?: long(name='LastScanTime', example='1687676649830'),
memberAccount?: long(name='MemberAccount'),
modelTags?: [
{
id?: long(name='Id', example='101'),
name?: string(name='Name', example='personal sensitive information'),
}
](name='ModelTags'),
name?: string(name='Name', example='t_sddp_selfmysql_pers0'),
objectFileCategory?: string(name='ObjectFileCategory'),
objectType?: string(name='ObjectType', example='text type'),
path?: string(name='Path', example='rm-1234.db_test'),
productCode?: string(name='ProductCode', example='RDS'),
productId?: long(name='ProductId', example='5'),
regionId?: string(name='RegionId'),
regionName?: string(name='RegionName', example='cn-hangzhou'),
ruleList?: [
{
riskLevelId?: long(name='RiskLevelId', example='2'),
riskLevelName?: string(name='RiskLevelName', example='S1'),
ruleCount?: int32(name='RuleCount', example='590'),
ruleId?: long(name='RuleId', example='1080'),
ruleName?: string(name='RuleName', example='name'),
}
](name='RuleList'),
sensitiveCount?: int32(name='SensitiveCount', example='1'),
templateId?: long(name='TemplateId', example='1'),
}
](name='Items'),
pageSize?: int32(name='PageSize', example='10'),
requestId?: string(name='RequestId', example='E6F6460E-4330-549A-BD89-C183FB17571E'),
totalCount?: int32(name='TotalCount', example='21'),
}
model DescribeDataObjectsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDataObjectsResponseBody(name='body'),
}
/**
* @summary 分页查询数据目录对象
*
* @param request DescribeDataObjectsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDataObjectsResponse
*/
async function describeDataObjectsWithOptions(request: DescribeDataObjectsRequest, runtime: Util.RuntimeOptions): DescribeDataObjectsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.domainId)) {
query['DomainId'] = request.domainId;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.fileCategoryCode)) {
query['FileCategoryCode'] = request.fileCategoryCode;
}
if (!Util.isUnset(request.fileType)) {
query['FileType'] = request.fileType;
}
if (!Util.isUnset(request.instanceId)) {
query['InstanceId'] = request.instanceId;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.memberAccount)) {
query['MemberAccount'] = request.memberAccount;
}
if (!Util.isUnset(request.modelIds)) {
query['ModelIds'] = request.modelIds;
}
if (!Util.isUnset(request.modelTagIds)) {
query['ModelTagIds'] = request.modelTagIds;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.parentCategoryIds)) {
query['ParentCategoryIds'] = request.parentCategoryIds;
}
if (!Util.isUnset(request.productIds)) {
query['ProductIds'] = request.productIds;
}
if (!Util.isUnset(request.queryName)) {
query['QueryName'] = request.queryName;
}
if (!Util.isUnset(request.riskLevels)) {
query['RiskLevels'] = request.riskLevels;
}
if (!Util.isUnset(request.serviceRegionId)) {
query['ServiceRegionId'] = request.serviceRegionId;
}
if (!Util.isUnset(request.templateId)) {
query['TemplateId'] = request.templateId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDataObjects',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary 分页查询数据目录对象
*
* @param request DescribeDataObjectsRequest
* @return DescribeDataObjectsResponse
*/
async function describeDataObjects(request: DescribeDataObjectsRequest): DescribeDataObjectsResponse {
var runtime = new Util.RuntimeOptions{};
return describeDataObjectsWithOptions(request, runtime);
}
model DescribeDocTypesRequest {
lang?: string(name='Lang', example='zh_cn'),
}
model DescribeDocTypesResponseBody = {
docTypeList?: [
{
code?: long(name='Code', example='100001'),
id?: long(name='Id', example='1'),
name?: string(name='Name', example='C/C++ Source Code'),
}
](name='DocTypeList'),
requestId?: string(name='RequestId', example='769FB3C1-F4C9-4******'),
}
model DescribeDocTypesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeDocTypesResponseBody(name='body'),
}
/**
* @param request DescribeDocTypesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeDocTypesResponse
*/
async function describeDocTypesWithOptions(request: DescribeDocTypesRequest, runtime: Util.RuntimeOptions): DescribeDocTypesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeDocTypes',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @param request DescribeDocTypesRequest
* @return DescribeDocTypesResponse
*/
async function describeDocTypes(request: DescribeDocTypesRequest): DescribeDocTypesResponse {
var runtime = new Util.RuntimeOptions{};
return describeDocTypesWithOptions(request, runtime);
}
model DescribeEventDetailRequest {
id?: long(name='Id', description='The ID of the anomalous event.
> You can call the **DescribeEvents** operation to query the ID of the anomalous event.
This parameter is required.', example='13456723343'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh**: Chinese
* **en**: English', example='zh'),
}
model DescribeEventDetailResponseBody = {
event?: {
alertTime?: long(name='AlertTime', description='The time when the alert for the anomalous event was generated. The value is a UNIX timestamp. Unit: milliseconds.', example='1545829129000'),
backed?: boolean(name='Backed', description='Indicates whether the handling result of the anomalous event is used to enhance the detection of anomalous events. Valid values:
* **true**: yes
* **false**: no
> If you enhance the detection of anomalous events, the detection accuracy and the rate of triggering alerts for anomalous events are improved.', example='false'),
dataInstance?: string(name='DataInstance', description='The instance name of the service in which the anomalous event was detected.', example='in-222***'),
dealDisplayName?: string(name='DealDisplayName', description='The display name of the account that is used to handle the anomalous event.', example='yundunsr'),
dealLoginName?: string(name='DealLoginName', description='The username of the account that is used to handle the anomalous event.', example='det1111'),
dealReason?: string(name='DealReason', description='The reason why the anomalous event is handled.', example='Anomaly confirmed'),
dealTime?: long(name='DealTime', description='The time when the anomalous event was handled. The value is a UNIX timestamp. Unit: milliseconds.', example='1230000'),
dealUserId?: long(name='DealUserId', description='The ID of the account that is used to handle the anomalous event.', example='229157443385014***'),
detail?: {
chart?: [
{
chatType?: int32(name='ChatType', description='The type of the chart. Valid values:
* **1**: column chart
* **2**: line chart
>This field will be returned only when NewAlarm is true.', example='1'),
data?: {
x?: [ string ](name='X', description='The value of the data item on the X axis.', example='[test1,test2,...]'),
y?: [ string ](name='Y', description='The value of the data item on the Y axis.', example='[1,2,3,...]'),
z?: [ string ](name='Z', description='The value of the data item for the Z axis.'),
}(name='Data', description='The data in the baseline behavior profile of the anomalous event.'),
label?: string(name='Label', description='The name of the baseline behavior chart of the anomalous event.', example='Baseline behavior chart'),
name?: string(name='Name', description='Icon title.
>This field will be returned only when NewAlarm is true.', example='misskingm'),
type?: string(name='Type', description='The type of the chart. Valid values:
* **1**: column chart
* **2**: line chart', example='1'),
XLabel?: string(name='XLabel', description='The descriptive label of data items on the X axis.', example='Number of days'),
YLabel?: string(name='YLabel', description='The descriptive label of data items on the Y axis.', example='Value'),
ZLabel?: string(name='ZLabel', description='The descriptive label of data items on the Z axis.
>This field will be returned only when NewAlarm is true.', example='chart description'),
}
](name='Chart', description='The baseline behavior chart of the anomalous event.'),
content?: [
{
label?: string(name='Label', description='The title of the content in the anomalous event.', example='Anomaly description'),
name?: string(name='Name', description='Exception event name.', example='daliaoyuncom'),
value?: string(name='Value', description='The description of the content in the anomalous event.', example='The account was used to access OSS from an unusual terminal whose IP address is 1.2.3.4 from 00:06:45 on September 9, 2019 to 00:57:37 on September 9, 2019.'),
}
](name='Content', description='The content in the anomalous event.'),
resourceInfo?: [
{
label?: string(name='Label', description='The source title.', example='Risk'),
value?: string(name='Value', description='The source description.', example='Based on the record of authentication by using an unusual terminal, an attacker may have obtained the access permission of the account, or an employee accessed data from a personal terminal.'),
}
](name='ResourceInfo', description='An array that consists of the source from which the information of the anomalous event is recorded.'),
}(name='Detail', description='The content in the details of the anomalous event.'),
displayName?: string(name='DisplayName', description='The display name of the account that triggered the anomalous event.', example='yundunsr'),
eventTime?: long(name='EventTime', description='The time when the anomalous event occurred. The value is a UNIX timestamp. Unit: milliseconds.', example='1545829129000'),
handleInfoList?: [
{
currentValue?: string(name='CurrentValue', description='The account that is used to handle the anomalous event.', example='sddp-test2'),
disableTime?: long(name='DisableTime', description='The time when the account is disabled. The value is a UNIX timestamp. Unit: milliseconds.', example='1611139155000'),
enableTime?: long(name='EnableTime', description='The time when the disabled account is enabled. The value is a UNIX timestamp. Unit: milliseconds.', example='1611139155000'),
handlerName?: string(name='HandlerName', description='The handling method.', example='Remove from the whitelist'),
handlerType?: string(name='HandlerType', description='The type of the handling method.', example='rds_security_ip'),
handlerValue?: int32(name='HandlerValue', description='The duration for which the handling operation takes effect. If you leave this parameter empty, the handling operation is permanently valid. Unit: minutes.', example='10'),
id?: long(name='Id', description='The ID of the handling rule.', example='11'),
status?: int32(name='Status', description='The status of the account that triggered the anomalous event. Valid values:
* **0**: disabled
* **1**: enabled
* **-1**: failed to disable the account
* **-2**: failed to enable the account', example='1'),
}
](name='HandleInfoList', description='An array that consists of the handling records of the anomalous event.'),
id?: long(name='Id', description='The unique ID of the anomalous event.', example='52234'),
logDetail?: string(name='LogDetail', description='The details of the alert logs.', example='{"client_ip": ["106.11.XX.XX", "106.11.XX.XX", "106.11.XX.XX", "106.11.XX.XX", "106.11.XX.XX", "106.11.XX.XX", "106.11.XX.XX", "106.11.XX.XX", "106.11.XX.XX"], "start_time": "2020-05-10 00:00:01", "instance": ["omniscience-data", "punish-beaver-data"], "end_time": "2020-05-10 00:21:22", "client_ua": ["Java/1.8.0_152", "Java/1.8.0_92", "aliyun-sdk-java/2.0.0", "aliyun-sdk-java/2.8.0(Linux/4.9.151-015.ali3000.alios7.x86_64/amd64;1.8.0_152)"], "user_name": 1512222261295262}'),
loginName?: string(name='LoginName', description='The username of the account that triggered the anomalous event.', example='det1111'),
newAlarm?: boolean(name='NewAlarm', description='Whether it is a new version of the alarm. Value:
- **true**: Yes.
- **false**: No.', example='true'),
productCode?: string(name='ProductCode', description='The name of the service in which the anomalous event was detected. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='MaxCompute'),
status?: int32(name='Status', description='The handling status for the anomalous event. Valid values:
* **0**: unhandled
* **1**: confirmed
* **2**: marked as false positive', example='0'),
statusName?: string(name='StatusName', description='The name of the handling status for the anomalous event.', example='Pending'),
subTypeCode?: string(name='SubTypeCode', description='The code of the anomalous event subtype.', example='020008'),
subTypeName?: string(name='SubTypeName', description='The name of the anomalous event subtype.', example='Anomalous volume of downloaded data'),
typeCode?: string(name='TypeCode', description='The code of the anomalous event type.', example='02'),
typeName?: string(name='TypeName', description='The name of the anomalous event type. Valid values:
* **01**: anomalous permission usage
* **02**: anomalous data flow
* **03**: anomalous data operation', example='Anomalous data flow'),
userId?: long(name='UserId', description='The ID of the account that triggered the anomalous event.', example='229157443385014***'),
}(name='Event', description='The details of the anomalous event.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='69FB3C1-F4C9-42DF-9B72-7077A8989C13'),
}
model DescribeEventDetailResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeEventDetailResponseBody(name='body'),
}
/**
* @summary Queries the details of an anomalous event. The details include the time when the anomalous event occurred, and the description and handling status of the anomalous event.
*
* @param request DescribeEventDetailRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeEventDetailResponse
*/
async function describeEventDetailWithOptions(request: DescribeEventDetailRequest, runtime: Util.RuntimeOptions): DescribeEventDetailResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeEventDetail',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries the details of an anomalous event. The details include the time when the anomalous event occurred, and the description and handling status of the anomalous event.
*
* @param request DescribeEventDetailRequest
* @return DescribeEventDetailResponse
*/
async function describeEventDetail(request: DescribeEventDetailRequest): DescribeEventDetailResponse {
var runtime = new Util.RuntimeOptions{};
return describeEventDetailWithOptions(request, runtime);
}
model DescribeEventTypesRequest {
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='2'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh**: Chinese
* **en**: English', example='zh'),
parentTypeId?: long(name='ParentTypeId', description='The type of anomalous event for which you want to query the anomalous events of subtypes. Valid values:
* **01**: anomalous permission usage
* **02**: anomalous data flow
* **03**: anomalous data operation', example='01'),
resourceId?: int32(name='ResourceId', description='The type of the resource. Valid values include **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates Object Storage Service (OSS). The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='5'),
status?: int32(name='Status', description='The status of the anomalous event. Valid values:
* **1**: enabled
* **2**: disabled', example='1'),
}
model DescribeEventTypesResponseBody = {
eventTypeList?: [
{
code?: string(name='Code', description='The code of the anomalous event type.', example='01'),
description?: string(name='Description', description='The description of the anomalous event type.', example='Anomalous permission usage,\\\\*\\\\*\\\\*\\\\*'),
id?: long(name='Id', description='The ID of the anomalous event type.', example='1'),
name?: string(name='Name', description='The name of the anomalous event type.', example='Anomalous permission usage'),
subTypeList?: [
{
adaptedProduct?: string(name='AdaptedProduct', description='The service to which the anomalous event detection rule applies. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='RDS'),
code?: string(name='Code', description='The code of the anomalous event subtype.', example='020008'),
configCode?: string(name='ConfigCode', description='The code of the configuration.', example='0100**'),
configContentType?: int32(name='ConfigContentType', description='The content format of anomalous event detection rule. Valid values:
* **0**: numeric values such as thresholds
* **1**: text such as IP addresses', example='1'),
configDescription?: string(name='ConfigDescription', description='The description of the configuration.', example='The period of time for which the permission is not used exceeds the threshold. The specified threshold is ${value} calendar days.'),
configValue?: string(name='ConfigValue', description='The value of the configuration.', example='90'),
description?: string(name='Description', description='The description of the anomalous event subtype.', example='Inappropriate configuration-No protection for the MaxCompute sensitive project, \\\\*\\\\*\\\\*\\\\*'),
eventHitCount?: int32(name='EventHitCount', description='The number of times that the anomalous event hits the anomalous event detection rule.', example='2'),
id?: long(name='Id', description='The ID of the anomalous event subtype.', example='1'),
name?: string(name='Name', description='The name of the anomalous event subtype.', example='Inappropriate configuration-No protection for the MaxCompute sensitive project'),
status?: int32(name='Status', description='Indicates whether detection is enabled for the anomalous event subtype. Valid values:
* **1**: yes
* **0**: no', example='1'),
}
](name='SubTypeList', description='An array that consists of anomalous event subtypes.'),
}
](name='EventTypeList', description='An array that consists of the types of anomalous events.
> If you leave the ParentTypeId parameter empty, anomalous event types are returned. If you set the ParentTypeId parameter, anomalous event subtypes under the specified anomalous event type are returned.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
}
model DescribeEventTypesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeEventTypesResponseBody(name='body'),
}
/**
* @summary Queries the types of anomalous events.
*
* @param request DescribeEventTypesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeEventTypesResponse
*/
async function describeEventTypesWithOptions(request: DescribeEventTypesRequest, runtime: Util.RuntimeOptions): DescribeEventTypesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.parentTypeId)) {
query['ParentTypeId'] = request.parentTypeId;
}
if (!Util.isUnset(request.resourceId)) {
query['ResourceId'] = request.resourceId;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeEventTypes',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries the types of anomalous events.
*
* @param request DescribeEventTypesRequest
* @return DescribeEventTypesResponse
*/
async function describeEventTypes(request: DescribeEventTypesRequest): DescribeEventTypesResponse {
var runtime = new Util.RuntimeOptions{};
return describeEventTypesWithOptions(request, runtime);
}
model DescribeEventsRequest {
currentPage?: int32(name='CurrentPage', description='The page number of the page to return.', example='1'),
dealUserId?: string(name='DealUserId', description='The ID of the account that handles the anomalous event.', example='yundun-***'),
endTime?: string(name='EndTime', description='The end of the time range during which the anomalous events are detected. The value is a UNIX timestamp. Unit: milliseconds.', example='1698700000'),
id?: long(name='Id', description='The unique ID of the anomalous event.', example='789026'),
instanceName?: string(name='InstanceName', description='The name of the data asset.', example='rm-uf6yzvbc2tg90iuxk.l****'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='12'),
productCode?: string(name='ProductCode', description='The name of the service to which the table belongs. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='OSS'),
startTime?: string(name='StartTime', description='The beginning of the time range during which the anomalous events are detected. The value is a UNIX timestamp. Unit: milliseconds.', example='1657900000'),
status?: string(name='Status', description='The handling status of the anomalous event. Valid values:
* 0: unhandled
* 1: confirmed
* 2: marked as false positive', example='1'),
subTypeCode?: string(name='SubTypeCode', description='The name of the anomalous event subtype.
> You can call the **DescribeEventTypes** operation to query the name of the anomalous event subtype.', example='Anomalous volume of downloaded data'),
targetProductCode?: string(name='TargetProductCode', description='The name of the destination service in an anomalous data flow. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**', example='RDS'),
typeCode?: string(name='TypeCode', description='The name of the anomalous event type. Valid values:
* 01: anomalous permission usage
* 02: anomalous data flow
* 03: anomalous data operation', example='02'),
userId?: long(name='UserId', description='The ID of the account that triggered the anomalous event.', example='1978132506596***'),
userName?: string(name='UserName', description='The username of the RAM user.', example='name'),
warnLevel?: int32(name='WarnLevel', description='The risk level of the alert that is triggered. Valid values:
* **1**: low
* **2**: medium
* **3**: high', example='1'),
}
model DescribeEventsResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
alertTime?: long(name='AlertTime', description='The time when an alert was triggered for the anomalous event. The value is a UNIX timestamp. Unit: milliseconds.', example='154529000'),
backed?: boolean(name='Backed', description='Indicates whether the detection of anomalous events is enhanced. If the detection of anomalous events is enhanced, the detection accuracy and the rate of triggering alerts for anomalous events are improved. Valid values:
* true: yes
* false: no', example='false'),
dealDisplayName?: string(name='DealDisplayName', description='The display name of the account that is used to handle the anomalous event.', example='yundunsr'),
dealLoginName?: string(name='DealLoginName', description='The username of the account that is used to handle the anomalous event.', example='det1111'),
dealTime?: long(name='DealTime', description='The time when the anomalous event was handled. The value is a UNIX timestamp. Unit: milliseconds.', example='12223300'),
dealUserId?: long(name='DealUserId', description='The ID of the account that is used to handle the anomalous event.', example='229157443385014***'),
displayName?: string(name='DisplayName', description='The display name of the account that triggered the anomalous event.', example='yundunsr'),
eventTime?: long(name='EventTime', description='The time when the anomalous event occurred. The value is a UNIX timestamp. Unit: milliseconds.', example='1545829129000'),
id?: long(name='Id', description='The ID of the anomalous event.', example='42233335555'),
loginName?: string(name='LoginName', description='The username of the account that triggered the anomalous event.', example='det1111'),
productCode?: string(name='ProductCode', description='The name of the service in which the anomalous event was detected.', example='RDS'),
status?: int32(name='Status', description='The handling status for the anomalous event. Valid values:
* 0: unhandled
* 1: confirmed
* 2: marked as false positive', example='0'),
statusName?: string(name='StatusName', description='The name of the handling status for the anomalous event.', example='Pending'),
subTypeCode?: string(name='SubTypeCode', description='The code of the anomalous event subtype.', example='020008'),
subTypeName?: string(name='SubTypeName', description='The name of the anomalous event subtype.', example='Anomalous volume of downloaded data'),
targetProductCode?: string(name='TargetProductCode', description='The name of the destination service in an anomalous data flow.', example='RDS'),
typeCode?: string(name='TypeCode', description='The code of the anomalous event type.', example='02'),
typeName?: string(name='TypeName', description='The name of the anomalous event type.', example='Anomalous data flow'),
userId?: long(name='UserId', description='The ID of the account that triggered the anomalous event.', example='1978132506596***'),
warnLevel?: int32(name='WarnLevel', description='The severity of the anomalous event.
* **1**: low
* **2**: medium
* **3**: high', example='2'),
}
](name='Items', description='An array that consists of the anomalous events.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='12'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='1'),
}
model DescribeEventsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeEventsResponseBody(name='body'),
}
/**
* @summary Queries anomalous events.
*
* @description You can call this operation to query anomalous events that may involve data leaks. This helps you search for and handle anomalous events.
* # Limits
* 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.
*
* @param request DescribeEventsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeEventsResponse
*/
async function describeEventsWithOptions(request: DescribeEventsRequest, runtime: Util.RuntimeOptions): DescribeEventsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.dealUserId)) {
query['DealUserId'] = request.dealUserId;
}
if (!Util.isUnset(request.endTime)) {
query['EndTime'] = request.endTime;
}
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.instanceName)) {
query['InstanceName'] = request.instanceName;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.productCode)) {
query['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.startTime)) {
query['StartTime'] = request.startTime;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
if (!Util.isUnset(request.subTypeCode)) {
query['SubTypeCode'] = request.subTypeCode;
}
if (!Util.isUnset(request.targetProductCode)) {
query['TargetProductCode'] = request.targetProductCode;
}
if (!Util.isUnset(request.typeCode)) {
query['TypeCode'] = request.typeCode;
}
if (!Util.isUnset(request.userId)) {
query['UserId'] = request.userId;
}
if (!Util.isUnset(request.userName)) {
query['UserName'] = request.userName;
}
if (!Util.isUnset(request.warnLevel)) {
query['WarnLevel'] = request.warnLevel;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeEvents',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries anomalous events.
*
* @description You can call this operation to query anomalous events that may involve data leaks. This helps you search for and handle anomalous events.
* # Limits
* 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.
*
* @param request DescribeEventsRequest
* @return DescribeEventsResponse
*/
async function describeEvents(request: DescribeEventsRequest): DescribeEventsResponse {
var runtime = new Util.RuntimeOptions{};
return describeEventsWithOptions(request, runtime);
}
model DescribeIdentifyTaskStatusRequest {
id?: long(name='Id', description='This parameter is required.', example='268'),
lang?: string(name='Lang', example='zh_cn'),
}
model DescribeIdentifyTaskStatusResponseBody = {
content?: {
status?: int32(name='Status'),
}(name='Content'),
requestId?: string(name='RequestId', example='71064826-726F-4ADA-B879-05D8055476FB'),
}
model DescribeIdentifyTaskStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeIdentifyTaskStatusResponseBody(name='body'),
}
/**
* @summary 查询识别任务状态
*
* @param request DescribeIdentifyTaskStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeIdentifyTaskStatusResponse
*/
async function describeIdentifyTaskStatusWithOptions(request: DescribeIdentifyTaskStatusRequest, runtime: Util.RuntimeOptions): DescribeIdentifyTaskStatusResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeIdentifyTaskStatus',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'GET',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary 查询识别任务状态
*
* @param request DescribeIdentifyTaskStatusRequest
* @return DescribeIdentifyTaskStatusResponse
*/
async function describeIdentifyTaskStatus(request: DescribeIdentifyTaskStatusRequest): DescribeIdentifyTaskStatusResponse {
var runtime = new Util.RuntimeOptions{};
return describeIdentifyTaskStatusWithOptions(request, runtime);
}
model DescribeInstanceSourcesRequest {
auditStatus?: int32(name='AuditStatus', description='Specifies whether to enable the security audit feature. Valid values:
* **1**: yes
* **0**: no', example='1'),
authStatus?: int32(name='AuthStatus', description='Specifies whether DSC is authorized to access the data asset.
* **0**: no
* **1**: yes', example='0'),
currentPage?: int32(name='CurrentPage', description='The number of the page to return. Default value: **1**.', example='1'),
engineType?: string(name='EngineType', description='The type of the database engine. Valid values: **MySQL, MariaDB, Oracle, PostgreSQL, and SQLServer**.', example='MySQL'),
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='2'),
instanceId?: string(name='InstanceId', description='The ID of the instance.', example='instance-demo-****'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh_cn**: Simplified Chinese (default)
* **en_us**: English', example='zh_cn'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Default value: **10**.', example='10'),
productCode?: string(name='ProductCode', description='The name of the service to which the data asset to query belongs. Valid values: **MaxCompute, OSS, ADS, OTS, and RDS**.', example='MaxCompute'),
productId?: long(name='ProductId', description='The ID of the service to which the data asset to query belongs. Valid values: **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates Object Storage Service (OSS). The value indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='1'),
searchKey?: string(name='SearchKey', description='The content based on which a fuzzy search is performed.', example='1'),
searchType?: string(name='SearchType', description='The data asset type based on which a fuzzy search is performed.
* **InstanceId**: the ID of the instance.
* **InstanceName**: the name of the instance.
* **DatabaseName**: the name of the database.', example='InstanceId'),
serviceRegionId?: string(name='ServiceRegionId', description='The region in which the data asset resides. For more information, see [Supported regions](https://help.aliyun.com/document_detail/214257.html).', example='cn-hangzhou'),
}
model DescribeInstanceSourcesResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
auditStatus?: int32(name='AuditStatus', description='Indicates whether the security audit feature is enabled. Valid values:
* **1**: yes
* **0**: no', example='1'),
autoScan?: int32(name='AutoScan', description='Indicates whether the automatic scan feature is enabled to detect sensitive data. Valid values:
* **0**: no
* **1**: yes', example='0'),
canModifyUserName?: boolean(name='CanModifyUserName', description='Indicates whether the username and password can be changed. Valid values:
* **true**: yes
* **false**: no', example='true'),
checkStatus?: int32(name='CheckStatus', description='The data detection status. Valid values:
* **0**: The data detection is ready.
* **1**: The data detection is running.
* **2**: The connectivity test is in progress.
* **3**: The connectivity test passed.
* **4**: The connectivity test failed.', example='3'),
datamaskStatus?: int32(name='DatamaskStatus', description='Indicates whether DSC has the data de-identification permissions on the data asset. Valid values:
* **1**: yes
* **0**: no', example='1'),
dbName?: string(name='DbName', description='The name of the database to which the data asset belongs.', example='demo'),
enable?: int32(name='Enable', description='Indicates whether sensitive data detection is enabled for the data asset. Valid values:
* **1**: yes
* **0**: no', example='1'),
engineType?: string(name='EngineType', description='The type of the database engine. Valid values: **MySQL, MariaDB, Oracle, PostgreSQL, and SQLServer**.', example='MySQL'),
errorMessage?: string(name='ErrorMessage', description='The reason for the failure.', example='The password is invalid.'),
gmtCreate?: long(name='GmtCreate', description='The time when the data asset was created. The value is a UNIX timestamp. Unit: milliseconds.', example='1625587423000'),
id?: long(name='Id', description='The unique ID of the data asset.', example='1'),
instanceDescription?: string(name='InstanceDescription', description='The description of the instance.', example='Test'),
instanceId?: string(name='InstanceId', description='The ID of the instance', example='rm-****'),
instanceSize?: long(name='InstanceSize', description='The storage space size of the instance. This parameter is valid only if the value of the ProductId parameter is 2. Unit: bytes.', example='409600'),
lastModifyTime?: long(name='LastModifyTime', description='The time when the data asset was last modified. Unit: milliseconds.', example='1625587423000'),
lastModifyUserId?: string(name='LastModifyUserId', description='The ID of the account that is last used to modify the data asset.', example='demo'),
logStoreDay?: int32(name='LogStoreDay', description='The retention period of raw logs. Unit: days.', example='30'),
passwordStatus?: int32(name='PasswordStatus', description='Indicates whether the password is used. Valid values:
* **1**: yes
* **0**: no', example='1'),
productId?: long(name='ProductId', description='The ID of the service to which the data asset belongs. Valid values include **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates OSS. The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='2'),
regionId?: string(name='RegionId', description='The ID of the region where the instance resides.', example='cn-hangzhou'),
regionName?: string(name='RegionName', description='The name of the region.', example='China (Hangzhou)'),
samplingSize?: int32(name='SamplingSize', description='The number of sensitive data samples. Valid values: **0**, **5**, and **10**. Unit: data entries.', example='10'),
tenantId?: string(name='TenantId', description='The ID of the tenant.', example='11'),
tenantName?: string(name='TenantName', description='The name of the tenant.', example='user1'),
userName?: string(name='UserName', description='The username of the account.', example='User01'),
}
](name='Items', description='An array that consists of the queried data assets.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
requestId?: string(name='RequestId', description='The ID of the request, which is used to locate and troubleshoot issues.', example='5A7E8FB9-5011-5A90-97D9-AE587047****'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='2'),
}
model DescribeInstanceSourcesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeInstanceSourcesResponseBody(name='body'),
}
/**
* @summary Queries a list of data assets.
*
* @description You can query a list of unauthorized or authorized data assets based on the value of AuthStatus.
* This operation is no longer used for the KMS console of the new version.
* # [](#qps-)QPS limits
* This operation can be called up to 10 times per second for each Alibaba Cloud account. If the number of 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.
*
* @param request DescribeInstanceSourcesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeInstanceSourcesResponse
*/
async function describeInstanceSourcesWithOptions(request: DescribeInstanceSourcesRequest, runtime: Util.RuntimeOptions): DescribeInstanceSourcesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.auditStatus)) {
query['AuditStatus'] = request.auditStatus;
}
if (!Util.isUnset(request.authStatus)) {
query['AuthStatus'] = request.authStatus;
}
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.engineType)) {
query['EngineType'] = request.engineType;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.instanceId)) {
query['InstanceId'] = request.instanceId;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.productCode)) {
query['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.productId)) {
query['ProductId'] = request.productId;
}
if (!Util.isUnset(request.searchKey)) {
query['SearchKey'] = request.searchKey;
}
if (!Util.isUnset(request.searchType)) {
query['SearchType'] = request.searchType;
}
if (!Util.isUnset(request.serviceRegionId)) {
query['ServiceRegionId'] = request.serviceRegionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeInstanceSources',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries a list of data assets.
*
* @description You can query a list of unauthorized or authorized data assets based on the value of AuthStatus.
* This operation is no longer used for the KMS console of the new version.
* # [](#qps-)QPS limits
* This operation can be called up to 10 times per second for each Alibaba Cloud account. If the number of 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.
*
* @param request DescribeInstanceSourcesRequest
* @return DescribeInstanceSourcesResponse
*/
async function describeInstanceSources(request: DescribeInstanceSourcesRequest): DescribeInstanceSourcesResponse {
var runtime = new Util.RuntimeOptions{};
return describeInstanceSourcesWithOptions(request, runtime);
}
model DescribeInstancesRequest {
currentPage?: int32(name='CurrentPage', description='The number of the page to return. Default value: **1**.', example='1'),
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Simplified Chinese
* **en_us**: English', example='zh_cn'),
name?: string(name='Name', description='The keyword that is used to search for data assets. DSC searches for data assets based on the keyword that you specify in fuzzy match mode. For example, if you specify data, all data assets whose names contain data are queried.', example='data'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Default value: **10**.', example='10'),
productCode?: string(name='ProductCode', description='The name of the service to which the data asset belongs, such as MaxCompute, OSS, and ApsaraDB RDS. For more information about the types of data assets from which DSC can scan for sensitive data, see [Supported data assets](https://help.aliyun.com/document_detail/212906.html).', example='RDS'),
productId?: long(name='ProductId', description='The ID of the service to which the data asset belongs. You can call the [DescribeDataAssets](~~DescribeDataAssets~~) operation to query the ID of the service.', example='1'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level ID of the data asset. A higher sensitivity level indicates that the identified data is more sensitive. Valid values:
* **1**: No sensitive data is identified.
* **2**: sensitive data at level 1.
* **3**: sensitive data at level 2.
* **4**: sensitive data at level 3
* **5**: sensitive data at level 4.
* **6**: sensitive data at level 5.
* **7**: sensitive data at level 6.
* **8**: sensitive data at level 7.
* **9**: sensitive data at level 8.
* **10**: sensitive data at level 9.
* **11**: sensitive data at level 10.', example='2'),
ruleId?: long(name='RuleId', description='The ID of the sensitive data detection rule that the data asset hits. You can call the [DescribeRules](~~DescribeRules~~) operation and obtain the ID of the sensitive data detection rule from the **Id** response parameter.', example='1111111'),
serviceRegionId?: string(name='ServiceRegionId', description='The region where the data asset resides. For more information, see [Supported regions](https://help.aliyun.com/document_detail/214257.html).', example='cn-hangzhou'),
}
model DescribeInstancesResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
creationTime?: long(name='CreationTime', description='The time when the data asset was created. The value is a UNIX timestamp. Unit: milliseconds.', example='1637226782000'),
departName?: string(name='DepartName', description='The name of the department to which the data asset belongs.', example='***DemoCenter'),
id?: long(name='Id', description='The unique ID of the data asset in DSC.', example='11111'),
instanceDescription?: string(name='InstanceDescription', description='The description of the data asset.', example='Data asset Information 1'),
labelsec?: boolean(name='Labelsec', description='The security status of the data asset. Valid values:
* **true**: The data asset is secure.
* **false**: The data asset is insecure.', example='true'),
lastFinishTime?: long(name='LastFinishTime', description='The time when the data asset was last scanned. The value is a UNIX timestamp. Unit: milliseconds.', example='1637622793000'),
memberAliUid?: string(name='MemberAliUid', description='If the management account has opened multiple accounts and the asset belongs to other member accounts, this field displays the UID of the member accounts.', example='12567890126'),
modelTags?: [
{
id?: long(name='Id', description='The ID of the tag. Valid values:
* **101**: personal sensitive information
* **102**: personal information
* **107**: general information', example='101'),
name?: string(name='Name', description='The name of the tag. Valid values:
* Personal sensitive information
* Personal information
* General information', example='personal sensitive data'),
}
](name='ModelTags', description='A list of tags.'),
name?: string(name='Name', description='The name of the data asset.', example='gxdata'),
odpsRiskLevelName?: string(name='OdpsRiskLevelName', description='This parameter is deprecated.', example='1'),
owner?: string(name='Owner', description='The Alibaba Cloud account to which the data asset belongs.', example='dtdep-239-******'),
productCode?: string(name='ProductCode', description='The name of the service to which the data asset belongs, such as MaxCompute, OSS, and ApsaraDB RDS. For more information about the types of data assets that DSC can scan to detect sensitive data, see [Supported data assets](https://help.aliyun.com/document_detail/212906.html).', example='RDS'),
productId?: string(name='ProductId', description='The ID of the service to which the data asset belongs.', example='5'),
protection?: boolean(name='Protection', description='The protection status of the data asset. Valid values:
* **true**: The data asset is being protected.
* **false**: The data asset is not protected.', example='false'),
riskLevelId?: long(name='RiskLevelId', description='The ID of the sensitivity level for the data asset. A higher sensitivity level ID indicates that the identified data is more sensitive.
* **1**: No sensitive data is detected.
* **2**: sensitive data at level 1.
* **3**: sensitive data at level 2.
* **4**: sensitive data at level 3.
* **5**: sensitive data at level 4.
* **6**: sensitive data at level 5.
* **7**: sensitive data at level 6.
* **8**: sensitive data at level 7.
* **9**: sensitive data at level 8.
* **10**: sensitive data at level 9.
* **11**: sensitive data at level 10.', example='2'),
riskLevelName?: string(name='RiskLevelName', description='The name of the sensitivity level for the data asset.', example='Sensitive data at level 1'),
ruleName?: string(name='RuleName', description='The name of the sensitive data detection rule that the data asset hits.', example='\\\\*\\\\*\\\\* rule'),
sensitive?: boolean(name='Sensitive', description='Indicates whether the data asset contains sensitive data. Valid values:
* **true**
* **false**', example='true'),
sensitiveCount?: int32(name='SensitiveCount', description='The number of sensitive data objects in the data asset. For example, if the data asset is an ApsaraDB RDS instance, the value indicates the number of sensitive tables in all databases of the instance.', example='123'),
tenantName?: string(name='TenantName', description='The name of the tenant.', example='Tenant 1'),
totalCount?: int32(name='TotalCount', description='The total number of data objects in the data asset. For example, if the data asset is an ApsaraDB RDS instance, the value indicates the total number of tables in all databases of the instance.', example='231'),
}
](name='Items', description='The data assets.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
requestId?: string(name='RequestId', description='The ID of the request.', example='71064826-726F-4ADA-B879-05D8055476FB'),
totalCount?: int32(name='TotalCount', description='The total number of data assets.', example='231'),
}
model DescribeInstancesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeInstancesResponseBody(name='body'),
}
/**
* @summary Queries data assets such as MaxCompute, ApsaraDB RDS, and Object Storage Service (OSS) that you authorize Data Security Center (DSC) to access.
*
* @description When you call the DescribeInstances operation, you can specify parameters such as Name and RiskLevelId to query data assets that meet filter conditions.
* # Limits
* 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.
*
* @param request DescribeInstancesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeInstancesResponse
*/
async function describeInstancesWithOptions(request: DescribeInstancesRequest, runtime: Util.RuntimeOptions): DescribeInstancesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.productCode)) {
query['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.productId)) {
query['ProductId'] = request.productId;
}
if (!Util.isUnset(request.riskLevelId)) {
query['RiskLevelId'] = request.riskLevelId;
}
if (!Util.isUnset(request.ruleId)) {
query['RuleId'] = request.ruleId;
}
if (!Util.isUnset(request.serviceRegionId)) {
query['ServiceRegionId'] = request.serviceRegionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeInstances',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries data assets such as MaxCompute, ApsaraDB RDS, and Object Storage Service (OSS) that you authorize Data Security Center (DSC) to access.
*
* @description When you call the DescribeInstances operation, you can specify parameters such as Name and RiskLevelId to query data assets that meet filter conditions.
* # Limits
* 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.
*
* @param request DescribeInstancesRequest
* @return DescribeInstancesResponse
*/
async function describeInstances(request: DescribeInstancesRequest): DescribeInstancesResponse {
var runtime = new Util.RuntimeOptions{};
return describeInstancesWithOptions(request, runtime);
}
model DescribeOssObjectDetailRequest {
id?: long(name='Id', description='The ID of the OSS object.
> You can call the [DescribeOssObjects](https://help.aliyun.com/document_detail/410152.html) operation to obtain the ID of the OSS object.
This parameter is required.', example='12345213'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
}
model DescribeOssObjectDetailResponseBody = {
ossObjectDetail?: {
bucketName?: string(name='BucketName', description='The name of the OSS bucket to which the OSS object belongs.', example='bucke***'),
categoryName?: string(name='CategoryName', description='The type of the OSS object.', example='Excel file'),
name?: string(name='Name', description='The name of the OSS object.', example='obj_id'),
regionId?: string(name='RegionId', description='The region ID of the OSS object.', example='cn-***'),
riskLevelName?: string(name='RiskLevelName', description='The name of the sensitivity level for the OSS object.', example='Medium sensitivity level'),
ruleList?: [
{
categoryName?: string(name='CategoryName', description='The type of the OSS object.', example='Excel file'),
count?: long(name='Count', description='The number of times that the OSS object hits the sensitive data detection rule.', example='2'),
modelTags?: [
{
id?: long(name='Id', description='The tag ID.
* **101**: sensitive personal information
* **102**: personal information
* **103**: important information', example='101'),
name?: string(name='Name', description='The tag name.
* Sensitive personal information
* Personal information
* Important information', example='personal sensitive data'),
}
](name='ModelTags', description='A list of tags for data that hits the recognition model.'),
riskLevelId?: long(name='RiskLevelId', description='The ID of the sensitivity level of the OSS object.
* **1**: No sensitive data is detected.
* **2**: indicates the low sensitivity level.
* **3**: indicates the medium sensitivity level.
* **4**: indicates the high sensitivity level.
* **5**: indicates the highest sensitivity level.', example='2'),
riskLevelName?: string(name='RiskLevelName', description='The name of the sensitivity level for the OSS object.', example='Medium sensitivity level'),
ruleName?: string(name='RuleName', description='The name of the sensitive data detection rule.', example='\\\\*\\\\*\\\\* rule'),
}
](name='RuleList', description='A list of the sensitive data detection rules that the OSS object hits.'),
}(name='OssObjectDetail', description='The details of the OSS object.'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
}
model DescribeOssObjectDetailResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeOssObjectDetailResponseBody(name='body'),
}
/**
* @summary Queries the details of an Object Storage Service (OSS) object that Data Security Center (DSC) is authorized to access.
*
* @description You can call this operation to query the details of an Object Storage Service (OSS) object. This helps you locate sensitive data detected in OSS.
* ## [](#)Precautions
* The DescribeOssObjectDetail operation is chagned to DescribeOssObjectDetailV2. We recommend that you call the DescribeOssObjectDetailV2 operation when you develop your applications.
* ## [](#qps)Limits
* Each Alibaba Cloud account can call this operation up to 10 times per second. 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.
*
* @param request DescribeOssObjectDetailRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeOssObjectDetailResponse
*/
async function describeOssObjectDetailWithOptions(request: DescribeOssObjectDetailRequest, runtime: Util.RuntimeOptions): DescribeOssObjectDetailResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeOssObjectDetail',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries the details of an Object Storage Service (OSS) object that Data Security Center (DSC) is authorized to access.
*
* @description You can call this operation to query the details of an Object Storage Service (OSS) object. This helps you locate sensitive data detected in OSS.
* ## [](#)Precautions
* The DescribeOssObjectDetail operation is chagned to DescribeOssObjectDetailV2. We recommend that you call the DescribeOssObjectDetailV2 operation when you develop your applications.
* ## [](#qps)Limits
* Each Alibaba Cloud account can call this operation up to 10 times per second. 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.
*
* @param request DescribeOssObjectDetailRequest
* @return DescribeOssObjectDetailResponse
*/
async function describeOssObjectDetail(request: DescribeOssObjectDetailRequest): DescribeOssObjectDetailResponse {
var runtime = new Util.RuntimeOptions{};
return describeOssObjectDetailWithOptions(request, runtime);
}
model DescribeOssObjectDetailV2Request {
bucketName?: string(name='BucketName'),
id?: string(name='Id', example='12300'),
lang?: string(name='Lang', example='zh_cn'),
objectKey?: string(name='ObjectKey'),
serviceRegionId?: string(name='ServiceRegionId'),
templateId?: long(name='TemplateId'),
}
model DescribeOssObjectDetailV2ResponseBody = {
ossObjectDetail?: {
bucketName?: string(name='BucketName', example='lv-demo'),
categoryName?: string(name='CategoryName', example='Excel file'),
fileCategoryName?: string(name='FileCategoryName'),
id?: string(name='Id'),
modelTagIds?: string(name='ModelTagIds'),
name?: string(name='Name', example='obj_id'),
objectAcl?: string(name='ObjectAcl'),
regionId?: string(name='RegionId', example='cn-zhangjiakou'),
riskLevelId?: int32(name='RiskLevelId'),
riskLevelName?: string(name='RiskLevelName', example='S1'),
ruleList?: [
{
categoryName?: string(name='CategoryName', example='Excel'),
count?: long(name='Count', example='2'),
modelTags?: [
{
id?: long(name='Id', example='101'),
name?: string(name='Name', example='personal sensitive data'),
}
](name='ModelTags'),
riskLevelId?: long(name='RiskLevelId', example='2'),
riskLevelName?: string(name='RiskLevelName', example='S1'),
ruleName?: string(name='RuleName', example='name'),
}
](name='RuleList'),
size?: long(name='Size'),
}(name='OssObjectDetail'),
requestId?: string(name='RequestId', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
}
model DescribeOssObjectDetailV2Response = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeOssObjectDetailV2ResponseBody(name='body'),
}
/**
* @summary 调用本接口查询数据安全中心连接授权的OSS的单个存储对象的详细信息
*
* @param request DescribeOssObjectDetailV2Request
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeOssObjectDetailV2Response
*/
async function describeOssObjectDetailV2WithOptions(request: DescribeOssObjectDetailV2Request, runtime: Util.RuntimeOptions): DescribeOssObjectDetailV2Response {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.bucketName)) {
query['BucketName'] = request.bucketName;
}
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.objectKey)) {
query['ObjectKey'] = request.objectKey;
}
if (!Util.isUnset(request.serviceRegionId)) {
query['ServiceRegionId'] = request.serviceRegionId;
}
if (!Util.isUnset(request.templateId)) {
query['TemplateId'] = request.templateId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeOssObjectDetailV2',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary 调用本接口查询数据安全中心连接授权的OSS的单个存储对象的详细信息
*
* @param request DescribeOssObjectDetailV2Request
* @return DescribeOssObjectDetailV2Response
*/
async function describeOssObjectDetailV2(request: DescribeOssObjectDetailV2Request): DescribeOssObjectDetailV2Response {
var runtime = new Util.RuntimeOptions{};
return describeOssObjectDetailV2WithOptions(request, runtime);
}
model DescribeOssObjectsRequest {
currentPage?: int32(name='CurrentPage', description='The page number of the page to return.', example='1'),
fileCategoryCode?: long(name='FileCategoryCode', description='The code of the file type.', example='1'),
instanceId?: string(name='InstanceId', description='The ID of the instance to which the OSS object belongs.
> You can call the **DescribeInstances** operation to query the instance ID.', example='ins-2222'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh**: Chinese
* **en**: English', example='zh'),
lastScanTimeEnd?: long(name='LastScanTimeEnd', description='The end time of the last scan. The value is a UNIX timestamp. Unit: milliseconds.', example='1536751124000'),
lastScanTimeStart?: long(name='LastScanTimeStart', description='The start time of the last scan. The value is a UNIX timestamp. Unit: milliseconds.', example='1536751124000'),
marker?: long(name='Marker', description='When you query data by page, use the `Marker` parameter to query the data that follows the `Marker` value.', example='1754786235714378752'),
name?: string(name='Name', description='The search keyword. Fuzzy match is supported.', example='test'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='12'),
riskLevelId?: int32(name='RiskLevelId', description='The sensitivity level of the OSS object. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='2'),
ruleId?: long(name='RuleId', description='The ID of the sensitive data detection rule that the OSS object hits.
> You can call the **DescribeRules** operation to query the ID of the sensitive data detection rule.', example='1222'),
serviceRegionId?: string(name='ServiceRegionId', description='The region in which the data asset resides.', example='cn-hangzhou'),
templateId?: long(name='TemplateId', description='The ID of the industry-specific rule template.', example='1'),
}
model DescribeOssObjectsResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
bucketName?: string(name='BucketName', description='The name of the bucket.', example='oss-duplicate-***'),
category?: long(name='Category', description='The type of the OSS object. Valid values include **900001**, **800015**, or **800005**, which indicates the MP4 file, PDF file, or OSS configuration file, respectively.', example='900001'),
categoryName?: string(name='CategoryName', description='The name of the file type.', example='MP4 file'),
fileCategoryCode?: long(name='FileCategoryCode', description='The code of the file type.', example='1'),
fileCategoryName?: string(name='FileCategoryName', description='The name of the file type.', example='text file'),
fileId?: string(name='FileId', description='The file ID of the OSS object.', example='file-22***'),
id?: string(name='Id', description='The ID of the OSS object.', example='17383'),
instanceId?: long(name='InstanceId', description='The ID of the instance to which the OSS object belongs.', example='1232122'),
lastModifiedTime?: long(name='LastModifiedTime', description='The time when the file was last modified.', example='1536751124000'),
name?: string(name='Name', description='The name of the OSS object.', example='obj_id'),
regionId?: string(name='RegionId', description='The region ID of the OSS object.', example='cn-***'),
riskLevelId?: long(name='RiskLevelId', description='The ID of the sensitivity level of the OSS object. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='2'),
riskLevelName?: string(name='RiskLevelName', description='The name of the sensitivity level for the OSS object.', example='Medium sensitivity level'),
ruleCount?: int32(name='RuleCount', description='The number of rules that are hit.', example='100'),
ruleList?: [
{
count?: long(name='Count', description='The number of times that the rule is hit.', example='100'),
name?: string(name='Name', description='The search keyword. Fuzzy match is supported.', example='ID card'),
riskLevelId?: long(name='RiskLevelId', description='The ID of the sensitivity level of the OSS object. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='2'),
}
](name='RuleList', description='The rules.'),
sensitiveCount?: int32(name='SensitiveCount', description='The number of fields that are hit.', example='50'),
size?: long(name='Size', description='The size of the file. Unit: bytes.', example='20'),
}
](name='Items', description='The OSS objects.'),
marker?: string(name='Marker', description='This parameter is deprecated.', example='-1'),
nextMarker?: string(name='NextMarker', description='The ID value from which the next page of results starts.
> This parameter is returned only when the `Truncated` parameter is set to `true`.', example='1754786235714378752'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='12'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='1'),
truncated?: boolean(name='Truncated', description='Indicates whether the queried entries are truncated. Valid values:
* **true**
* **false**', example='false'),
}
model DescribeOssObjectsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeOssObjectsResponseBody(name='body'),
}
/**
* @summary Queries Object Storage Service (OSS) objects that you authorize Data Security Center (DSC) to access.
*
* @param request DescribeOssObjectsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeOssObjectsResponse
*/
async function describeOssObjectsWithOptions(request: DescribeOssObjectsRequest, runtime: Util.RuntimeOptions): DescribeOssObjectsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.fileCategoryCode)) {
query['FileCategoryCode'] = request.fileCategoryCode;
}
if (!Util.isUnset(request.instanceId)) {
query['InstanceId'] = request.instanceId;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.lastScanTimeEnd)) {
query['LastScanTimeEnd'] = request.lastScanTimeEnd;
}
if (!Util.isUnset(request.lastScanTimeStart)) {
query['LastScanTimeStart'] = request.lastScanTimeStart;
}
if (!Util.isUnset(request.marker)) {
query['Marker'] = request.marker;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.riskLevelId)) {
query['RiskLevelId'] = request.riskLevelId;
}
if (!Util.isUnset(request.ruleId)) {
query['RuleId'] = request.ruleId;
}
if (!Util.isUnset(request.serviceRegionId)) {
query['ServiceRegionId'] = request.serviceRegionId;
}
if (!Util.isUnset(request.templateId)) {
query['TemplateId'] = request.templateId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeOssObjects',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries Object Storage Service (OSS) objects that you authorize Data Security Center (DSC) to access.
*
* @param request DescribeOssObjectsRequest
* @return DescribeOssObjectsResponse
*/
async function describeOssObjects(request: DescribeOssObjectsRequest): DescribeOssObjectsResponse {
var runtime = new Util.RuntimeOptions{};
return describeOssObjectsWithOptions(request, runtime);
}
model DescribePackagesRequest {
currentPage?: int32(name='CurrentPage', description='The page number of the page to return.', example='1'),
instanceId?: long(name='InstanceId', description='The ID of the instance to which the package belongs.
> You can call the **DescribeInstances** operation to query the ID of the instance.', example='12321'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
name?: string(name='Name', description='The search keyword. Fuzzy match is supported.', example='test'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='10'),
productId?: long(name='ProductId', description='The ID of the service to which the package belongs.
> You can call the **DescribeDataAssets** operation to query the ID of the service.', example='2566600'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the package. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='2'),
ruleId?: long(name='RuleId', description='The ID of the sensitive data detection rule that the package hits.
> You can call the **DescribeRules** operation to query the ID of the sensitive data detection rule.', example='266666'),
}
model DescribePackagesResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
creationTime?: long(name='CreationTime', description='The point in time when the MaxCompute package was created. The value is a UNIX timestamp. Unit: milliseconds.', example='1536751124000'),
id?: long(name='Id', description='The ID of the package.', example='111111'),
instanceId?: long(name='InstanceId', description='The ID of the instance to which the package belongs.', example='223453332'),
name?: string(name='Name', description='The name of the package.', example='gxdata'),
owner?: string(name='Owner', description='The account of the user that owns the package.', example='cou-2221'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the package. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='4'),
riskLevelName?: string(name='RiskLevelName', description='The name of the sensitivity level for the package.', example='Highest sensitivity level'),
sensitive?: boolean(name='Sensitive', description='Indicates whether the package contains sensitive data. Valid values:
* true: yes
* false: no', example='true'),
sensitiveCount?: int32(name='SensitiveCount', description='The total volume of sensitive data in the package. For example, the value can be the total number of sensitive tables in the MaxCompute package.', example='123'),
totalCount?: int32(name='TotalCount', description='The total volume of data in the package. For example, the value can be the total number of tables in the MaxCompute package.', example='321'),
}
](name='Items', description='An array that consists of the information about the packages.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='12'),
}
model DescribePackagesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribePackagesResponseBody(name='body'),
}
/**
* @summary Queries information about the MaxCompute packages that Data Security Center (DSC) is authorized to access. The information includes the names of MaxCompute packages, the accounts of MaxCompute package owners, and the sensitivity levels of MaxCompute packages.
*
* @description You can call this operation to query MaxCompute packages that are scanned by DSC. This helps you search for MaxCompute packages and view the summary of MaxCompute packages.
* # Limits
* 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.
*
* @param request DescribePackagesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribePackagesResponse
*/
async function describePackagesWithOptions(request: DescribePackagesRequest, runtime: Util.RuntimeOptions): DescribePackagesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.instanceId)) {
query['InstanceId'] = request.instanceId;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.productId)) {
query['ProductId'] = request.productId;
}
if (!Util.isUnset(request.riskLevelId)) {
query['RiskLevelId'] = request.riskLevelId;
}
if (!Util.isUnset(request.ruleId)) {
query['RuleId'] = request.ruleId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribePackages',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries information about the MaxCompute packages that Data Security Center (DSC) is authorized to access. The information includes the names of MaxCompute packages, the accounts of MaxCompute package owners, and the sensitivity levels of MaxCompute packages.
*
* @description You can call this operation to query MaxCompute packages that are scanned by DSC. This helps you search for MaxCompute packages and view the summary of MaxCompute packages.
* # Limits
* 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.
*
* @param request DescribePackagesRequest
* @return DescribePackagesResponse
*/
async function describePackages(request: DescribePackagesRequest): DescribePackagesResponse {
var runtime = new Util.RuntimeOptions{};
return describePackagesWithOptions(request, runtime);
}
model DescribeParentInstanceRequest {
authStatus?: int32(name='AuthStatus', example='0'),
checkStatus?: int32(name='CheckStatus', example='3'),
clusterStatus?: string(name='ClusterStatus', example='Running'),
currentPage?: int32(name='CurrentPage', example='1'),
dbName?: string(name='DbName', example='db_test'),
engineType?: string(name='EngineType', example='MySQL'),
instanceId?: string(name='InstanceId', example='rm-azfxx'),
lang?: string(name='Lang', example='zh_cn'),
memberAccount?: long(name='MemberAccount'),
pageSize?: int32(name='PageSize', example='10'),
resourceType?: long(name='ResourceType', example='5'),
serviceRegionId?: string(name='ServiceRegionId', example='cn-shanghai'),
}
model DescribeParentInstanceResponseBody = {
currentPage?: int32(name='CurrentPage', example='1'),
items?: [
{
auditStatus?: int32(name='AuditStatus', example='1'),
authStatus?: int32(name='AuthStatus', example='1'),
authTime?: long(name='AuthTime'),
clusterStatus?: string(name='ClusterStatus', example='Running'),
connectNode?: string(name='ConnectNode', example='Primary'),
dbNum?: string(name='DbNum', example='3'),
engineType?: string(name='EngineType', example='MySQL'),
instanceDescription?: string(name='InstanceDescription', example='instance description'),
instanceId?: string(name='InstanceId', example='rm-2h066mht2vz'),
instanceSize?: long(name='InstanceSize', example='409600'),
localName?: string(name='LocalName', example='cn-hangzhou'),
memberAccount?: long(name='MemberAccount'),
parentId?: string(name='ParentId', example='rm-uf6b9897shxxx.test'),
regionId?: string(name='RegionId'),
resourceType?: string(name='ResourceType', example='RDS'),
supportConnectNodes?: string(name='SupportConnectNodes', example='Primary,Secondary'),
tenantId?: string(name='TenantId', example='HBJWDSBE-zh_CN'),
tenantName?: string(name='TenantName', example='user1'),
unConnectDbCount?: string(name='UnConnectDbCount', example='1'),
unSupportOneClickAuthReason?: string(name='UnSupportOneClickAuthReason', example='engine type not support'),
}
](name='Items'),
pageSize?: int32(name='PageSize', example='10'),
requestId?: string(name='RequestId', example='ACEF9334-BB50-525D-8CF3-6CF504E4D1B3'),
totalCount?: int32(name='TotalCount', example='3'),
}
model DescribeParentInstanceResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeParentInstanceResponseBody(name='body'),
}
/**
* @summary 获取一级授权列表
*
* @param request DescribeParentInstanceRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeParentInstanceResponse
*/
async function describeParentInstanceWithOptions(request: DescribeParentInstanceRequest, runtime: Util.RuntimeOptions): DescribeParentInstanceResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.authStatus)) {
query['AuthStatus'] = request.authStatus;
}
if (!Util.isUnset(request.checkStatus)) {
query['CheckStatus'] = request.checkStatus;
}
if (!Util.isUnset(request.clusterStatus)) {
query['ClusterStatus'] = request.clusterStatus;
}
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.dbName)) {
query['DbName'] = request.dbName;
}
if (!Util.isUnset(request.engineType)) {
query['EngineType'] = request.engineType;
}
if (!Util.isUnset(request.instanceId)) {
query['InstanceId'] = request.instanceId;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.memberAccount)) {
query['MemberAccount'] = request.memberAccount;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.serviceRegionId)) {
query['ServiceRegionId'] = request.serviceRegionId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeParentInstance',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary 获取一级授权列表
*
* @param request DescribeParentInstanceRequest
* @return DescribeParentInstanceResponse
*/
async function describeParentInstance(request: DescribeParentInstanceRequest): DescribeParentInstanceResponse {
var runtime = new Util.RuntimeOptions{};
return describeParentInstanceWithOptions(request, runtime);
}
model DescribeRiskLevelsRequest {
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='2'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* zh_cn: Chinese (default)
* en_us: English', example='zh_cn'),
templateId?: long(name='TemplateId', description='The ID of the industry-specific rule template.', example='1'),
}
model DescribeRiskLevelsResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='136082B3-B21F-5E9D-B68E-991FFD205D24'),
riskLevelList?: [
{
description?: string(name='Description', description='The description of the sensitivity level. You can enter a custom description.
The following list describes the sensitivity level names and the corresponding default description:
* **NA**: which indicates that no sensitive data is detected.
* **S1**: which indicates the sensitive data at sensitivity level 1.
* **S2**: which indicates the sensitive data at sensitivity level 2.
* **S3**: which indicates the sensitive data at sensitivity level 3.
* **S4**: which indicates the sensitive data at sensitivity level 4.
* **S5**: which indicates the sensitive data at sensitivity level 5.
* **S6**: which indicates the sensitive data at sensitivity level 6.
* **S7**: which indicates the sensitive data at sensitivity level 7.
* **S8**: which indicates the sensitive data at sensitivity level 8.
* **S9**: which indicates the sensitive data at sensitivity level 9.
* **S10**: which indicates the sensitive data at sensitivity level 10.', example='Sensitive data at sensitivity level 1'),
id?: long(name='Id', description='The unique ID of the sensitivity level. Valid values: 1 to 11. Each sensitivity level ID maps a sensitivity level. For example, the sensitivity level ID of 2 corresponds to the sensitivity level S1.
For more information, see the description of the Name parameter.', example='2'),
name?: string(name='Name', description='The name of the sensitivity level. The highest sensitivity level varies based on rule templates. The highest sensitivity level is S10. The highest sensitivity level of the **Built-in data security classification templates for Alibaba and Ant Group** is S4, and that of the **built-in classification templates for financial data** and **built-in classification templates for assets** is S5. For more information about the built-in classification templates for financial data, see Guidelines for Security Classification of Financial Data and Security Data - JRT 0197-2020. For a copied rule template, the highest sensitivity level is S10. The following list describes the sensitivity level names and the corresponding IDs:
* **NA**: 1
* **S1**: 2
* **S2**: 3
* **S3**: 4
* **S4**: 5
* **S5**: 6
* **S6**: 7
* **S7**: 8
* **S8**: 9
* **S9**: 10
* **S10**: 11', example='S1'),
referenceNum?: int32(name='ReferenceNum', description='The number of times that each sensitivity level is referenced in the rule template. Default value: 0.', example='20'),
}
](name='RiskLevelList', description='An array that consists of sensitivity levels.'),
}
model DescribeRiskLevelsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeRiskLevelsResponseBody(name='body'),
}
/**
* @summary Queries the sensitivity levels that are defined in a rule template provided by Data Security Center (DSC).
*
* @description You can call this operation to query the sensitivity levels that are defined in the current rule template provided by DSC. This helps you learn about the number of times that each sensitivity level is referenced in the rule template and the highest sensitivity level.
* # Limits
* 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.
*
* @param request DescribeRiskLevelsRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeRiskLevelsResponse
*/
async function describeRiskLevelsWithOptions(request: DescribeRiskLevelsRequest, runtime: Util.RuntimeOptions): DescribeRiskLevelsResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.templateId)) {
query['TemplateId'] = request.templateId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeRiskLevels',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries the sensitivity levels that are defined in a rule template provided by Data Security Center (DSC).
*
* @description You can call this operation to query the sensitivity levels that are defined in the current rule template provided by DSC. This helps you learn about the number of times that each sensitivity level is referenced in the rule template and the highest sensitivity level.
* # Limits
* 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.
*
* @param request DescribeRiskLevelsRequest
* @return DescribeRiskLevelsResponse
*/
async function describeRiskLevels(request: DescribeRiskLevelsRequest): DescribeRiskLevelsResponse {
var runtime = new Util.RuntimeOptions{};
return describeRiskLevelsWithOptions(request, runtime);
}
model DescribeRulesRequest {
category?: int32(name='Category', description='The content type of the sensitive data detection rule. Valid values:
* **0**: keyword
* **2**: regular expression', example='2'),
contentCategory?: int32(name='ContentCategory', description='The type of the content in the sensitive data detection rule. Valid values include **1**, **2**, **3**, **4**, and **5**. The value 1 indicates attempts to exploit SQL injections. The value 2 indicates bypass by using SQL injections. The value 3 indicates abuse of stored procedures. The value 4 indicates buffer overflow. The value 5 indicates SQL injections based on errors.', example='1'),
cooperationChannel?: string(name='CooperationChannel', description='The external cooperation channel. Valid values:
* DAS
* YAOCHI', example='DAS'),
currentPage?: int32(name='CurrentPage', description='The page number of the page to return.', example='1'),
customType?: int32(name='CustomType', description='The type of the sensitive data detection rule. Valid values:
* **0**: built-in rule
* **1**: custom rule', example='1'),
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='2'),
groupId?: string(name='GroupId', description='The parent group type of the rule.', example='4_1'),
keywordCompatible?: boolean(name='KeywordCompatible', description='Specifies whether to allow earlier versions of request parameters to support keywords that are supported in later versions of request parameters. Valid values:
* **true**: yes
* **false**: no
> To specify keywords as the content type of the sensitive data detection rule, you can set the Category parameter to 0 for earlier versions of request parameters and set the Category parameter to 5 for later versions of request parameters. You can specify the KeywordCompatible parameter based on your business requirements.', example='true'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh**: Chinese
* **en**: English', example='zh'),
matchType?: int32(name='MatchType', description='The match type. Valid values:
* 1: rule-based match
* 2: dictionary-based match', example='1'),
name?: string(name='Name', description='The name of the sensitive data detection rule. Fuzzy match is supported.', example='\\\\*\\\\*\\\\* rule'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page.', example='12'),
productCode?: int32(name='ProductCode', description='The name of the service to which the data asset belongs. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='MaxCompute'),
productId?: long(name='ProductId', description='The ID of the service to which the sensitive data detection rule is applied. Valid values include **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates Object Storage Service (OSS). The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='1'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the sensitive data that hits the sensitive data detection rule. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='2'),
ruleType?: int32(name='RuleType', description='The type of the sensitive data detection rule. Valid values:
* **1**: sensitive data detection rule
* **2**: audit rule
* **3**: anomalous event detection rule
* **99**: custom rule', example='1'),
simplify?: boolean(name='Simplify', description='Specifies whether to query a simplified rule. The simplified rule contains only the rule name. Valid values:
* true
* false', example='false'),
status?: int32(name='Status', description='The status of the sensitive data detection rule. Valid values:
* **1**: enabled
* **0**: disabled', example='1'),
supportForm?: int32(name='SupportForm', description='The type of the data asset. Valid values:
* **0**: all data assets
* **1**: structured data asset
* **2**: unstructured data asset
> If you set the parameter to 1 or 2, rules that support all data assets and rules that support the queried data asset type are returned.', example='1'),
warnLevel?: int32(name='WarnLevel', description='The severity level of the alert. Valid values:
* **1**: low
* **2**: medium
* **3**: high', example='2'),
}
model DescribeRulesResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
category?: int32(name='Category', description='The content type of the sensitive data detection rule. Valid values:
* **0**: keyword
* **2**: regular expression', example='2'),
categoryName?: string(name='CategoryName', description='The name of the content type of the sensitive data detection rule.', example='Regular expression'),
content?: string(name='Content', description='The content in the sensitive data detection rule.
> A built-in detection rule whose CustomType is 0 does not return the content of the rule.', example='(?:\\\\\\\\D|^)((?:(?:25[0-4]|2[0-4]\\\\\\\\d|1\\\\\\\\d{2}|[1-9]\\\\\\\\d{1})\\\\\\\\.)(?:(?:25[0-5]|2[0-4]\\\\\\\\d|[01]?\\\\\\\\d?\\\\\\\\d)\\\\\\\\.){2}(?:25[0-5]|2[0-4]\\\\\\\\d|1[0-9]\\\\\\\\d|[1-9]\\\\\\\\d|[1-9]))(?:\\\\\\\\D|$)'),
contentCategory?: string(name='ContentCategory', description='The type of the content in the sensitive data detection rule. Valid values include **1**, **2**, **3**, **4**, and **5**. The value 1 indicates attempts to exploit SQL injections. The value 2 indicates bypass by using SQL injections. The value 3 indicates abuse of stored procedures. The value 4 indicates buffer overflow. The value 5 indicates SQL injections based on errors.', example='1'),
customType?: int32(name='CustomType', description='The type of the sensitive data detection rule.
* 0: built-in rule
* 1: custom rule', example='1'),
description?: string(name='Description', description='The description of the sensitive data detection rule.', example='The sensitive data detection rule is used to detect IP addresses.'),
displayName?: string(name='DisplayName', description='The display name of the account that is used to create the sensitive data detection rule.', example='****test'),
gmtCreate?: long(name='GmtCreate', description='The time when the sensitive data detection rule is created. The value is a UNIX timestamp. Unit: milliseconds.', example='1545277010000'),
gmtModified?: long(name='GmtModified', description='The time when the sensitive data detection rule is modified. The value is a UNIX timestamp. Unit: milliseconds.', example='1545277010000'),
groupId?: string(name='GroupId', description='The parent group type of the rule.', example='4_1'),
hitTotalCount?: int32(name='HitTotalCount', description='The number of times that the sensitive data detection rule is hit.', example='3'),
id?: long(name='Id', description='The ID of the sensitive data detection rule.', example='20000'),
loginName?: string(name='LoginName', description='The username of the account that is used to create the sensitive data detection rule.', example='det1111'),
majorKey?: string(name='MajorKey', description='The key of the primary dimension.', example='key'),
matchType?: int32(name='MatchType', description='The match type. Valid values:
* **1**: rule-based match
* **2**: dictionary-based match', example='1'),
modelRuleIds?: string(name='ModelRuleIds', description='The IDs of the models for sensitive data audit.', example='1452'),
name?: string(name='Name', description='The name of the sensitive data detection rule.', example='IP address'),
productCode?: string(name='ProductCode', description='The name of the service to which the data asset belongs. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='MaxCompute'),
productId?: long(name='ProductId', description='The ID of the service to which the sensitive data detection rule is applied. Valid values include **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates OSS. The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='2'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the sensitive data that hits the sensitive data detection rule. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='2'),
riskLevelName?: string(name='RiskLevelName', description='The sensitivity level of data that hits the sensitive data detection rule. Valid values:
* **N/A**: indicates that no sensitive data is detected.
* **S1**: indicates the low sensitivity level.
* **S2**: indicates the medium sensitivity level.
* **S3**: indicates the high sensitivity level.
* **S4**: indicates the highest sensitivity level.', example='S2'),
statExpress?: string(name='StatExpress', description='The statistical expression.', example='1'),
status?: int32(name='Status', description='The status of the sensitive data detection rule. Valid values:
* **0**: disabled
* **1**: enabled', example='1'),
supportForm?: int32(name='SupportForm', description='The data asset type that is supported by the sensitive data detection rule. Valid values:
* **0**: all data assets
* **1**: structured data assets
* **2**: unstructured data assets', example='2'),
target?: string(name='Target', description='The name of the service to which the data asset belongs. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='MaxCompute'),
templateRuleIds?: string(name='TemplateRuleIds', description='The IDs of the templates that are used to audit sensitive data.', example='1'),
userId?: long(name='UserId', description='The ID of the account that is used to create the sensitive data detection rule.', example='0'),
warnLevel?: int32(name='WarnLevel', description='The severity level. Valid values:
* **1**: low
* **2**: medium
* **3**: high', example='2'),
}
](name='Items', description='The sensitive data detection rules.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='12'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='23'),
}
model DescribeRulesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeRulesResponseBody(name='body'),
}
/**
* @summary Queries sensitive data detection rules.
*
* @param request DescribeRulesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeRulesResponse
*/
async function describeRulesWithOptions(request: DescribeRulesRequest, runtime: Util.RuntimeOptions): DescribeRulesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.category)) {
query['Category'] = request.category;
}
if (!Util.isUnset(request.contentCategory)) {
query['ContentCategory'] = request.contentCategory;
}
if (!Util.isUnset(request.cooperationChannel)) {
query['CooperationChannel'] = request.cooperationChannel;
}
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.customType)) {
query['CustomType'] = request.customType;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.groupId)) {
query['GroupId'] = request.groupId;
}
if (!Util.isUnset(request.keywordCompatible)) {
query['KeywordCompatible'] = request.keywordCompatible;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.matchType)) {
query['MatchType'] = request.matchType;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.productCode)) {
query['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.productId)) {
query['ProductId'] = request.productId;
}
if (!Util.isUnset(request.riskLevelId)) {
query['RiskLevelId'] = request.riskLevelId;
}
if (!Util.isUnset(request.ruleType)) {
query['RuleType'] = request.ruleType;
}
if (!Util.isUnset(request.simplify)) {
query['Simplify'] = request.simplify;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
if (!Util.isUnset(request.supportForm)) {
query['SupportForm'] = request.supportForm;
}
if (!Util.isUnset(request.warnLevel)) {
query['WarnLevel'] = request.warnLevel;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeRules',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries sensitive data detection rules.
*
* @param request DescribeRulesRequest
* @return DescribeRulesResponse
*/
async function describeRules(request: DescribeRulesRequest): DescribeRulesResponse {
var runtime = new Util.RuntimeOptions{};
return describeRulesWithOptions(request, runtime);
}
model DescribeTablesRequest {
currentPage?: int32(name='CurrentPage', description='The page number of the page to return. Default value: 1.', example='1'),
instanceId?: long(name='InstanceId', description='The ID of the data asset to which the table belongs. You can call the [DescribeInstances](~~DescribeInstances~~) operation to obtain the ID of the data asset.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
name?: string(name='Name', description='The search keyword. Fuzzy match is supported. For example, if you specify test, all tables whose names contain test are retrieved.', example='test'),
packageId?: long(name='PackageId', description='The ID of the package to which the table belongs. You can call the [DescribePackages](~~DescribePackages~~) operation to obtain the ID of the package.', example='555555'),
pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Default value: 10.', example='10'),
productCode?: string(name='ProductCode', description='The name of the service to which the table belongs, such as MaxCompute, OSS, and ApsaraDB RDS. For more information about the types of data assets from which Data Security Center (DSC) can scan for sensitive data, see [Supported data assets](https://help.aliyun.com/document_detail/212906.html).', example='MaxCompute'),
productId?: long(name='ProductId', description='The ID of the service to which the table belongs. You can call the [DescribeDataAssets](~~DescribeDataAssets~~) operation to obtain the ID of the service.', example='1'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the table. Each sensitivity level ID corresponds to a sensitivity level name. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='2'),
ruleId?: long(name='RuleId', description='The ID of the sensitive data detection rule that the table hits. You can call the [DescribeRules](~~DescribeRules~~) operation to obtain the ID of the sensitive data detection rule.', example='333322'),
serviceRegionId?: string(name='ServiceRegionId', description='The region in which DSC is activated. For more information, see [Supported regions](https://help.aliyun.com/document_detail/214257.html).', example='cn-hangzhou'),
templateId?: long(name='TemplateId', description='The ID of the industry-specific rule template.', example='1'),
}
model DescribeTablesResponseBody = {
currentPage?: int32(name='CurrentPage', description='The page number of the returned page.', example='1'),
items?: [
{
creationTime?: long(name='CreationTime', description='The point in time when the table was created. Unit: milliseconds.', example='1536751124000'),
id?: long(name='Id', description='The ID of the table.', example='222'),
instanceDescription?: string(name='InstanceDescription', description='The description of the data asset.', example='Description 1'),
instanceId?: long(name='InstanceId', description='The ID of the data asset to which the table belongs.', example='1'),
instanceName?: string(name='InstanceName', description='The name of the data asset to which the table belongs.', example='Data Asset 1'),
name?: string(name='Name', description='The name of the table.', example='gxdata'),
owner?: string(name='Owner', description='The Alibaba Cloud account to which the table belongs.', example='dtdep-239-******'),
productCode?: string(name='ProductCode', description='The name of the service to which the table belongs. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**. For more information about the types of data assets from which DSC can scan for sensitive data, see [Supported data assets](https://help.aliyun.com/document_detail/212906.html).', example='MaxCompute'),
productId?: string(name='ProductId', description='The ID of the service to which the table belongs.', example='1'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the table. Each sensitivity level ID corresponds to a sensitivity level name. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='2'),
riskLevelName?: string(name='RiskLevelName', description='The name of the sensitivity level for the table. Valid values:
* **N/A**: indicates that no sensitive data is detected.
* **S1**: indicates the low sensitivity level.
* **S2**: indicates the medium sensitivity level.
* **S3**: indicates the high sensitivity level.
* **S4**: indicates the highest sensitivity level.', example='S2'),
ruleList?: [
{
count?: long(name='Count', description='The total number of rules.', example='12'),
name?: string(name='Name', description='The name of the rule.', example='Rule name'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the sensitive data that hits the sensitive data detection rule. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='1'),
}
](name='RuleList', description='The information about the sensitive data detection rules that are hit.'),
sensitive?: boolean(name='Sensitive', description='Indicates whether the table contains sensitive fields. Valid values:
* **true**: yes
* **false**: no', example='true'),
sensitiveCount?: int32(name='SensitiveCount', description='The total number of sensitive fields in the table.', example='32'),
sensitiveRatio?: string(name='SensitiveRatio', description='The percentage of sensitive fields in the table.', example='21%'),
tenantName?: string(name='TenantName', description='The name of the tenant.', example='Tenant 1'),
totalCount?: int32(name='TotalCount', description='The total number of fields in the table.', example='1234'),
}
](name='Items', description='An array that consists of tables.'),
pageSize?: int32(name='PageSize', description='The number of entries returned per page.', example='10'),
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='13'),
}
model DescribeTablesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeTablesResponseBody(name='body'),
}
/**
* @summary Queries tables in data assets, 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.
* # 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.
*
* @param request DescribeTablesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeTablesResponse
*/
async function describeTablesWithOptions(request: DescribeTablesRequest, runtime: Util.RuntimeOptions): DescribeTablesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.currentPage)) {
query['CurrentPage'] = request.currentPage;
}
if (!Util.isUnset(request.instanceId)) {
query['InstanceId'] = request.instanceId;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.packageId)) {
query['PackageId'] = request.packageId;
}
if (!Util.isUnset(request.pageSize)) {
query['PageSize'] = request.pageSize;
}
if (!Util.isUnset(request.productCode)) {
query['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.productId)) {
query['ProductId'] = request.productId;
}
if (!Util.isUnset(request.riskLevelId)) {
query['RiskLevelId'] = request.riskLevelId;
}
if (!Util.isUnset(request.ruleId)) {
query['RuleId'] = request.ruleId;
}
if (!Util.isUnset(request.serviceRegionId)) {
query['ServiceRegionId'] = request.serviceRegionId;
}
if (!Util.isUnset(request.templateId)) {
query['TemplateId'] = request.templateId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeTables',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries tables in data assets, 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.
* # 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.
*
* @param request DescribeTablesRequest
* @return DescribeTablesResponse
*/
async function describeTables(request: DescribeTablesRequest): DescribeTablesResponse {
var runtime = new Util.RuntimeOptions{};
return describeTablesWithOptions(request, runtime);
}
model DescribeTemplateAllRulesRequest {
featureType?: int32(name='FeatureType'),
lang?: string(name='Lang', example='zh_cn'),
templateId?: long(name='TemplateId', example='1'),
}
model DescribeTemplateAllRulesResponseBody = {
requestId?: string(name='RequestId', example='769FB3C1-F4C9-4******'),
ruleList?: [
{
id?: long(name='Id', example='376'),
name?: string(name='Name', example='Model Name'),
}
](name='RuleList'),
}
model DescribeTemplateAllRulesResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeTemplateAllRulesResponseBody(name='body'),
}
/**
* @param request DescribeTemplateAllRulesRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeTemplateAllRulesResponse
*/
async function describeTemplateAllRulesWithOptions(request: DescribeTemplateAllRulesRequest, runtime: Util.RuntimeOptions): DescribeTemplateAllRulesResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.templateId)) {
query['TemplateId'] = request.templateId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeTemplateAllRules',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @param request DescribeTemplateAllRulesRequest
* @return DescribeTemplateAllRulesResponse
*/
async function describeTemplateAllRules(request: DescribeTemplateAllRulesRequest): DescribeTemplateAllRulesResponse {
var runtime = new Util.RuntimeOptions{};
return describeTemplateAllRulesWithOptions(request, runtime);
}
model DescribeUserStatusRequest {
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh_cn**: Simplified Chinese (default)
* **en_us**: English', example='zh_cn'),
}
model DescribeUserStatusResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
userStatus?: {
accessKeyId?: string(name='AccessKeyId', description='The AccessKey ID of the current account.', example='LTAI4G67HRBzNRmMhfyv****'),
auditClosable?: boolean(name='AuditClosable', description='Indicates whether the SQL Explorer feature can be disabled. Valid values:
* **true**: yes
* **false**: no', example='true'),
auditReleasable?: boolean(name='AuditReleasable', description='Indicates whether the audit resources can be released.
* **true**: yes
* **false**: no', example='true'),
authed?: boolean(name='Authed', description='Indicates whether DSC has permission to access user resources within the current account. Valid values:
* **true**: yes
* **false**: no', example='true'),
chargeType?: string(name='ChargeType', description='The billing method of DCS that is purchased by using the current account. Valid values:
* **PREPAY**: subscription
* **POSTPAY**: pay-as-you-go', example='PREPAY'),
dataManagerRole?: int32(name='DataManagerRole', description='The permissions that the current account has. Valid values:
* **0**: The current account has the administrative permissions or read-only permissions on Data Security Center.
* **1**: The current account has the permissions to manage data domains.', example='1'),
instanceId?: string(name='InstanceId', description='The ID of the data security center instance purchased by the main account.', example='sddp-cn-****'),
instanceNum?: int32(name='InstanceNum', description='The number of instances within the current account.', example='32'),
instanceTotalCount?: long(name='InstanceTotalCount', description='The total number of instances.', example='10'),
labStatus?: int32(name='LabStatus', description='Indicates whether the data security lab feature is enabled. Valid values:
* **1**: yes
* **0**: no', example='1'),
ossTotalSize?: long(name='OssTotalSize', description='OSS total storage capacity. Unit: Bytes.', example='2048'),
protectionDays?: int32(name='ProtectionDays', description='Accumulate the number of days to protect user assets.', example='2'),
purchased?: boolean(name='Purchased', description='Indicates whether DSC is purchased. Valid values:
* **true**: yes
* **false**: no', example='true'),
releaseDays?: int32(name='ReleaseDays', description='The grace period between when DSC is expired and when DSC is released. Unit: days.', example='15'),
releaseTime?: long(name='ReleaseTime', description='The time when the audit resources are released. Unit: milliseconds.', example='15000'),
remainDays?: int32(name='RemainDays', description='The remaining period for which the data assets within the current account can be protected by DSC.', example='131'),
trail?: boolean(name='Trail', description='Indicates whether the current account uses a free trial of DSC. Valid values:
* **true**: yes
* **false**: no', example='true'),
useAgentAudit?: boolean(name='UseAgentAudit', description='Indicates whether the agent audit feature is used. Valid values:
* **1**: yes
* **0**: no', example='1'),
useInstanceNum?: int32(name='UseInstanceNum', description='The number of instances that are used.', example='125'),
useOssSize?: long(name='UseOssSize', description='The occupied space of the Object Storage Service (OSS) bucket. Unit: bytes.', example='234'),
}(name='UserStatus', description='The information about the current account.'),
}
model DescribeUserStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DescribeUserStatusResponseBody(name='body'),
}
/**
* @summary Queries the information about an account.
*
* @description You can call this operation to query the information about the current account. This helps you get familiar with your account that accesses Data Security Center (DSC).
* # Limits
* 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.
*
* @param request DescribeUserStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DescribeUserStatusResponse
*/
async function describeUserStatusWithOptions(request: DescribeUserStatusRequest, runtime: Util.RuntimeOptions): DescribeUserStatusResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DescribeUserStatus',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Queries the information about an account.
*
* @description You can call this operation to query the information about the current account. This helps you get familiar with your account that accesses Data Security Center (DSC).
* # Limits
* 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.
*
* @param request DescribeUserStatusRequest
* @return DescribeUserStatusResponse
*/
async function describeUserStatus(request: DescribeUserStatusRequest): DescribeUserStatusResponse {
var runtime = new Util.RuntimeOptions{};
return describeUserStatusWithOptions(request, runtime);
}
model DisableUserConfigRequest {
code?: string(name='Code', description='The code of the configuration item. You can call the [DescribeConfigs](~~DescribeConfigs~~) operation to obtain the code of the configuration item.', example='access_failed_cnt'),
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh_cn**: Chinese (default)
* **en_us**: English', example='zh_cn'),
}
model DisableUserConfigResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='AC314611-D907-5EBF-B6D8-70425E5A8643'),
}
model DisableUserConfigResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DisableUserConfigResponseBody(name='body'),
}
/**
* @summary Disables a configuration item. After you disable a configuration item, you can call the CreateConfig operation to enable the configuration item by specifying the code of the configuration item for the Code parameter in the request.
*
* @description You can call this operation to disable a configuration item based on the code of the configuration item. This helps you modify configurations at the earliest opportunity.
* # Limits
* 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.
*
* @param request DisableUserConfigRequest
* @param runtime runtime options for this request RuntimeOptions
* @return DisableUserConfigResponse
*/
async function disableUserConfigWithOptions(request: DisableUserConfigRequest, runtime: Util.RuntimeOptions): DisableUserConfigResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.code)) {
query['Code'] = request.code;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DisableUserConfig',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Disables a configuration item. After you disable a configuration item, you can call the CreateConfig operation to enable the configuration item by specifying the code of the configuration item for the Code parameter in the request.
*
* @description You can call this operation to disable a configuration item based on the code of the configuration item. This helps you modify configurations at the earliest opportunity.
* # Limits
* 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.
*
* @param request DisableUserConfigRequest
* @return DisableUserConfigResponse
*/
async function disableUserConfig(request: DisableUserConfigRequest): DisableUserConfigResponse {
var runtime = new Util.RuntimeOptions{};
return disableUserConfigWithOptions(request, runtime);
}
model ExecDatamaskRequest {
data?: string(name='Data', description='The sensitive data to be de-identified. The value is a JSON string that contains the following parameters:
* **dataHeaderList**: the names of the columns in which data needs to be de-identified. Specify the column names in accordance with the order of data that needs to be de-identified.
* **dataList**: the data that needs to be de-identified.
* **ruleList**: the IDs of sensitive data detection rules used to detect data that needs to be de-identified. Specify the rule IDs in accordance with the order of data that needs to be de-identified. Each ID identifies a sensitive data detection rule that is used to detect a type of sensitive data. You can call the [DescribeRules](~~DescribeRules~~) operation to query the IDs of sensitive data detection rules.
This parameter is required.', example='{"dataHeaderList":["name","age"],"dataList":[["lily",18],["lucy",17]],"ruleList":[1002,null]}'),
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Simplified Chinese
* **en_us**: English', example='zh_cn'),
templateId?: long(name='TemplateId', description='The ID of the de-identification template. The ID is generated after you create the de-identification template in the [Data Security Center (DSC) console](https://yundun.console.aliyun.com/?\\\\&p=sddpnext#/sddp/dm/template). You can choose **Data desensitization** > **Desensitization Template** in the left-side navigation pane and obtain the ID of the de-identification template from the **Desensitization Template** page.
* If you select **Field name** as the matching mode of the template, DSC matches data based on the columns specified by the **dataHeaderList** parameter in the **Data** parameter.
* If you select **Sensitive type** as the matching mode of the template, DSC matches data based on the sensitive data detection rules specified by the **ruleList** parameter in the **Data** parameter.
This parameter is required.', example='1'),
}
model ExecDatamaskResponseBody = {
data?: string(name='Data', description='The de-identified data, which is described in a JSON string. The JSON string contains the following parameters:
* **dataHeaderList**: the names of columns that contain the de-identified data.
* **dataList**: the de-identified data. The column order of the de-identified data is the same as that indicated by the dataHeaderList parameter.
* **ruleList**: the IDs of sensitive data detection rules.', example='{"dataHeaderList":["name","age"],"dataList":[["l***",18],["l***",17]],"ruleList":[1002,null]}'),
requestId?: string(name='RequestId', description='The ID of the request, which is used to locate and troubleshoot issues.', example='813BA9FA-D062-42C4-8CD5-11A7640B96E6'),
}
model ExecDatamaskResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ExecDatamaskResponseBody(name='body'),
}
/**
* @summary Dynamically de-identifies sensitive data.
*
* @param request ExecDatamaskRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ExecDatamaskResponse
*/
async function execDatamaskWithOptions(request: ExecDatamaskRequest, runtime: Util.RuntimeOptions): ExecDatamaskResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.data)) {
query['Data'] = request.data;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.templateId)) {
query['TemplateId'] = request.templateId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ExecDatamask',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Dynamically de-identifies sensitive data.
*
* @param request ExecDatamaskRequest
* @return ExecDatamaskResponse
*/
async function execDatamask(request: ExecDatamaskRequest): ExecDatamaskResponse {
var runtime = new Util.RuntimeOptions{};
return execDatamaskWithOptions(request, runtime);
}
model ManualTriggerMaskingProcessRequest {
id?: long(name='Id', description='The ID of the de-identification task.
The ID of the de-identification task is a string. You can call the DescribeDataMaskingTasks operation to query the ID.
This parameter is required.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response, default value zh_cn. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
}
model ManualTriggerMaskingProcessResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-4******'),
}
model ManualTriggerMaskingProcessResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ManualTriggerMaskingProcessResponseBody(name='body'),
}
/**
* @summary Triggers a de-identification task.
*
* @param request ManualTriggerMaskingProcessRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ManualTriggerMaskingProcessResponse
*/
async function manualTriggerMaskingProcessWithOptions(request: ManualTriggerMaskingProcessRequest, runtime: Util.RuntimeOptions): ManualTriggerMaskingProcessResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ManualTriggerMaskingProcess',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Triggers a de-identification task.
*
* @param request ManualTriggerMaskingProcessRequest
* @return ManualTriggerMaskingProcessResponse
*/
async function manualTriggerMaskingProcess(request: ManualTriggerMaskingProcessRequest): ManualTriggerMaskingProcessResponse {
var runtime = new Util.RuntimeOptions{};
return manualTriggerMaskingProcessWithOptions(request, runtime);
}
model ModifyDataLimitRequest {
auditStatus?: int32(name='AuditStatus', description='Specifies whether to enable the security audit feature. Valid values:
* **0**: no
* **1**: yes', example='1'),
autoScan?: int32(name='AutoScan', description='Specifies whether to automatically trigger a re-scan after a rule is modified. Valid values:
* **0**: no
* **1**: yes
> When a re-scan is triggered, DSC scans all data in your data asset.', example='1'),
engineType?: string(name='EngineType', description='The database engine that is run by the instance. Valid values:
* **MySQL**
* **SQLServer**', example='MySQL'),
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='2'),
id?: long(name='Id', description='The unique ID of the data asset for which you want to modify configuration items.
> You can call the [DescribeDataLimits](~~DescribeDataLimits~~) operation to query the ID of the data asset.
This parameter is required.', example='11'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh**: Chinese (default)
* **en**: English', example='zh'),
logStoreDay?: int32(name='LogStoreDay', description='The retention period of raw logs after you enable the security audit feature. Unit: days. Valid values:
* **30**
* **90**
* **180**
* **365**', example='30'),
modifyPassword?: boolean(name='ModifyPassword', description='Specifies whether to change the username and password that are used to log on to the ApsaraDB RDS database. Valid values:
* **true**: yes
* **false**: no', example='true'),
password?: string(name='Password', description='The password used to log on to the ApsaraDB RDS database that you authorize DSC to access.', example='********'),
port?: int32(name='Port', description='The port that is used to connect to the database.', example='3306'),
resourceType?: int32(name='ResourceType', description='The name of the service to which the data asset belongs. Valid values:
* **1**: MaxCompute
* **2**: Object Storage Service (OSS)
* **3**: AnalyticDB for MySQL
* **4**: Tablestore
* **5**: ApsaraDB RDS
This parameter is required.', example='5'),
samplingSize?: int32(name='SamplingSize', description='The number of sensitive data samples tht are collected after sensitive data detection is enabled. Valid values:
* **0**
* **5**
* **10**', example='0'),
securityGroupIdList?: [ string ](name='SecurityGroupIdList', description='The security group that is used by PrivateLink when you install the DSC agent.'),
serviceRegionId?: string(name='ServiceRegionId', description='The region in which the data asset resides. 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)', example='cn-hangzhou'),
userName?: string(name='UserName', description='The username used to log on to the ApsaraDB RDS database that you authorize DSC to access.', example='User01'),
vSwitchIdList?: [ string ](name='VSwitchIdList', description='The vSwitch that is used by PrivateLink when you install the DSC agent.'),
vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) to which the data asset belongs.', example='vpc-2zevcqke6hh09c41****'),
}
model ModifyDataLimitResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request, which is used to locate and troubleshoot issues.', example='7C3AC882-E5A8-4855-BE77-B6837B695EF1'),
}
model ModifyDataLimitResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyDataLimitResponseBody(name='body'),
}
/**
* @summary Modifies configuration items for a data asset that you authorize Data Security Center (DSC) to access.
*
* @param request ModifyDataLimitRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyDataLimitResponse
*/
async function modifyDataLimitWithOptions(request: ModifyDataLimitRequest, runtime: Util.RuntimeOptions): ModifyDataLimitResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.auditStatus)) {
query['AuditStatus'] = request.auditStatus;
}
if (!Util.isUnset(request.autoScan)) {
query['AutoScan'] = request.autoScan;
}
if (!Util.isUnset(request.engineType)) {
query['EngineType'] = request.engineType;
}
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.logStoreDay)) {
query['LogStoreDay'] = request.logStoreDay;
}
if (!Util.isUnset(request.modifyPassword)) {
query['ModifyPassword'] = request.modifyPassword;
}
if (!Util.isUnset(request.password)) {
query['Password'] = request.password;
}
if (!Util.isUnset(request.port)) {
query['Port'] = request.port;
}
if (!Util.isUnset(request.resourceType)) {
query['ResourceType'] = request.resourceType;
}
if (!Util.isUnset(request.samplingSize)) {
query['SamplingSize'] = request.samplingSize;
}
if (!Util.isUnset(request.securityGroupIdList)) {
query['SecurityGroupIdList'] = request.securityGroupIdList;
}
if (!Util.isUnset(request.serviceRegionId)) {
query['ServiceRegionId'] = request.serviceRegionId;
}
if (!Util.isUnset(request.userName)) {
query['UserName'] = request.userName;
}
if (!Util.isUnset(request.vSwitchIdList)) {
query['VSwitchIdList'] = request.vSwitchIdList;
}
if (!Util.isUnset(request.vpcId)) {
query['VpcId'] = request.vpcId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifyDataLimit',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Modifies configuration items for a data asset that you authorize Data Security Center (DSC) to access.
*
* @param request ModifyDataLimitRequest
* @return ModifyDataLimitResponse
*/
async function modifyDataLimit(request: ModifyDataLimitRequest): ModifyDataLimitResponse {
var runtime = new Util.RuntimeOptions{};
return modifyDataLimitWithOptions(request, runtime);
}
model ModifyDefaultLevelRequest {
defaultId?: long(name='DefaultId', description='The default sensitivity level of data that Data Security Center (DSC) cannot classify as sensitive or insensitive. Valid values:
* **1**: N/A
* **2**: S1
* **3**: S2
* **4**: S3
* **5**: S4', example='4'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
sensitiveIds?: string(name='SensitiveIds', description='The sensitivity level ID of data that DSC classifies as sensitive. Separate multiple IDs with commas (,). Valid values:
* **1**: N/A
* **2**: S1
* **3**: S2
* **4**: S3
* **5**: S4', example='1,2,3,4'),
}
model ModifyDefaultLevelResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='208B016D-4CB9-4A85-96A5-0B8ED1EBF271'),
}
model ModifyDefaultLevelResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyDefaultLevelResponseBody(name='body'),
}
/**
* @summary Changes the sensitivity levels of sensitive data. You can change the default sensitivity levels of data that cannot be classified as sensitive or insensitive, and the sensitivity levels of data that can be classified as sensitive.
*
* @description You can call this operation to modify the sensitivity levels of data. This helps you manage the sensitivity levels.
* # Limits
* 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.
*
* @param request ModifyDefaultLevelRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyDefaultLevelResponse
*/
async function modifyDefaultLevelWithOptions(request: ModifyDefaultLevelRequest, runtime: Util.RuntimeOptions): ModifyDefaultLevelResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.defaultId)) {
query['DefaultId'] = request.defaultId;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.sensitiveIds)) {
query['SensitiveIds'] = request.sensitiveIds;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifyDefaultLevel',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Changes the sensitivity levels of sensitive data. You can change the default sensitivity levels of data that cannot be classified as sensitive or insensitive, and the sensitivity levels of data that can be classified as sensitive.
*
* @description You can call this operation to modify the sensitivity levels of data. This helps you manage the sensitivity levels.
* # Limits
* 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.
*
* @param request ModifyDefaultLevelRequest
* @return ModifyDefaultLevelResponse
*/
async function modifyDefaultLevel(request: ModifyDefaultLevelRequest): ModifyDefaultLevelResponse {
var runtime = new Util.RuntimeOptions{};
return modifyDefaultLevelWithOptions(request, runtime);
}
model ModifyEventStatusRequest {
backed?: boolean(name='Backed', description='Specifies whether to enhance the detection of anomalous events. If you enhance the detection of anomalous events, the detection accuracy and the rate of triggering alerts for anomalous events are improved. Valid values:
* **true**: yes
* **false**: no', example='true'),
dealReason?: string(name='DealReason', description='The reason why the anomalous event is handled.', example='Anomaly confirmed'),
id?: long(name='Id', description='The ID of the anomalous event.
> You can call the **DescribeEvents** operation to query the ID of the anomalous event.
This parameter is required.', example='12345'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Chinese
* **en_us**: English', example='zh_cn'),
status?: int32(name='Status', description='The method to handle the anomalous event. Valid values:
* **1**: marks the anomalous event as a false positive.
* **2**: confirms and handles the anomalous event.
This parameter is required.', example='1'),
}
model ModifyEventStatusResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='8491DBFD-48C0-4E11-B6FC-6F38921244A9'),
}
model ModifyEventStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyEventStatusResponseBody(name='body'),
}
/**
* @summary Handles an anomalous event.
*
* @description You can call this operation to handle anomalous events that involve data leaks. This helps protect your data assets at the earliest opportunity.
* # Limits
* 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.
*
* @param request ModifyEventStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyEventStatusResponse
*/
async function modifyEventStatusWithOptions(request: ModifyEventStatusRequest, runtime: Util.RuntimeOptions): ModifyEventStatusResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.backed)) {
query['Backed'] = request.backed;
}
if (!Util.isUnset(request.dealReason)) {
query['DealReason'] = request.dealReason;
}
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifyEventStatus',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Handles an anomalous event.
*
* @description You can call this operation to handle anomalous events that involve data leaks. This helps protect your data assets at the earliest opportunity.
* # Limits
* 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.
*
* @param request ModifyEventStatusRequest
* @return ModifyEventStatusResponse
*/
async function modifyEventStatus(request: ModifyEventStatusRequest): ModifyEventStatusResponse {
var runtime = new Util.RuntimeOptions{};
return modifyEventStatusWithOptions(request, runtime);
}
model ModifyEventTypeStatusRequest {
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values: **zh** and **en**. The value zh indicates Chinese, and the value en indicates English.', example='zh'),
subTypeIds?: string(name='SubTypeIds', description='The ID of the anomalous event subtype. Separate multiple IDs with commas (,).
> You can call the **DescribeEventTypes** operation to query the ID of anomalous event subtype.', example='020008'),
}
model ModifyEventTypeStatusResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='208B016D-4CB9-4A85-96A5-0B8ED1E*****'),
}
model ModifyEventTypeStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyEventTypeStatusResponseBody(name='body'),
}
/**
* @summary Enables the detection of anomalous events of subtypes.
*
* @param request ModifyEventTypeStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyEventTypeStatusResponse
*/
async function modifyEventTypeStatusWithOptions(request: ModifyEventTypeStatusRequest, runtime: Util.RuntimeOptions): ModifyEventTypeStatusResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.subTypeIds)) {
query['SubTypeIds'] = request.subTypeIds;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifyEventTypeStatus',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Enables the detection of anomalous events of subtypes.
*
* @param request ModifyEventTypeStatusRequest
* @return ModifyEventTypeStatusResponse
*/
async function modifyEventTypeStatus(request: ModifyEventTypeStatusRequest): ModifyEventTypeStatusResponse {
var runtime = new Util.RuntimeOptions{};
return modifyEventTypeStatusWithOptions(request, runtime);
}
model ModifyReportTaskStatusRequest {
featureType?: int32(name='FeatureType', description='This parameter is deprecated.', example='1'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Simplified Chinese
* **en_us**: English', example='zh_cn'),
reportTaskStatus?: int32(name='ReportTaskStatus', description='Specifies the status of the report task. Valid values:
* **0**: disabled
* **1**: enabled
> This parameter is required.', example='0'),
}
model ModifyReportTaskStatusResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request, which is used to locate and troubleshoot issues.', example='208B016D-4CB9-4A85-96A5-0B8ED1EBF271'),
}
model ModifyReportTaskStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyReportTaskStatusResponseBody(name='body'),
}
/**
* @summary Enables or disables the report task.
*
* @description You can call this operation to enable or disable the report task. After you activate Data Security Center (DSC), the report task is enabled by default. After you disable the report task, you cannot view statistics that are newly generated in the Report Center module, on the Overview page of the Cloud Native Data Audit module, and in the Data security lab module. Existing statistics are not affected.
* # Limits
* 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.
*
* @param request ModifyReportTaskStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyReportTaskStatusResponse
*/
async function modifyReportTaskStatusWithOptions(request: ModifyReportTaskStatusRequest, runtime: Util.RuntimeOptions): ModifyReportTaskStatusResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.featureType)) {
query['FeatureType'] = request.featureType;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.reportTaskStatus)) {
query['ReportTaskStatus'] = request.reportTaskStatus;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifyReportTaskStatus',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Enables or disables the report task.
*
* @description You can call this operation to enable or disable the report task. After you activate Data Security Center (DSC), the report task is enabled by default. After you disable the report task, you cannot view statistics that are newly generated in the Report Center module, on the Overview page of the Cloud Native Data Audit module, and in the Data security lab module. Existing statistics are not affected.
* # Limits
* 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.
*
* @param request ModifyReportTaskStatusRequest
* @return ModifyReportTaskStatusResponse
*/
async function modifyReportTaskStatus(request: ModifyReportTaskStatusRequest): ModifyReportTaskStatusResponse {
var runtime = new Util.RuntimeOptions{};
return modifyReportTaskStatusWithOptions(request, runtime);
}
model ModifyRuleRequest {
category?: int32(name='Category', description='The content type of the sensitive data detection rule. Valid values:
* **2**: regular expression
* **3**: algorithm
* **5**: keyword', example='2'),
content?: string(name='Content', description='The content of the sensitive data detection rule. You can specify a regular expression, an algorithm, or keywords that are used to match sensitive fields or text.
This parameter is required.', example='(?:\\\\\\\\D|^)((?:(?:25[0-4]|2[0-4]\\\\\\\\d|1\\\\\\\\d{2}|[1-9]\\\\\\\\d{1})\\\\\\\\.)(?:(?:25[0-5]|2[0-4]\\\\\\\\d|[01]?\\\\\\\\d?\\\\\\\\d)\\\\\\\\.){2}(?:25[0-5]|2[0-4]\\\\\\\\d|1[0-9]\\\\\\\\d|[1-9]\\\\\\\\d|[1-9]))(?:\\\\\\\\D|$)'),
id?: long(name='Id', description='The ID of the sensitive data detection rule.
You can call the [DescribeRules](~~DescribeRules~~) operation to obtain the rule ID.
This parameter is required.', example='1****'),
lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh_cn**. Valid values:
* **zh_cn**: Simplified Chinese
* **en_us**: English', example='zh_cn'),
matchType?: int32(name='MatchType', description='The match type. Valid values:
* **1**: rule-based match
* **2**: dictionary-based match', example='1'),
modelRuleIds?: string(name='ModelRuleIds', description='The IDs of the models for sensitive data audit.', example='1452'),
name?: string(name='Name', description='The name of the sensitive data detection rule.
You can call the [DescribeRules](~~DescribeRules~~) operation to obtain the rule name.
This parameter is required.', example='esw'),
productCode?: string(name='ProductCode', description='The service to which the sensitive data detection rule is applied. Valid values include **MaxCompute, OSS, ADS, OTS, and RDS**.', example='RDS'),
productId?: long(name='ProductId', description='The ID of the service to which the sensitive data detection rule is applied. Valid values include **1**, **2**, **3**, **4**, and **5**. The value 1 indicates MaxCompute. The value 2 indicates Object Storage Service (OSS). The value 3 indicates AnalyticDB for MySQL. The value 4 indicates Tablestore. The value 5 indicates ApsaraDB RDS.', example='5'),
riskLevelId?: long(name='RiskLevelId', description='The sensitivity level of the sensitive data that hits the sensitive data detection rule. Valid values:
* **1**: N/A, which indicates that no sensitive data is detected.
* **2**: S1, which indicates the low sensitivity level.
* **3**: S2, which indicates the medium sensitivity level.
* **4**: S3, which indicates the high sensitivity level.
* **5**: S4, which indicates the highest sensitivity level.', example='2'),
ruleType?: int32(name='RuleType', description='The type of the sensitive data detection rule. Valid values:
* **1**: data detection rule
* **2**: audit rule
* **3**: anomalous event detection rule', example='1'),
supportForm?: int32(name='SupportForm', description='The data assets supported by the sensitive data detection rule. Valid values:
* **0**: all data assets
* **1**: structured data assets
* **2**: unstructured data assets', example='1'),
templateRuleIds?: string(name='TemplateRuleIds', description='The IDs of the templates that are used to audit sensitive data.', example='1'),
warnLevel?: int32(name='WarnLevel', description='The risk level of the alert that is triggered by the sensitive data detection rule. Valid values:
* **1**: low level
* **2**: medium level
* **3**: high level', example='1'),
}
model ModifyRuleResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='7C3AC882-E5A8-4855-BE77-B6837B695EF1'),
}
model ModifyRuleResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyRuleResponseBody(name='body'),
}
/**
* @summary Modifies a custom sensitive data detection rule in Data Security Center (DSC).
*
* @description When you call this operation, you must configure request parameters to specify the rule name, rule ID, and rule content.
* # Limits
* 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.
*
* @param request ModifyRuleRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyRuleResponse
*/
async function modifyRuleWithOptions(request: ModifyRuleRequest, runtime: Util.RuntimeOptions): ModifyRuleResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.category)) {
query['Category'] = request.category;
}
if (!Util.isUnset(request.content)) {
query['Content'] = request.content;
}
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.matchType)) {
query['MatchType'] = request.matchType;
}
if (!Util.isUnset(request.modelRuleIds)) {
query['ModelRuleIds'] = request.modelRuleIds;
}
if (!Util.isUnset(request.name)) {
query['Name'] = request.name;
}
if (!Util.isUnset(request.productCode)) {
query['ProductCode'] = request.productCode;
}
if (!Util.isUnset(request.productId)) {
query['ProductId'] = request.productId;
}
if (!Util.isUnset(request.riskLevelId)) {
query['RiskLevelId'] = request.riskLevelId;
}
if (!Util.isUnset(request.ruleType)) {
query['RuleType'] = request.ruleType;
}
if (!Util.isUnset(request.supportForm)) {
query['SupportForm'] = request.supportForm;
}
if (!Util.isUnset(request.templateRuleIds)) {
query['TemplateRuleIds'] = request.templateRuleIds;
}
if (!Util.isUnset(request.warnLevel)) {
query['WarnLevel'] = request.warnLevel;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifyRule',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Modifies a custom sensitive data detection rule in Data Security Center (DSC).
*
* @description When you call this operation, you must configure request parameters to specify the rule name, rule ID, and rule content.
* # Limits
* 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.
*
* @param request ModifyRuleRequest
* @return ModifyRuleResponse
*/
async function modifyRule(request: ModifyRuleRequest): ModifyRuleResponse {
var runtime = new Util.RuntimeOptions{};
return modifyRuleWithOptions(request, runtime);
}
model ModifyRuleStatusRequest {
id?: long(name='Id', description='The ID of the sensitive data detection rule.
> You can query the ID of the sensitive data detection rule by calling the **DescribeRules** operation.', example='12341'),
ids?: string(name='Ids', description='The ID of the sensitive data detection rule. Separate multiple IDs with commas (,).
> You can query the ID of the sensitive data detection rule by calling the **DescribeRules** operation.', example='1,2,3,4'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh**: Chinese
* **en**: English', example='zh'),
status?: int32(name='Status', description='Specifies whether to enable or disable the sensitive data detection rule. Valid values:
* **0**: disables the sensitive data detection rule.
* **1**: enables the sensitive data detection rule.
This parameter is required.', example='1'),
}
model ModifyRuleStatusResponseBody = {
failedIds?: string(name='FailedIds', description='The IDs of sensitive data detection rules whose status failed to be changed. Multiple IDs are separated with commas (,).', example='1,2,3,4'),
requestId?: string(name='RequestId', description='The ID of the request.', example='7C3AC882-E5A8-4855-BE77-B6837B695EF1'),
}
model ModifyRuleStatusResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ModifyRuleStatusResponseBody(name='body'),
}
/**
* @summary Enables or disables a sensitive data detection rule.
*
* @param request ModifyRuleStatusRequest
* @param runtime runtime options for this request RuntimeOptions
* @return ModifyRuleStatusResponse
*/
async function modifyRuleStatusWithOptions(request: ModifyRuleStatusRequest, runtime: Util.RuntimeOptions): ModifyRuleStatusResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.ids)) {
query['Ids'] = request.ids;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.status)) {
query['Status'] = request.status;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ModifyRuleStatus',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Enables or disables a sensitive data detection rule.
*
* @param request ModifyRuleStatusRequest
* @return ModifyRuleStatusResponse
*/
async function modifyRuleStatus(request: ModifyRuleStatusRequest): ModifyRuleStatusResponse {
var runtime = new Util.RuntimeOptions{};
return modifyRuleStatusWithOptions(request, runtime);
}
model ScanOssObjectV1Request {
bucketName?: string(name='BucketName', description='This parameter is required.', example='sddp-api-demo-bucket'),
lang?: string(name='Lang', example='zh'),
objectKeyList?: [ string ](name='ObjectKeyList', description='This parameter is required.'),
serviceRegionId?: string(name='ServiceRegionId', description='This parameter is required.', example='cn-hangzhou'),
templateId?: long(name='TemplateId', example='1'),
}
model ScanOssObjectV1ShrinkRequest {
bucketName?: string(name='BucketName', description='This parameter is required.', example='sddp-api-demo-bucket'),
lang?: string(name='Lang', example='zh'),
objectKeyListShrink?: string(name='ObjectKeyList', description='This parameter is required.'),
serviceRegionId?: string(name='ServiceRegionId', description='This parameter is required.', example='cn-hangzhou'),
templateId?: long(name='TemplateId', example='1'),
}
model ScanOssObjectV1ResponseBody = {
id?: long(name='Id', example='268'),
requestId?: string(name='RequestId', example='7C3AC882-E5A8-4855-BE77-B6837B695EF1'),
}
model ScanOssObjectV1Response = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ScanOssObjectV1ResponseBody(name='body'),
}
/**
* @summary 创建文件扫描任务
*
* @param tmpReq ScanOssObjectV1Request
* @param runtime runtime options for this request RuntimeOptions
* @return ScanOssObjectV1Response
*/
async function scanOssObjectV1WithOptions(tmpReq: ScanOssObjectV1Request, runtime: Util.RuntimeOptions): ScanOssObjectV1Response {
Util.validateModel(tmpReq);
var request = new ScanOssObjectV1ShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.objectKeyList)) {
request.objectKeyListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.objectKeyList, 'ObjectKeyList', 'json');
}
var query = {};
if (!Util.isUnset(request.bucketName)) {
query['BucketName'] = request.bucketName;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
if (!Util.isUnset(request.objectKeyListShrink)) {
query['ObjectKeyList'] = request.objectKeyListShrink;
}
if (!Util.isUnset(request.serviceRegionId)) {
query['ServiceRegionId'] = request.serviceRegionId;
}
if (!Util.isUnset(request.templateId)) {
query['TemplateId'] = request.templateId;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ScanOssObjectV1',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary 创建文件扫描任务
*
* @param request ScanOssObjectV1Request
* @return ScanOssObjectV1Response
*/
async function scanOssObjectV1(request: ScanOssObjectV1Request): ScanOssObjectV1Response {
var runtime = new Util.RuntimeOptions{};
return scanOssObjectV1WithOptions(request, runtime);
}
model StopMaskingProcessRequest {
id?: long(name='Id', description='The unique ID of the de-identification task. You can query the task ID by calling the [DescribeDataMaskingTasks](~~DescribeDataMaskingTasks~~) operation.
This parameter is required.', example='3'),
lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:
* **zh_cn**: Simplified Chinese (default)
* **en_us**: English', example='zh_cn'),
}
model StopMaskingProcessResponseBody = {
requestId?: string(name='RequestId', description='The ID of the request.', example='769FB3C1-F4C9-42DF-9B72-7077A8989C13'),
}
model StopMaskingProcessResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: StopMaskingProcessResponseBody(name='body'),
}
/**
* @summary Stops a de-identification task. After you stop a de-identification task, you can resume the task by calling the ManualTriggerMaskingProcess operation.
*
* @description You can call this operation to stop a de-identification task that is running. For example, you can stop a de-identification task that is used to de-identify specific data.
* # Limits
* 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.
*
* @param request StopMaskingProcessRequest
* @param runtime runtime options for this request RuntimeOptions
* @return StopMaskingProcessResponse
*/
async function stopMaskingProcessWithOptions(request: StopMaskingProcessRequest, runtime: Util.RuntimeOptions): StopMaskingProcessResponse {
Util.validateModel(request);
var query = {};
if (!Util.isUnset(request.id)) {
query['Id'] = request.id;
}
if (!Util.isUnset(request.lang)) {
query['Lang'] = request.lang;
}
var req = new OpenApi.OpenApiRequest{
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'StopMaskingProcess',
version = '2019-01-03',
protocol = 'HTTPS',
pathname = '/',
method = 'POST',
authType = 'AK',
style = 'RPC',
reqBodyType = 'formData',
bodyType = 'json',
};
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
return callApi(params, req, runtime);
} else {
return execute(params, req, runtime);
}
}
/**
* @summary Stops a de-identification task. After you stop a de-identification task, you can resume the task by calling the ManualTriggerMaskingProcess operation.
*
* @description You can call this operation to stop a de-identification task that is running. For example, you can stop a de-identification task that is used to de-identify specific data.
* # Limits
* 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.
*
* @param request StopMaskingProcessRequest
* @return StopMaskingProcessResponse
*/
async function stopMaskingProcess(request: StopMaskingProcessRequest): StopMaskingProcessResponse {
var runtime = new Util.RuntimeOptions{};
return stopMaskingProcessWithOptions(request, runtime);
}