grants
Creates, updates, deletes or gets a grant
resource or lists grants
in a region
Overview
Name | grants |
Type | Resource |
Description | An example resource schema demonstrating some basic constructs and validation rules. |
Id | aws.licensemanager.grants |
Fields
Name | Datatype | Description |
---|---|---|
grant_arn | string | Arn of the grant. |
grant_name | string | Name for the created Grant. |
license_arn | string | License Arn for the grant. |
home_region | string | Home region for the created grant. |
version | string | The version of the grant. |
allowed_operations | array | |
principals | array | |
status | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | , region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.licensemanager.grants (
,
region
)
SELECT
'{{ }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.licensemanager.grants (
GrantName,
LicenseArn,
HomeRegion,
AllowedOperations,
Principals,
Status,
region
)
SELECT
'{{ GrantName }}',
'{{ LicenseArn }}',
'{{ HomeRegion }}',
'{{ AllowedOperations }}',
'{{ Principals }}',
'{{ Status }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: grant
props:
- name: GrantName
value: '{{ GrantName }}'
- name: LicenseArn
value: '{{ LicenseArn }}'
- name: HomeRegion
value: '{{ HomeRegion }}'
- name: AllowedOperations
value:
- '{{ AllowedOperations[0] }}'
- name: Principals
value:
- null
- name: Status
value: '{{ Status }}'
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