Skip to main content

grants

Creates, updates, deletes or gets a grant resource or lists grants in a region

Overview

Namegrants
TypeResource
DescriptionAn example resource schema demonstrating some basic constructs and validation rules.
Idaws.licensemanager.grants

Fields

NameDatatypeDescription
grant_arnstringArn of the grant.
grant_namestringName for the created Grant.
license_arnstringLicense Arn for the grant.
home_regionstringHome region for the created grant.
versionstringThe version of the grant.
allowed_operationsarray
principalsarray
statusstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERT, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all grants in a region.

SELECT
region,
grant_arn,
grant_name,
license_arn,
home_region,
version,
allowed_operations,
principals,
status
FROM aws.licensemanager.grants
WHERE region = 'us-east-1';

Gets all properties from an individual grant.

SELECT
region,
grant_arn,
grant_name,
license_arn,
home_region,
version,
allowed_operations,
principals,
status
FROM aws.licensemanager.grants
WHERE region = 'us-east-1' AND data__Identifier = '<GrantArn>';

INSERT example

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

/*+ create */
INSERT INTO aws.licensemanager.grants (
,
region
)
SELECT
'{{ }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.licensemanager.grants
WHERE data__Identifier = '<GrantArn>'
AND region = 'us-east-1';

Permissions

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

Create

license-manager:CreateGrant

Read

license-manager:GetGrant

Update

license-manager:CreateGrantVersion

Delete

license-manager:DeleteGrant

List

license-manager:ListDistributedGrants