backend_api_models
Creates, updates, deletes, gets or lists a backend_api_models resource.
Overview
| Name | backend_api_models |
| Type | Resource |
| Id | aws.amplifybackend.backend_api_models |
Fields
The following fields are returned by SELECT queries:
- get_backend_api_models
| Name | Datatype | Description |
|---|---|---|
model_introspection_schema | string | Stringified JSON of the model introspection schema for an existing backend API resource. |
models | string | Stringified JSON of the datastore model. |
status | string | The current status of the request. (LATEST, STALE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_backend_api_models | select | app_id, backend_environment_name, region | Gets a model introspection schema for an existing backend API resource. | |
generate_backend_api_models | exec | app_id, backend_environment_name, region, ResourceName | Generates 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.
| Name | Datatype | Description |
|---|---|---|
app_id | string | The app ID. |
backend_environment_name | string | The name of the backend environment. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_backend_api_models
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
- generate_backend_api_models
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 }}"
}'
;