LakeFormation / Client / create_rls_policy

create_rls_policy

LakeFormation.Client.create_rls_policy(**kwargs)

Creates a row-level security (RLS) policy. A row-level security policy defines a filter expression that Lake Formation evaluates to determine which rows of a table a principal is allowed to see. The policy is created independently of any resource, and is later associated with a resource and principal using AttachRLSPolicy.

See also: AWS API Documentation

Request Syntax

response = client.create_rls_policy(
    Name='string',
    AttachmentColumns=[
        {
            'Name': 'string',
            'Type': 'string'
        },
    ],
    FilterExpression='string'
)
Parameters:
  • Name (string) –

    [REQUIRED]

    A unique name for the row-level security policy within the Data Catalog.

  • AttachmentColumns (list) –

    [REQUIRED]

    The list of columns that the filter expression references. These columns define the shape of the data that the policy can be attached to.

    • (dict) –

      A column in a table that a row-level security policy’s filter expression can reference.

      • Name (string) – [REQUIRED]

        The name of the column.

      • Type (string) –

        The data type of the column.

  • FilterExpression (string) –

    [REQUIRED]

    A filter predicate, written in a SQL-like syntax, that Lake Formation evaluates against each row. Only the rows for which the expression evaluates to true are returned to the principal.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions