云数据库 GAUSSDB-ALTER MASKING POLICY:语法格式

时间:2024-11-13 14:45:53

语法格式

  • 修改策略描述:
    1
    ALTER MASKING POLICY policy_name COMMENTS policy_comments;
    

  • 修改脱敏方式:
    1
    ALTER MASKING POLICY policy_name { ADD | REMOVE | MODIFY } masking_actions[, ...];
    

    • 其中masking_actions:
      1
          masking_function ON LABEL(label_name[, ...])
      

    • 其中masking_function:
      1
         { maskall | randommasking | creditcardmasking | basicemailmasking | fullemailmasking | shufflemasking | alldigitsmasking | regexpmasking }
      

  • 修改脱敏策略生效场景:
    1
    ALTER MASKING POLICY policy_name MODIFY (filter_group_clause);
    

    • 其中filter_group_clause:
      1
          FILTER ON { ( FILTER_TYPE ( filter_value [, ... ] ) ) [, ... ] }
      

  • 移除脱敏策略生效场景,使策略对所用场景生效:
    1
    ALTER MASKING POLICY policy_name DROP FILTER;
    

  • 修改脱敏策略开启/关闭:
    1
    ALTER MASKING POLICY policy_name {ENABLE | DISABLE};
    

support.huaweicloud.com/distributed-devg-v8-gaussdb/gaussdb-12-0494.html