FindBestMatchSecurityStrategy - FindBestMatchSecurityStrategy

Updated at:

Finds the best-matching security policy based on the specified conditions.

Operation description

Request description

Finds the most suitable security policy based on the specified control module, sub-module, and workspace ID. If a workspace ID is provided, the workspace-level policy is matched first; otherwise, the tenant-level policy is returned. System policies cannot be deleted or modified.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ControlModule

string

No

The control module used to match the security policy type.

Valid values:

  • DataStudio :

    DataStudio

  • DataQuery :

    DataQuery

DataQuery

ControlSubModule

string

No

The control sub-module used to match the security policy type.

Valid values:

  • MyCatalog :

    MyCatalog

MyCatalog

WorkspaceId

integer

No

The workspace ID, used to precisely match a workspace-level policy.

12345

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The 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 Data Analysis Policy

Description

string

The policy description.

Controls the security behavior of query results in the Data Analysis module.

SchemaName

string

The schema template name.

DataQuerySecurityStrategySchema

ControlModule

string

The control module.

DataQuery

ControlSubModule

string

The control sub-module.

MyCatalog

ControlDwScope

string

The control scope (Workspace/Tenant).

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.

DataQuerySecurityStrategySchema

DisplayName

string

The display name.

Data Analysis

DisplayNameEn

string

The English display name.

Data Query

ControlModule

string

The control module.

DataQuery

ControlSubModule

string

The control sub-module.

MyCatalog

ControlDwScope

string

The control scope.

Tenant

SystemPolicyName

string

The system policy name. 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

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 control item identifier. For valid values, see the control item list for each schema.

viewCount

DisplayName

string

The display name.

Query Results - Single Display Record Limit

DisplayNameEn

string

The English display name.

Query Results - Single Display Record Limit

Enable

boolean

Indicates whether this 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 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 boundary value of the range.

0

StandardEditionIntervalValue

array

The valid value range [min, max] for Standard Edition.

integer

The boundary value of the range.

0

ProfessionalEditionIntervalValue

array

The valid value range [min, max] for Professional Edition.

integer

The boundary value of the range.

0

EnterpriseEditionIntervalValue

array

The valid value range [min, max] for Enterprise Edition.

integer

The boundary value of the range.

0

OriginPolicyId

integer

The ID of the source 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.

2026-05-25T20:46:19

UpdateTime

string

The update time.

2026-05-25T20:46:19

Edition

string

The purchased DataWorks edition.

STANDARD

EditionDisplayName

string

The display name of the purchased DataWorks edition.

Standard Edition

Examples

Success response

JSON format

{
  "RequestId": "0bc5df3a17***903790e8e8a",
  "Data": {
    "SecurityStrategy": {
      "Id": 16,
      "Name": "Default Data Analysis Policy",
      "Description": "Controls the security behavior of query results in the Data Analysis module",
      "SchemaName": "DataQuerySecurityStrategySchema",
      "ControlModule": "DataQuery",
      "ControlSubModule": "MyCatalog",
      "ControlDwScope": "Tenant",
      "Workspaces": [
        12345
      ],
      "Enabled": true,
      "Content": {
        "Name": "DataQuerySecurityStrategySchema",
        "DisplayName": "Data Analysis",
        "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 - Single Display Record Limit",
            "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.