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 LFlongGrantPermissions API operation. When you delete a PrincipalPermissions resource, the permissions on principal-resource pair are revoked via the LFlongRevokePermissions 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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.lakeformation.principal_permissions
WHERE
Identifier = '{{ principal_identifier }}|{{ resource_identifier }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

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