subscription_targets
Creates, updates, deletes or gets a subscription_target resource or lists subscription_targets in a region
Overview
| Name | subscription_targets |
| Type | Resource |
| Description | Subscription targets enables one to access the data to which you have subscribed in your projects. |
| Id | awscc.datazone.subscription_targets |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
applicable_asset_types | array | The asset types that can be included in the subscription target. |
authorized_principals | array | The authorized principals of the subscription target. |
created_at | string | The timestamp of when the subscription target was created. |
created_by | string | The Amazon DataZone user who created the subscription target. |
domain_id | string | The ID of the Amazon DataZone domain in which subscription target is created. |
domain_identifier | string | The ID of the Amazon DataZone domain in which subscription target would be created. |
environment_id | string | The ID of the environment in which subscription target is created. |
environment_identifier | string | The ID of the environment in which subscription target would be created. |
id | string | The ID of the subscription target. |
manage_access_role | string | The manage access role that is used to create the subscription target. |
name | string | The name of the subscription target. |
project_id | string | The identifier of the project specified in the subscription target. |
provider | string | The provider of the subscription target. |
subscription_target_config | array | The configuration of the subscription target. |
type | string | The type of the subscription target. |
updated_at | string | The timestamp of when the subscription target was updated. |
updated_by | string | The Amazon DataZone user who updated the subscription target. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
domain_id | string | The ID of the Amazon DataZone domain in which subscription target is created. |
environment_id | string | The ID of the environment in which subscription target is created. |
id | string | The ID of the subscription target. |
region | string | AWS region. |
For more information, see AWS::DataZone::SubscriptionTarget.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | subscription_targets | INSERT | ApplicableAssetTypes, AuthorizedPrincipals, DomainIdentifier, EnvironmentIdentifier, Name, SubscriptionTargetConfig, Type, region |
delete_resource | subscription_targets | DELETE | Identifier, region |
update_resource | subscription_targets | UPDATE | Identifier, PatchDocument, region |
list_resources | subscription_targets_list_only | SELECT | region |
get_resource | subscription_targets | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual subscription_target.
SELECT
region,
applicable_asset_types,
authorized_principals,
created_at,
created_by,
domain_id,
domain_identifier,
environment_id,
environment_identifier,
id,
manage_access_role,
name,
project_id,
provider,
subscription_target_config,
type,
updated_at,
updated_by
FROM awscc.datazone.subscription_targets
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_id }}|{{ environment_id }}|{{ id }}';
Lists all subscription_targets in a region.
SELECT
region,
domain_id,
environment_id,
id
FROM awscc.datazone.subscription_targets_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new subscription_target resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.datazone.subscription_targets (
ApplicableAssetTypes,
AuthorizedPrincipals,
DomainIdentifier,
EnvironmentIdentifier,
Name,
SubscriptionTargetConfig,
Type,
region
)
SELECT
'{{ applicable_asset_types }}',
'{{ authorized_principals }}',
'{{ domain_identifier }}',
'{{ environment_identifier }}',
'{{ name }}',
'{{ subscription_target_config }}',
'{{ type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.datazone.subscription_targets (
ApplicableAssetTypes,
AuthorizedPrincipals,
DomainIdentifier,
EnvironmentIdentifier,
ManageAccessRole,
Name,
Provider,
SubscriptionTargetConfig,
Type,
region
)
SELECT
'{{ applicable_asset_types }}',
'{{ authorized_principals }}',
'{{ domain_identifier }}',
'{{ environment_identifier }}',
'{{ manage_access_role }}',
'{{ name }}',
'{{ provider }}',
'{{ subscription_target_config }}',
'{{ type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: subscription_target
props:
- name: applicable_asset_types
value:
- '{{ applicable_asset_types[0] }}'
- name: authorized_principals
value:
- '{{ authorized_principals[0] }}'
- name: domain_identifier
value: '{{ domain_identifier }}'
- name: environment_identifier
value: '{{ environment_identifier }}'
- name: manage_access_role
value: '{{ manage_access_role }}'
- name: name
value: '{{ name }}'
- name: provider
value: '{{ provider }}'
- name: subscription_target_config
value:
- form_name: '{{ form_name }}'
content: '{{ content }}'
- name: type
value: '{{ type }}'
UPDATE example
Use the following StackQL query and manifest file to update a subscription_target resource, using stack-deploy.
/*+ update */
UPDATE awscc.datazone.subscription_targets
SET PatchDocument = string('{{ {
"ApplicableAssetTypes": applicable_asset_types,
"AuthorizedPrincipals": authorized_principals,
"ManageAccessRole": manage_access_role,
"Name": name,
"Provider": provider,
"SubscriptionTargetConfig": subscription_target_config
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_id }}|{{ environment_id }}|{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.datazone.subscription_targets
WHERE
Identifier = '{{ domain_id }}|{{ environment_id }}|{{ id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the subscription_targets resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
datazone:CreateSubscriptionTarget,
datazone:GetSubscriptionTarget,
iam:PassRole
datazone:GetSubscriptionTarget
datazone:UpdateSubscriptionTarget,
datazone:GetSubscriptionTarget,
iam:PassRole
datazone:DeleteSubscriptionTarget
datazone:ListSubscriptionTargets