Skip to main content

subscriptions

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

Overview

Namesubscriptions
TypeResource
Idaws.datazone.subscriptions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the subscription. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
created_atstring (date-time)The timestamp of when the subscription was created.
created_bystringThe Amazon DataZone user who created the subscription.
domain_idstringThe ID of the Amazon DataZone domain in which the subscription exists. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>)
retain_permissionsbooleanThe retain permissions of the subscription.
statusstringThe status of the subscription. (APPROVED, REVOKED, CANCELLED)
subscribed_listingobjectThe details of the published asset for which the subscription grant is created.
subscribed_principalobjectThe principal that has the subscription grant for the asset.
subscription_request_idstringThe ID of the subscription request. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
updated_atstring (date-time)The timestamp of when the subscription was updated.
updated_bystringThe Amazon DataZone user who updated the subscription.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_subscriptionselectdomain_identifier, identifier, regionGets a subscription in Amazon DataZone.
list_subscriptionsselectdomain_identifier, regionsubscriptionRequestIdentifier, status, subscribedListingId, owningProjectId, owningIamPrincipalArn, owningUserId, owningGroupId, approverProjectId, sortBy, sortOrder, maxResults, nextTokenLists subscriptions in Amazon DataZone.
revoke_subscriptionupdatedomain_identifier, identifier, regionRevokes a specified subscription in Amazon DataZone.
accept_subscription_requestexecdomain_identifier, identifier, regionAccepts a subscription request to a specific asset.
reject_subscription_requestexecdomain_identifier, identifier, regionRejects the specified subscription request.

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
domain_identifierstringThe identifier of the Amazon DataZone domain in which the subscription request was rejected.
identifierstringThe identifier of the subscription request that was rejected.
regionstringAWS region (default: us-east-1)
approverProjectIdstringThe identifier of the project for the subscription's approver.
maxResultsintegerThe maximum number of subscriptions to return in a single call to ListSubscriptions. When the number of subscriptions 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 ListSubscriptions to list the next set of Subscriptions.
nextTokenstringWhen the number of subscriptions 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 subscriptions, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListSubscriptions to list the next set of subscriptions.
owningGroupIdstringThe ID of the owning group.
owningIamPrincipalArnstringThe ARN of the owning IAM principal.
owningProjectIdstringThe identifier of the owning project.
owningUserIdstringThe ID of the owning user.
sortBystringSpecifies the way in which the results of this action are to be sorted.
sortOrderstringSpecifies the sort order for the results of this action.
statusstringThe status of the subscriptions that you want to list. This is not a required parameter, but if not provided, by default, Amazon DataZone returns only APPROVED subscriptions.
subscribedListingIdstringThe identifier of the subscribed listing for the subscriptions that you want to list.
subscriptionRequestIdentifierstringThe identifier of the subscription request for the subscriptions that you want to list.

SELECT examples

Gets a subscription in Amazon DataZone.

SELECT
id,
created_at,
created_by,
domain_id,
retain_permissions,
status,
subscribed_listing,
subscribed_principal,
subscription_request_id,
updated_at,
updated_by
FROM aws.datazone.subscriptions
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Revokes a specified subscription in Amazon DataZone.

UPDATE aws.datazone.subscriptions
SET
retainPermissions = {{ retainPermissions }}
WHERE
domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
id,
created_at,
created_by,
domain_id,
retain_permissions,
status,
subscribed_listing,
subscribed_principal,
subscription_request_id,
updated_at,
updated_by;

Lifecycle Methods

Accepts a subscription request to a specific asset.

EXEC aws.datazone.subscriptions.accept_subscription_request
@domain_identifier='{{ domain_identifier }}' --required,
@identifier='{{ identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"decisionComment": "{{ decisionComment }}",
"assetScopes": "{{ assetScopes }}",
"assetPermissions": "{{ assetPermissions }}"
}'
;