Skip to content

aws.lakeformation.list_permissions

Example SQL Queries

SELECT * FROM
aws.lakeformation.list_permissions;

Description

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.

Table Definition

Column NameColumn Data Type
catalog_id Input Column

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 Lake Formation environment.

VARCHAR
include_related Input Column

Indicates that related permissions should be included in the results.

VARCHAR
max_results Input Column

The maximum number of results to return.

BIGINT
next_token Input Column

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

VARCHAR
principal Input Column

Specifies a principal to filter the permissions returned.

STRUCT(
"data_lake_principal_identifier" VARCHAR
)
Show child fields
principal.data_lake_principal_identifier

An identifier for the Lake Formation principal.

resource Input Column

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.

STRUCT(
"catalog" BOOLEAN,
"database" STRUCT(
"catalog_id" VARCHAR,
"name" VARCHAR
),
"table" STRUCT(
"catalog_id" VARCHAR,
"database_name" VARCHAR,
"name" VARCHAR,
"table_wildcard" BOOLEAN
),
"table_with_columns" STRUCT(
"catalog_id" VARCHAR,
"database_name" VARCHAR,
"name" VARCHAR,
"column_names" VARCHAR[],
"column_wildcard" STRUCT(
"excluded_column_names" VARCHAR[]
)
),
"data_location" STRUCT(
"catalog_id" VARCHAR,
"resource_arn" VARCHAR
),
"data_cells_filter" STRUCT(
"table_catalog_id" VARCHAR,
"database_name" VARCHAR,
"table_name" VARCHAR,
"name" VARCHAR
),
"lf_tag" STRUCT(
"catalog_id" VARCHAR,
"tag_key" VARCHAR,
"tag_values" VARCHAR[]
),
"lf_tag_policy" STRUCT(
"catalog_id" VARCHAR,
"resource_type" VARCHAR,
"expression" STRUCT(
"tag_key" VARCHAR,
"tag_values" VARCHAR[]
)[]
)
)
Show child fields
resource.catalog

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 Lake Formation environment.

resource.data_cells_filter

A data cell filter.

Show child fields
resource.data_cells_filter.database_name

A database in the Glue Data Catalog.

resource.data_cells_filter.name

The name of the data cells filter.

resource.data_cells_filter.table_catalog_id

The ID of the catalog to which the table belongs.

resource.data_cells_filter.table_name

The name of the table.

resource.data_location

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

Show child fields
resource.data_location.catalog_id

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

resource.data_location.resource_arn

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

resource.database

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.

Show child fields
resource.database.catalog_id

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

resource.database.name

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

resource.lf_tag

The LF-tag key and values attached to a resource.

Show child fields
resource.lf_tag.catalog_id

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 Lake Formation environment.

resource.lf_tag.tag_key

The key-name for the LF-tag.

resource.lf_tag.tag_values[]
resource.lf_tag_policy

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

Show child fields
resource.lf_tag_policy.catalog_id

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 Lake Formation environment.

resource.lf_tag_policy.expression[]
Show child fields
resource.lf_tag_policy.expression[].tag_key

The key-name for the LF-tag.

resource.lf_tag_policy.expression[].tag_values[]
resource.lf_tag_policy.resource_type

The resource type for which the LF-tag policy applies.

resource.table

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.

Show child fields
resource.table.catalog_id

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

resource.table.database_name

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.

resource.table.name

The name of the table.

resource.table.table_wildcard

A wildcard object representing every table under a database.

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

resource.table_with_columns

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.

Show child fields
resource.table_with_columns.catalog_id

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

resource.table_with_columns.column_names[]
resource.table_with_columns.column_wildcard

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

Show child fields
resource.table_with_columns.column_wildcard.excluded_column_names[]
resource.table_with_columns.database_name

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.

resource.table_with_columns.name

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.

resource_type Input Column

Specifies a resource type to filter the permissions returned.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
principal_resource_permissions

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

