grants
Creates, updates, deletes, gets or lists a grants resource.
Overview
| Name | grants |
| Type | Resource |
| Id | aws.license_manager.grants |
Fields
The following fields are returned by SELECT queries:
- get_grant
| Name | Datatype | Description |
|---|---|---|
grant_arn | string | Amazon Resource Name (ARN) of the grant. (pattern: <code>^arn:aws[a-zA-Z-]*:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$</code>) |
grant_name | string | Grant name. |
grant_status | string | Grant status. (PENDING_WORKFLOW, PENDING_ACCEPT, REJECTED, ACTIVE, FAILED_WORKFLOW, DELETED, PENDING_DELETE, DISABLED, WORKFLOW_COMPLETED) |
granted_operations | array | Granted operations. |
grantee_principal_arn | string | The grantee principal ARN. (pattern: <code>^arn:aws[a-zA-Z-]*:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$</code>) |
home_region | string | Home Region of the grant. |
license_arn | string | License ARN. (pattern: <code>^arn:aws[a-zA-Z-]*:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$</code>) |
options | object | The options specified for the grant. |
parent_arn | string | Parent ARN. (pattern: <code>^arn:aws[a-zA-Z-]*:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$</code>) |
status_reason | string | Grant status reason. (pattern: <code>[\s\S]+</code>) |
version | string | Grant version. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_grant | select | region | Gets detailed information about the specified grant. | |
create_grant | insert | region, ClientToken, GrantName, LicenseArn, Principals, HomeRegion, AllowedOperations | Creates a grant for the specified license. A grant shares the use of license entitlements with a specific Amazon Web Services account, an organization, or an organizational unit (OU). For more information, see Granted licenses in License Manager in the License Manager User Guide. | |
create_grant_version | insert | region, ClientToken, GrantArn | Creates a new version of the specified grant. For more information, see Granted licenses in License Manager in the License Manager User Guide. | |
delete_grant | delete | region | Deletes the specified grant. | |
accept_grant | exec | region, GrantArn | Accepts the specified grant. | |
reject_grant | exec | region, GrantArn | Rejects the specified grant. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_grant
Gets detailed information about the specified grant.
SELECT
grant_arn,
grant_name,
grant_status,
granted_operations,
grantee_principal_arn,
home_region,
license_arn,
options,
parent_arn,
status_reason,
version
FROM aws.license_manager.grants
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_grant
- create_grant_version
- Manifest
Creates a grant for the specified license. A grant shares the use of license entitlements with a specific Amazon Web Services account, an organization, or an organizational unit (OU). For more information, see Granted licenses in License Manager in the License Manager User Guide.
INSERT INTO aws.license_manager.grants (
ClientToken,
GrantName,
LicenseArn,
Principals,
HomeRegion,
AllowedOperations,
Tags,
region
)
SELECT
'{{ ClientToken }}' /* required */,
'{{ GrantName }}' /* required */,
'{{ LicenseArn }}' /* required */,
'{{ Principals }}' /* required */,
'{{ HomeRegion }}' /* required */,
'{{ AllowedOperations }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
grant_arn,
status,
version
;
Creates a new version of the specified grant. For more information, see Granted licenses in License Manager in the License Manager User Guide.
INSERT INTO aws.license_manager.grants (
ClientToken,
GrantArn,
GrantName,
AllowedOperations,
Status,
StatusReason,
SourceVersion,
Options,
region
)
SELECT
'{{ ClientToken }}' /* required */,
'{{ GrantArn }}' /* required */,
'{{ GrantName }}',
'{{ AllowedOperations }}',
'{{ Status }}',
'{{ StatusReason }}',
'{{ SourceVersion }}',
'{{ Options }}',
'{{ region }}'
RETURNING
grant_arn,
status,
version
;
# Description fields are for documentation purposes
- name: grants
props:
- name: region
value: "{{ region }}"
description: Required parameter for the grants resource.
- name: ClientToken
value: "{{ ClientToken }}"
description: |
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- name: GrantName
value: "{{ GrantName }}"
description: |
Grant name.
- name: LicenseArn
value: "{{ LicenseArn }}"
description: |
Amazon Resource Name (ARN) of the license.
- name: Principals
value:
- "{{ Principals }}"
description: |
The grant principals. You can specify one of the following as an Amazon Resource Name (ARN): An Amazon Web Services account, which includes only the account specified. An organizational unit (OU), which includes all accounts in the OU. An organization, which will include all accounts across your organization.
- name: HomeRegion
value: "{{ HomeRegion }}"
description: |
Home Region of the grant.
- name: AllowedOperations
value:
- "{{ AllowedOperations }}"
description: |
Allowed operations for the grant.
- name: Tags
description: |
Tags to add to the grant. For more information about tagging support in License Manager, see the TagResource operation.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: GrantArn
value: "{{ GrantArn }}"
description: |
Amazon Resource Name (ARN) of the grant.
- name: Status
value: "{{ Status }}"
description: |
Grant status.
valid_values: ['PENDING_WORKFLOW', 'PENDING_ACCEPT', 'REJECTED', 'ACTIVE', 'FAILED_WORKFLOW', 'DELETED', 'PENDING_DELETE', 'DISABLED', 'WORKFLOW_COMPLETED']
- name: StatusReason
value: "{{ StatusReason }}"
description: |
Grant status reason.
- name: SourceVersion
value: "{{ SourceVersion }}"
description: |
Current version of the grant.
- name: Options
description: |
The options specified for the grant.
value:
ActivationOverrideBehavior: "{{ ActivationOverrideBehavior }}"
DELETE examples
- delete_grant
Deletes the specified grant.
DELETE FROM aws.license_manager.grants
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- accept_grant
- reject_grant
Accepts the specified grant.
EXEC aws.license_manager.grants.accept_grant
@region='{{ region }}' --required
@@json=
'{
"GrantArn": "{{ GrantArn }}"
}'
;
Rejects the specified grant.
EXEC aws.license_manager.grants.reject_grant
@region='{{ region }}' --required
@@json=
'{
"GrantArn": "{{ GrantArn }}"
}'
;