Skip to main content

principal_permissions

Creates, updates, deletes or gets a principal_permission resource or lists principal_permissions in a region

Overview

Nameprincipal_permissions
TypeResource
DescriptionThe AWS::LakeFormation::PrincipalPermissions resource represents the permissions that a principal has on a GLUDC resource (such as GLUlong databases or GLUlong tables). When you create a PrincipalPermissions resource, the permissions are granted via the LFlong GrantPermissions API operation. When you delete a PrincipalPermissions resource, the permissions on principal-resource pair are revoked via the LFlong RevokePermissions API operation.
Idaws.lakeformation.principal_permissions

Fields

NameDatatypeDescription
catalogstringThe identifier for the GLUDC. By default, the account ID. The GLUDC is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
principalobjectThe principal to be granted a permission.
resourceobjectThe resource to be granted or revoked permissions.
permissionsarrayThe permissions granted or revoked.
permissions_with_grant_optionarrayIndicates the ability to grant permissions (as a subset of permissions granted).
principal_identifierstring
resource_identifierstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTPrincipal, Resource, Permissions, PermissionsWithGrantOption, region
delete_resourceDELETEdata__Identifier, region
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual principal_permission.

SELECT
region,
catalog,
principal,
resource,
permissions,
permissions_with_grant_option,
principal_identifier,
resource_identifier
FROM aws.lakeformation.principal_permissions
WHERE region = 'us-east-1' AND data__Identifier = '<PrincipalIdentifier>|<ResourceIdentifier>';

INSERT example

Use the following StackQL query and manifest file to create a new principal_permission resource, using stack-deploy.

/*+ create */
INSERT INTO aws.lakeformation.principal_permissions (
Principal,
Resource,
Permissions,
PermissionsWithGrantOption,
region
)
SELECT
'{{ Principal }}',
'{{ Resource }}',
'{{ Permissions }}',
'{{ PermissionsWithGrantOption }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.lakeformation.principal_permissions
WHERE data__Identifier = '<PrincipalIdentifier|ResourceIdentifier>'
AND region = 'us-east-1';

Permissions

To operate on the principal_permissions resource, the following permissions are required:

Create

lakeformation:GrantPermissions,
lakeformation:ListPermissions,
glue:GetTable,
glue:GetDatabase

Read

lakeformation:ListPermissions,
glue:GetTable,
glue:GetDatabase

Delete

lakeformation:RevokePermissions,
lakeformation:ListPermissions,
glue:GetTable,
glue:GetDatabase