Skip to main content

forms

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

Overview

Nameforms
TypeResource
Idaws.amplifyuibuilder.forms

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique ID of the form.
namestringThe name of the form.
app_idstringThe unique ID of the Amplify app associated with the form.
ctaobjectStores the call to action configuration for the form.
data_typeobjectThe type of data source to use to create the form.
environment_namestringThe name of the backend environment that is a part of the Amplify app.
fieldsobjectStores the information about the form's fields.
form_action_typestringThe operation to perform on the specified form. (create, update)
label_decoratorstringSpecifies an icon or decoration to display on the form. (required, optional, none)
schema_versionstringThe schema version of the form when it was imported.
sectional_elementsobjectStores the visual helper elements for the form that are not associated with any data.
styleobjectStores the configuration for the form's style.
tagsobjectOne or more key-value pairs to use when tagging the form.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_formselectapp_id, environment_name, id, regionReturns an existing form for an Amplify app.
list_formsselectapp_id, environment_name, regionnextToken, maxResultsRetrieves a list of forms for a specified Amplify app and backend environment.
create_forminsertapp_id, environment_name, region, formToCreateclientTokenCreates a new form for an Amplify app.
update_formupdateapp_id, environment_name, id, region, updatedFormclientTokenUpdates an existing form.
delete_formdeleteapp_id, environment_name, id, regionDeletes a form from an Amplify app.
export_formsexecapp_id, environment_name, regionnextTokenExports form configurations to code that is ready to integrate into an Amplify app.

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 unique ID of the Amplify app to export forms to.
environment_namestringThe name of the backend environment that is a part of the Amplify app.
idstringThe unique ID of the form to delete.
regionstringAWS region (default: us-east-1)
clientTokenstringThe unique client token.
maxResultsintegerThe maximum number of forms to retrieve.
nextTokenstringThe token to request the next page of results.

SELECT examples

Returns an existing form for an Amplify app.

SELECT
id,
name,
app_id,
cta,
data_type,
environment_name,
fields,
form_action_type,
label_decorator,
schema_version,
sectional_elements,
style,
tags
FROM aws.amplifyuibuilder.forms
WHERE app_id = '{{ app_id }}' -- required
AND environment_name = '{{ environment_name }}' -- required
AND id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new form for an Amplify app.

INSERT INTO aws.amplifyuibuilder.forms (
formToCreate,
app_id,
environment_name,
region,
clientToken
)
SELECT
'{{ formToCreate }}' /* required */,
'{{ app_id }}',
'{{ environment_name }}',
'{{ region }}',
'{{ clientToken }}'
RETURNING
entity
;

UPDATE examples

Updates an existing form.

UPDATE aws.amplifyuibuilder.forms
SET
updatedForm = '{{ updatedForm }}'
WHERE
app_id = '{{ app_id }}' --required
AND environment_name = '{{ environment_name }}' --required
AND id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND updatedForm = '{{ updatedForm }}' --required
AND clientToken = '{{ clientToken}}'
RETURNING
entity;

DELETE examples

Deletes a form from an Amplify app.

DELETE FROM aws.amplifyuibuilder.forms
WHERE app_id = '{{ app_id }}' --required
AND environment_name = '{{ environment_name }}' --required
AND id = '{{ id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Exports form configurations to code that is ready to integrate into an Amplify app.

EXEC aws.amplifyuibuilder.forms.export_forms
@app_id='{{ app_id }}' --required,
@environment_name='{{ environment_name }}' --required,
@region='{{ region }}' --required,
@nextToken='{{ nextToken }}'
;