model_templates
Creates, updates, deletes, gets or lists a model_templates resource.
Overview
| Name | model_templates |
| Type | Resource |
| Id | aws.apigateway.model_templates |
Fields
The following fields are returned by SELECT queries:
- get_model_template
| Name | Datatype | Description |
|---|---|---|
value | string | The Apache Velocity Template Language (VTL) template content used for the template resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_model_template | select | restapi_id, model_name, region | Generates 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.
| Name | Datatype | Description |
|---|---|---|
model_name | string | The name of the model for which to generate a template. |
region | string | AWS region (default: us-east-1) |
restapi_id | string | The string identifier of the associated RestApi. |
SELECT examples
- get_model_template
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
;