Skip to content

Api Gateway  >  Operations  >  get_model_template

get_model_template

Operation

get_model_template async

get_model_template(input: GetModelTemplateInput, plugins: list[Plugin] | None = None) -> GetModelTemplateOutput

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

Parameters:

Name Type Description Default
input GetModelTemplateInput

An instance of GetModelTemplateInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetModelTemplateOutput

An instance of GetModelTemplateOutput.

Input

GetModelTemplateInput dataclass

Request to generate a sample mapping template used to transform the payload.

Attributes

model_name class-attribute instance-attribute
model_name: str | None = None

The name of the model for which to generate a template.

rest_api_id class-attribute instance-attribute
rest_api_id: str | None = None

The string identifier of the associated RestApi.

Output

GetModelTemplateOutput dataclass

Represents a mapping template used to transform a payload.

Attributes

value class-attribute instance-attribute
value: str | None = None

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