Skip to main content

policy_grants

Creates, updates, deletes or gets a policy_grant resource or lists policy_grants in a region

Overview

Namepolicy_grants
TypeResource
DescriptionPolicy Grant in AWS DataZone is an explicit authorization assignment that allows a specific principal (user, group, or project) to perform particular actions (such as creating glossary terms, managing projects, or accessing resources) on governed resources within a certain scope (like a Domain Unit or Project). Policy Grants are essentially the mechanism by which DataZone enforces fine-grained, role-based access control beyond what is possible through AWS IAM alone.
Idawscc.datazone.policy_grants

Fields

NameDatatypeDescription
entity_typestring
policy_typestring
created_bystringSpecifies the user who created the policy grant member.
created_atstringSpecifies the timestamp at which policy grant member was created.
grant_idstringThe unique identifier of the policy grant returned by the AddPolicyGrant API
entity_identifierstring
detailobject
principalobject
domain_identifierstring
regionstringAWS region.

For more information, see AWS::DataZone::PolicyGrant.

Methods

NameAccessible byRequired Params
create_resourceINSERTDomainIdentifier, EntityIdentifier, EntityType, PolicyType, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual policy_grant.

SELECT
region,
entity_type,
policy_type,
created_by,
created_at,
grant_id,
entity_identifier,
detail,
principal,
domain_identifier
FROM awscc.datazone.policy_grants
WHERE region = 'us-east-1' AND data__Identifier = '<DomainIdentifier>|<GrantId>|<EntityIdentifier>|<EntityType>|<PolicyType>';

INSERT example

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

/*+ create */
INSERT INTO awscc.datazone.policy_grants (
EntityType,
PolicyType,
EntityIdentifier,
DomainIdentifier,
region
)
SELECT
'{{ EntityType }}',
'{{ PolicyType }}',
'{{ EntityIdentifier }}',
'{{ DomainIdentifier }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.datazone.policy_grants
WHERE data__Identifier = '<DomainIdentifier|GrantId|EntityIdentifier|EntityType|PolicyType>'
AND region = 'us-east-1';

Permissions

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

Read

datazone:ListPolicyGrants

Create

datazone:AddPolicyGrant,
datazone:ListPolicyGrants

List

datazone:ListPolicyGrants

Delete

datazone:RemovePolicyGrant,
datazone:ListPolicyGrants