Creates a new analysis template.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{
"Type" : "AWS::CleanRooms::AnalysisTemplate",
"Properties" : {
"AnalysisParameters" : [ AnalysisParameter, ... ]
,
"Description" : String
,
"Format" : String
,
"MembershipIdentifier" : String
,
"Name" : String
,
"Source" : AnalysisSource
,
"Tags" : [ Tag, ... ]
}
}
YAML
Type: AWS::CleanRooms::AnalysisTemplate
Properties:
AnalysisParameters:
- AnalysisParameter
Description: String
Format: String
MembershipIdentifier: String
Name: String
Source:
AnalysisSource
Tags:
- Tag
Properties
AnalysisParameters
-
The parameters of the analysis template.
Required: No
Type: Array of AnalysisParameter
Minimum:
0
Maximum:
10
Update requires: Replacement
Description
-
The description of the analysis template.
Required: No
Type: String
Pattern:
^[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*$
Maximum:
255
Update requires: No interruption
Format
-
The format of the analysis template.
Required: Yes
Type: String
Allowed values:
SQL
Update requires: Replacement
MembershipIdentifier
-
The identifier for a membership resource.
Required: Yes
Type: String
Pattern:
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Minimum:
36
Maximum:
36
Update requires: Replacement
Name
-
The name of the analysis template.
Required: Yes
Type: String
Pattern:
^[a-zA-Z0-9_](([a-zA-Z0-9_ ]+-)*([a-zA-Z0-9_ ]+))?$
Maximum:
128
Update requires: Replacement
Source
-
The source of the analysis template.
Required: Yes
Type: AnalysisSource
Update requires: Replacement
-
An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.
Required: No
Type: Array of Tag
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the AnalysisTemplateIdentifier
, such as a1b2c3d4-5678-90ab-cdef-EXAMPLE2222
. For example:
{ "Ref": "myAnalysisTemplate" }
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt
intrinsic function, see Fn::GetAtt
.
AnalysisTemplateIdentifier
-
Returns the identifier for the analysis template.
Example:
a1b2c3d4-5678-90ab-cdef-EXAMPLE2222
Arn
-
Returns the Amazon Resource Name (ARN) of the analysis template.
Example:
arn:aws:cleanrooms:us-east-1:111122223333:membership/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111/analysistemplates/a1b2c3d4-5678-90ab-cdef-EXAMPLE2222
CollaborationArn
-
Returns the unique ARN for the analysis template’s associated collaboration.
Example:
arn:aws:cleanrooms:us-east-1:111122223333:collaboration/a1b2c3d4-5678-90ab-cdef-EXAMPLE33333
CollaborationIdentifier
-
Returns the unique ID for the associated collaboration of the analysis template.
Example:
a1b2c3d4-5678-90ab-cdef-EXAMPLE33333
MembershipArn
-
Returns the Amazon Resource Name (ARN) of the member who created the analysis template.
Example:
arn:aws:cleanrooms:us-east-1:111122223333:membership/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
Examples
Create an analysis template
The following example creates an analysis template.
JSON
{
"ExampleAnalysisTemplate": {
"Type": "AWS::CleanRooms::AnalysisTemplate",
"Properties": {
"MembershipIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE1111",
"Name": "exampleAnalysisTemplate",
"Description": "example description",
"Source": {
"Text": "SELECT * FROM cta1 WHERE cta1.column1 > :Param1 AND cta1.column2 like :Param2"
},
"Format": "SQL",
"AnalysisParameters": [
{
"Name": "Param1",
"Type": "SMALLINT",
"DefaultValue": 1
},
{
"Name": "Param2",
"Type": "CHAR"
}
],
"Tags": [
{
"Key": "Hello",
"Value": "World"
}
]
}
}
}
YAML
ExampleAnalysisTemplate:
Type: 'AWS::CleanRooms::AnalysisTemplate'
Properties:
MembershipIdentifier: a1b2c3d4-5678-90ab-cdef-EXAMPLE1111
Name: exampleAnalysisTemplate
Description: example description
Source:
Text: SELECT * FROM cta1 WHERE cta1.column1 > :Param1 AND cta1.column2 like :Param2
Format: SQL
AnalysisParameters:
- Name: Param1
Type: SMALLINT
DefaultValue: 1
- Name: Param2
Type: CHAR
Tags:
- Key: Hello
Value: World