backend_environments
Creates, updates, deletes, gets or lists a backend_environments resource.
Overview
| Name | backend_environments |
| Type | Resource |
| Id | aws.amplify.backend_environments |
Fields
The following fields are returned by SELECT queries:
- get_backend_environment
- list_backend_environments
| Name | Datatype | Description |
|---|---|---|
backend_environment_arn | string | The Amazon Resource Name (ARN) for a backend environment that is part of an Amplify app. (pattern: <code>(?s).*</code>) |
create_time | string (date-time) | The creation date and time for a backend environment that is part of an Amplify app. |
deployment_artifacts | string | The name of deployment artifacts. (pattern: <code>(?s).+</code>) |
environment_name | string | The name for a backend environment that is part of an Amplify app. (pattern: <code>(?s).+</code>) |
stack_name | string | The AWS CloudFormation stack name of a backend environment. (pattern: <code>(?s).+</code>) |
update_time | string (date-time) | The last updated date and time for a backend environment that is part of an Amplify app. |
| Name | Datatype | Description |
|---|---|---|
backend_environments | array | The list of backend environments for an Amplify app. |
next_token | string | A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries. (pattern: <code>(?s).*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_backend_environment | select | app_id, environment_name, region | Returns a backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code. | |
list_backend_environments | select | app_id, region | environmentName, nextToken, maxResults | Lists the backend environments for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code. |
create_backend_environment | insert | app_id, region, environmentName | Creates a new backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code. | |
delete_backend_environment | delete | app_id, environment_name, region | Deletes a backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code. |
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 unique ID of an Amplify app. |
environment_name | string | The name of a backend environment of an Amplify app. |
region | string | AWS region (default: us-east-1) |
environmentName | string | The name of the backend environment |
maxResults | integer | The maximum number of records to list in a single response. |
nextToken | string | A pagination token. Set to null to start listing backend environments from the start. If a non-null pagination token is returned in a result, pass its value in here to list more backend environments. |
SELECT examples
- get_backend_environment
- list_backend_environments
Returns a backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
SELECT
backend_environment_arn,
create_time,
deployment_artifacts,
environment_name,
stack_name,
update_time
FROM aws.amplify.backend_environments
WHERE app_id = '{{ app_id }}' -- required
AND environment_name = '{{ environment_name }}' -- required
AND region = '{{ region }}' -- required
;
Lists the backend environments for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
SELECT
backend_environments,
next_token
FROM aws.amplify.backend_environments
WHERE app_id = '{{ app_id }}' -- required
AND region = '{{ region }}' -- required
AND environmentName = '{{ environmentName }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_backend_environment
- Manifest
Creates a new backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
INSERT INTO aws.amplify.backend_environments (
environmentName,
stackName,
deploymentArtifacts,
app_id,
region
)
SELECT
'{{ environmentName }}' /* required */,
'{{ stackName }}',
'{{ deploymentArtifacts }}',
'{{ app_id }}',
'{{ region }}'
RETURNING
backend_environment
;
# Description fields are for documentation purposes
- name: backend_environments
props:
- name: app_id
value: "{{ app_id }}"
description: Required parameter for the backend_environments resource.
- name: region
value: "{{ region }}"
description: Required parameter for the backend_environments resource.
- name: environmentName
value: "{{ environmentName }}"
- name: stackName
value: "{{ stackName }}"
- name: deploymentArtifacts
value: "{{ deploymentArtifacts }}"
DELETE examples
- delete_backend_environment
Deletes a backend environment for an Amplify app. This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isn’t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
DELETE FROM aws.amplify.backend_environments
WHERE app_id = '{{ app_id }}' --required
AND environment_name = '{{ environment_name }}' --required
AND region = '{{ region }}' --required
;