Skip to main content

backend_api_models

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

Overview

Namebackend_api_models
TypeResource
Idaws.amplifybackend.backend_api_models

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
model_introspection_schemastringStringified JSON of the model introspection schema for an existing backend API resource.
modelsstringStringified JSON of the datastore model.
statusstringThe current status of the request. (LATEST, STALE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_backend_api_modelsselectapp_id, backend_environment_name, regionGets a model introspection schema for an existing backend API resource.
generate_backend_api_modelsexecapp_id, backend_environment_name, region, ResourceNameGenerates a model schema for an existing backend API resource.

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
app_idstringThe app ID.
backend_environment_namestringThe name of the backend environment.
regionstringAWS region (default: us-east-1)

SELECT examples

Gets a model introspection schema for an existing backend API resource.

SELECT
model_introspection_schema,
models,
status
FROM aws.amplifybackend.backend_api_models
WHERE app_id = '{{ app_id }}' -- required
AND backend_environment_name = '{{ backend_environment_name }}' -- required
AND region = '{{ region }}' -- required
;

Lifecycle Methods

Generates a model schema for an existing backend API resource.

EXEC aws.amplifybackend.backend_api_models.generate_backend_api_models
@app_id='{{ app_id }}' --required,
@backend_environment_name='{{ backend_environment_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"ResourceName": "{{ ResourceName }}"
}'
;