backend_storages
Creates, updates, deletes, gets or lists a backend_storages resource.
Overview
| Name | backend_storages |
| Type | Resource |
| Id | aws.amplifybackend.backend_storages |
Fields
The following fields are returned by SELECT queries:
- get_backend_storage
| Name | Datatype | Description |
|---|---|---|
app_id | string | The app ID. |
backend_environment_name | string | The name of the backend environment. |
resource_config | object | The resource configuration for the backend storage resource. |
resource_name | string | The name of the storage resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_backend_storage | select | app_id, backend_environment_name, region | Gets details for a backend storage resource. | |
create_backend_storage | insert | app_id, region, BackendEnvironmentName, ResourceConfig, ResourceName | Creates a backend storage resource. | |
update_backend_storage | update | app_id, backend_environment_name, region, ResourceConfig, ResourceName | Updates an existing backend storage resource. | |
delete_backend_storage | delete | app_id, backend_environment_name, region | Removes the specified backend storage 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_storage
Gets details for a backend storage resource.
SELECT
app_id,
backend_environment_name,
resource_config,
resource_name
FROM aws.amplifybackend.backend_storages
WHERE app_id = '{{ app_id }}' -- required
AND backend_environment_name = '{{ backend_environment_name }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_backend_storage
- Manifest
Creates a backend storage resource.
INSERT INTO aws.amplifybackend.backend_storages (
BackendEnvironmentName,
ResourceConfig,
ResourceName,
app_id,
region
)
SELECT
'{{ BackendEnvironmentName }}' /* required */,
'{{ ResourceConfig }}' /* required */,
'{{ ResourceName }}' /* required */,
'{{ app_id }}',
'{{ region }}'
RETURNING
app_id,
backend_environment_name,
job_id,
status
;
# Description fields are for documentation purposes
- name: backend_storages
props:
- name: app_id
value: "{{ app_id }}"
description: Required parameter for the backend_storages resource.
- name: region
value: "{{ region }}"
description: Required parameter for the backend_storages resource.
- name: BackendEnvironmentName
value: "{{ BackendEnvironmentName }}"
- name: ResourceConfig
description: |
The resource configuration for creating backend storage.
value:
BucketName: "{{ BucketName }}"
Permissions:
Authenticated:
- "{{ Authenticated }}"
UnAuthenticated:
- "{{ UnAuthenticated }}"
ServiceName: "{{ ServiceName }}"
- name: ResourceName
value: "{{ ResourceName }}"
UPDATE examples
- update_backend_storage
Updates an existing backend storage resource.
UPDATE aws.amplifybackend.backend_storages
SET
ResourceConfig = '{{ ResourceConfig }}',
ResourceName = '{{ ResourceName }}'
WHERE
app_id = '{{ app_id }}' --required
AND backend_environment_name = '{{ backend_environment_name }}' --required
AND region = '{{ region }}' --required
AND ResourceConfig = '{{ ResourceConfig }}' --required
AND ResourceName = '{{ ResourceName }}' --required
RETURNING
app_id,
backend_environment_name,
job_id,
status;
DELETE examples
- delete_backend_storage
Removes the specified backend storage resource.
DELETE FROM aws.amplifybackend.backend_storages
WHERE app_id = '{{ app_id }}' --required
AND backend_environment_name = '{{ backend_environment_name }}' --required
AND region = '{{ region }}' --required
;