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 | aws.datazone.subscription_targets |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ApplicableAssetTypes, AuthorizedPrincipals, DomainIdentifier, EnvironmentIdentifier, ManageAccessRole, Name, SubscriptionTargetConfig, Type, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all subscription_targets
in a region.
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 aws.datazone.subscription_targets
WHERE region = 'us-east-1';
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 aws.datazone.subscription_targets
WHERE region = 'us-east-1' AND data__Identifier = '<DomainId>|<EnvironmentId>|<Id>';
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 aws.datazone.subscription_targets (
ApplicableAssetTypes,
AuthorizedPrincipals,
DomainIdentifier,
EnvironmentIdentifier,
ManageAccessRole,
Name,
SubscriptionTargetConfig,
Type,
region
)
SELECT
'{{ ApplicableAssetTypes }}',
'{{ AuthorizedPrincipals }}',
'{{ DomainIdentifier }}',
'{{ EnvironmentIdentifier }}',
'{{ ManageAccessRole }}',
'{{ Name }}',
'{{ SubscriptionTargetConfig }}',
'{{ Type }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.datazone.subscription_targets (
ApplicableAssetTypes,
AuthorizedPrincipals,
DomainIdentifier,
EnvironmentIdentifier,
ManageAccessRole,
Name,
Provider,
SubscriptionTargetConfig,
Type,
region
)
SELECT
'{{ ApplicableAssetTypes }}',
'{{ AuthorizedPrincipals }}',
'{{ DomainIdentifier }}',
'{{ EnvironmentIdentifier }}',
'{{ ManageAccessRole }}',
'{{ Name }}',
'{{ Provider }}',
'{{ SubscriptionTargetConfig }}',
'{{ Type }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: subscription_target
props:
- name: ApplicableAssetTypes
value:
- '{{ ApplicableAssetTypes[0] }}'
- name: AuthorizedPrincipals
value:
- '{{ AuthorizedPrincipals[0] }}'
- name: DomainIdentifier
value: '{{ DomainIdentifier }}'
- name: EnvironmentIdentifier
value: '{{ EnvironmentIdentifier }}'
- name: ManageAccessRole
value: '{{ ManageAccessRole }}'
- name: Name
value: '{{ Name }}'
- name: Provider
value: '{{ Provider }}'
- name: SubscriptionTargetConfig
value:
- FormName: '{{ FormName }}'
Content: '{{ Content }}'
- name: Type
value: '{{ Type }}'
DELETE
example
/*+ delete */
DELETE FROM aws.datazone.subscription_targets
WHERE data__Identifier = '<DomainId|EnvironmentId|Id>'
AND region = 'us-east-1';
Permissions
To operate on the subscription_targets
resource, the following permissions are required:
Create
datazone:CreateSubscriptionTarget,
datazone:GetSubscriptionTarget,
iam:PassRole
Read
datazone:GetSubscriptionTarget
Update
datazone:UpdateSubscriptionTarget,
datazone:GetSubscriptionTarget,
iam:PassRole
Delete
datazone:DeleteSubscriptionTarget
List
datazone:ListSubscriptionTargets