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.
Idawscc.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.
principal_identifierstring
resource_identifierstring
regionstringAWS region.

For more information, see AWS::LakeFormation::PrincipalPermissions.

Methods

NameAccessible byRequired Params
create_resourceINSERTPrincipal, Resource, Permissions, PermissionsWithGrantOption, region
delete_resourceDELETEIdentifier, region
get_resourceSELECTIdentifier, 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 awscc.lakeformation.principal_permissions
WHERE
region = 'us-east-1' AND
Identifier = '{{ principal_identifier }}|{{ resource_identifier }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.lakeformation.principal_permissions (
Principal,
Resource,
Permissions,
PermissionsWithGrantOption,
region
)
SELECT
'{{ principal }}',
'{{ resource }}',
'{{ permissions }}',
'{{ permissions_with_grant_option }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.lakeformation.principal_permissions
WHERE
Identifier = '{{ principal_identifier }}|{{ resource_identifier }}' AND
region = 'us-east-1';

Permissions

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

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