FindBestMatchSecurityStrategy
Retrieves the best-matching security policy based on the specified conditions.
Operation description
Before you begin
Activate DataWorks in the target region. To query the effective policy for a workspace, obtain the workspace ID from PagingInfo.Projects[].Id in the ListProjects API and specify it in WorkspaceId.
Matching rules
If WorkspaceId is specified, the system preferentially matches custom policies applicable to the workspace, and then matches tenant-level global policies. If no custom policy is matched, the system default policy is used. If WorkspaceId is omitted, the service matches policies by module and submodule under the current tenant without filtering by workspace. If ControlSubModule is specified, an exact match is required. If it is omitted, only policies without a specified submodule are matched.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:FindBestMatchSecurityStrategy |
get |
*All Resource
|
None | None |
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 exact match of the workspace-level policy. |
12345 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The API request ID. |
0bc5df3a17***903790e8e8a |
| Data |
object |
The data object. |
|
| SecurityStrategy |
object |
The security policy. |
|
| Id |
integer |
The policy ID. |
16 |
| Name |
string |
The policy name. |
Default DataAnalysis policy |
| Description |
string |
The policy description. |
Controls the security behavior of query results in the DataAnalysis module |
| SchemaName |
string |
The schema template name. Valid values:
|
DataQuerySecurityStrategySchema |
| ControlModule |
string |
The control module. Valid values:
|
DataQuery |
| ControlSubModule |
string |
The control submodule. Valid values:
|
MyCatalog |
| ControlDwScope |
string |
The control scope (Workspace/Tenant). Valid values:
|
Tenant |
| Workspaces |
array |
The 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 StrategyContent definition. |
|
| Name |
string |
The schema name. Valid values:
|
DataQuerySecurityStrategySchema |
| DisplayName |
string |
The display name. |
DataAnalysis |
| DisplayNameEn |
string |
The English display name. |
Data Query |
| ControlModule |
string |
The control module. Valid values:
|
DataQuery |
| ControlSubModule |
string |
The control submodule. Valid values:
|
MyCatalog |
| ControlDwScope |
string |
The control scope. Valid values:
|
Tenant |
| SystemPolicyName |
string |
The system policy name. If this parameter is not empty, automatic creation of a default policy is performed. |
SYSTEM_GENERATE_DEFAULT_DATA_QUERY |
| SystemPolicyDisplayName |
string |
The display name of the system policy. |
Default system generate data query policy |
| Controllers |
array<object> |
The list of control items. Note: Valid control items depend on the selected schema. For more information, see the Controller definition and the control item list for each schema. |
|
|
object |
The control item. |
||
| Controller |
string |
The identifier of the control item. For valid values, see the control item list for each schema. |
viewCount |
| DisplayName |
string |
The display name. |
Query results - Maximum number of records displayed at a time |
| DisplayNameEn |
string |
The English display name. |
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 data type depends on ControllerValueType. |
20 |
| BasicEditionDefaultValue |
any |
The default value for Basic Edition. |
0 |
| StandardEditionDefaultValue |
any |
The default value for Standard Edition. |
10000 |
| ProfessionalEditionDefaultValue |
any |
The default value for Professional Edition. |
200000 |
| EnterpriseEditionDefaultValue |
any |
The default value for Enterprise Edition. |
500000 |
| BasicEditionIntervalValue |
array |
The valid value range [min, max] for Basic Edition. |
|
|
integer |
The start and end values of the range. |
0 |
|
| StandardEditionIntervalValue |
array |
The valid value range [min, max] for Standard Edition. |
|
|
integer |
The start and end values of the range. |
0 |
|
| ProfessionalEditionIntervalValue |
array |
The valid value range [min, max] for Professional Edition. |
|
|
integer |
The start and end values of the range. |
0 |
|
| EnterpriseEditionIntervalValue |
array |
The valid value range [min, max] for Enterprise Edition. |
|
|
integer |
The start and end values of the range. |
0 |
|
| OriginPolicyId |
integer |
The source ID of the system default policy. |
12 |
| Creator |
string |
The user ID of the creator. |
203322746501002787 |
| Updater |
string |
The user ID of the last updater. |
207947397706614297 |
| CreateTime |
string |
The creation time in the YYYY-MM-DDTHH:mm:ss format. The time zone is not specified in the current document. |
2026-05-25T20:46:19 |
| UpdateTime |
string |
The update time in the YYYY-MM-DDTHH:mm:ss format. The time zone is not specified in the current document. |
2026-05-25T20:46:19 |
| Edition |
string |
The purchased DataWorks edition. |
STANDARD |
| EditionDisplayName |
string |
The name of the purchased DataWorks edition. |
Standard Edition |
Examples
Success response
JSON format
{
"RequestId": "0bc5df3a17***903790e8e8a",
"Data": {
"SecurityStrategy": {
"Id": 16,
"Name": "Default data analytics policy",
"Description": "Controls the security behavior of query results in the data analytics module",
"SchemaName": "DataQuerySecurityStrategySchema",
"ControlModule": "DataQuery",
"ControlSubModule": "MyCatalog",
"ControlDwScope": "Tenant",
"Workspaces": [
12345
],
"Enabled": true,
"Content": {
"Name": "DataQuerySecurityStrategySchema",
"DisplayName": "Data analytics",
"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": "Query results - Maximum number of records displayed at a time",
"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": "Standard Edition"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.