LakeFormation

Table of Contents

Client

class LakeFormation.Client

A low-level client representing AWS Lake Formation

Defines the public endpoint for the AWS Lake Formation service.

import boto3

client = boto3.client('lakeformation')

These are the available methods:

add_lf_tags_to_resource(**kwargs)

Attaches one or more tags to an existing resource.

See also: AWS API Documentation

Request Syntax

response = client.add_lf_tags_to_resource(
    CatalogId='string',
    Resource={
        'Catalog': {}
        ,
        'Database': {
            'CatalogId': 'string',
            'Name': 'string'
        },
        'Table': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'TableWildcard': {}

        },
        'TableWithColumns': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'ColumnNames': [
                'string',
            ],
            'ColumnWildcard': {
                'ExcludedColumnNames': [
                    'string',
                ]
            }
        },
        'DataLocation': {
            'CatalogId': 'string',
            'ResourceArn': 'string'
        },
        'LFTag': {
            'CatalogId': 'string',
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
        'LFTagPolicy': {
            'CatalogId': 'string',
            'ResourceType': 'DATABASE'|'TABLE',
            'Expression': [
                {
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
            ]
        }
    },
    LFTags=[
        {
            'CatalogId': 'string',
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
    ]
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • Resource (dict) --

    [REQUIRED]

    The resource to which to attach a tag.

    • Catalog (dict) --

      The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

    • Database (dict) --

      The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • Name (string) -- [REQUIRED]

        The name of the database resource. Unique to the Data Catalog.

    • Table (dict) --

      The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) --

        The name of the table.

      • TableWildcard (dict) --

        A wildcard object representing every table under a database.

        At least one of TableResource$Name or TableResource$TableWildcard is required.

    • TableWithColumns (dict) --

      The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) -- [REQUIRED]

        The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • ColumnNames (list) --

        The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

        • (string) --
      • ColumnWildcard (dict) --

        A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

        • ExcludedColumnNames (list) --

          Excludes column names. Any column with this name will be excluded.

          • (string) --
    • DataLocation (dict) --

      The location of an Amazon S3 path where permissions are granted or revoked.

      • CatalogId (string) --

        The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

      • ResourceArn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

    • LFTag (dict) --

      The tag key and values attached to a resource.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • TagKey (string) -- [REQUIRED]

        The key-name for the tag.

      • TagValues (list) -- [REQUIRED]

        A list of possible values an attribute can take.

        • (string) --
    • LFTagPolicy (dict) --

      A list of tag conditions that define a resource's tag policy.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • ResourceType (string) -- [REQUIRED]

        The resource type for which the tag policy applies.

      • Expression (list) -- [REQUIRED]

        A list of tag conditions that apply to the resource's tag policy.

        • (dict) --

          A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

          • TagKey (string) -- [REQUIRED]

            The key-name for the tag.

          • TagValues (list) -- [REQUIRED]

            A list of possible values an attribute can take.

            • (string) --
  • LFTags (list) --

    [REQUIRED]

    The tags to attach to the resource.

    • (dict) --

      A structure containing a tag key-value pair.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • TagKey (string) -- [REQUIRED]

        The key-name for the tag.

      • TagValues (list) -- [REQUIRED]

        A list of possible values an attribute can take.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'Failures': [
        {
            'LFTag': {
                'CatalogId': 'string',
                'TagKey': 'string',
                'TagValues': [
                    'string',
                ]
            },
            'Error': {
                'ErrorCode': 'string',
                'ErrorMessage': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • Failures (list) --

      A list of failures to tag the resource.

      • (dict) --

        A structure containing an error related to a TagResource or UnTagResource operation.

        • LFTag (dict) --

          The key-name of the tag.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

          • TagKey (string) --

            The key-name for the tag.

          • TagValues (list) --

            A list of possible values an attribute can take.

            • (string) --
        • Error (dict) --

          An error that occurred with the attachment or detachment of the tag.

          • ErrorCode (string) --

            The code associated with this error.

          • ErrorMessage (string) --

            A message describing the error.

Exceptions

  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.AccessDeniedException
  • LakeFormation.Client.exceptions.ConcurrentModificationException
batch_grant_permissions(**kwargs)

Batch operation to grant permissions to the principal.

See also: AWS API Documentation

Request Syntax

response = client.batch_grant_permissions(
    CatalogId='string',
    Entries=[
        {
            'Id': 'string',
            'Principal': {
                'DataLakePrincipalIdentifier': 'string'
            },
            'Resource': {
                'Catalog': {}
                ,
                'Database': {
                    'CatalogId': 'string',
                    'Name': 'string'
                },
                'Table': {
                    'CatalogId': 'string',
                    'DatabaseName': 'string',
                    'Name': 'string',
                    'TableWildcard': {}

                },
                'TableWithColumns': {
                    'CatalogId': 'string',
                    'DatabaseName': 'string',
                    'Name': 'string',
                    'ColumnNames': [
                        'string',
                    ],
                    'ColumnWildcard': {
                        'ExcludedColumnNames': [
                            'string',
                        ]
                    }
                },
                'DataLocation': {
                    'CatalogId': 'string',
                    'ResourceArn': 'string'
                },
                'LFTag': {
                    'CatalogId': 'string',
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
                'LFTagPolicy': {
                    'CatalogId': 'string',
                    'ResourceType': 'DATABASE'|'TABLE',
                    'Expression': [
                        {
                            'TagKey': 'string',
                            'TagValues': [
                                'string',
                            ]
                        },
                    ]
                }
            },
            'Permissions': [
                'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
            ],
            'PermissionsWithGrantOption': [
                'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
            ]
        },
    ]
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • Entries (list) --

    [REQUIRED]

    A list of up to 20 entries for resource permissions to be granted by batch operation to the principal.

    • (dict) --

      A permission to a resource granted by batch operation to the principal.

      • Id (string) -- [REQUIRED]

        A unique identifier for the batch permissions request entry.

      • Principal (dict) --

        The principal to be granted a permission.

        • DataLakePrincipalIdentifier (string) --

          An identifier for the AWS Lake Formation principal.

      • Resource (dict) --

        The resource to which the principal is to be granted a permission.

        • Catalog (dict) --

          The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

        • Database (dict) --

          The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, it is the account ID of the caller.

          • Name (string) -- [REQUIRED]

            The name of the database resource. Unique to the Data Catalog.

        • Table (dict) --

          The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, it is the account ID of the caller.

          • DatabaseName (string) -- [REQUIRED]

            The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

          • Name (string) --

            The name of the table.

          • TableWildcard (dict) --

            A wildcard object representing every table under a database.

            At least one of TableResource$Name or TableResource$TableWildcard is required.

        • TableWithColumns (dict) --

          The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, it is the account ID of the caller.

          • DatabaseName (string) -- [REQUIRED]

            The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

          • Name (string) -- [REQUIRED]

            The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

          • ColumnNames (list) --

            The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

            • (string) --
          • ColumnWildcard (dict) --

            A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

            • ExcludedColumnNames (list) --

              Excludes column names. Any column with this name will be excluded.

              • (string) --
        • DataLocation (dict) --

          The location of an Amazon S3 path where permissions are granted or revoked.

          • CatalogId (string) --

            The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

          • ResourceArn (string) -- [REQUIRED]

            The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

        • LFTag (dict) --

          The tag key and values attached to a resource.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

          • TagKey (string) -- [REQUIRED]

            The key-name for the tag.

          • TagValues (list) -- [REQUIRED]

            A list of possible values an attribute can take.

            • (string) --
        • LFTagPolicy (dict) --

          A list of tag conditions that define a resource's tag policy.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

          • ResourceType (string) -- [REQUIRED]

            The resource type for which the tag policy applies.

          • Expression (list) -- [REQUIRED]

            A list of tag conditions that apply to the resource's tag policy.

            • (dict) --

              A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

              • TagKey (string) -- [REQUIRED]

                The key-name for the tag.

              • TagValues (list) -- [REQUIRED]

                A list of possible values an attribute can take.

                • (string) --
      • Permissions (list) --

        The permissions to be granted.

        • (string) --
      • PermissionsWithGrantOption (list) --

        Indicates if the option to pass permissions is granted.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'Failures': [
        {
            'RequestEntry': {
                'Id': 'string',
                'Principal': {
                    'DataLakePrincipalIdentifier': 'string'
                },
                'Resource': {
                    'Catalog': {},
                    'Database': {
                        'CatalogId': 'string',
                        'Name': 'string'
                    },
                    'Table': {
                        'CatalogId': 'string',
                        'DatabaseName': 'string',
                        'Name': 'string',
                        'TableWildcard': {}
                    },
                    'TableWithColumns': {
                        'CatalogId': 'string',
                        'DatabaseName': 'string',
                        'Name': 'string',
                        'ColumnNames': [
                            'string',
                        ],
                        'ColumnWildcard': {
                            'ExcludedColumnNames': [
                                'string',
                            ]
                        }
                    },
                    'DataLocation': {
                        'CatalogId': 'string',
                        'ResourceArn': 'string'
                    },
                    'LFTag': {
                        'CatalogId': 'string',
                        'TagKey': 'string',
                        'TagValues': [
                            'string',
                        ]
                    },
                    'LFTagPolicy': {
                        'CatalogId': 'string',
                        'ResourceType': 'DATABASE'|'TABLE',
                        'Expression': [
                            {
                                'TagKey': 'string',
                                'TagValues': [
                                    'string',
                                ]
                            },
                        ]
                    }
                },
                'Permissions': [
                    'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
                ],
                'PermissionsWithGrantOption': [
                    'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
                ]
            },
            'Error': {
                'ErrorCode': 'string',
                'ErrorMessage': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • Failures (list) --

      A list of failures to grant permissions to the resources.

      • (dict) --

        A list of failures when performing a batch grant or batch revoke operation.

        • RequestEntry (dict) --

          An identifier for an entry of the batch request.

          • Id (string) --

            A unique identifier for the batch permissions request entry.

          • Principal (dict) --

            The principal to be granted a permission.

            • DataLakePrincipalIdentifier (string) --

              An identifier for the AWS Lake Formation principal.

          • Resource (dict) --

            The resource to which the principal is to be granted a permission.

            • Catalog (dict) --

              The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

            • Database (dict) --

              The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

              • CatalogId (string) --

                The identifier for the Data Catalog. By default, it is the account ID of the caller.

              • Name (string) --

                The name of the database resource. Unique to the Data Catalog.

            • Table (dict) --

              The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

              • CatalogId (string) --

                The identifier for the Data Catalog. By default, it is the account ID of the caller.

              • DatabaseName (string) --

                The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

              • Name (string) --

                The name of the table.

              • TableWildcard (dict) --

                A wildcard object representing every table under a database.

                At least one of TableResource$Name or TableResource$TableWildcard is required.

            • TableWithColumns (dict) --

              The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

              • CatalogId (string) --

                The identifier for the Data Catalog. By default, it is the account ID of the caller.

              • DatabaseName (string) --

                The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

              • Name (string) --

                The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

              • ColumnNames (list) --

                The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

                • (string) --
              • ColumnWildcard (dict) --

                A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

                • ExcludedColumnNames (list) --

                  Excludes column names. Any column with this name will be excluded.

                  • (string) --
            • DataLocation (dict) --

              The location of an Amazon S3 path where permissions are granted or revoked.

              • CatalogId (string) --

                The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

              • ResourceArn (string) --

                The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

            • LFTag (dict) --

              The tag key and values attached to a resource.

              • CatalogId (string) --

                The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

              • TagKey (string) --

                The key-name for the tag.

              • TagValues (list) --

                A list of possible values an attribute can take.

                • (string) --
            • LFTagPolicy (dict) --

              A list of tag conditions that define a resource's tag policy.

              • CatalogId (string) --

                The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

              • ResourceType (string) --

                The resource type for which the tag policy applies.

              • Expression (list) --

                A list of tag conditions that apply to the resource's tag policy.

                • (dict) --

                  A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

                  • TagKey (string) --

                    The key-name for the tag.

                  • TagValues (list) --

                    A list of possible values an attribute can take.

                    • (string) --
          • Permissions (list) --

            The permissions to be granted.

            • (string) --
          • PermissionsWithGrantOption (list) --

            Indicates if the option to pass permissions is granted.

            • (string) --
        • Error (dict) --

          An error message that applies to the failure of the entry.

          • ErrorCode (string) --

            The code associated with this error.

          • ErrorMessage (string) --

            A message describing the error.

Exceptions

  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.OperationTimeoutException
batch_revoke_permissions(**kwargs)

Batch operation to revoke permissions from the principal.

See also: AWS API Documentation

Request Syntax

response = client.batch_revoke_permissions(
    CatalogId='string',
    Entries=[
        {
            'Id': 'string',
            'Principal': {
                'DataLakePrincipalIdentifier': 'string'
            },
            'Resource': {
                'Catalog': {}
                ,
                'Database': {
                    'CatalogId': 'string',
                    'Name': 'string'
                },
                'Table': {
                    'CatalogId': 'string',
                    'DatabaseName': 'string',
                    'Name': 'string',
                    'TableWildcard': {}

                },
                'TableWithColumns': {
                    'CatalogId': 'string',
                    'DatabaseName': 'string',
                    'Name': 'string',
                    'ColumnNames': [
                        'string',
                    ],
                    'ColumnWildcard': {
                        'ExcludedColumnNames': [
                            'string',
                        ]
                    }
                },
                'DataLocation': {
                    'CatalogId': 'string',
                    'ResourceArn': 'string'
                },
                'LFTag': {
                    'CatalogId': 'string',
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
                'LFTagPolicy': {
                    'CatalogId': 'string',
                    'ResourceType': 'DATABASE'|'TABLE',
                    'Expression': [
                        {
                            'TagKey': 'string',
                            'TagValues': [
                                'string',
                            ]
                        },
                    ]
                }
            },
            'Permissions': [
                'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
            ],
            'PermissionsWithGrantOption': [
                'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
            ]
        },
    ]
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • Entries (list) --

    [REQUIRED]

    A list of up to 20 entries for resource permissions to be revoked by batch operation to the principal.

    • (dict) --

      A permission to a resource granted by batch operation to the principal.

      • Id (string) -- [REQUIRED]

        A unique identifier for the batch permissions request entry.

      • Principal (dict) --

        The principal to be granted a permission.

        • DataLakePrincipalIdentifier (string) --

          An identifier for the AWS Lake Formation principal.

      • Resource (dict) --

        The resource to which the principal is to be granted a permission.

        • Catalog (dict) --

          The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

        • Database (dict) --

          The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, it is the account ID of the caller.

          • Name (string) -- [REQUIRED]

            The name of the database resource. Unique to the Data Catalog.

        • Table (dict) --

          The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, it is the account ID of the caller.

          • DatabaseName (string) -- [REQUIRED]

            The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

          • Name (string) --

            The name of the table.

          • TableWildcard (dict) --

            A wildcard object representing every table under a database.

            At least one of TableResource$Name or TableResource$TableWildcard is required.

        • TableWithColumns (dict) --

          The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, it is the account ID of the caller.

          • DatabaseName (string) -- [REQUIRED]

            The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

          • Name (string) -- [REQUIRED]

            The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

          • ColumnNames (list) --

            The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

            • (string) --
          • ColumnWildcard (dict) --

            A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

            • ExcludedColumnNames (list) --

              Excludes column names. Any column with this name will be excluded.

              • (string) --
        • DataLocation (dict) --

          The location of an Amazon S3 path where permissions are granted or revoked.

          • CatalogId (string) --

            The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

          • ResourceArn (string) -- [REQUIRED]

            The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

        • LFTag (dict) --

          The tag key and values attached to a resource.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

          • TagKey (string) -- [REQUIRED]

            The key-name for the tag.

          • TagValues (list) -- [REQUIRED]

            A list of possible values an attribute can take.

            • (string) --
        • LFTagPolicy (dict) --

          A list of tag conditions that define a resource's tag policy.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

          • ResourceType (string) -- [REQUIRED]

            The resource type for which the tag policy applies.

          • Expression (list) -- [REQUIRED]

            A list of tag conditions that apply to the resource's tag policy.

            • (dict) --

              A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

              • TagKey (string) -- [REQUIRED]

                The key-name for the tag.

              • TagValues (list) -- [REQUIRED]

                A list of possible values an attribute can take.

                • (string) --
      • Permissions (list) --

        The permissions to be granted.

        • (string) --
      • PermissionsWithGrantOption (list) --

        Indicates if the option to pass permissions is granted.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'Failures': [
        {
            'RequestEntry': {
                'Id': 'string',
                'Principal': {
                    'DataLakePrincipalIdentifier': 'string'
                },
                'Resource': {
                    'Catalog': {},
                    'Database': {
                        'CatalogId': 'string',
                        'Name': 'string'
                    },
                    'Table': {
                        'CatalogId': 'string',
                        'DatabaseName': 'string',
                        'Name': 'string',
                        'TableWildcard': {}
                    },
                    'TableWithColumns': {
                        'CatalogId': 'string',
                        'DatabaseName': 'string',
                        'Name': 'string',
                        'ColumnNames': [
                            'string',
                        ],
                        'ColumnWildcard': {
                            'ExcludedColumnNames': [
                                'string',
                            ]
                        }
                    },
                    'DataLocation': {
                        'CatalogId': 'string',
                        'ResourceArn': 'string'
                    },
                    'LFTag': {
                        'CatalogId': 'string',
                        'TagKey': 'string',
                        'TagValues': [
                            'string',
                        ]
                    },
                    'LFTagPolicy': {
                        'CatalogId': 'string',
                        'ResourceType': 'DATABASE'|'TABLE',
                        'Expression': [
                            {
                                'TagKey': 'string',
                                'TagValues': [
                                    'string',
                                ]
                            },
                        ]
                    }
                },
                'Permissions': [
                    'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
                ],
                'PermissionsWithGrantOption': [
                    'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
                ]
            },
            'Error': {
                'ErrorCode': 'string',
                'ErrorMessage': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • Failures (list) --

      A list of failures to revoke permissions to the resources.

      • (dict) --

        A list of failures when performing a batch grant or batch revoke operation.

        • RequestEntry (dict) --

          An identifier for an entry of the batch request.

          • Id (string) --

            A unique identifier for the batch permissions request entry.

          • Principal (dict) --

            The principal to be granted a permission.

            • DataLakePrincipalIdentifier (string) --

              An identifier for the AWS Lake Formation principal.

          • Resource (dict) --

            The resource to which the principal is to be granted a permission.

            • Catalog (dict) --

              The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

            • Database (dict) --

              The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

              • CatalogId (string) --

                The identifier for the Data Catalog. By default, it is the account ID of the caller.

              • Name (string) --

                The name of the database resource. Unique to the Data Catalog.

            • Table (dict) --

              The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

              • CatalogId (string) --

                The identifier for the Data Catalog. By default, it is the account ID of the caller.

              • DatabaseName (string) --

                The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

              • Name (string) --

                The name of the table.

              • TableWildcard (dict) --

                A wildcard object representing every table under a database.

                At least one of TableResource$Name or TableResource$TableWildcard is required.

            • TableWithColumns (dict) --

              The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

              • CatalogId (string) --

                The identifier for the Data Catalog. By default, it is the account ID of the caller.

              • DatabaseName (string) --

                The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

              • Name (string) --

                The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

              • ColumnNames (list) --

                The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

                • (string) --
              • ColumnWildcard (dict) --

                A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

                • ExcludedColumnNames (list) --

                  Excludes column names. Any column with this name will be excluded.

                  • (string) --
            • DataLocation (dict) --

              The location of an Amazon S3 path where permissions are granted or revoked.

              • CatalogId (string) --

                The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

              • ResourceArn (string) --

                The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

            • LFTag (dict) --

              The tag key and values attached to a resource.

              • CatalogId (string) --

                The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

              • TagKey (string) --

                The key-name for the tag.

              • TagValues (list) --

                A list of possible values an attribute can take.

                • (string) --
            • LFTagPolicy (dict) --

              A list of tag conditions that define a resource's tag policy.

              • CatalogId (string) --

                The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

              • ResourceType (string) --

                The resource type for which the tag policy applies.

              • Expression (list) --

                A list of tag conditions that apply to the resource's tag policy.

                • (dict) --

                  A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

                  • TagKey (string) --

                    The key-name for the tag.

                  • TagValues (list) --

                    A list of possible values an attribute can take.

                    • (string) --
          • Permissions (list) --

            The permissions to be granted.

            • (string) --
          • PermissionsWithGrantOption (list) --

            Indicates if the option to pass permissions is granted.

            • (string) --
        • Error (dict) --

          An error message that applies to the failure of the entry.

          • ErrorCode (string) --

            The code associated with this error.

          • ErrorMessage (string) --

            A message describing the error.

Exceptions

  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.OperationTimeoutException
can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_lf_tag(**kwargs)

Creates a tag with the specified name and values.

See also: AWS API Documentation

Request Syntax

response = client.create_lf_tag(
    CatalogId='string',
    TagKey='string',
    TagValues=[
        'string',
    ]
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • TagKey (string) --

    [REQUIRED]

    The key-name for the tag.

  • TagValues (list) --

    [REQUIRED]

    A list of possible values an attribute can take.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.ResourceNumberLimitExceededException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.AccessDeniedException
delete_lf_tag(**kwargs)

Deletes the specified tag key name. If the attribute key does not exist or the tag does not exist, then the operation will not do anything. If the attribute key exists, then the operation checks if any resources are tagged with this attribute key, if yes, the API throws a 400 Exception with the message "Delete not allowed" as the tag key is still attached with resources. You can consider untagging resources with this tag key.

See also: AWS API Documentation

Request Syntax

response = client.delete_lf_tag(
    CatalogId='string',
    TagKey='string'
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • TagKey (string) --

    [REQUIRED]

    The key-name for the tag to delete.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.AccessDeniedException
deregister_resource(**kwargs)

Deregisters the resource as managed by the Data Catalog.

When you deregister a path, Lake Formation removes the path from the inline policy attached to your service-linked role.

See also: AWS API Documentation

Request Syntax

response = client.deregister_resource(
    ResourceArn='string'
)
Parameters
ResourceArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the resource that you want to deregister.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.EntityNotFoundException
describe_resource(**kwargs)

Retrieves the current data access role for the given resource registered in AWS Lake Formation.

See also: AWS API Documentation

Request Syntax

response = client.describe_resource(
    ResourceArn='string'
)
Parameters
ResourceArn (string) --

[REQUIRED]

The resource ARN.

Return type
dict
Returns
Response Syntax
{
    'ResourceInfo': {
        'ResourceArn': 'string',
        'RoleArn': 'string',
        'LastModified': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --
    • ResourceInfo (dict) --

      A structure containing information about an AWS Lake Formation resource.

      • ResourceArn (string) --

        The Amazon Resource Name (ARN) of the resource.

      • RoleArn (string) --

        The IAM role that registered a resource.

      • LastModified (datetime) --

        The date and time the resource was last modified.

Exceptions

  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.EntityNotFoundException
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_data_lake_settings(**kwargs)

Retrieves the list of the data lake administrators of a Lake Formation-managed data lake.

See also: AWS API Documentation

Request Syntax

response = client.get_data_lake_settings(
    CatalogId='string'
)
Parameters
CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
Return type
dict
Returns
Response Syntax
{
    'DataLakeSettings': {
        'DataLakeAdmins': [
            {
                'DataLakePrincipalIdentifier': 'string'
            },
        ],
        'CreateDatabaseDefaultPermissions': [
            {
                'Principal': {
                    'DataLakePrincipalIdentifier': 'string'
                },
                'Permissions': [
                    'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
                ]
            },
        ],
        'CreateTableDefaultPermissions': [
            {
                'Principal': {
                    'DataLakePrincipalIdentifier': 'string'
                },
                'Permissions': [
                    'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
                ]
            },
        ],
        'TrustedResourceOwners': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --
    • DataLakeSettings (dict) --

      A structure representing a list of AWS Lake Formation principals designated as data lake administrators.

      • DataLakeAdmins (list) --

        A list of AWS Lake Formation principals. Supported principals are IAM users or IAM roles.

        • (dict) --

          The AWS Lake Formation principal. Supported principals are IAM users or IAM roles.

          • DataLakePrincipalIdentifier (string) --

            An identifier for the AWS Lake Formation principal.

      • CreateDatabaseDefaultPermissions (list) --

        A structure representing a list of up to three principal permissions entries for default create database permissions.

        • (dict) --

          Permissions granted to a principal.

          • Principal (dict) --

            The principal who is granted permissions.

            • DataLakePrincipalIdentifier (string) --

              An identifier for the AWS Lake Formation principal.

          • Permissions (list) --

            The permissions that are granted to the principal.

            • (string) --
      • CreateTableDefaultPermissions (list) --

        A structure representing a list of up to three principal permissions entries for default create table permissions.

        • (dict) --

          Permissions granted to a principal.

          • Principal (dict) --

            The principal who is granted permissions.

            • DataLakePrincipalIdentifier (string) --

              An identifier for the AWS Lake Formation principal.

          • Permissions (list) --

            The permissions that are granted to the principal.

            • (string) --
      • TrustedResourceOwners (list) --

        A list of the resource-owning account IDs that the caller's account can use to share their user access details (user ARNs). The user ARNs can be logged in the resource owner's AWS CloudTrail log.

        You may want to specify this property when you are in a high-trust boundary, such as the same team or company.

        • (string) --

Exceptions

  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.EntityNotFoundException
get_effective_permissions_for_path(**kwargs)

Returns the Lake Formation permissions for a specified table or database resource located at a path in Amazon S3. GetEffectivePermissionsForPath will not return databases and tables if the catalog is encrypted.

See also: AWS API Documentation

Request Syntax

response = client.get_effective_permissions_for_path(
    CatalogId='string',
    ResourceArn='string',
    NextToken='string',
    MaxResults=123
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource for which you want to get permissions.

  • NextToken (string) -- A continuation token, if this is not the first call to retrieve this list.
  • MaxResults (integer) -- The maximum number of results to return.
Return type

dict

Returns

Response Syntax

{
    'Permissions': [
        {
            'Principal': {
                'DataLakePrincipalIdentifier': 'string'
            },
            'Resource': {
                'Catalog': {},
                'Database': {
                    'CatalogId': 'string',
                    'Name': 'string'
                },
                'Table': {
                    'CatalogId': 'string',
                    'DatabaseName': 'string',
                    'Name': 'string',
                    'TableWildcard': {}
                },
                'TableWithColumns': {
                    'CatalogId': 'string',
                    'DatabaseName': 'string',
                    'Name': 'string',
                    'ColumnNames': [
                        'string',
                    ],
                    'ColumnWildcard': {
                        'ExcludedColumnNames': [
                            'string',
                        ]
                    }
                },
                'DataLocation': {
                    'CatalogId': 'string',
                    'ResourceArn': 'string'
                },
                'LFTag': {
                    'CatalogId': 'string',
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
                'LFTagPolicy': {
                    'CatalogId': 'string',
                    'ResourceType': 'DATABASE'|'TABLE',
                    'Expression': [
                        {
                            'TagKey': 'string',
                            'TagValues': [
                                'string',
                            ]
                        },
                    ]
                }
            },
            'Permissions': [
                'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
            ],
            'PermissionsWithGrantOption': [
                'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
            ],
            'AdditionalDetails': {
                'ResourceShare': [
                    'string',
                ]
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Permissions (list) --

      A list of the permissions for the specified table or database resource located at the path in Amazon S3.

      • (dict) --

        The permissions granted or revoked on a resource.

        • Principal (dict) --

          The Data Lake principal to be granted or revoked permissions.

          • DataLakePrincipalIdentifier (string) --

            An identifier for the AWS Lake Formation principal.

        • Resource (dict) --

          The resource where permissions are to be granted or revoked.

          • Catalog (dict) --

            The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

          • Database (dict) --

            The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, it is the account ID of the caller.

            • Name (string) --

              The name of the database resource. Unique to the Data Catalog.

          • Table (dict) --

            The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, it is the account ID of the caller.

            • DatabaseName (string) --

              The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

            • Name (string) --

              The name of the table.

            • TableWildcard (dict) --

              A wildcard object representing every table under a database.

              At least one of TableResource$Name or TableResource$TableWildcard is required.

          • TableWithColumns (dict) --

            The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, it is the account ID of the caller.

            • DatabaseName (string) --

              The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

            • Name (string) --

              The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

            • ColumnNames (list) --

              The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

              • (string) --
            • ColumnWildcard (dict) --

              A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

              • ExcludedColumnNames (list) --

                Excludes column names. Any column with this name will be excluded.

                • (string) --
          • DataLocation (dict) --

            The location of an Amazon S3 path where permissions are granted or revoked.

            • CatalogId (string) --

              The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

            • ResourceArn (string) --

              The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

          • LFTag (dict) --

            The tag key and values attached to a resource.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

            • TagKey (string) --

              The key-name for the tag.

            • TagValues (list) --

              A list of possible values an attribute can take.

              • (string) --
          • LFTagPolicy (dict) --

            A list of tag conditions that define a resource's tag policy.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

            • ResourceType (string) --

              The resource type for which the tag policy applies.

            • Expression (list) --

              A list of tag conditions that apply to the resource's tag policy.

              • (dict) --

                A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

                • TagKey (string) --

                  The key-name for the tag.

                • TagValues (list) --

                  A list of possible values an attribute can take.

                  • (string) --
        • Permissions (list) --

          The permissions to be granted or revoked on the resource.

          • (string) --
        • PermissionsWithGrantOption (list) --

          Indicates whether to grant the ability to grant permissions (as a subset of permissions granted).

          • (string) --
        • AdditionalDetails (dict) --

          This attribute can be used to return any additional details of PrincipalResourcePermissions . Currently returns only as a RAM resource share ARN.

          • ResourceShare (list) --

            A resource share ARN for a catalog resource shared through AWS Resource Access Manager (AWS RAM).

            • (string) --
    • NextToken (string) --

      A continuation token, if this is not the first call to retrieve this list.

Exceptions

  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.InternalServiceException
get_lf_tag(**kwargs)

Returns a tag definition.

See also: AWS API Documentation

Request Syntax

response = client.get_lf_tag(
    CatalogId='string',
    TagKey='string'
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • TagKey (string) --

    [REQUIRED]

    The key-name for the tag.

Return type

dict

Returns

Response Syntax

{
    'CatalogId': 'string',
    'TagKey': 'string',
    'TagValues': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • CatalogId (string) --

      The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

    • TagKey (string) --

      The key-name for the tag.

    • TagValues (list) --

      A list of possible values an attribute can take.

      • (string) --

Exceptions

  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.AccessDeniedException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_resource_lf_tags(**kwargs)

Returns the tags applied to a resource.

See also: AWS API Documentation

Request Syntax

response = client.get_resource_lf_tags(
    CatalogId='string',
    Resource={
        'Catalog': {}
        ,
        'Database': {
            'CatalogId': 'string',
            'Name': 'string'
        },
        'Table': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'TableWildcard': {}

        },
        'TableWithColumns': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'ColumnNames': [
                'string',
            ],
            'ColumnWildcard': {
                'ExcludedColumnNames': [
                    'string',
                ]
            }
        },
        'DataLocation': {
            'CatalogId': 'string',
            'ResourceArn': 'string'
        },
        'LFTag': {
            'CatalogId': 'string',
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
        'LFTagPolicy': {
            'CatalogId': 'string',
            'ResourceType': 'DATABASE'|'TABLE',
            'Expression': [
                {
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
            ]
        }
    },
    ShowAssignedLFTags=True|False
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • Resource (dict) --

    [REQUIRED]

    The resource for which you want to return tags.

    • Catalog (dict) --

      The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

    • Database (dict) --

      The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • Name (string) -- [REQUIRED]

        The name of the database resource. Unique to the Data Catalog.

    • Table (dict) --

      The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) --

        The name of the table.

      • TableWildcard (dict) --

        A wildcard object representing every table under a database.

        At least one of TableResource$Name or TableResource$TableWildcard is required.

    • TableWithColumns (dict) --

      The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) -- [REQUIRED]

        The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • ColumnNames (list) --

        The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

        • (string) --
      • ColumnWildcard (dict) --

        A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

        • ExcludedColumnNames (list) --

          Excludes column names. Any column with this name will be excluded.

          • (string) --
    • DataLocation (dict) --

      The location of an Amazon S3 path where permissions are granted or revoked.

      • CatalogId (string) --

        The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

      • ResourceArn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

    • LFTag (dict) --

      The tag key and values attached to a resource.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • TagKey (string) -- [REQUIRED]

        The key-name for the tag.

      • TagValues (list) -- [REQUIRED]

        A list of possible values an attribute can take.

        • (string) --
    • LFTagPolicy (dict) --

      A list of tag conditions that define a resource's tag policy.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • ResourceType (string) -- [REQUIRED]

        The resource type for which the tag policy applies.

      • Expression (list) -- [REQUIRED]

        A list of tag conditions that apply to the resource's tag policy.

        • (dict) --

          A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

          • TagKey (string) -- [REQUIRED]

            The key-name for the tag.

          • TagValues (list) -- [REQUIRED]

            A list of possible values an attribute can take.

            • (string) --
  • ShowAssignedLFTags (boolean) -- Indicates whether to show the assigned tags.
Return type

dict

Returns

Response Syntax

{
    'LFTagOnDatabase': [
        {
            'CatalogId': 'string',
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
    ],
    'LFTagsOnTable': [
        {
            'CatalogId': 'string',
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
    ],
    'LFTagsOnColumns': [
        {
            'Name': 'string',
            'LFTags': [
                {
                    'CatalogId': 'string',
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • LFTagOnDatabase (list) --

      A list of tags applied to a database resource.

      • (dict) --

        A structure containing a tag key-value pair.

        • CatalogId (string) --

          The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

        • TagKey (string) --

          The key-name for the tag.

        • TagValues (list) --

          A list of possible values an attribute can take.

          • (string) --
    • LFTagsOnTable (list) --

      A list of tags applied to a table resource.

      • (dict) --

        A structure containing a tag key-value pair.

        • CatalogId (string) --

          The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

        • TagKey (string) --

          The key-name for the tag.

        • TagValues (list) --

          A list of possible values an attribute can take.

          • (string) --
    • LFTagsOnColumns (list) --

      A list of tags applied to a column resource.

      • (dict) --

        A structure containing the name of a column resource and the tags attached to it.

        • Name (string) --

          The name of a column resource.

        • LFTags (list) --

          The tags attached to a column resource.

          • (dict) --

            A structure containing a tag key-value pair.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

            • TagKey (string) --

              The key-name for the tag.

            • TagValues (list) --

              A list of possible values an attribute can take.

              • (string) --

Exceptions

  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.GlueEncryptionException
  • LakeFormation.Client.exceptions.AccessDeniedException
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
grant_permissions(**kwargs)

Grants permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3.

For information about permissions, see Security and Access Control to Metadata and Data .

See also: AWS API Documentation

Request Syntax

response = client.grant_permissions(
    CatalogId='string',
    Principal={
        'DataLakePrincipalIdentifier': 'string'
    },
    Resource={
        'Catalog': {}
        ,
        'Database': {
            'CatalogId': 'string',
            'Name': 'string'
        },
        'Table': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'TableWildcard': {}

        },
        'TableWithColumns': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'ColumnNames': [
                'string',
            ],
            'ColumnWildcard': {
                'ExcludedColumnNames': [
                    'string',
                ]
            }
        },
        'DataLocation': {
            'CatalogId': 'string',
            'ResourceArn': 'string'
        },
        'LFTag': {
            'CatalogId': 'string',
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
        'LFTagPolicy': {
            'CatalogId': 'string',
            'ResourceType': 'DATABASE'|'TABLE',
            'Expression': [
                {
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
            ]
        }
    },
    Permissions=[
        'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
    ],
    PermissionsWithGrantOption=[
        'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
    ]
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • Principal (dict) --

    [REQUIRED]

    The principal to be granted the permissions on the resource. Supported principals are IAM users or IAM roles, and they are defined by their principal type and their ARN.

    Note that if you define a resource with a particular ARN, then later delete, and recreate a resource with that same ARN, the resource maintains the permissions already granted.

    • DataLakePrincipalIdentifier (string) --

      An identifier for the AWS Lake Formation principal.

  • Resource (dict) --

    [REQUIRED]

    The resource to which permissions are to be granted. Resources in AWS Lake Formation are the Data Catalog, databases, and tables.

    • Catalog (dict) --

      The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

    • Database (dict) --

      The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • Name (string) -- [REQUIRED]

        The name of the database resource. Unique to the Data Catalog.

    • Table (dict) --

      The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) --

        The name of the table.

      • TableWildcard (dict) --

        A wildcard object representing every table under a database.

        At least one of TableResource$Name or TableResource$TableWildcard is required.

    • TableWithColumns (dict) --

      The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) -- [REQUIRED]

        The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • ColumnNames (list) --

        The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

        • (string) --
      • ColumnWildcard (dict) --

        A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

        • ExcludedColumnNames (list) --

          Excludes column names. Any column with this name will be excluded.

          • (string) --
    • DataLocation (dict) --

      The location of an Amazon S3 path where permissions are granted or revoked.

      • CatalogId (string) --

        The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

      • ResourceArn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

    • LFTag (dict) --

      The tag key and values attached to a resource.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • TagKey (string) -- [REQUIRED]

        The key-name for the tag.

      • TagValues (list) -- [REQUIRED]

        A list of possible values an attribute can take.

        • (string) --
    • LFTagPolicy (dict) --

      A list of tag conditions that define a resource's tag policy.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • ResourceType (string) -- [REQUIRED]

        The resource type for which the tag policy applies.

      • Expression (list) -- [REQUIRED]

        A list of tag conditions that apply to the resource's tag policy.

        • (dict) --

          A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

          • TagKey (string) -- [REQUIRED]

            The key-name for the tag.

          • TagValues (list) -- [REQUIRED]

            A list of possible values an attribute can take.

            • (string) --
  • Permissions (list) --

    [REQUIRED]

    The permissions granted to the principal on the resource. AWS Lake Formation defines privileges to grant and revoke access to metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3. AWS Lake Formation requires that each principal be authorized to perform a specific task on AWS Lake Formation resources.

    • (string) --
  • PermissionsWithGrantOption (list) --

    Indicates a list of the granted permissions that the principal may pass to other users. These permissions may only be a subset of the permissions granted in the Privileges .

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • LakeFormation.Client.exceptions.ConcurrentModificationException
  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InvalidInputException
list_lf_tags(**kwargs)

Lists tags that the requester has permission to view.

See also: AWS API Documentation

Request Syntax

response = client.list_lf_tags(
    CatalogId='string',
    ResourceShareType='FOREIGN'|'ALL',
    MaxResults=123,
    NextToken='string'
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • ResourceShareType (string) -- If resource share type is ALL , returns both in-account tags and shared tags that the requester has permission to view. If resource share type is FOREIGN , returns all share tags that the requester can view. If no resource share type is passed, lists tags in the given catalog ID that the requester has permission to view.
  • MaxResults (integer) -- The maximum number of results to return.
  • NextToken (string) -- A continuation token, if this is not the first call to retrieve this list.
Return type

dict

Returns

Response Syntax

{
    'LFTags': [
        {
            'CatalogId': 'string',
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • LFTags (list) --

      A list of tags that the requested has permission to view.

      • (dict) --

        A structure containing a tag key-value pair.

        • CatalogId (string) --

          The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

        • TagKey (string) --

          The key-name for the tag.

        • TagValues (list) --

          A list of possible values an attribute can take.

          • (string) --
    • NextToken (string) --

      A continuation token, present if the current list segment is not the last.

Exceptions

  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
list_permissions(**kwargs)

Returns a list of the principal permissions on the resource, filtered by the permissions of the caller. For example, if you are granted an ALTER permission, you are able to see only the principal permissions for ALTER.

This operation returns only those permissions that have been explicitly granted.

For information about permissions, see Security and Access Control to Metadata and Data .

See also: AWS API Documentation

Request Syntax

response = client.list_permissions(
    CatalogId='string',
    Principal={
        'DataLakePrincipalIdentifier': 'string'
    },
    ResourceType='CATALOG'|'DATABASE'|'TABLE'|'DATA_LOCATION'|'LF_TAG'|'LF_TAG_POLICY'|'LF_TAG_POLICY_DATABASE'|'LF_TAG_POLICY_TABLE',
    Resource={
        'Catalog': {}
        ,
        'Database': {
            'CatalogId': 'string',
            'Name': 'string'
        },
        'Table': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'TableWildcard': {}

        },
        'TableWithColumns': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'ColumnNames': [
                'string',
            ],
            'ColumnWildcard': {
                'ExcludedColumnNames': [
                    'string',
                ]
            }
        },
        'DataLocation': {
            'CatalogId': 'string',
            'ResourceArn': 'string'
        },
        'LFTag': {
            'CatalogId': 'string',
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
        'LFTagPolicy': {
            'CatalogId': 'string',
            'ResourceType': 'DATABASE'|'TABLE',
            'Expression': [
                {
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
            ]
        }
    },
    NextToken='string',
    MaxResults=123
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • Principal (dict) --

    Specifies a principal to filter the permissions returned.

    • DataLakePrincipalIdentifier (string) --

      An identifier for the AWS Lake Formation principal.

  • ResourceType (string) -- Specifies a resource type to filter the permissions returned.
  • Resource (dict) --

    A resource where you will get a list of the principal permissions.

    This operation does not support getting privileges on a table with columns. Instead, call this operation on the table, and the operation returns the table and the table w columns.

    • Catalog (dict) --

      The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

    • Database (dict) --

      The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • Name (string) -- [REQUIRED]

        The name of the database resource. Unique to the Data Catalog.

    • Table (dict) --

      The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) --

        The name of the table.

      • TableWildcard (dict) --

        A wildcard object representing every table under a database.

        At least one of TableResource$Name or TableResource$TableWildcard is required.

    • TableWithColumns (dict) --

      The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) -- [REQUIRED]

        The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • ColumnNames (list) --

        The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

        • (string) --
      • ColumnWildcard (dict) --

        A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

        • ExcludedColumnNames (list) --

          Excludes column names. Any column with this name will be excluded.

          • (string) --
    • DataLocation (dict) --

      The location of an Amazon S3 path where permissions are granted or revoked.

      • CatalogId (string) --

        The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

      • ResourceArn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

    • LFTag (dict) --

      The tag key and values attached to a resource.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • TagKey (string) -- [REQUIRED]

        The key-name for the tag.

      • TagValues (list) -- [REQUIRED]

        A list of possible values an attribute can take.

        • (string) --
    • LFTagPolicy (dict) --

      A list of tag conditions that define a resource's tag policy.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • ResourceType (string) -- [REQUIRED]

        The resource type for which the tag policy applies.

      • Expression (list) -- [REQUIRED]

        A list of tag conditions that apply to the resource's tag policy.

        • (dict) --

          A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

          • TagKey (string) -- [REQUIRED]

            The key-name for the tag.

          • TagValues (list) -- [REQUIRED]

            A list of possible values an attribute can take.

            • (string) --
  • NextToken (string) -- A continuation token, if this is not the first call to retrieve this list.
  • MaxResults (integer) -- The maximum number of results to return.
Return type

dict

Returns

Response Syntax

{
    'PrincipalResourcePermissions': [
        {
            'Principal': {
                'DataLakePrincipalIdentifier': 'string'
            },
            'Resource': {
                'Catalog': {},
                'Database': {
                    'CatalogId': 'string',
                    'Name': 'string'
                },
                'Table': {
                    'CatalogId': 'string',
                    'DatabaseName': 'string',
                    'Name': 'string',
                    'TableWildcard': {}
                },
                'TableWithColumns': {
                    'CatalogId': 'string',
                    'DatabaseName': 'string',
                    'Name': 'string',
                    'ColumnNames': [
                        'string',
                    ],
                    'ColumnWildcard': {
                        'ExcludedColumnNames': [
                            'string',
                        ]
                    }
                },
                'DataLocation': {
                    'CatalogId': 'string',
                    'ResourceArn': 'string'
                },
                'LFTag': {
                    'CatalogId': 'string',
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
                'LFTagPolicy': {
                    'CatalogId': 'string',
                    'ResourceType': 'DATABASE'|'TABLE',
                    'Expression': [
                        {
                            'TagKey': 'string',
                            'TagValues': [
                                'string',
                            ]
                        },
                    ]
                }
            },
            'Permissions': [
                'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
            ],
            'PermissionsWithGrantOption': [
                'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
            ],
            'AdditionalDetails': {
                'ResourceShare': [
                    'string',
                ]
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • PrincipalResourcePermissions (list) --

      A list of principals and their permissions on the resource for the specified principal and resource types.

      • (dict) --

        The permissions granted or revoked on a resource.

        • Principal (dict) --

          The Data Lake principal to be granted or revoked permissions.

          • DataLakePrincipalIdentifier (string) --

            An identifier for the AWS Lake Formation principal.

        • Resource (dict) --

          The resource where permissions are to be granted or revoked.

          • Catalog (dict) --

            The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

          • Database (dict) --

            The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, it is the account ID of the caller.

            • Name (string) --

              The name of the database resource. Unique to the Data Catalog.

          • Table (dict) --

            The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, it is the account ID of the caller.

            • DatabaseName (string) --

              The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

            • Name (string) --

              The name of the table.

            • TableWildcard (dict) --

              A wildcard object representing every table under a database.

              At least one of TableResource$Name or TableResource$TableWildcard is required.

          • TableWithColumns (dict) --

            The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, it is the account ID of the caller.

            • DatabaseName (string) --

              The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

            • Name (string) --

              The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

            • ColumnNames (list) --

              The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

              • (string) --
            • ColumnWildcard (dict) --

              A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

              • ExcludedColumnNames (list) --

                Excludes column names. Any column with this name will be excluded.

                • (string) --
          • DataLocation (dict) --

            The location of an Amazon S3 path where permissions are granted or revoked.

            • CatalogId (string) --

              The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

            • ResourceArn (string) --

              The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

          • LFTag (dict) --

            The tag key and values attached to a resource.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

            • TagKey (string) --

              The key-name for the tag.

            • TagValues (list) --

              A list of possible values an attribute can take.

              • (string) --
          • LFTagPolicy (dict) --

            A list of tag conditions that define a resource's tag policy.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

            • ResourceType (string) --

              The resource type for which the tag policy applies.

            • Expression (list) --

              A list of tag conditions that apply to the resource's tag policy.

              • (dict) --

                A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

                • TagKey (string) --

                  The key-name for the tag.

                • TagValues (list) --

                  A list of possible values an attribute can take.

                  • (string) --
        • Permissions (list) --

          The permissions to be granted or revoked on the resource.

          • (string) --
        • PermissionsWithGrantOption (list) --

          Indicates whether to grant the ability to grant permissions (as a subset of permissions granted).

          • (string) --
        • AdditionalDetails (dict) --

          This attribute can be used to return any additional details of PrincipalResourcePermissions . Currently returns only as a RAM resource share ARN.

          • ResourceShare (list) --

            A resource share ARN for a catalog resource shared through AWS Resource Access Manager (AWS RAM).

            • (string) --
    • NextToken (string) --

      A continuation token, if this is not the first call to retrieve this list.

Exceptions

  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.InternalServiceException
list_resources(**kwargs)

Lists the resources registered to be managed by the Data Catalog.

See also: AWS API Documentation

Request Syntax

response = client.list_resources(
    FilterConditionList=[
        {
            'Field': 'RESOURCE_ARN'|'ROLE_ARN'|'LAST_MODIFIED',
            'ComparisonOperator': 'EQ'|'NE'|'LE'|'LT'|'GE'|'GT'|'CONTAINS'|'NOT_CONTAINS'|'BEGINS_WITH'|'IN'|'BETWEEN',
            'StringValueList': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • FilterConditionList (list) --

    Any applicable row-level and/or column-level filtering conditions for the resources.

    • (dict) --

      This structure describes the filtering of columns in a table based on a filter condition.

      • Field (string) --

        The field to filter in the filter condition.

      • ComparisonOperator (string) --

        The comparison operator used in the filter condition.

      • StringValueList (list) --

        A string with values used in evaluating the filter condition.

        • (string) --
  • MaxResults (integer) -- The maximum number of resource results.
  • NextToken (string) -- A continuation token, if this is not the first call to retrieve these resources.
Return type

dict

Returns

Response Syntax

{
    'ResourceInfoList': [
        {
            'ResourceArn': 'string',
            'RoleArn': 'string',
            'LastModified': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ResourceInfoList (list) --

      A summary of the data lake resources.

      • (dict) --

        A structure containing information about an AWS Lake Formation resource.

        • ResourceArn (string) --

          The Amazon Resource Name (ARN) of the resource.

        • RoleArn (string) --

          The IAM role that registered a resource.

        • LastModified (datetime) --

          The date and time the resource was last modified.

    • NextToken (string) --

      A continuation token, if this is not the first call to retrieve these resources.

Exceptions

  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
put_data_lake_settings(**kwargs)

Sets the list of data lake administrators who have admin privileges on all resources managed by Lake Formation. For more information on admin privileges, see Granting Lake Formation Permissions .

This API replaces the current list of data lake admins with the new list being passed. To add an admin, fetch the current list and add the new admin to that list and pass that list in this API.

See also: AWS API Documentation

Request Syntax

response = client.put_data_lake_settings(
    CatalogId='string',
    DataLakeSettings={
        'DataLakeAdmins': [
            {
                'DataLakePrincipalIdentifier': 'string'
            },
        ],
        'CreateDatabaseDefaultPermissions': [
            {
                'Principal': {
                    'DataLakePrincipalIdentifier': 'string'
                },
                'Permissions': [
                    'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
                ]
            },
        ],
        'CreateTableDefaultPermissions': [
            {
                'Principal': {
                    'DataLakePrincipalIdentifier': 'string'
                },
                'Permissions': [
                    'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
                ]
            },
        ],
        'TrustedResourceOwners': [
            'string',
        ]
    }
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • DataLakeSettings (dict) --

    [REQUIRED]

    A structure representing a list of AWS Lake Formation principals designated as data lake administrators.

    • DataLakeAdmins (list) --

      A list of AWS Lake Formation principals. Supported principals are IAM users or IAM roles.

      • (dict) --

        The AWS Lake Formation principal. Supported principals are IAM users or IAM roles.

        • DataLakePrincipalIdentifier (string) --

          An identifier for the AWS Lake Formation principal.

    • CreateDatabaseDefaultPermissions (list) --

      A structure representing a list of up to three principal permissions entries for default create database permissions.

      • (dict) --

        Permissions granted to a principal.

        • Principal (dict) --

          The principal who is granted permissions.

          • DataLakePrincipalIdentifier (string) --

            An identifier for the AWS Lake Formation principal.

        • Permissions (list) --

          The permissions that are granted to the principal.

          • (string) --
    • CreateTableDefaultPermissions (list) --

      A structure representing a list of up to three principal permissions entries for default create table permissions.

      • (dict) --

        Permissions granted to a principal.

        • Principal (dict) --

          The principal who is granted permissions.

          • DataLakePrincipalIdentifier (string) --

            An identifier for the AWS Lake Formation principal.

        • Permissions (list) --

          The permissions that are granted to the principal.

          • (string) --
    • TrustedResourceOwners (list) --

      A list of the resource-owning account IDs that the caller's account can use to share their user access details (user ARNs). The user ARNs can be logged in the resource owner's AWS CloudTrail log.

      You may want to specify this property when you are in a high-trust boundary, such as the same team or company.

      • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.InvalidInputException
register_resource(**kwargs)

Registers the resource as managed by the Data Catalog.

To add or update data, Lake Formation needs read/write access to the chosen Amazon S3 path. Choose a role that you know has permission to do this, or choose the AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register the first Amazon S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.

The following request registers a new location and gives AWS Lake Formation permission to use the service-linked role to access that location.

ResourceArn = arn:aws:s3:::my-bucket UseServiceLinkedRole = true

If UseServiceLinkedRole is not set to true, you must provide or set the RoleArn :

arn:aws:iam::12345:role/my-data-access-role

See also: AWS API Documentation

Request Syntax

response = client.register_resource(
    ResourceArn='string',
    UseServiceLinkedRole=True|False,
    RoleArn='string'
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource that you want to register.

  • UseServiceLinkedRole (boolean) --

    Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog. A service-linked role is a unique type of IAM role that is linked directly to Lake Formation.

    For more information, see Using Service-Linked Roles for Lake Formation .

  • RoleArn (string) -- The identifier for the role that registers the resource.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.AlreadyExistsException
remove_lf_tags_from_resource(**kwargs)

Removes a tag from the resource. Only database, table, or tableWithColumns resource are allowed. To tag columns, use the column inclusion list in tableWithColumns to specify column input.

See also: AWS API Documentation

Request Syntax

response = client.remove_lf_tags_from_resource(
    CatalogId='string',
    Resource={
        'Catalog': {}
        ,
        'Database': {
            'CatalogId': 'string',
            'Name': 'string'
        },
        'Table': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'TableWildcard': {}

        },
        'TableWithColumns': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'ColumnNames': [
                'string',
            ],
            'ColumnWildcard': {
                'ExcludedColumnNames': [
                    'string',
                ]
            }
        },
        'DataLocation': {
            'CatalogId': 'string',
            'ResourceArn': 'string'
        },
        'LFTag': {
            'CatalogId': 'string',
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
        'LFTagPolicy': {
            'CatalogId': 'string',
            'ResourceType': 'DATABASE'|'TABLE',
            'Expression': [
                {
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
            ]
        }
    },
    LFTags=[
        {
            'CatalogId': 'string',
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
    ]
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • Resource (dict) --

    [REQUIRED]

    The resource where you want to remove a tag.

    • Catalog (dict) --

      The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

    • Database (dict) --

      The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • Name (string) -- [REQUIRED]

        The name of the database resource. Unique to the Data Catalog.

    • Table (dict) --

      The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) --

        The name of the table.

      • TableWildcard (dict) --

        A wildcard object representing every table under a database.

        At least one of TableResource$Name or TableResource$TableWildcard is required.

    • TableWithColumns (dict) --

      The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) -- [REQUIRED]

        The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • ColumnNames (list) --

        The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

        • (string) --
      • ColumnWildcard (dict) --

        A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

        • ExcludedColumnNames (list) --

          Excludes column names. Any column with this name will be excluded.

          • (string) --
    • DataLocation (dict) --

      The location of an Amazon S3 path where permissions are granted or revoked.

      • CatalogId (string) --

        The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

      • ResourceArn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

    • LFTag (dict) --

      The tag key and values attached to a resource.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • TagKey (string) -- [REQUIRED]

        The key-name for the tag.

      • TagValues (list) -- [REQUIRED]

        A list of possible values an attribute can take.

        • (string) --
    • LFTagPolicy (dict) --

      A list of tag conditions that define a resource's tag policy.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • ResourceType (string) -- [REQUIRED]

        The resource type for which the tag policy applies.

      • Expression (list) -- [REQUIRED]

        A list of tag conditions that apply to the resource's tag policy.

        • (dict) --

          A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

          • TagKey (string) -- [REQUIRED]

            The key-name for the tag.

          • TagValues (list) -- [REQUIRED]

            A list of possible values an attribute can take.

            • (string) --
  • LFTags (list) --

    [REQUIRED]

    The tags to be removed from the resource.

    • (dict) --

      A structure containing a tag key-value pair.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • TagKey (string) -- [REQUIRED]

        The key-name for the tag.

      • TagValues (list) -- [REQUIRED]

        A list of possible values an attribute can take.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'Failures': [
        {
            'LFTag': {
                'CatalogId': 'string',
                'TagKey': 'string',
                'TagValues': [
                    'string',
                ]
            },
            'Error': {
                'ErrorCode': 'string',
                'ErrorMessage': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • Failures (list) --

      A list of failures to untag a resource.

      • (dict) --

        A structure containing an error related to a TagResource or UnTagResource operation.

        • LFTag (dict) --

          The key-name of the tag.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

          • TagKey (string) --

            The key-name for the tag.

          • TagValues (list) --

            A list of possible values an attribute can take.

            • (string) --
        • Error (dict) --

          An error that occurred with the attachment or detachment of the tag.

          • ErrorCode (string) --

            The code associated with this error.

          • ErrorMessage (string) --

            A message describing the error.

Exceptions

  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.GlueEncryptionException
  • LakeFormation.Client.exceptions.AccessDeniedException
  • LakeFormation.Client.exceptions.ConcurrentModificationException
revoke_permissions(**kwargs)

Revokes permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3.

See also: AWS API Documentation

Request Syntax

response = client.revoke_permissions(
    CatalogId='string',
    Principal={
        'DataLakePrincipalIdentifier': 'string'
    },
    Resource={
        'Catalog': {}
        ,
        'Database': {
            'CatalogId': 'string',
            'Name': 'string'
        },
        'Table': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'TableWildcard': {}

        },
        'TableWithColumns': {
            'CatalogId': 'string',
            'DatabaseName': 'string',
            'Name': 'string',
            'ColumnNames': [
                'string',
            ],
            'ColumnWildcard': {
                'ExcludedColumnNames': [
                    'string',
                ]
            }
        },
        'DataLocation': {
            'CatalogId': 'string',
            'ResourceArn': 'string'
        },
        'LFTag': {
            'CatalogId': 'string',
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
        'LFTagPolicy': {
            'CatalogId': 'string',
            'ResourceType': 'DATABASE'|'TABLE',
            'Expression': [
                {
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
            ]
        }
    },
    Permissions=[
        'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
    ],
    PermissionsWithGrantOption=[
        'ALL'|'SELECT'|'ALTER'|'DROP'|'DELETE'|'INSERT'|'DESCRIBE'|'CREATE_DATABASE'|'CREATE_TABLE'|'DATA_LOCATION_ACCESS'|'CREATE_TAG'|'ALTER_TAG'|'DELETE_TAG'|'DESCRIBE_TAG'|'ASSOCIATE_TAG',
    ]
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • Principal (dict) --

    [REQUIRED]

    The principal to be revoked permissions on the resource.

    • DataLakePrincipalIdentifier (string) --

      An identifier for the AWS Lake Formation principal.

  • Resource (dict) --

    [REQUIRED]

    The resource to which permissions are to be revoked.

    • Catalog (dict) --

      The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

    • Database (dict) --

      The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • Name (string) -- [REQUIRED]

        The name of the database resource. Unique to the Data Catalog.

    • Table (dict) --

      The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) --

        The name of the table.

      • TableWildcard (dict) --

        A wildcard object representing every table under a database.

        At least one of TableResource$Name or TableResource$TableWildcard is required.

    • TableWithColumns (dict) --

      The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, it is the account ID of the caller.

      • DatabaseName (string) -- [REQUIRED]

        The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

      • Name (string) -- [REQUIRED]

        The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

      • ColumnNames (list) --

        The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.

        • (string) --
      • ColumnWildcard (dict) --

        A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.

        • ExcludedColumnNames (list) --

          Excludes column names. Any column with this name will be excluded.

          • (string) --
    • DataLocation (dict) --

      The location of an Amazon S3 path where permissions are granted or revoked.

      • CatalogId (string) --

        The identifier for the Data Catalog where the location is registered with AWS Lake Formation. By default, it is the account ID of the caller.

      • ResourceArn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) that uniquely identifies the data location resource.

    • LFTag (dict) --

      The tag key and values attached to a resource.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • TagKey (string) -- [REQUIRED]

        The key-name for the tag.

      • TagValues (list) -- [REQUIRED]

        A list of possible values an attribute can take.

        • (string) --
    • LFTagPolicy (dict) --

      A list of tag conditions that define a resource's tag policy.

      • CatalogId (string) --

        The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

      • ResourceType (string) -- [REQUIRED]

        The resource type for which the tag policy applies.

      • Expression (list) -- [REQUIRED]

        A list of tag conditions that apply to the resource's tag policy.

        • (dict) --

          A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

          • TagKey (string) -- [REQUIRED]

            The key-name for the tag.

          • TagValues (list) -- [REQUIRED]

            A list of possible values an attribute can take.

            • (string) --
  • Permissions (list) --

    [REQUIRED]

    The permissions revoked to the principal on the resource. For information about permissions, see Security and Access Control to Metadata and Data .

    • (string) --
  • PermissionsWithGrantOption (list) --

    Indicates a list of permissions for which to revoke the grant option allowing the principal to pass permissions to other principals.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • LakeFormation.Client.exceptions.ConcurrentModificationException
  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InvalidInputException
search_databases_by_lf_tags(**kwargs)

This operation allows a search on DATABASE resources by TagCondition . This operation is used by admins who want to grant user permissions on certain TagConditions . Before making a grant, the admin can use SearchDatabasesByTags to find all resources where the given TagConditions are valid to verify whether the returned resources can be shared.

See also: AWS API Documentation

Request Syntax

response = client.search_databases_by_lf_tags(
    NextToken='string',
    MaxResults=123,
    CatalogId='string',
    Expression=[
        {
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
    ]
)
Parameters
  • NextToken (string) -- A continuation token, if this is not the first call to retrieve this list.
  • MaxResults (integer) -- The maximum number of results to return.
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • Expression (list) --

    [REQUIRED]

    A list of conditions (LFTag structures) to search for in database resources.

    • (dict) --

      A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

      • TagKey (string) -- [REQUIRED]

        The key-name for the tag.

      • TagValues (list) -- [REQUIRED]

        A list of possible values an attribute can take.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'DatabaseList': [
        {
            'Database': {
                'CatalogId': 'string',
                'Name': 'string'
            },
            'LFTags': [
                {
                    'CatalogId': 'string',
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      A continuation token, present if the current list segment is not the last.

    • DatabaseList (list) --

      A list of databases that meet the tag conditions.

      • (dict) --

        A structure describing a database resource with tags.

        • Database (dict) --

          A database that has tags attached to it.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, it is the account ID of the caller.

          • Name (string) --

            The name of the database resource. Unique to the Data Catalog.

        • LFTags (list) --

          A list of tags attached to the database.

          • (dict) --

            A structure containing a tag key-value pair.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

            • TagKey (string) --

              The key-name for the tag.

            • TagValues (list) --

              A list of possible values an attribute can take.

              • (string) --

Exceptions

  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.GlueEncryptionException
  • LakeFormation.Client.exceptions.AccessDeniedException
search_tables_by_lf_tags(**kwargs)

This operation allows a search on TABLE resources by LFTag s. This will be used by admins who want to grant user permissions on certain LFTags. Before making a grant, the admin can use SearchTablesByLFTags to find all resources where the given LFTag s are valid to verify whether the returned resources can be shared.

See also: AWS API Documentation

Request Syntax

response = client.search_tables_by_lf_tags(
    NextToken='string',
    MaxResults=123,
    CatalogId='string',
    Expression=[
        {
            'TagKey': 'string',
            'TagValues': [
                'string',
            ]
        },
    ]
)
Parameters
  • NextToken (string) -- A continuation token, if this is not the first call to retrieve this list.
  • MaxResults (integer) -- The maximum number of results to return.
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • Expression (list) --

    [REQUIRED]

    A list of conditions (LFTag structures) to search for in table resources.

    • (dict) --

      A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

      • TagKey (string) -- [REQUIRED]

        The key-name for the tag.

      • TagValues (list) -- [REQUIRED]

        A list of possible values an attribute can take.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'TableList': [
        {
            'Table': {
                'CatalogId': 'string',
                'DatabaseName': 'string',
                'Name': 'string',
                'TableWildcard': {}
            },
            'LFTagOnDatabase': [
                {
                    'CatalogId': 'string',
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
            ],
            'LFTagsOnTable': [
                {
                    'CatalogId': 'string',
                    'TagKey': 'string',
                    'TagValues': [
                        'string',
                    ]
                },
            ],
            'LFTagsOnColumns': [
                {
                    'Name': 'string',
                    'LFTags': [
                        {
                            'CatalogId': 'string',
                            'TagKey': 'string',
                            'TagValues': [
                                'string',
                            ]
                        },
                    ]
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      A continuation token, present if the current list segment is not the last.

    • TableList (list) --

      A list of tables that meet the tag conditions.

      • (dict) --

        A structure describing a table resource with tags.

        • Table (dict) --

          A table that has tags attached to it.

          • CatalogId (string) --

            The identifier for the Data Catalog. By default, it is the account ID of the caller.

          • DatabaseName (string) --

            The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.

          • Name (string) --

            The name of the table.

          • TableWildcard (dict) --

            A wildcard object representing every table under a database.

            At least one of TableResource$Name or TableResource$TableWildcard is required.

        • LFTagOnDatabase (list) --

          A list of tags attached to the database where the table resides.

          • (dict) --

            A structure containing a tag key-value pair.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

            • TagKey (string) --

              The key-name for the tag.

            • TagValues (list) --

              A list of possible values an attribute can take.

              • (string) --
        • LFTagsOnTable (list) --

          A list of tags attached to the table.

          • (dict) --

            A structure containing a tag key-value pair.

            • CatalogId (string) --

              The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

            • TagKey (string) --

              The key-name for the tag.

            • TagValues (list) --

              A list of possible values an attribute can take.

              • (string) --
        • LFTagsOnColumns (list) --

          A list of tags attached to columns in the table.

          • (dict) --

            A structure containing the name of a column resource and the tags attached to it.

            • Name (string) --

              The name of a column resource.

            • LFTags (list) --

              The tags attached to a column resource.

              • (dict) --

                A structure containing a tag key-value pair.

                • CatalogId (string) --

                  The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

                • TagKey (string) --

                  The key-name for the tag.

                • TagValues (list) --

                  A list of possible values an attribute can take.

                  • (string) --

Exceptions

  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.GlueEncryptionException
  • LakeFormation.Client.exceptions.AccessDeniedException
update_lf_tag(**kwargs)

Updates the list of possible values for the specified tag key. If the tag does not exist, the operation throws an EntityNotFoundException. The values in the delete key values will be deleted from list of possible values. If any value in the delete key values is attached to a resource, then API errors out with a 400 Exception - "Update not allowed". Untag the attribute before deleting the tag key's value.

See also: AWS API Documentation

Request Syntax

response = client.update_lf_tag(
    CatalogId='string',
    TagKey='string',
    TagValuesToDelete=[
        'string',
    ],
    TagValuesToAdd=[
        'string',
    ]
)
Parameters
  • CatalogId (string) -- The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.
  • TagKey (string) --

    [REQUIRED]

    The key-name for the tag for which to add or delete values.

  • TagValuesToDelete (list) --

    A list of tag values to delete from the tag.

    • (string) --
  • TagValuesToAdd (list) --

    A list of tag values to add from the tag.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • LakeFormation.Client.exceptions.EntityNotFoundException
  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.ConcurrentModificationException
  • LakeFormation.Client.exceptions.AccessDeniedException
update_resource(**kwargs)

Updates the data access role used for vending access to the given (registered) resource in AWS Lake Formation.

See also: AWS API Documentation

Request Syntax

response = client.update_resource(
    RoleArn='string',
    ResourceArn='string'
)
Parameters
  • RoleArn (string) --

    [REQUIRED]

    The new role to use for the given resource registered in AWS Lake Formation.

  • ResourceArn (string) --

    [REQUIRED]

    The resource ARN.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • LakeFormation.Client.exceptions.InvalidInputException
  • LakeFormation.Client.exceptions.InternalServiceException
  • LakeFormation.Client.exceptions.OperationTimeoutException
  • LakeFormation.Client.exceptions.EntityNotFoundException

Paginators

The available paginators are: