Skip to main content

model_templates

Creates, updates, deletes, gets or lists a model_templates resource.

Overview

Namemodel_templates
TypeResource
Idaws.apigateway.model_templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
valuestringThe Apache Velocity Template Language (VTL) template content used for the template resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_model_templateselectrestapi_id, model_name, regionGenerates a sample mapping template that can be used to transform a payload into the structure of a model.

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.

NameDatatypeDescription
model_namestringThe name of the model for which to generate a template.
regionstringAWS region (default: us-east-1)
restapi_idstringThe string identifier of the associated RestApi.

SELECT examples

Generates a sample mapping template that can be used to transform a payload into the structure of a model.

SELECT
value
FROM aws.apigateway.model_templates
WHERE restapi_id = '{{ restapi_id }}' -- required
AND model_name = '{{ model_name }}' -- required
AND region = '{{ region }}' -- required
;