根据给定条件查找最匹配的安全策略。
接口说明
请求说明
该 API 用于根据提供的管控模块、子模块及工作空间 ID 来查找最适合的安全策略。如果提供了工作空间 ID,则会优先匹配指定工作空间级别的策略;否则,将返回租户级别的策略。请注意,系统策略不能被删除或修改。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ControlModule |
string |
否 |
管控模块,用于匹配安全策略类型 枚举值:
|
DataQuery |
| ControlSubModule |
string |
否 |
管控子模块,用于匹配安全策略类型 枚举值:
|
MyCatalog |
| WorkspaceId |
integer |
否 |
工作空间 ID,用于精确匹配工作空间级别策略 |
12345 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
API 请求 ID |
0bc5df3a17***903790e8e8a |
| Data |
object |
数据对象 |
|
| SecurityStrategy |
object |
安全策略 |
|
| Id |
integer |
策略 ID |
16 |
| Name |
string |
策略名称 |
默认数据分析策略 |
| Description |
string |
策略描述 |
控制数据分析模块的查询结果安全行为 |
| SchemaName |
string |
Schema 模板名称 |
DataQuerySecurityStrategySchema |
| ControlModule |
string |
管控模块 |
DataQuery |
| ControlSubModule |
string |
管控子模块 |
MyCatalog |
| ControlDwScope |
string |
管控范围(Workspace/Tenant) |
Tenant |
| Workspaces |
array |
关联工作空间 ID 列表 |
|
|
integer |
工作空间 ID。 |
12345 |
|
| Enabled |
boolean |
是否启用 |
true |
| Content |
object |
策略内容,参考 StrategyContent 定义 |
|
| Name |
string |
Schema 名称 |
DataQuerySecurityStrategySchema |
| DisplayName |
string |
显示名称 |
数据分析 |
| DisplayNameEn |
string |
英文显示名称 |
Data Query |
| ControlModule |
string |
管控模块 |
DataQuery |
| ControlSubModule |
string |
管控子模块 |
MyCatalog |
| ControlDwScope |
string |
管控范围 |
Tenant |
| SystemPolicyName |
string |
系统策略名称(非空时系统自动创建默认策略) |
SYSTEM_GENERATE_DEFAULT_DATA_QUERY |
| SystemPolicyDisplayName |
string |
系统策略显示名称 |
Default system generate data query policy |
| Controllers |
array<object> |
管控项列表, 注意:合法管控项取决于所选 Schema,参考 Controller 定义 及 各 Schema 管控项列表 |
|
|
object |
管控项 |
||
| Controller |
string |
管控项标识符,取值见 各 Schema 管控项列表 |
viewCount |
| DisplayName |
string |
显示名称 |
查询结果-单次展示记录值上限 |
| DisplayNameEn |
string |
英文显示名称 |
Query Results - Single Display Record Limit |
| Enable |
boolean |
是否启用该管控项 |
true |
| ControllerValueType |
string |
值类型(Boolean/Integer/Long/String) |
Integer |
| UserConfigValue |
any |
用户配置值,类型取决于 ControllerValueType |
20 |
| BasicEditionDefaultValue |
any |
基础版默认值 |
0 |
| StandardEditionDefaultValue |
any |
标准版默认值 |
10000 |
| ProfessionalEditionDefaultValue |
any |
专业版默认值 |
200000 |
| EnterpriseEditionDefaultValue |
any |
企业版默认值 |
500000 |
| BasicEditionIntervalValue |
array |
基础版有效值区间[min, max] |
|
|
integer |
区间起止值 |
0 |
|
| StandardEditionIntervalValue |
array |
标准版有效值区间[min, max] |
|
|
integer |
区间起止值 |
0 |
|
| ProfessionalEditionIntervalValue |
array |
专业版有效值区间[min, max] |
|
|
integer |
区间起止值 |
0 |
|
| EnterpriseEditionIntervalValue |
array |
企业版有效值区间[min, max] |
|
|
integer |
区间起止值 |
0 |
|
| OriginPolicyId |
integer |
系统默认策略来源 ID |
12 |
| Creator |
string |
创建者用户 ID |
203322746501002787 |
| Updater |
string |
最后更新者用户 ID |
207947397706614297 |
| CreateTime |
string |
创建时间。 |
2026-05-25T20:46:19 |
| UpdateTime |
string |
更新时间。 |
2026-05-25T20:46:19 |
| Edition |
string |
购买的 Datawork 版本 |
STANDARD |
| EditionDisplayName |
string |
购买的 Datawork 版本名称 |
标准版 |
示例
正常返回示例
JSON格式
{
"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": "标准版"
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。