Finds the best matching security policy based on the specified conditions.
Operation description
Description
This API finds the best matching security policy based on a specified control module, submodule, and workspace ID. If a workspace ID is provided, the system prioritizes matching a workspace-level policy. Otherwise, the system returns a tenant-level policy. System policies cannot be deleted or modified.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ControlModule |
string |
No |
The control module, used to match the security policy type. Valid values:
|
DataQuery |
| ControlSubModule |
string |
No |
The control submodule, used to match the security policy type. Valid values:
|
MyCatalog |
| WorkspaceId |
integer |
No |
The workspace ID, used for an exact match of a workspace-level policy. |
12345 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the API request. |
0bc5df3a17***903790e8e8a |
| Data |
object |
The data object. |
|
| SecurityStrategy |
object |
The security policy. |
|
| Id |
integer |
The policy ID. |
16 |
| Name |
string |
The policy name. |
默认数据分析策略 |
| Description |
string |
The policy description. |
控制数据分析模块的查询结果安全行为 |
| SchemaName |
string |
The name of the schema template. |
DataQuerySecurityStrategySchema |
| ControlModule |
string |
The control module. |
DataQuery |
| ControlSubModule |
string |
The control submodule. |
MyCatalog |
| ControlDwScope |
string |
The control scope (Workspace/Tenant). |
Tenant |
| Workspaces |
array |
A list of associated workspace IDs. |
|
|
integer |
The workspace ID. |
12345 |
|
| Enabled |
boolean |
Indicates whether the policy is enabled. |
true |
| Content |
object |
The policy content. For more information, see the definition of StrategyContent. |
|
| Name |
string |
The schema name. |
DataQuerySecurityStrategySchema |
| DisplayName |
string |
The display name. |
数据分析 |
| DisplayNameEn |
string |
The display name in English. |
Data Query |
| ControlModule |
string |
The control module. |
DataQuery |
| ControlSubModule |
string |
The control submodule. |
MyCatalog |
| ControlDwScope |
string |
The control scope. |
Tenant |
| SystemPolicyName |
string |
The name of the system policy. If this parameter is not empty, the system automatically creates a default policy. |
SYSTEM_GENERATE_DEFAULT_DATA_QUERY |
| SystemPolicyDisplayName |
string |
The display name of the system policy. |
Default system generate data query policy |
| Controllers |
array<object> |
A list of control items. Note: Valid control items depend on the selected schema. For more information, see the Controller definition and the list of control items for each schema. |
|
|
object |
A control item. |
||
| Controller |
string |
The identifier of the control item. For valid values, see the list of control items for each schema. |
viewCount |
| DisplayName |
string |
The display name. |
查询结果-单次展示记录值上限 |
| DisplayNameEn |
string |
The display name in English. |
Query Results - Single Display Record Limit |
| Enable |
boolean |
Indicates whether the control item is enabled. |
true |
| ControllerValueType |
string |
The value type (Boolean/Integer/Long/String). |
Integer |
| UserConfigValue |
any |
The user-configured value. The type depends on ControllerValueType. |
20 |
| BasicEditionDefaultValue |
any |
The default value for the Basic Edition. |
0 |
| StandardEditionDefaultValue |
any |
The default value for the Standard Edition. |
10000 |
| ProfessionalEditionDefaultValue |
any |
The default value for the Professional Edition. |
200000 |
| EnterpriseEditionDefaultValue |
any |
The default value for the Enterprise Edition. |
500000 |
| BasicEditionIntervalValue |
array |
The valid value range for the Basic Edition [min, max]. |
|
|
integer |
The start or end value of the range. |
0 |
|
| StandardEditionIntervalValue |
array |
The valid value range for the Standard Edition [min, max]. |
|
|
integer |
The start or end value of the range. |
0 |
|
| ProfessionalEditionIntervalValue |
array |
The valid value range for the Professional Edition [min, max]. |
|
|
integer |
The start or end value of the range. |
0 |
|
| EnterpriseEditionIntervalValue |
array |
The valid value range for the Enterprise Edition [min, max]. |
|
|
integer |
The start or end value of the range. |
0 |
|
| OriginPolicyId |
integer |
The source ID of the default system policy. |
12 |
| Creator |
string |
The ID of the user who created the policy. |
203322746501002787 |
| Updater |
string |
The ID of the user who last updated the policy. |
207947397706614297 |
| CreateTime |
string |
The time when the policy was created. |
2026-05-25T20:46:19 |
| UpdateTime |
string |
The time when the policy was last updated. |
2026-05-25T20:46:19 |
| Edition |
string |
The purchased DataWorks edition. |
STANDARD |
| EditionDisplayName |
string |
The name of the purchased DataWorks edition. |
标准版 |
Examples
Success response
JSON format
{
"RequestId": "0bc5df3a17***903790e8e8a",
"Data": {
"SecurityStrategy": {
"Id": 16,
"Name": "默认数据分析策略",
"Description": "控制数据分析模块的查询结果安全行为",
"SchemaName": "DataQuerySecurityStrategySchema",
"ControlModule": "DataQuery",
"ControlSubModule": "MyCatalog",
"ControlDwScope": "Tenant",
"Workspaces": [
12345
],
"Enabled": true,
"Content": {
"Name": "DataQuerySecurityStrategySchema",
"DisplayName": "数据分析",
"DisplayNameEn": "Data Query",
"ControlModule": "DataQuery",
"ControlSubModule": "MyCatalog",
"ControlDwScope": "Tenant",
"SystemPolicyName": "SYSTEM_GENERATE_DEFAULT_DATA_QUERY",
"SystemPolicyDisplayName": "Default system generate data query policy",
"Controllers": [
{
"Controller": "viewCount",
"DisplayName": "查询结果-单次展示记录值上限",
"DisplayNameEn": "Query Results - Single Display Record Limit",
"Enable": true,
"ControllerValueType": "Integer",
"UserConfigValue": "20",
"BasicEditionDefaultValue": "0",
"StandardEditionDefaultValue": "10000",
"ProfessionalEditionDefaultValue": "200000",
"EnterpriseEditionDefaultValue": "500000",
"BasicEditionIntervalValue": [
0
],
"StandardEditionIntervalValue": [
0
],
"ProfessionalEditionIntervalValue": [
0
],
"EnterpriseEditionIntervalValue": [
0
]
}
]
},
"OriginPolicyId": 12,
"Creator": "203322746501002787",
"Updater": "207947397706614297",
"CreateTime": "2026-05-25T20:46:19",
"UpdateTime": "2026-05-25T20:46:19"
},
"Edition": "STANDARD",
"EditionDisplayName": "标准版"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.