CreateSecurityStrategy

Updated at:

Creates a new security control policy and supports the configuration of multiple modules and submodules. Requires the permissions of a DataWorks tenant administrator and a security administrator.

Operation description

Request description

  • SchemaName: Select an appropriate schema name based on your business requirements.

  • ControlModule and ControlSubModule: Specify the module and submodule to which the policy applies. Make sure that they match the selected schema.

  • ControlDwScope: Define the application scope of the policy, which can be the tenant level or the workspace level.

  • Workspaces: If ControlDwScope is set to Workspace, you must provide a list of associated workspace IDs.

  • Content.Controllers: The list of control items in the policy content must comply with the valid control item definitions of the selected schema.

  • System default policies cannot be created by calling this operation.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:CreateSecurityStrategy

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Name

string

Yes

The policy name.

Default data analysis policy

Description

string

No

The description of the policy.

Controls the security behavior of query results in the data analysis module

SchemaName

string

Yes

The name of the schema template.

Valid values:

  • DataStudioMyCatalogSecurityStrategySchema :

    Data Studio personal data catalog security policy schema.

  • DataQuerySecurityStrategySchema :

    Data query security policy schema.

  • DataStudioSecurityStrategySchema :

    Data Studio security policy schema.

DataQuerySecurityStrategySchema

ControlModule

string

Yes

The control module.

Valid values:

  • DataStudio :

    Data Studio.

  • DataQuery :

    Data query.

DataQuery

ControlSubModule

string

No

The control submodule.

Valid values:

  • MyCatalog :

    Personal data catalog.

MyCatalog

ControlDwScope

string

Yes

The control scope.

Valid values:

  • Tenant :

    Tenant.

  • Workspace :

    Workspace.

Tenant

Workspaces

array

No

The list of associated workspace IDs.

integer

No

The workspace ID.

1853943

Content

object

Yes

The policy content. The content is constrained by SecurityStrategySchema.

Name

string

Yes

The name of the SecurityStrategySchema associated with the current policy.

Valid values:

  • DataStudioMyCatalogSecurityStrategySchema :

    Data Studio personal data catalog security policy schema.

  • DataQuerySecurityStrategySchema :

    Data query security policy schema.

  • DataStudioSecurityStrategySchema :

    Data Studio security policy schema.

DataQuerySecurityStrategySchema

DisplayName

string

No

The display name of the SecurityStrategySchema associated with the current policy.

Data analysis

DisplayNameEn

string

No

The English display name of the SecurityStrategySchema associated with the current policy.

Data Analysis

ControlModule

string

Yes

The control module. This is the controlModule of the SecurityStrategySchema associated with the current policy.

Valid values:

  • DataStudio :

    Data Studio.

  • DataQuery :

    Data query.

DataStudio

ControlSubModule

string

No

The control submodule. This is the controlSubModule of the SecurityStrategySchema associated with the current policy.

Valid values:

  • MyCatalog :

    Personal data catalog.

MyCatalog

ControlDwScope

string

No

The control scope. This is the name of the SecurityStrategySchema associated with the current policy.

Valid values:

  • Tenant :

    Tenant.

  • Workspace :

    Workspace.

Tenant

SystemPolicyName

string

No

The name of the SecurityStrategySchema associated with the current policy.

SYSTEM_GENERATE_DEFAULT_DATA_QUERY

SystemPolicyDisplayName

string

No

The name of the SecurityStrategySchema associated with the current policy.

Default system generate data query policy

Controllers

array<object>

No

The list of control items.

Note: Valid control items depend on the selected schema. Refer to the controller definitions and the control item list for each schema.

object

No

The control item.

Controller

string

No

The identifier of the control item. For valid values, refer to the control item list for each schema.

viewCount

DisplayName

string

No

The display name.

Query results - Maximum number of records displayed per query

DisplayNameEn

string

No

The English display name.

Query Results - Single Display Record Limit

Enable

boolean

No

Specifies whether to enable the control item.

true

ControllerValueType

string

No

The value type. Valid values: Boolean, Integer, Long, and String.

Integer

UserConfigValue

any

No

The user-configured value. The type depends on ControllerValueType.

10

BasicEditionDefaultValue

any

No

The default value for Basic Edition.

0

StandardEditionDefaultValue

any

No

The default value for Standard Edition.

100000

ProfessionalEditionDefaultValue

any

No

The default value for Professional Edition.

200000

EnterpriseEditionDefaultValue

any

No

The default value for Enterprise Edition.

500000

BasicEditionIntervalValue

array

No

The valid value range for Basic Edition, in the format of [min, max].

integer

No

The start and end values of the range.

0

StandardEditionIntervalValue

array

No

The valid value range for Standard Edition, in the format of [min, max].

integer

No

The start and end values of the range.

100000

ProfessionalEditionIntervalValue

array

No

The valid value range for Professional Edition, in the format of [min, max].

integer

No

The start and end values of the range.

200000

EnterpriseEditionIntervalValue

array

No

The valid value range for Enterprise Edition, in the format of [min, max].

integer

No

The start and end values of the range.

500000

ClientToken

string

No

The idempotency parameter. This parameter is used to prevent duplicate operations caused by multiple calls.

ABFUOEUOTRTRJKE

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The API request ID.

0bc5df3a17****903790e8e8a

Id

integer

The security policy ID.

12345

Examples

Success response

JSON format

{
  "RequestId": "0bc5df3a17****903790e8e8a",
  "Id": 12345
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.