templates
Creates, updates, deletes, gets or lists a templates resource.
Overview
| Name | templates |
| Type | Resource |
| Id | aws.quicksight.templates |
Fields
The following fields are returned by SELECT queries:
- describe_template
- list_templates
| Name | Datatype | Description |
|---|---|---|
request_id | string | The Amazon Web Services request ID for this operation. |
status | integer | The HTTP status of the request. |
template | object | The template structure for the object you want to describe. |
| Name | Datatype | Description |
|---|---|---|
arn | string | A summary of a template. |
created_time | string (date-time) | The last time that this template was created. |
last_updated_time | string (date-time) | The last time that this template was updated. |
latest_version_number | integer (int64) | A structure containing a list of version numbers for the template summary. |
name | string | A display name for the template. |
template_id | string | The ID of the template. This ID is unique per Amazon Web Services Region for each Amazon Web Services account. (pattern: <code>[\w-]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_template | select | aws_account_id, template_id, region | version-number, alias-name | Describes a template's metadata. |
list_templates | select | aws_account_id, region | next-token, max-result | Lists all the templates in the current Amazon Quick Sight account. |
create_template | insert | aws_account_id, template_id, region | Creates a template either from a TemplateDefinition or from an existing Quick Sight analysis or template. You can use the resulting template to create additional dashboards, templates, or analyses. A template is an entity in Quick Sight that encapsulates the metadata required to create an analysis and that you can use to create s dashboard. A template adds a layer of abstraction by using placeholders to replace the dataset associated with the analysis. You can use templates to create dashboards by replacing dataset placeholders with datasets that follow the same schema that was used to create the source analysis and template. | |
update_template | update | aws_account_id, template_id, region | Updates a template from an existing Amazon Quick Sight analysis or another template. | |
delete_template | delete | aws_account_id, template_id, region | version-number | Deletes a template. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
aws_account_id | string | The ID of the Amazon Web Services account that contains the template that you're deleting. |
region | string | AWS region (default: us-east-1) |
template_id | string | An ID for the template you want to delete. |
alias-name | string | The alias of the template that you want to describe. If you name a specific alias, you describe the version that the alias points to. You can specify the latest version of the template by providing the keyword $LATEST in the AliasName parameter. The keyword $PUBLISHED doesn't apply to templates. |
max-result | integer | The maximum number of results to be returned per request. |
next-token | string | The token for the next set of results, or null if there are no more results. |
version-number | integer (int64) | Specifies the version of the template that you want to delete. If you don't provide a version number, DeleteTemplate deletes all versions of the template. |
SELECT examples
- describe_template
- list_templates
Describes a template's metadata.
SELECT
request_id,
status,
template
FROM aws.quicksight.templates
WHERE aws_account_id = '{{ aws_account_id }}' -- required
AND template_id = '{{ template_id }}' -- required
AND region = '{{ region }}' -- required
AND `version-number` = '{{ version-number }}'
AND `alias-name` = '{{ alias-name }}'
;
Lists all the templates in the current Amazon Quick Sight account.
SELECT
arn,
created_time,
last_updated_time,
latest_version_number,
name,
template_id
FROM aws.quicksight.templates
WHERE aws_account_id = '{{ aws_account_id }}' -- required
AND region = '{{ region }}' -- required
AND `next-token` = '{{ next-token }}'
AND `max-result` = '{{ max-result }}'
;
INSERT examples
- create_template
- Manifest
Creates a template either from a TemplateDefinition or from an existing Quick Sight analysis or template. You can use the resulting template to create additional dashboards, templates, or analyses. A template is an entity in Quick Sight that encapsulates the metadata required to create an analysis and that you can use to create s dashboard. A template adds a layer of abstraction by using placeholders to replace the dataset associated with the analysis. You can use templates to create dashboards by replacing dataset placeholders with datasets that follow the same schema that was used to create the source analysis and template.
INSERT INTO aws.quicksight.templates (
Name,
Permissions,
SourceEntity,
Tags,
VersionDescription,
Definition,
ValidationStrategy,
aws_account_id,
template_id,
region
)
SELECT
'{{ Name }}',
'{{ Permissions }}',
'{{ SourceEntity }}',
'{{ Tags }}',
'{{ VersionDescription }}',
'{{ Definition }}',
'{{ ValidationStrategy }}',
'{{ aws_account_id }}',
'{{ template_id }}',
'{{ region }}'
RETURNING
arn,
creation_status,
request_id,
status,
template_id,
version_arn
;
# Description fields are for documentation purposes
- name: templates
props:
- name: aws_account_id
value: "{{ aws_account_id }}"
description: Required parameter for the templates resource.
- name: template_id
value: "{{ template_id }}"
description: Required parameter for the templates resource.
- name: region
value: "{{ region }}"
description: Required parameter for the templates resource.
- name: Name
value: "{{ Name }}"
- name: Permissions
value:
- Principal: "{{ Principal }}"
Actions: "{{ Actions }}"
- name: SourceEntity
description: |
The source entity of the template.
value:
SourceAnalysis:
Arn: "{{ Arn }}"
DataSetReferences:
- DataSetPlaceholder: "{{ DataSetPlaceholder }}"
DataSetArn: "{{ DataSetArn }}"
TopicReferences:
- TopicPlaceholder: "{{ TopicPlaceholder }}"
TopicArn: "{{ TopicArn }}"
SourceTemplate:
Arn: "{{ Arn }}"
- name: Tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: VersionDescription
value: "{{ VersionDescription }}"
- name: Definition
description: |
The detailed definition of a template.
value:
DataSetConfigurations:
- Placeholder: "{{ Placeholder }}"
DataSetSchema:
ColumnSchemaList:
- Name: "{{ Name }}"
DataType: "{{ DataType }}"
GeographicRole: "{{ GeographicRole }}"
ColumnGroupSchemaList: "{{ ColumnGroupSchemaList }}"
TopicConfigurations:
- Placeholder: "{{ Placeholder }}"
DataSetSchema:
ColumnSchemaList:
- Name: "{{ Name }}"
DataType: "{{ DataType }}"
GeographicRole: "{{ GeographicRole }}"
ColumnGroupSchemaList: "{{ ColumnGroupSchemaList }}"
Sheets:
- SheetId: "{{ SheetId }}"
Title: "{{ Title }}"
Description: "{{ Description }}"
Name: "{{ Name }}"
ParameterControls: "{{ ParameterControls }}"
FilterControls: "{{ FilterControls }}"
Visuals: "{{ Visuals }}"
TextBoxes: "{{ TextBoxes }}"
Images: "{{ Images }}"
Layouts: "{{ Layouts }}"
SheetControlLayouts: "{{ SheetControlLayouts }}"
ContentType: "{{ ContentType }}"
CustomActionDefaults:
highlightOperation:
Trigger: "{{ Trigger }}"
TooltipSheets:
- SheetId: "{{ SheetId }}"
Name: "{{ Name }}"
Visuals: "{{ Visuals }}"
TextBoxes: "{{ TextBoxes }}"
Images: "{{ Images }}"
Layouts: "{{ Layouts }}"
CalculatedFields:
- DataSetIdentifier: "{{ DataSetIdentifier }}"
TopicIdentifier: "{{ TopicIdentifier }}"
Name: "{{ Name }}"
Expression: "{{ Expression }}"
ParameterDeclarations:
- StringParameterDeclaration:
ParameterValueType: "{{ ParameterValueType }}"
Name: "{{ Name }}"
DefaultValues:
DynamicValue:
UserNameColumn: "{{ UserNameColumn }}"
GroupNameColumn: "{{ GroupNameColumn }}"
DefaultValueColumn: "{{ DefaultValueColumn }}"
StaticValues:
- "{{ StaticValues }}"
ValueWhenUnset:
ValueWhenUnsetOption: "{{ ValueWhenUnsetOption }}"
CustomValue: "{{ CustomValue }}"
MappedDataSetParameters:
- DataSetIdentifier: "{{ DataSetIdentifier }}"
DataSetParameterName: "{{ DataSetParameterName }}"
DecimalParameterDeclaration:
ParameterValueType: "{{ ParameterValueType }}"
Name: "{{ Name }}"
DefaultValues:
DynamicValue:
UserNameColumn: "{{ UserNameColumn }}"
GroupNameColumn: "{{ GroupNameColumn }}"
DefaultValueColumn: "{{ DefaultValueColumn }}"
StaticValues:
- {{ StaticValues }}
ValueWhenUnset:
ValueWhenUnsetOption: "{{ ValueWhenUnsetOption }}"
CustomValue: {{ CustomValue }}
MappedDataSetParameters:
- DataSetIdentifier: "{{ DataSetIdentifier }}"
DataSetParameterName: "{{ DataSetParameterName }}"
IntegerParameterDeclaration:
ParameterValueType: "{{ ParameterValueType }}"
Name: "{{ Name }}"
DefaultValues:
DynamicValue:
UserNameColumn: "{{ UserNameColumn }}"
GroupNameColumn: "{{ GroupNameColumn }}"
DefaultValueColumn: "{{ DefaultValueColumn }}"
StaticValues:
- {{ StaticValues }}
ValueWhenUnset:
ValueWhenUnsetOption: "{{ ValueWhenUnsetOption }}"
CustomValue: {{ CustomValue }}
MappedDataSetParameters:
- DataSetIdentifier: "{{ DataSetIdentifier }}"
DataSetParameterName: "{{ DataSetParameterName }}"
DateTimeParameterDeclaration:
Name: "{{ Name }}"
DefaultValues:
DynamicValue:
UserNameColumn: "{{ UserNameColumn }}"
GroupNameColumn: "{{ GroupNameColumn }}"
DefaultValueColumn: "{{ DefaultValueColumn }}"
StaticValues:
- "{{ StaticValues }}"
RollingDate:
DataSetIdentifier: "{{ DataSetIdentifier }}"
Expression: "{{ Expression }}"
TimeGranularity: "{{ TimeGranularity }}"
ValueWhenUnset:
ValueWhenUnsetOption: "{{ ValueWhenUnsetOption }}"
CustomValue: "{{ CustomValue }}"
MappedDataSetParameters:
- DataSetIdentifier: "{{ DataSetIdentifier }}"
DataSetParameterName: "{{ DataSetParameterName }}"
FilterGroups:
- FilterGroupId: "{{ FilterGroupId }}"
Filters: "{{ Filters }}"
ScopeConfiguration:
SelectedSheets:
SheetVisualScopingConfigurations:
- SheetId: "{{ SheetId }}"
Scope: "{{ Scope }}"
VisualIds: "{{ VisualIds }}"
AllSheets: "{{ AllSheets }}"
Status: "{{ Status }}"
CrossDataset: "{{ CrossDataset }}"
ColumnConfigurations:
- Column:
DataSetIdentifier: "{{ DataSetIdentifier }}"
TopicIdentifier: "{{ TopicIdentifier }}"
ColumnName: "{{ ColumnName }}"
FormatConfiguration:
StringFormatConfiguration:
NullValueFormatConfiguration:
NullString: "{{ NullString }}"
NumericFormatConfiguration:
NumberDisplayFormatConfiguration: "{{ NumberDisplayFormatConfiguration }}"
CurrencyDisplayFormatConfiguration: "{{ CurrencyDisplayFormatConfiguration }}"
PercentageDisplayFormatConfiguration: "{{ PercentageDisplayFormatConfiguration }}"
NumberFormatConfiguration:
FormatConfiguration:
NumberDisplayFormatConfiguration: "{{ NumberDisplayFormatConfiguration }}"
CurrencyDisplayFormatConfiguration: "{{ CurrencyDisplayFormatConfiguration }}"
PercentageDisplayFormatConfiguration: "{{ PercentageDisplayFormatConfiguration }}"
DateTimeFormatConfiguration:
DateTimeFormat: "{{ DateTimeFormat }}"
NullValueFormatConfiguration:
NullString: "{{ NullString }}"
NumericFormatConfiguration:
NumberDisplayFormatConfiguration: "{{ NumberDisplayFormatConfiguration }}"
CurrencyDisplayFormatConfiguration: "{{ CurrencyDisplayFormatConfiguration }}"
PercentageDisplayFormatConfiguration: "{{ PercentageDisplayFormatConfiguration }}"
Role: "{{ Role }}"
ColorsConfiguration:
CustomColors:
- FieldValue: "{{ FieldValue }}"
Color: "{{ Color }}"
SpecialValue: "{{ SpecialValue }}"
DecalSettingsConfiguration:
CustomDecalSettings:
- ElementValue: "{{ ElementValue }}"
DecalVisibility: "{{ DecalVisibility }}"
DecalColor: "{{ DecalColor }}"
DecalPatternType: "{{ DecalPatternType }}"
DecalStyleType: "{{ DecalStyleType }}"
AnalysisDefaults:
DefaultNewSheetConfiguration:
InteractiveLayoutConfiguration:
Grid:
CanvasSizeOptions: "{{ CanvasSizeOptions }}"
FreeForm:
CanvasSizeOptions: "{{ CanvasSizeOptions }}"
PaginatedLayoutConfiguration:
SectionBased:
CanvasSizeOptions: "{{ CanvasSizeOptions }}"
SheetContentType: "{{ SheetContentType }}"
Options:
Timezone: "{{ Timezone }}"
WeekStart: "{{ WeekStart }}"
QBusinessInsightsStatus: "{{ QBusinessInsightsStatus }}"
ExcludedDataSetArns:
- "{{ ExcludedDataSetArns }}"
CustomActionDefaults:
highlightOperation:
Trigger: "{{ Trigger }}"
VisualMessages:
NoDataMessage:
Enabled: {{ Enabled }}
Title: "{{ Title }}"
TitleVisibility: "{{ TitleVisibility }}"
Description: "{{ Description }}"
DescriptionVisibility: "{{ DescriptionVisibility }}"
LinkText: "{{ LinkText }}"
LinkUrl: "{{ LinkUrl }}"
LinkVisibility: "{{ LinkVisibility }}"
QueryExecutionOptions:
QueryExecutionMode: "{{ QueryExecutionMode }}"
StaticFiles:
- ImageStaticFile:
StaticFileId: "{{ StaticFileId }}"
Source:
UrlOptions:
Url: "{{ Url }}"
S3Options:
BucketName: "{{ BucketName }}"
ObjectKey: "{{ ObjectKey }}"
Region: "{{ Region }}"
SpatialStaticFile:
StaticFileId: "{{ StaticFileId }}"
Source:
UrlOptions:
Url: "{{ Url }}"
S3Options:
BucketName: "{{ BucketName }}"
ObjectKey: "{{ ObjectKey }}"
Region: "{{ Region }}"
- name: ValidationStrategy
description: |
The option to relax the validation that is required to create and update analyses, dashboards, and templates with definition objects. When you set this value to LENIENT, validation is skipped for specific errors.
value:
Mode: "{{ Mode }}"
UPDATE examples
- update_template
Updates a template from an existing Amazon Quick Sight analysis or another template.
UPDATE aws.quicksight.templates
SET
SourceEntity = '{{ SourceEntity }}',
VersionDescription = '{{ VersionDescription }}',
Name = '{{ Name }}',
Definition = '{{ Definition }}',
ValidationStrategy = '{{ ValidationStrategy }}'
WHERE
aws_account_id = '{{ aws_account_id }}' --required
AND template_id = '{{ template_id }}' --required
AND region = '{{ region }}' --required
RETURNING
arn,
creation_status,
request_id,
status,
template_id,
version_arn;
DELETE examples
- delete_template
Deletes a template.
DELETE FROM aws.quicksight.templates
WHERE aws_account_id = '{{ aws_account_id }}' --required
AND template_id = '{{ template_id }}' --required
AND region = '{{ region }}' --required
AND `version-number` = '{{ version-number }}'
;