STRUCT(
"principal" STRUCT(
"data_lake_principal_identifier" VARCHAR
),
"resource" STRUCT(
"catalog" BOOLEAN,
"database" STRUCT(
"catalog_id" VARCHAR,
"name" VARCHAR
),
"table" STRUCT(
"catalog_id" VARCHAR,
"database_name" VARCHAR,
"name" VARCHAR,
"table_wildcard" BOOLEAN
),
"table_with_columns" STRUCT(
"catalog_id" VARCHAR,
"database_name" VARCHAR,
"name" VARCHAR,
"column_names" VARCHAR[],
"column_wildcard" STRUCT(
"excluded_column_names" VARCHAR[]
)
),
"data_location" STRUCT(
"catalog_id" VARCHAR,
"resource_arn" VARCHAR
),
"data_cells_filter" STRUCT(
"table_catalog_id" VARCHAR,
"database_name" VARCHAR,
"table_name" VARCHAR,
"name" VARCHAR
),
"lf_tag" STRUCT(
"catalog_id" VARCHAR,
"tag_key" VARCHAR,
"tag_values" VARCHAR[]
),
"lf_tag_policy" STRUCT(
"catalog_id" VARCHAR,
"resource_type" VARCHAR,
"expression" STRUCT(
"tag_key" VARCHAR,
"tag_values" VARCHAR[]
)[]
)
),
"permissions" VARCHAR[],
"permissions_with_grant_option" VARCHAR[],
"additional_details" STRUCT(
"resource_share" VARCHAR[]
),
"last_updated" TIMESTAMP_S,
"last_updated_by" VARCHAR
)[]
Show child fields
principal_resource_permissions[]
Show child fields
principal_resource_permissions[].additional_details

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

Show child fields
principal_resource_permissions[].additional_details.resource_share[]
principal_resource_permissions[].last_updated

The date and time when the resource was last updated.

principal_resource_permissions[].last_updated_by

The user who updated the record.

principal_resource_permissions[].permissions[]
principal_resource_permissions[].permissions_with_grant_option[]
principal_resource_permissions[].principal

The Data Lake principal to be granted or revoked permissions.

Show child fields
principal_resource_permissions[].principal.data_lake_principal_identifier

An identifier for the Lake Formation principal.

principal_resource_permissions[].resource

The resource where permissions are to be granted or revoked.

Show child fields
principal_resource_permissions[].resource.catalog

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 Lake Formation environment.

principal_resource_permissions[].resource.data_cells_filter

A data cell filter.

Show child fields
principal_resource_permissions[].resource.data_cells_filter.database_name

A database in the Glue Data Catalog.

principal_resource_permissions[].resource.data_cells_filter.name

The name of the data cells filter.

principal_resource_permissions[].resource.data_cells_filter.table_catalog_id

The ID of the catalog to which the table belongs.

principal_resource_permissions[].resource.data_cells_filter.table_name

The name of the table.

principal_resource_permissions[].resource.data_location

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

Show child fields
principal_resource_permissions[].resource.data_location.catalog_id

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

principal_resource_permissions[].resource.data_location.resource_arn

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

principal_resource_permissions[].resource.database

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.

Show child fields
principal_resource_permissions[].resource.database.catalog_id

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

principal_resource_permissions[].resource.database.name

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

principal_resource_permissions[].resource.lf_tag

The LF-tag key and values attached to a resource.

Show child fields
principal_resource_permissions[].resource.lf_tag.catalog_id

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 Lake Formation environment.

principal_resource_permissions[].resource.lf_tag.tag_key

The key-name for the LF-tag.

principal_resource_permissions[].resource.lf_tag.tag_values[]
principal_resource_permissions[].resource.lf_tag_policy

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

Show child fields
principal_resource_permissions[].resource.lf_tag_policy.catalog_id

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 Lake Formation environment.

principal_resource_permissions[].resource.lf_tag_policy.expression[]
Show child fields
principal_resource_permissions[].resource.lf_tag_policy.expression[].tag_key

The key-name for the LF-tag.

principal_resource_permissions[].resource.lf_tag_policy.expression[].tag_values[]
principal_resource_permissions[].resource.lf_tag_policy.resource_type

The resource type for which the LF-tag policy applies.

principal_resource_permissions[].resource.table

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.

Show child fields
principal_resource_permissions[].resource.table.catalog_id

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

principal_resource_permissions[].resource.table.database_name

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.

principal_resource_permissions[].resource.table.name

The name of the table.

principal_resource_permissions[].resource.table.table_wildcard

A wildcard object representing every table under a database.

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

principal_resource_permissions[].resource.table_with_columns

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.

Show child fields
principal_resource_permissions[].resource.table_with_columns.catalog_id

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

principal_resource_permissions[].resource.table_with_columns.column_names[]
principal_resource_permissions[].resource.table_with_columns.column_wildcard

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

Show child fields
principal_resource_permissions[].resource.table_with_columns.column_wildcard.excluded_column_names[]
principal_resource_permissions[].resource.table_with_columns.database_name

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.

principal_resource_permissions[].resource.table_with_columns.name

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.