Skip to main content

backend_storages

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

Overview

Namebackend_storages
TypeResource
Idaws.amplifybackend.backend_storages

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
app_idstringThe app ID.
backend_environment_namestringThe name of the backend environment.
resource_configobjectThe resource configuration for the backend storage resource.
resource_namestringThe name of the storage resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_backend_storageselectapp_id, backend_environment_name, regionGets details for a backend storage resource.
create_backend_storageinsertapp_id, region, BackendEnvironmentName, ResourceConfig, ResourceNameCreates a backend storage resource.
update_backend_storageupdateapp_id, backend_environment_name, region, ResourceConfig, ResourceNameUpdates an existing backend storage resource.
delete_backend_storagedeleteapp_id, backend_environment_name, regionRemoves 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.

NameDatatypeDescription
app_idstringThe app ID.
backend_environment_namestringThe name of the backend environment.
regionstringAWS region (default: us-east-1)

SELECT examples

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

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
;

UPDATE examples

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

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
;