Skip to main content

analysis_templates

Creates, updates, deletes or gets an analysis_template resource or lists analysis_templates in a region

Overview

Nameanalysis_templates
TypeResource
DescriptionRepresents a stored analysis within a collaboration
Idawscc.cleanrooms.analysis_templates

Fields

NameDatatypeDescription
arnstring
collaboration_arnstring
collaboration_identifierstring
tagsarrayAn arbitrary set of tags (key-value pairs) for this cleanrooms analysis template.
analysis_parametersarrayThe member who can query can provide this placeholder for a literal data value in an analysis template
analysis_template_identifierstring
descriptionstring
membership_arnstring
membership_identifierstring
namestring
schemaobject
sourceobject
source_metadataobject
formatstring
regionstringAWS region.

For more information, see AWS::CleanRooms::AnalysisTemplate.

Methods

NameResourceAccessible byRequired Params
create_resourceanalysis_templatesINSERTSource, Format, Name, MembershipIdentifier, region
delete_resourceanalysis_templatesDELETEIdentifier, region
update_resourceanalysis_templatesUPDATEIdentifier, PatchDocument, region
list_resourcesanalysis_templates_list_onlySELECTregion
get_resourceanalysis_templatesSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ analysis_template_identifier }}|{{ membership_identifier }}';

INSERT example

Use the following StackQL query and manifest file to create a new analysis_template resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.cleanrooms.analysis_templates (
MembershipIdentifier,
Name,
Source,
Format,
region
)
SELECT
'{{ membership_identifier }}',
'{{ name }}',
'{{ source }}',
'{{ format }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.cleanrooms.analysis_templates
WHERE
Identifier = '{{ analysis_template_identifier }}|{{ membership_identifier }}' 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:

ParameterDescription
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 analysis_templates resource, the following permissions are required:

cleanrooms:CreateAnalysisTemplate,
cleanrooms:ListTagsForResource,
cleanrooms:TagResource,
cleanrooms:GetAnalysisTemplate,
cleanrooms:ListAnalysisTemplates,
iam:PassRole