analysis_templates
Creates, updates, deletes or gets an analysis_template resource or lists analysis_templates in a region
Overview
| Name | analysis_templates |
| Type | Resource |
| Description | Represents a stored analysis within a collaboration |
| Id | awscc.cleanrooms.analysis_templates |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | |
collaboration_arn | string | |
collaboration_identifier | string | |
tags | array | An arbitrary set of tags (key-value pairs) for this cleanrooms analysis template. |
analysis_parameters | array | The member who can query can provide this placeholder for a literal data value in an analysis template |
analysis_template_identifier | string | |
description | string | |
membership_arn | string | |
membership_identifier | string | |
name | string | |
schema | object | |
source | object | |
source_metadata | object | |
format | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
analysis_template_identifier | string | |
membership_identifier | string | |
region | string | AWS region. |
For more information, see AWS::CleanRooms::AnalysisTemplate.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | analysis_templates | INSERT | Source, Format, Name, MembershipIdentifier, region |
delete_resource | analysis_templates | DELETE | Identifier, region |
update_resource | analysis_templates | UPDATE | Identifier, PatchDocument, region |
list_resources | analysis_templates_list_only | SELECT | region |
get_resource | analysis_templates | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual analysis_template.
SELECT
region,
arn,
collaboration_arn,
collaboration_identifier,
tags,
analysis_parameters,
analysis_template_identifier,
description,
membership_arn,
membership_identifier,
name,
schema,
source,
source_metadata,
format
FROM awscc.cleanrooms.analysis_templates
WHERE
region = 'us-east-1' AND
Identifier = '{{ analysis_template_identifier }}|{{ membership_identifier }}';
Lists all analysis_templates in a region.
SELECT
region,
analysis_template_identifier,
membership_identifier
FROM awscc.cleanrooms.analysis_templates_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new analysis_template resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.cleanrooms.analysis_templates (
MembershipIdentifier,
Name,
Source,
Format,
region
)
SELECT
'{{ membership_identifier }}',
'{{ name }}',
'{{ source }}',
'{{ format }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.cleanrooms.analysis_templates (
Tags,
AnalysisParameters,
Description,
MembershipIdentifier,
Name,
Schema,
Source,
SourceMetadata,
Format,
region
)
SELECT
'{{ tags }}',
'{{ analysis_parameters }}',
'{{ description }}',
'{{ membership_identifier }}',
'{{ name }}',
'{{ schema }}',
'{{ source }}',
'{{ source_metadata }}',
'{{ format }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: analysis_template
props:
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: analysis_parameters
value:
- default_value: '{{ default_value }}'
name: '{{ name }}'
type: '{{ type }}'
- name: description
value: '{{ description }}'
- name: membership_identifier
value: '{{ membership_identifier }}'
- name: name
value: '{{ name }}'
- name: schema
value:
referenced_tables:
- '{{ referenced_tables[0] }}'
- name: source
value: null
- name: source_metadata
value: null
- name: format
value: '{{ format }}'
UPDATE example
Use the following StackQL query and manifest file to update a analysis_template resource, using stack-deploy.
/*+ update */
UPDATE awscc.cleanrooms.analysis_templates
SET PatchDocument = string('{{ {
"Tags": tags,
"Description": description,
"SourceMetadata": source_metadata
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ analysis_template_identifier }}|{{ membership_identifier }}';
DELETE example
/*+ delete */
DELETE FROM awscc.cleanrooms.analysis_templates
WHERE
Identifier = '{{ analysis_template_identifier }}|{{ membership_identifier }}' AND
region = 'us-east-1';
Permissions
To operate on the analysis_templates resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
cleanrooms:CreateAnalysisTemplate,
cleanrooms:ListTagsForResource,
cleanrooms:TagResource,
cleanrooms:GetAnalysisTemplate,
cleanrooms:ListAnalysisTemplates,
iam:PassRole
cleanrooms:GetAnalysisTemplate,
cleanrooms:ListTagsForResource
cleanrooms:UpdateAnalysisTemplate,
cleanrooms:GetAnalysisTemplate,
cleanrooms:ListTagsForResource,
cleanrooms:TagResource,
cleanrooms:UntagResource
cleanrooms:DeleteAnalysisTemplate,
cleanrooms:GetAnalysisTemplate,
cleanrooms:ListAnalysisTemplates,
cleanrooms:ListTagsForResource,
cleanrooms:UntagResource
cleanrooms:ListAnalysisTemplates