subscription_grants
Creates, updates, deletes, gets or lists a subscription_grants resource.
Overview
| Name | subscription_grants |
| Type | Resource |
| Id | aws.datazone.subscription_grants |
Fields
The following fields are returned by SELECT queries:
- get_subscription_grant
- list_subscription_grants
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the subscription grant. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
assets | array | The assets for which the subscription grant is created. |
created_at | string (date-time) | The timestamp of when the subscription grant is created. |
created_by | string | The Amazon DataZone user who created the subscription grant. |
domain_id | string | The ID of the Amazon DataZone domain in which the subscription grant exists. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>) |
environment_id | string | The environment ID of the subscription grant. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
granted_entity | object | The entity to which the subscription is granted. |
status | string | The status of the subscription grant. (PENDING, IN_PROGRESS, GRANT_FAILED, REVOKE_FAILED, GRANT_AND_REVOKE_FAILED, COMPLETED, INACCESSIBLE) |
subscription_id | string | The identifier of the subscription. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
subscription_target_id | string | The subscription target ID associated with the subscription grant. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
updated_at | string (date-time) | The timestamp of when the subscription grant was upated. |
updated_by | string | The Amazon DataZone user who updated the subscription grant. |
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the subscription grant. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
assets | array | The assets included in the subscription grant. |
created_at | string (date-time) | The timestamp of when a subscription grant was created. |
created_by | string | The datazone user who created the subscription grant. |
domain_id | string | The identifier of the Amazon DataZone domain in which a subscription grant exists. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>) |
environment_id | string | The environment ID of the subscription grant. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
granted_entity | object | The entity to which the subscription is granted. |
status | string | The status of the subscription grant. (PENDING, IN_PROGRESS, GRANT_FAILED, REVOKE_FAILED, GRANT_AND_REVOKE_FAILED, COMPLETED, INACCESSIBLE) |
subscription_id | string | The ID of the subscription. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
subscription_target_id | string | The identifier of the target of the subscription grant. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
updated_at | string (date-time) | The timestamp of when the subscription grant was updated. |
updated_by | string | The Amazon DataZone user who updated the subscription grant. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_subscription_grant | select | domain_identifier, identifier, region | Gets the subscription grant in Amazon DataZone. | |
list_subscription_grants | select | domain_identifier, region | environmentId, subscriptionTargetId, subscribedListingId, subscriptionId, owningProjectId, owningIamPrincipalArn, owningUserId, owningGroupId, sortBy, sortOrder, maxResults, nextToken | Lists subscription grants. |
create_subscription_grant | insert | domain_identifier, region, environmentIdentifier, grantedEntity | Creates a subsscription grant in Amazon DataZone. | |
update_subscription_grant_status | update | domain_identifier, identifier, asset_identifier, region, status | Updates the status of the specified subscription grant status in Amazon DataZone. | |
delete_subscription_grant | delete | domain_identifier, identifier, region | Deletes and subscription grant in Amazon DataZone. |
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 |
|---|---|---|
asset_identifier | string | The identifier of the asset the subscription grant status of which is to be updated. |
domain_identifier | string | The ID of the Amazon DataZone domain where the subscription grant is deleted. |
identifier | string | The ID of the subscription grant that is deleted. |
region | string | AWS region (default: us-east-1) |
environmentId | string | The identifier of the Amazon DataZone environment. |
maxResults | integer | The maximum number of subscription grants to return in a single call to ListSubscriptionGrants. When the number of subscription grants to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListSubscriptionGrants to list the next set of subscription grants. |
nextToken | string | When the number of subscription grants is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of subscription grants, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListSubscriptionGrants to list the next set of subscription grants. |
owningGroupId | string | The ID of the owning group. |
owningIamPrincipalArn | string | The ARN of the owning IAM principal. |
owningProjectId | string | The ID of the owning project of the subscription grants. |
owningUserId | string | The ID of the owning user. |
sortBy | string | Specifies the way of sorting the results of this action. |
sortOrder | string | Specifies the sort order of this action. |
subscribedListingId | string | The identifier of the subscribed listing. |
subscriptionId | string | The identifier of the subscription. |
subscriptionTargetId | string | The identifier of the subscription target. |
SELECT examples
- get_subscription_grant
- list_subscription_grants
Gets the subscription grant in Amazon DataZone.
SELECT
id,
assets,
created_at,
created_by,
domain_id,
environment_id,
granted_entity,
status,
subscription_id,
subscription_target_id,
updated_at,
updated_by
FROM aws.datazone.subscription_grants
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;
Lists subscription grants.
SELECT
id,
assets,
created_at,
created_by,
domain_id,
environment_id,
granted_entity,
status,
subscription_id,
subscription_target_id,
updated_at,
updated_by
FROM aws.datazone.subscription_grants
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND region = '{{ region }}' -- required
AND environmentId = '{{ environmentId }}'
AND subscriptionTargetId = '{{ subscriptionTargetId }}'
AND subscribedListingId = '{{ subscribedListingId }}'
AND subscriptionId = '{{ subscriptionId }}'
AND owningProjectId = '{{ owningProjectId }}'
AND owningIamPrincipalArn = '{{ owningIamPrincipalArn }}'
AND owningUserId = '{{ owningUserId }}'
AND owningGroupId = '{{ owningGroupId }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_subscription_grant
- Manifest
Creates a subsscription grant in Amazon DataZone.
INSERT INTO aws.datazone.subscription_grants (
environmentIdentifier,
subscriptionTargetIdentifier,
grantedEntity,
assetTargetNames,
clientToken,
domain_identifier,
region
)
SELECT
'{{ environmentIdentifier }}' /* required */,
'{{ subscriptionTargetIdentifier }}',
'{{ grantedEntity }}' /* required */,
'{{ assetTargetNames }}',
'{{ clientToken }}',
'{{ domain_identifier }}',
'{{ region }}'
RETURNING
id,
assets,
created_at,
created_by,
domain_id,
environment_id,
granted_entity,
status,
subscription_id,
subscription_target_id,
updated_at,
updated_by
;
# Description fields are for documentation purposes
- name: subscription_grants
props:
- name: domain_identifier
value: "{{ domain_identifier }}"
description: Required parameter for the subscription_grants resource.
- name: region
value: "{{ region }}"
description: Required parameter for the subscription_grants resource.
- name: environmentIdentifier
value: "{{ environmentIdentifier }}"
- name: subscriptionTargetIdentifier
value: "{{ subscriptionTargetIdentifier }}"
- name: grantedEntity
description: |
The details of a listing for which a subscription is to be granted.
value:
listing:
identifier: "{{ identifier }}"
revision: "{{ revision }}"
- name: assetTargetNames
value:
- assetId: "{{ assetId }}"
targetName: "{{ targetName }}"
- name: clientToken
value: "{{ clientToken }}"
UPDATE examples
- update_subscription_grant_status
Updates the status of the specified subscription grant status in Amazon DataZone.
UPDATE aws.datazone.subscription_grants
SET
status = '{{ status }}',
failureCause = '{{ failureCause }}',
targetName = '{{ targetName }}'
WHERE
domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND asset_identifier = '{{ asset_identifier }}' --required
AND region = '{{ region }}' --required
AND status = '{{ status }}' --required
RETURNING
id,
assets,
created_at,
created_by,
domain_id,
environment_id,
granted_entity,
status,
subscription_id,
subscription_target_id,
updated_at,
updated_by;
DELETE examples
- delete_subscription_grant
Deletes and subscription grant in Amazon DataZone.
DELETE FROM aws.datazone.subscription_grants
WHERE domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;