DETACH MASKING POLICY - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

DETACH MASKING POLICY

Detaches an already attached dynamic data masking policy from a column. For more information on dynamic data masking, see Dynamic data masking.

Superusers and users or roles that have the sys:secadmin role can detach a masking policy.

Syntax

DETACH MASKING POLICY policy_name ON { table_name } ( output_column_names ) FROM { user_name | ROLE role_name | PUBLIC };

Parameters

policy_name

The name of the masking policy to detach.

table_name

The name of the table to detach the masking policy from.

output_column_names

The names of the columns to which the masking policy was attached.

user_name

The name of the user to whom the masking policy was attached.

You can only set one of user_name, role_name, and PUBLIC in a single DETACH MASKING POLICY statement.

role_name

The name of the role to which the masking policy was attached.

You can only set one of user_name, role_name, and PUBLIC in a single DETACH MASKING POLICY statement.

PUBLIC

Shows that the policy was attached to all users in the table.

You can only set one of user_name, role_name, and PUBLIC in a single DETACH MASKING POLICY statement.