CreateTemplate - Amazon QuickSight


Creates a template from an existing Amazon QuickSight analysis or template. You can use the resulting template to create a dashboard.

A template is an entity in Amazon QuickSight 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.

Request Syntax

POST /accounts/AwsAccountId/templates/TemplateId HTTP/1.1 Content-type: application/json { "Definition": { "AnalysisDefaults": { "DefaultNewSheetConfiguration": { ... } }, "CalculatedFields": [ { ... } ], "ColumnConfigurations": [ { ... } ], "DataSetConfigurations": [ { ... } ], "FilterGroups": [ { ... } ], "ParameterDeclarations": [ { ... } ], "Sheets": [ { ... } ] }, "Name": "string", "Permissions": [ { "Actions": [ "string" ], "Principal": "string" } ], "SourceEntity": { "SourceAnalysis": { "Arn": "string", "DataSetReferences": [ { "DataSetArn": "string", "DataSetPlaceholder": "string" } ] }, "SourceTemplate": { "Arn": "string" } }, "Tags": [ { "Key": "string", "Value": "string" } ], "VersionDescription": "string" }

URI Request Parameters

The request uses the following URI parameters.


The ID for the AWS account that the group is in. You use the ID for the AWS account that contains your Amazon QuickSight account.

Length Constraints: Fixed length of 12.

Pattern: ^[0-9]{12}$

Required: Yes


An ID for the template that you want to create. This template is unique per AWS Region; in each AWS account.

Length Constraints: Minimum length of 1. Maximum length of 512.

Pattern: [\w\-]+

Required: Yes

Request Body

The request accepts the following data in JSON format.


The definition of a template.

A definition is the data model of all features in a Dashboard, Template, or Analysis.

Type: TemplateVersionDefinition object

Required: No


A display name for the template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: No


A list of resource permissions to be set on the template.

Type: Array of ResourcePermission objects

Array Members: Minimum number of 1 item. Maximum number of 64 items.

Required: No


The entity that you are using as a source when you create the template. In SourceEntity, you specify the type of object you're using as source: SourceTemplate for a template or SourceAnalysis for an analysis. Both of these require an Amazon Resource Name (ARN). For SourceTemplate, specify the ARN of the source template. For SourceAnalysis, specify the ARN of the source analysis. The SourceTemplate ARN can contain any AWS account and any Amazon QuickSight-supported AWS Region.

Use the DataSetReferences entity within SourceTemplate or SourceAnalysis to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.

Type: TemplateSourceEntity object

Required: No


Contains a map of the key-value pairs for the resource tag or tags assigned to the resource.

Type: Array of Tag objects

Array Members: Minimum number of 1 item. Maximum number of 200 items.

Required: No


A description of the current template version being created. This API operation creates the first version of the template. Every time UpdateTemplate is called, a new version is created. Each version of the template maintains a description of the version in the VersionDescription field.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 512.

Required: No

Response Syntax

HTTP/1.1 Status Content-type: application/json { "Arn": "string", "CreationStatus": "string", "RequestId": "string", "TemplateId": "string", "VersionArn": "string" }

Response Elements

If the action is successful, the service sends back the following HTTP response.


The HTTP status of the request.

The following data is returned in JSON format by the service.


The ARN for the template.

Type: String


The template creation status.

Type: String



The AWS request ID for this operation.

Type: String


The ID of the template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 512.

Pattern: [\w\-]+


The ARN for the template, including the version information of the first version.

Type: String


For information about the errors that are common to all actions, see Common Errors.


You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon QuickSight service, that your policies have the correct permissions, and that you are using the correct access keys.

HTTP Status Code: 401


Updating or deleting a resource can cause an inconsistent state.

HTTP Status Code: 409


An internal failure occurred.

HTTP Status Code: 500


One or more parameters has a value that isn't valid.

HTTP Status Code: 400


A limit is exceeded.

HTTP Status Code: 409


The resource specified already exists.

HTTP Status Code: 409


One or more resources can't be found.

HTTP Status Code: 404


Access is throttled.

HTTP Status Code: 429


This error indicates that you are calling an operation on an Amazon QuickSight subscription where the edition doesn't include support for that operation. Amazon Amazon QuickSight currently has Standard Edition and Enterprise Edition. Not every operation and capability is available in every edition.

HTTP Status Code: 403

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: