
# 更新动态数据脱敏策略 - UpdateSecurityDynamicMaskingPolicy
#### 功能介绍
更新动态数据脱敏策略。
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-dataartsstudio/making_request.html)。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-dataartsstudio/abcd.html)。
- 如果使用身份策略授权，当前API调用无需身份策略权限。
 
#### URI
PUT /v1/{project_id}/security/masking/dynamic/policies/{id}
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述                                                                                                    |
|:---|:---|:---|:---|
| project_id | 是    | String | 项目ID，获取方法请参见[项目ID和账号ID](https://support.huaweicloud.com/api-dataartsstudio/projectid_accountid.html)。 |
| id         | 是    | String | 脱敏策略id                                                                                                |
   
#### 请求参数
表2请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                           |
|:---|:---|:---|:---|
| workspace    | 是    | String | 工作空间ID，获取方法请参见[实例ID和工作空间ID](https://support.huaweicloud.com/api-dataartsstudio/dataartsstudio_02_0350.html)。 |
| X-Auth-Token | 是    | String | IAM Token，通过调用IAM服务获取用户Token接口获取（响应消息头中X-Subject-Token的值）使用Token认证时必选。                                       |
   
表3请求Body参数 
| 参数              | 是否必选 | 参数类型                                                                                                                   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|:---|:---|:---|:---|
| name            | 是    | String                                                                                                                 | 策略名称。英文和汉字开头, 支持英文、汉字、数字、下划线, 2-64字符。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| datasource_type | 是    | String                                                                                                                 | 数据源类型 - HIVE数据源   - DWS数据源   - DLI数据源    |
| cluster_id      | 是    | String                                                                                                                 | 集群id。请于集群管理页面查看集群ID信息。当数据源类型为DLI时，该参数需要填写为DLI。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| cluster_name    | 是    | String                                                                                                                 | 集群名称。请于集群管理页面查看集群名称信息。当数据源类型为DLI时，该参数需要填写为DLI。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| database_name   | 是    | String                                                                                                                 | 数据库名称。获取方法请参见[获取数据源中的表](https://support.huaweicloud.com/api-dataartsstudio/ListDataTables_offline.html)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| table_id        | 否    | String                                                                                                                 | 数据表id，获取方法请参见[获取数据源中的表](https://support.huaweicloud.com/api-dataartsstudio/ListDataTables_offline.html)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| table_name      | 是    | String                                                                                                                 | 数据表名称, 获取方法请参见[获取数据源中的表](https://support.huaweicloud.com/api-dataartsstudio/ListDataTables_offline.html)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| user_groups     | 否    | String                                                                                                                 | 用户组列表，用户组名称逗号分隔（非必填项，但用户、用户组必须二选其一进行配置）。例如："userGroup1,userGroup2"。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| users           | 否    | String                                                                                                                 | 用户列表，用户名称逗号分隔（非必填项，但用户、用户组必须二选其一进行配置），例如："user1,user2"。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| conn_name       | 是    | String                                                                                                                 | 数据连接名称，获取方法请参见[查询数据连接列表](https://support.huaweicloud.com/api-dataartsstudio/ListDataconnections.html)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| conn_id         | 是    | String                                                                                                                 | 数据连接id，获取方法请参见[查询数据连接列表](https://support.huaweicloud.com/api-dataartsstudio/ListDataconnections.html)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| schema_name     | 否    | String                                                                                                                 | DWS数据源的模式名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| policy_list     | 是    | Array of [DynamicMaskingPolicyUpdate] objects | 动态数据脱敏策略列表。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
   
 表4DynamicMaskingPolicyUpdate 
| 参数                   | 是否必选 | 参数类型                                                                                         | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|:---|:---|:---|:---|
| column_name          | 是    | String                                                                                       | 数据表中的字段名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| column_type          | 是    | String                                                                                       | 数据表中字段的数据类型。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| algorithm_type       | 否    | String                                                                                       | 动态脱敏规则参数介绍，具体请参考用户指南手册中的"动态脱敏规则介绍"章节。 HIVE数据源动态脱敏算法 - MASK 掩盖英文字符和数字   - MASK_SHOW_LAST_4 保留后四位   - MASK_SHOW_FIRST_4 保留前四位   - MASK_HASH 哈希掩盖   - MASK_DATE_SHOW_YEAR 掩盖月份和日期   - MASK_NULL NULL掩盖    DWS数据源动态脱敏算法 - DWS_ALL_MASK 全掩码   - DWS_BACK_KEEP 保留后4位，其余脱敏为\*   - DWS_FRONT_KEEP 保留前2位，其余脱敏为\*   - DWS_SELF_CONFIG 需要输入开始位置、结束位置、脱敏字符传入detail结构体中，例如{"start": 1, "end": 2, "string_target": "\*"}    DLI数据源动态脱敏算法 - MASK 掩盖英文字符和数字   - MASK_SHOW_LAST_4 保留后四位   - MASK_SHOW_FIRST_4 保留前四位   - MASK_HASH 哈希掩盖   - MASK_DATE_SHOW_YEAR 掩盖月份和日期   - MASK_NULL NULL掩盖    |
| algorithm_detail     | 否    | String                                                                                       | 动态脱敏策略算法详情（序列化字符串，仅展示使用）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| algorithm_detail_dto | 否    | [AlgorithmDetailDTO] object | 动态脱敏策略算法详情。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
   
 表5AlgorithmDetailDTO 
| 参数            | 是否必选 | 参数类型    | 描述                     |
|:---|:---|:---|:---|
| start         | 否    | Integer | 开始位数，该值需要大于0且小于end值。   |
| end           | 否    | Integer | 结束位数，该值需要大于或等于start值。  |
| int_target    | 否    | Integer | 数值类型。                  |
| string_target | 否    | String  | 字符串类型。可输入参数为"\*"或者"#"。 |
   
#### 响应参数
**状态码：200**
表6响应Body参数 
| 参数              | 参数类型                                                                                                        | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|:---|:---|:---|
| id              | String                                                                                                      | 策略id。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| name            | String                                                                                                      | 策略名称。英文和汉字开头, 支持英文、汉字、数字、下划线, 2-64字符。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| datasource_type | String                                                                                                      | 数据源类型 - HIVE数据源   - DWS数据源   - DLI数据源                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| cluster_id      | String                                                                                                      | 集群id。请于集群管理页面查看集群ID信息。当数据源类型为DLI时，该参数需要填写为DLI。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| cluster_name    | String                                                                                                      | 集群名称。请于集群管理页面查看集群名称信息。当数据源类型为DLI时，该参数需要填写为DLI。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| database_name   | String                                                                                                      | 数据库名称。获取方法请参见[获取数据源中的表](https://support.huaweicloud.com/api-dataartsstudio/ListDataTables_offline.html)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| table_id        | String                                                                                                      | 数据表id，获取方法请参见[获取数据源中的表](https://support.huaweicloud.com/api-dataartsstudio/ListDataTables_offline.html)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| table_name      | String                                                                                                      | 数据表名称, 获取方法请参见[获取数据源中的表](https://support.huaweicloud.com/api-dataartsstudio/ListDataTables_offline.html)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| user_groups     | String                                                                                                      | 用户组列表，用户组名称逗号分隔（非必填项，但用户、用户组必须二选其一进行配置）。例如："userGroup1,userGroup2"。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| users           | String                                                                                                      | 用户列表，用户名称逗号分隔（非必填项，但用户、用户组必须二选其一进行配置），例如："user1,user2"。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| conn_name       | String                                                                                                      | 数据连接名称，获取方法请参见[查询数据连接列表](https://support.huaweicloud.com/api-dataartsstudio/ListDataconnections.html)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| conn_id         | String                                                                                                      | 数据连接id，获取方法请参见[查询数据连接列表](https://support.huaweicloud.com/api-dataartsstudio/ListDataconnections.html)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| sync_status     | String                                                                                                      | 同步状态： - UNKNOWN 未知状态   - NOT_SYNC 未同步   - SYNCING 同步中   - SYNC_SUCCESS 同步成功   - SYNC_FAIL 同步失败   - SYNC_PARTIAL_FAIL 存在失败   - DELETE_FAIL 删除失败   - DELETING 删除中   - UPDATING 更新中   - DATA_UPDATED 数据存在更新    |
| sync_msg        | String                                                                                                      | 策略同步信息。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| sync_log        | String                                                                                                      | 同步运行日志, 格式为 字段同步信息+换行符。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| create_time     | Long                                                                                                        | 策略创建时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| create_user     | String                                                                                                      | 策略创建者。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| update_time     | Long                                                                                                        | 策略更新时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| update_user     | String                                                                                                      | 策略更新者。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| schema_name     | String                                                                                                      | DWS数据源的模式名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| policy_list     | Array of [DynamicMaskingPolicy] objects | 动态数据脱敏策略列表。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
   
 表7DynamicMaskingPolicy 
| 参数                   | 参数类型                                                                                          | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| id                   | String                                                                                        | 字段脱敏策略id。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| policy_set_id        | String                                                                                        | 动态脱敏策略id。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| column_name          | String                                                                                        | 数据表中的字段名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| column_type          | String                                                                                        | 数据表中字段的数据类型。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| algorithm_type       | String                                                                                        | 动态脱敏规则参数介绍，具体请参考用户指南手册中的"动态脱敏规则介绍"章节。 HIVE数据源动态脱敏算法 - MASK 掩盖英文字符和数字   - MASK_SHOW_LAST_4 保留后四位   - MASK_SHOW_FIRST_4 保留前四位   - MASK_HASH 哈希掩盖   - MASK_DATE_SHOW_YEAR 掩盖月份和日期   - MASK_NULL NULL掩盖    DWS数据源动态脱敏算法 - DWS_ALL_MASK 全掩码   - DWS_BACK_KEEP 保留后4位，其余脱敏为\*   - DWS_FRONT_KEEP 保留前2位，其余脱敏为\*   - DWS_SELF_CONFIG 需要输入开始位置、结束位置、脱敏字符传入detail结构体中，例如{"start": 1, "end": 2, "string_target": "\*"}    DLI数据源动态脱敏算法 - MASK 掩盖英文字符和数字   - MASK_SHOW_LAST_4 保留后四位   - MASK_SHOW_FIRST_4 保留前四位   - MASK_HASH 哈希掩盖   - MASK_DATE_SHOW_YEAR 掩盖月份和日期   - MASK_NULL NULL掩盖    |
| sync_status          | String                                                                                        | 同步状态： - UNKNOWN 未知状态   - NOT_SYNC 未同步   - SYNCING 同步中   - SYNC_SUCCESS 同步成功   - SYNC_FAIL 同步失败   - SYNC_PARTIAL_FAIL 存在失败   - DELETE_FAIL 删除失败   - DELETING 删除中   - UPDATING 更新中   - DATA_UPDATED 数据存在更新                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| algorithm_detail     | String                                                                                        | 动态脱敏策略算法详情（序列化字符串，仅展示使用）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| algorithm_detail_dto | [AlgorithmDetailDTO] object | 动态脱敏策略算法详情。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
   
 表8AlgorithmDetailDTO 
| 参数            | 参数类型    | 描述                     |
|:---|:---|:---|
| start         | Integer | 开始位数，该值需要大于0且小于end值。   |
| end           | Integer | 结束位数，该值需要大于或等于start值。  |
| int_target    | Integer | 数值类型。                  |
| string_target | String  | 字符串类型。可输入参数为"\*"或者"#"。 |
   
**状态码：400**
表9响应Body参数 
| 参数         | 参数类型   | 描述    |
|:---|:---|:---|
| error_code | String | 错误码。  |
| error_msg  | String | 错误描述。 |
   
#### 请求示例
- 更新HIVE数据源动态脱敏策略
  ```
  /v1/0833a5737480d53b2f25c010dc1a7b88/security/masking/dynamic/policies/f52f0f7fe2074421e473b88cdb7752ab
  {
    "name" : "OpenAPI_HIVE_test",
    "datasource_type" : "HIVE",
    "cluster_id" : "dc425074-26b3-479c-9e2f-b103c0cdd90f",
    "cluster_name" : "mrs_3x_autotest_do_not_del",
    "database_name" : "bigdatatest",
    "table_name" : "chuan",
    "table_id" : "NativeTable-ae55cb5c44be4119b8958a3ba5d9a71f-bigdatatest-chuan",
    "user_groups" : "DataArts User",
    "users" : "",
    "conn_name" : "hive_xxxx_0520",
    "conn_id" : "ae55cb5c44be4119b8958a3ba5d9a71f",
    "policy_list" : [ {
      "column_name" : "rr",
      "column_type" : "string",
      "algorithm_type" : "MASK_SHOW_FIRST_4"
    } ]
  }
  ```
  
- 更新DWS数据源动态脱敏策略
  ```
  /v1/0833a5737480d53b2f25c010dc1a7b88/security/masking/dynamic/policies/6c21c00bbabf1941eebbc2d5a586b2fa
  {
    "name" : "OpenAPI_DWS_test",
    "datasource_type" : "DWS",
    "cluster_id" : "c94a9133-ef65-47ad-9483-bfa8c5eaa101",
    "cluster_name" : "dws_ssl_xxxx_nomodify",
    "database_name" : "gaussdb",
    "table_name" : "all_column",
    "table_id" : "NativeTable-e2f6c44100654778aee017f8ad9e3ac9-gaussdb-public-all_column",
    "user_groups" : "DataArts_PDP5_NoPrivilleage",
    "users" : "autotest_tics",
    "conn_name" : "dws_0430",
    "conn_id" : "e2f6c44100654778aee017f8ad9e3ac9",
    "policy_list" : [ {
      "column_name" : "avarchar",
      "column_type" : "varchar",
      "algorithm_type" : "DWS_FRONT_KEEP",
      "algorithm_detail_dto" : null
    } ],
    "schema_name" : "public"
  }
  ```
  
- 更新DLI数据源动态脱敏策略
  ```
  /v1/0833a5737480d53b2f25c010dc1a7b88/security/masking/dynamic/policies/62355f975ff8a2943e6ac8992d0951e7
  {
    "name" : "OpenAPI_DLI_xxxx",
    "datasource_type" : "DLI",
    "cluster_id" : "DLI",
    "cluster_name" : "DLI",
    "database_name" : "bi",
    "table_name" : "ab",
    "table_id" : "NativeTable-619d52a0e6954aa68844f5f010e06ef8-bi-ab",
    "user_groups" : "",
    "users" : "",
    "conn_name" : "xxxx_dli_link",
    "conn_id" : "619d52a0e6954aa68844f5f010e06ef8",
    "policy_list" : [ {
      "column_name" : "name1",
      "column_type" : "string",
      "algorithm_type" : "MASK_HASH"
    } ]
  }
  ```
  
 
#### 响应示例
**状态码：200**
OK
```
{
  "name" : "OpenAPI_HIVE_test",
  "datasource_type" : "HIVE",
  "cluster_id" : "dc425074-26b3-479c-9e2f-b103c0cdd90f",
  "cluster_name" : "mrs_3x_xxxx_do_not_del",
  "database_name" : "bigdatatest",
  "table_name" : "chuan",
  "table_id" : "NativeTable-ae55cb5c44be4119b8958a3ba5d9a71f-bigdatatest-chuan",
  "user_groups" : "DataArts User",
  "users" : "",
  "conn_name" : "hive_xxxx_0520",
  "conn_id" : "ae55cb5c44be4119b8958a3ba5d9a71f",
  "policy_list" : [ {
    "column_name" : "rr",
    "column_type" : "string",
    "algorithm_type" : "MASK_NULL"
  } ]
}
```
#### SDK代码示例
SDK代码示例如下。
- [Java]
  - 更新HIVE数据源动态脱敏策略
    ```
    package com.huaweicloud.sdk.test;
    import com.huaweicloud.sdk.core.auth.ICredential;
    import com.huaweicloud.sdk.core.auth.BasicCredentials;
    import com.huaweicloud.sdk.core.exception.ConnectionException;
    import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
    import com.huaweicloud.sdk.core.exception.ServiceResponseException;
    import com.huaweicloud.sdk.dataartsstudio.v1.region.DataArtsStudioRegion;
    import com.huaweicloud.sdk.dataartsstudio.v1.*;
    import com.huaweicloud.sdk.dataartsstudio.v1.model.*;
    import java.util.List;
    import java.util.ArrayList;
    public class UpdateSecurityDynamicMaskingPolicySolution {
        public static void main(String[] args) {
            // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
            // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
            String ak = System.getenv("CLOUD_SDK_AK");
            String sk = System.getenv("CLOUD_SDK_SK");
            String projectId = "{project_id}";
            ICredential auth = new BasicCredentials()
                    .withProjectId(projectId)
                    .withAk(ak)
                    .withSk(sk);
            DataArtsStudioClient client = DataArtsStudioClient.newBuilder()
                    .withCredential(auth)
                    .withRegion(DataArtsStudioRegion.valueOf("<YOUR REGION>"))
                    .build();
            UpdateSecurityDynamicMaskingPolicyRequest request = new UpdateSecurityDynamicMaskingPolicyRequest();
            request.withId("{id}");
            DynamicMaskingPolicyUpdateDTO body = new DynamicMaskingPolicyUpdateDTO();
            List<DynamicMaskingPolicyUpdate> listbodyPolicyList = new ArrayList<>();
            listbodyPolicyList.add(
                new DynamicMaskingPolicyUpdate()
                    .withColumnName("rr")
                    .withColumnType("string")
                    .withAlgorithmType("MASK_SHOW_FIRST_4")
            );
            body.withPolicyList(listbodyPolicyList);
            body.withConnId("ae55cb5c44be4119b8958a3ba5d9a71f");
            body.withConnName("hive_xxxx_0520");
            body.withUsers("");
            body.withUserGroups("DataArts User");
            body.withTableName("chuan");
            body.withTableId("NativeTable-ae55cb5c44be4119b8958a3ba5d9a71f-bigdatatest-chuan");
            body.withDatabaseName("bigdatatest");
            body.withClusterName("mrs_3x_autotest_do_not_del");
            body.withClusterId("dc425074-26b3-479c-9e2f-b103c0cdd90f");
            body.withDatasourceType(DynamicMaskingPolicyUpdateDTO.DatasourceTypeEnum.fromValue("HIVE"));
            body.withName("OpenAPI_HIVE_test");
            request.withBody(body);
            try {
                UpdateSecurityDynamicMaskingPolicyResponse response = client.updateSecurityDynamicMaskingPolicy(request);
                System.out.println(response.toString());
            } catch (ConnectionException e) {
                e.printStackTrace();
            } catch (RequestTimeoutException e) {
                e.printStackTrace();
            } catch (ServiceResponseException e) {
                e.printStackTrace();
                System.out.println(e.getHttpStatusCode());
                System.out.println(e.getRequestId());
                System.out.println(e.getErrorCode());
                System.out.println(e.getErrorMsg());
            }
        }
    }
    ```
    
  
  - 更新DWS数据源动态脱敏策略
    ```
    package com.huaweicloud.sdk.test;
    import com.huaweicloud.sdk.core.auth.ICredential;
    import com.huaweicloud.sdk.core.auth.BasicCredentials;
    import com.huaweicloud.sdk.core.exception.ConnectionException;
    import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
    import com.huaweicloud.sdk.core.exception.ServiceResponseException;
    import com.huaweicloud.sdk.dataartsstudio.v1.region.DataArtsStudioRegion;
    import com.huaweicloud.sdk.dataartsstudio.v1.*;
    import com.huaweicloud.sdk.dataartsstudio.v1.model.*;
    import java.util.List;
    import java.util.ArrayList;
    public class UpdateSecurityDynamicMaskingPolicySolution {
        public static void main(String[] args) {
            // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
            // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
            String ak = System.getenv("CLOUD_SDK_AK");
            String sk = System.getenv("CLOUD_SDK_SK");
            String projectId = "{project_id}";
            ICredential auth = new BasicCredentials()
                    .withProjectId(projectId)
                    .withAk(ak)
                    .withSk(sk);
            DataArtsStudioClient client = DataArtsStudioClient.newBuilder()
                    .withCredential(auth)
                    .withRegion(DataArtsStudioRegion.valueOf("<YOUR REGION>"))
                    .build();
            UpdateSecurityDynamicMaskingPolicyRequest request = new UpdateSecurityDynamicMaskingPolicyRequest();
            request.withId("{id}");
            DynamicMaskingPolicyUpdateDTO body = new DynamicMaskingPolicyUpdateDTO();
            List<DynamicMaskingPolicyUpdate> listbodyPolicyList = new ArrayList<>();
            listbodyPolicyList.add(
                new DynamicMaskingPolicyUpdate()
                    .withColumnName("avarchar")
                    .withColumnType("varchar")
                    .withAlgorithmType("DWS_FRONT_KEEP")
            );
            body.withPolicyList(listbodyPolicyList);
            body.withSchemaName("public");
            body.withConnId("e2f6c44100654778aee017f8ad9e3ac9");
            body.withConnName("dws_0430");
            body.withUsers("autotest_tics");
            body.withUserGroups("DataArts_PDP5_NoPrivilleage");
            body.withTableName("all_column");
            body.withTableId("NativeTable-e2f6c44100654778aee017f8ad9e3ac9-gaussdb-public-all_column");
            body.withDatabaseName("gaussdb");
            body.withClusterName("dws_ssl_xxxx_nomodify");
            body.withClusterId("c94a9133-ef65-47ad-9483-bfa8c5eaa101");
            body.withDatasourceType(DynamicMaskingPolicyUpdateDTO.DatasourceTypeEnum.fromValue("DWS"));
            body.withName("OpenAPI_DWS_test");
            request.withBody(body);
            try {
                UpdateSecurityDynamicMaskingPolicyResponse response = client.updateSecurityDynamicMaskingPolicy(request);
                System.out.println(response.toString());
            } catch (ConnectionException e) {
                e.printStackTrace();
            } catch (RequestTimeoutException e) {
                e.printStackTrace();
            } catch (ServiceResponseException e) {
                e.printStackTrace();
                System.out.println(e.getHttpStatusCode());
                System.out.println(e.getRequestId());
                System.out.println(e.getErrorCode());
                System.out.println(e.getErrorMsg());
            }
        }
    }
    ```
    
  
  - 更新DLI数据源动态脱敏策略
    ```
    package com.huaweicloud.sdk.test;
    import com.huaweicloud.sdk.core.auth.ICredential;
    import com.huaweicloud.sdk.core.auth.BasicCredentials;
    import com.huaweicloud.sdk.core.exception.ConnectionException;
    import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
    import com.huaweicloud.sdk.core.exception.ServiceResponseException;
    import com.huaweicloud.sdk.dataartsstudio.v1.region.DataArtsStudioRegion;
    import com.huaweicloud.sdk.dataartsstudio.v1.*;
    import com.huaweicloud.sdk.dataartsstudio.v1.model.*;
    import java.util.List;
    import java.util.ArrayList;
    public class UpdateSecurityDynamicMaskingPolicySolution {
        public static void main(String[] args) {
            // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
            // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
            String ak = System.getenv("CLOUD_SDK_AK");
            String sk = System.getenv("CLOUD_SDK_SK");
            String projectId = "{project_id}";
            ICredential auth = new BasicCredentials()
                    .withProjectId(projectId)
                    .withAk(ak)
                    .withSk(sk);
            DataArtsStudioClient client = DataArtsStudioClient.newBuilder()
                    .withCredential(auth)
                    .withRegion(DataArtsStudioRegion.valueOf("<YOUR REGION>"))
                    .build();
            UpdateSecurityDynamicMaskingPolicyRequest request = new UpdateSecurityDynamicMaskingPolicyRequest();
            request.withId("{id}");
            DynamicMaskingPolicyUpdateDTO body = new DynamicMaskingPolicyUpdateDTO();
            List<DynamicMaskingPolicyUpdate> listbodyPolicyList = new ArrayList<>();
            listbodyPolicyList.add(
                new DynamicMaskingPolicyUpdate()
                    .withColumnName("name1")
                    .withColumnType("string")
                    .withAlgorithmType("MASK_HASH")
            );
            body.withPolicyList(listbodyPolicyList);
            body.withConnId("619d52a0e6954aa68844f5f010e06ef8");
            body.withConnName("xxxx_dli_link");
            body.withUsers("");
            body.withUserGroups("");
            body.withTableName("ab");
            body.withTableId("NativeTable-619d52a0e6954aa68844f5f010e06ef8-bi-ab");
            body.withDatabaseName("bi");
            body.withClusterName("DLI");
            body.withClusterId("DLI");
            body.withDatasourceType(DynamicMaskingPolicyUpdateDTO.DatasourceTypeEnum.fromValue("DLI"));
            body.withName("OpenAPI_DLI_xxxx");
            request.withBody(body);
            try {
                UpdateSecurityDynamicMaskingPolicyResponse response = client.updateSecurityDynamicMaskingPolicy(request);
                System.out.println(response.toString());
            } catch (ConnectionException e) {
                e.printStackTrace();
            } catch (RequestTimeoutException e) {
                e.printStackTrace();
            } catch (ServiceResponseException e) {
                e.printStackTrace();
                System.out.println(e.getHttpStatusCode());
                System.out.println(e.getRequestId());
                System.out.println(e.getErrorCode());
                System.out.println(e.getErrorMsg());
            }
        }
    }
    ```
    
   
- [Python]
  - 更新HIVE数据源动态脱敏策略
    ```
    # coding: utf-8
    import os
    from huaweicloudsdkcore.auth.credentials import BasicCredentials
    from huaweicloudsdkdataartsstudio.v1.region.dataartsstudio_region import DataArtsStudioRegion
    from huaweicloudsdkcore.exceptions import exceptions
    from huaweicloudsdkdataartsstudio.v1 import *
    if __name__ == "__main__":
        # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        ak = os.environ["CLOUD_SDK_AK"]
        sk = os.environ["CLOUD_SDK_SK"]
        projectId = "{project_id}"
        credentials = BasicCredentials(ak, sk, projectId)
        client = DataArtsStudioClient.new_builder() \
            .with_credentials(credentials) \
            .with_region(DataArtsStudioRegion.value_of("<YOUR REGION>")) \
            .build()
        try:
            request = UpdateSecurityDynamicMaskingPolicyRequest()
            request.id = "{id}"
            listPolicyListbody = [
                DynamicMaskingPolicyUpdate(
                    column_name="rr",
                    column_type="string",
                    algorithm_type="MASK_SHOW_FIRST_4"
                )
            ]
            request.body = DynamicMaskingPolicyUpdateDTO(
                policy_list=listPolicyListbody,
                conn_id="ae55cb5c44be4119b8958a3ba5d9a71f",
                conn_name="hive_xxxx_0520",
                users="",
                user_groups="DataArts User",
                table_name="chuan",
                table_id="NativeTable-ae55cb5c44be4119b8958a3ba5d9a71f-bigdatatest-chuan",
                database_name="bigdatatest",
                cluster_name="mrs_3x_autotest_do_not_del",
                cluster_id="dc425074-26b3-479c-9e2f-b103c0cdd90f",
                datasource_type="HIVE",
                name="OpenAPI_HIVE_test"
            )
            response = client.update_security_dynamic_masking_policy(request)
            print(response)
        except exceptions.ClientRequestException as e:
            print(e.status_code)
            print(e.request_id)
            print(e.error_code)
            print(e.error_msg)
    ```
    
  
  - 更新DWS数据源动态脱敏策略
    ```
    # coding: utf-8
    import os
    from huaweicloudsdkcore.auth.credentials import BasicCredentials
    from huaweicloudsdkdataartsstudio.v1.region.dataartsstudio_region import DataArtsStudioRegion
    from huaweicloudsdkcore.exceptions import exceptions
    from huaweicloudsdkdataartsstudio.v1 import *
    if __name__ == "__main__":
        # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        ak = os.environ["CLOUD_SDK_AK"]
        sk = os.environ["CLOUD_SDK_SK"]
        projectId = "{project_id}"
        credentials = BasicCredentials(ak, sk, projectId)
        client = DataArtsStudioClient.new_builder() \
            .with_credentials(credentials) \
            .with_region(DataArtsStudioRegion.value_of("<YOUR REGION>")) \
            .build()
        try:
            request = UpdateSecurityDynamicMaskingPolicyRequest()
            request.id = "{id}"
            listPolicyListbody = [
                DynamicMaskingPolicyUpdate(
                    column_name="avarchar",
                    column_type="varchar",
                    algorithm_type="DWS_FRONT_KEEP"
                )
            ]
            request.body = DynamicMaskingPolicyUpdateDTO(
                policy_list=listPolicyListbody,
                schema_name="public",
                conn_id="e2f6c44100654778aee017f8ad9e3ac9",
                conn_name="dws_0430",
                users="autotest_tics",
                user_groups="DataArts_PDP5_NoPrivilleage",
                table_name="all_column",
                table_id="NativeTable-e2f6c44100654778aee017f8ad9e3ac9-gaussdb-public-all_column",
                database_name="gaussdb",
                cluster_name="dws_ssl_xxxx_nomodify",
                cluster_id="c94a9133-ef65-47ad-9483-bfa8c5eaa101",
                datasource_type="DWS",
                name="OpenAPI_DWS_test"
            )
            response = client.update_security_dynamic_masking_policy(request)
            print(response)
        except exceptions.ClientRequestException as e:
            print(e.status_code)
            print(e.request_id)
            print(e.error_code)
            print(e.error_msg)
    ```
    
  
  - 更新DLI数据源动态脱敏策略
    ```
    # coding: utf-8
    import os
    from huaweicloudsdkcore.auth.credentials import BasicCredentials
    from huaweicloudsdkdataartsstudio.v1.region.dataartsstudio_region import DataArtsStudioRegion
    from huaweicloudsdkcore.exceptions import exceptions
    from huaweicloudsdkdataartsstudio.v1 import *
    if __name__ == "__main__":
        # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        ak = os.environ["CLOUD_SDK_AK"]
        sk = os.environ["CLOUD_SDK_SK"]
        projectId = "{project_id}"
        credentials = BasicCredentials(ak, sk, projectId)
        client = DataArtsStudioClient.new_builder() \
            .with_credentials(credentials) \
            .with_region(DataArtsStudioRegion.value_of("<YOUR REGION>")) \
            .build()
        try:
            request = UpdateSecurityDynamicMaskingPolicyRequest()
            request.id = "{id}"
            listPolicyListbody = [
                DynamicMaskingPolicyUpdate(
                    column_name="name1",
                    column_type="string",
                    algorithm_type="MASK_HASH"
                )
            ]
            request.body = DynamicMaskingPolicyUpdateDTO(
                policy_list=listPolicyListbody,
                conn_id="619d52a0e6954aa68844f5f010e06ef8",
                conn_name="xxxx_dli_link",
                users="",
                user_groups="",
                table_name="ab",
                table_id="NativeTable-619d52a0e6954aa68844f5f010e06ef8-bi-ab",
                database_name="bi",
                cluster_name="DLI",
                cluster_id="DLI",
                datasource_type="DLI",
                name="OpenAPI_DLI_xxxx"
            )
            response = client.update_security_dynamic_masking_policy(request)
            print(response)
        except exceptions.ClientRequestException as e:
            print(e.status_code)
            print(e.request_id)
            print(e.error_code)
            print(e.error_msg)
    ```
    
   
- [Go]
  - 更新HIVE数据源动态脱敏策略
    ```
    package main
    import (
    "fmt"
    "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
        dataartsstudio "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1"
    "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/model"
        region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/region"
    )
    func main() {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        ak := os.Getenv("CLOUD_SDK_AK")
        sk := os.Getenv("CLOUD_SDK_SK")
        projectId := "{project_id}"
        auth := basic.NewCredentialsBuilder().
            WithAk(ak).
            WithSk(sk).
            WithProjectId(projectId).
            Build()
        client := dataartsstudio.NewDataArtsStudioClient(
            dataartsstudio.DataArtsStudioClientBuilder().
                WithRegion(region.ValueOf("<YOUR REGION>")).
                WithCredential(auth).
                Build())
        request := &model.UpdateSecurityDynamicMaskingPolicyRequest{}
    request.Id = "{id}"
    algorithmTypePolicyList:= "MASK_SHOW_FIRST_4"
    var listPolicyListbody = []model.DynamicMaskingPolicyUpdate{
            {
                ColumnName: "rr",
                ColumnType: "string",
                AlgorithmType: &algorithmTypePolicyList,
            },
        }
    usersDynamicMaskingPolicyUpdateDto:= ""
    userGroupsDynamicMaskingPolicyUpdateDto:= "DataArts User"
    tableIdDynamicMaskingPolicyUpdateDto:= "NativeTable-ae55cb5c44be4119b8958a3ba5d9a71f-bigdatatest-chuan"
    request.Body = &model.DynamicMaskingPolicyUpdateDto{
    PolicyList: listPolicyListbody,
    ConnId: "ae55cb5c44be4119b8958a3ba5d9a71f",
    ConnName: "hive_xxxx_0520",
    Users: &usersDynamicMaskingPolicyUpdateDto,
    UserGroups: &userGroupsDynamicMaskingPolicyUpdateDto,
    TableName: "chuan",
    TableId: &tableIdDynamicMaskingPolicyUpdateDto,
    DatabaseName: "bigdatatest",
    ClusterName: "mrs_3x_autotest_do_not_del",
    ClusterId: "dc425074-26b3-479c-9e2f-b103c0cdd90f",
    DatasourceType: model.GetDynamicMaskingPolicyUpdateDtoDatasourceTypeEnum().HIVE,
    Name: "OpenAPI_HIVE_test",
    }
    response, err := client.UpdateSecurityDynamicMaskingPolicy(request)
    if err == nil {
            fmt.Printf("%+v\n", response)
        } else {
            fmt.Println(err)
        }
    }
    ```
    
  
  - 更新DWS数据源动态脱敏策略
    ```
    package main
    import (
    "fmt"
    "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
        dataartsstudio "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1"
    "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/model"
        region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/region"
    )
    func main() {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        ak := os.Getenv("CLOUD_SDK_AK")
        sk := os.Getenv("CLOUD_SDK_SK")
        projectId := "{project_id}"
        auth := basic.NewCredentialsBuilder().
            WithAk(ak).
            WithSk(sk).
            WithProjectId(projectId).
            Build()
        client := dataartsstudio.NewDataArtsStudioClient(
            dataartsstudio.DataArtsStudioClientBuilder().
                WithRegion(region.ValueOf("<YOUR REGION>")).
                WithCredential(auth).
                Build())
        request := &model.UpdateSecurityDynamicMaskingPolicyRequest{}
    request.Id = "{id}"
    algorithmTypePolicyList:= "DWS_FRONT_KEEP"
    var listPolicyListbody = []model.DynamicMaskingPolicyUpdate{
            {
                ColumnName: "avarchar",
                ColumnType: "varchar",
                AlgorithmType: &algorithmTypePolicyList,
            },
        }
    schemaNameDynamicMaskingPolicyUpdateDto:= "public"
    usersDynamicMaskingPolicyUpdateDto:= "autotest_tics"
    userGroupsDynamicMaskingPolicyUpdateDto:= "DataArts_PDP5_NoPrivilleage"
    tableIdDynamicMaskingPolicyUpdateDto:= "NativeTable-e2f6c44100654778aee017f8ad9e3ac9-gaussdb-public-all_column"
    request.Body = &model.DynamicMaskingPolicyUpdateDto{
    PolicyList: listPolicyListbody,
    SchemaName: &schemaNameDynamicMaskingPolicyUpdateDto,
    ConnId: "e2f6c44100654778aee017f8ad9e3ac9",
    ConnName: "dws_0430",
    Users: &usersDynamicMaskingPolicyUpdateDto,
    UserGroups: &userGroupsDynamicMaskingPolicyUpdateDto,
    TableName: "all_column",
    TableId: &tableIdDynamicMaskingPolicyUpdateDto,
    DatabaseName: "gaussdb",
    ClusterName: "dws_ssl_xxxx_nomodify",
    ClusterId: "c94a9133-ef65-47ad-9483-bfa8c5eaa101",
    DatasourceType: model.GetDynamicMaskingPolicyUpdateDtoDatasourceTypeEnum().DWS,
    Name: "OpenAPI_DWS_test",
    }
    response, err := client.UpdateSecurityDynamicMaskingPolicy(request)
    if err == nil {
            fmt.Printf("%+v\n", response)
        } else {
            fmt.Println(err)
        }
    }
    ```
    
  
  - 更新DLI数据源动态脱敏策略
    ```
    package main
    import (
    "fmt"
    "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
        dataartsstudio "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1"
    "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/model"
        region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/region"
    )
    func main() {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        ak := os.Getenv("CLOUD_SDK_AK")
        sk := os.Getenv("CLOUD_SDK_SK")
        projectId := "{project_id}"
        auth := basic.NewCredentialsBuilder().
            WithAk(ak).
            WithSk(sk).
            WithProjectId(projectId).
            Build()
        client := dataartsstudio.NewDataArtsStudioClient(
            dataartsstudio.DataArtsStudioClientBuilder().
                WithRegion(region.ValueOf("<YOUR REGION>")).
                WithCredential(auth).
                Build())
        request := &model.UpdateSecurityDynamicMaskingPolicyRequest{}
    request.Id = "{id}"
    algorithmTypePolicyList:= "MASK_HASH"
    var listPolicyListbody = []model.DynamicMaskingPolicyUpdate{
            {
                ColumnName: "name1",
                ColumnType: "string",
                AlgorithmType: &algorithmTypePolicyList,
            },
        }
    usersDynamicMaskingPolicyUpdateDto:= ""
    userGroupsDynamicMaskingPolicyUpdateDto:= ""
    tableIdDynamicMaskingPolicyUpdateDto:= "NativeTable-619d52a0e6954aa68844f5f010e06ef8-bi-ab"
    request.Body = &model.DynamicMaskingPolicyUpdateDto{
    PolicyList: listPolicyListbody,
    ConnId: "619d52a0e6954aa68844f5f010e06ef8",
    ConnName: "xxxx_dli_link",
    Users: &usersDynamicMaskingPolicyUpdateDto,
    UserGroups: &userGroupsDynamicMaskingPolicyUpdateDto,
    TableName: "ab",
    TableId: &tableIdDynamicMaskingPolicyUpdateDto,
    DatabaseName: "bi",
    ClusterName: "DLI",
    ClusterId: "DLI",
    DatasourceType: model.GetDynamicMaskingPolicyUpdateDtoDatasourceTypeEnum().DLI,
    Name: "OpenAPI_DLI_xxxx",
    }
    response, err := client.UpdateSecurityDynamicMaskingPolicy(request)
    if err == nil {
            fmt.Printf("%+v\n", response)
        } else {
            fmt.Println(err)
        }
    }
    ```
    
   
- [更多]
  更多编程语言的SDK代码示例，请参见[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/DataArtsStudio/sdk?api=UpdateSecurityDynamicMaskingPolicy)的代码示例页签，可生成自动对应的SDK代码示例。
#### 状态码
| 状态码 | 描述          |
|:---|:---|
| 200 | OK          |
| 400 | Bad Request |
   
