Skip to main content

subscription_grants

Creates, updates, deletes, gets or lists a subscription_grants resource.

Overview

Namesubscription_grants
TypeResource
Idaws.datazone.subscription_grants

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the subscription grant. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
assetsarrayThe assets for which the subscription grant is created.
created_atstring (date-time)The timestamp of when the subscription grant is created.
created_bystringThe Amazon DataZone user who created the subscription grant.
domain_idstringThe ID of the Amazon DataZone domain in which the subscription grant exists. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>)
environment_idstringThe environment ID of the subscription grant. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
granted_entityobjectThe entity to which the subscription is granted.
statusstringThe status of the subscription grant. (PENDING, IN_PROGRESS, GRANT_FAILED, REVOKE_FAILED, GRANT_AND_REVOKE_FAILED, COMPLETED, INACCESSIBLE)
subscription_idstringThe identifier of the subscription. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
subscription_target_idstringThe subscription target ID associated with the subscription grant. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
updated_atstring (date-time)The timestamp of when the subscription grant was upated.
updated_bystringThe Amazon DataZone user who updated the subscription grant.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_subscription_grantselectdomain_identifier, identifier, regionGets the subscription grant in Amazon DataZone.
list_subscription_grantsselectdomain_identifier, regionenvironmentId, subscriptionTargetId, subscribedListingId, subscriptionId, owningProjectId, owningIamPrincipalArn, owningUserId, owningGroupId, sortBy, sortOrder, maxResults, nextTokenLists subscription grants.
create_subscription_grantinsertdomain_identifier, region, environmentIdentifier, grantedEntityCreates a subsscription grant in Amazon DataZone.
update_subscription_grant_statusupdatedomain_identifier, identifier, asset_identifier, region, statusUpdates the status of the specified subscription grant status in Amazon DataZone.
delete_subscription_grantdeletedomain_identifier, identifier, regionDeletes 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.

NameDatatypeDescription
asset_identifierstringThe identifier of the asset the subscription grant status of which is to be updated.
domain_identifierstringThe ID of the Amazon DataZone domain where the subscription grant is deleted.
identifierstringThe ID of the subscription grant that is deleted.
regionstringAWS region (default: us-east-1)
environmentIdstringThe identifier of the Amazon DataZone environment.
maxResultsintegerThe 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.
nextTokenstringWhen 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.
owningGroupIdstringThe ID of the owning group.
owningIamPrincipalArnstringThe ARN of the owning IAM principal.
owningProjectIdstringThe ID of the owning project of the subscription grants.
owningUserIdstringThe ID of the owning user.
sortBystringSpecifies the way of sorting the results of this action.
sortOrderstringSpecifies the sort order of this action.
subscribedListingIdstringThe identifier of the subscribed listing.
subscriptionIdstringThe identifier of the subscription.
subscriptionTargetIdstringThe identifier of the subscription target.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;