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

NameResourceAccessible byRequired Params
create_resourcepolicy_grantsINSERTDomainIdentifier, EntityIdentifier, EntityType, PolicyType, region
delete_resourcepolicy_grantsDELETEIdentifier, region
list_resourcespolicy_grants_list_onlySELECTregion
get_resourcepolicy_grantsSELECTIdentifier, 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 = '{{ region }}' AND
Identifier = '{{ domain_identifier }}|{{ grant_id }}|{{ entity_identifier }}|{{ entity_type }}|{{ policy_type }}';

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
'{{ entity_type }}',
'{{ policy_type }}',
'{{ entity_identifier }}',
'{{ domain_identifier }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.datazone.policy_grants
WHERE
Identifier = '{{ domain_identifier }}|{{ grant_id }}|{{ entity_identifier }}|{{ entity_type }}|{{ policy_type }}' 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 policy_grants resource, the following permissions are required:

datazone:ListPolicyGrants