forms
Creates, updates, deletes, gets or lists a forms resource.
Overview
| Name | forms |
| Type | Resource |
| Id | aws.amplifyuibuilder.forms |
Fields
The following fields are returned by SELECT queries:
- get_form
- list_forms
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the form. |
name | string | The name of the form. |
app_id | string | The unique ID of the Amplify app associated with the form. |
cta | object | Stores the call to action configuration for the form. |
data_type | object | The type of data source to use to create the form. |
environment_name | string | The name of the backend environment that is a part of the Amplify app. |
fields | object | Stores the information about the form's fields. |
form_action_type | string | The operation to perform on the specified form. (create, update) |
label_decorator | string | Specifies an icon or decoration to display on the form. (required, optional, none) |
schema_version | string | The schema version of the form when it was imported. |
sectional_elements | object | Stores the visual helper elements for the form that are not associated with any data. |
style | object | Stores the configuration for the form's style. |
tags | object | One or more key-value pairs to use when tagging the form. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the form. |
name | string | The name of the form. |
app_id | string | The unique ID for the app associated with the form summary. |
data_type | object | The form's data source type. |
environment_name | string | The name of the backend environment that is part of the Amplify app. |
form_action_type | string | The type of operation to perform on the form. (create, update) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_form | select | app_id, environment_name, id, region | Returns an existing form for an Amplify app. | |
list_forms | select | app_id, environment_name, region | nextToken, maxResults | Retrieves a list of forms for a specified Amplify app and backend environment. |
create_form | insert | app_id, environment_name, region, formToCreate | clientToken | Creates a new form for an Amplify app. |
update_form | update | app_id, environment_name, id, region, updatedForm | clientToken | Updates an existing form. |
delete_form | delete | app_id, environment_name, id, region | Deletes a form from an Amplify app. | |
export_forms | exec | app_id, environment_name, region | nextToken | Exports 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.
| Name | Datatype | Description |
|---|---|---|
app_id | string | The unique ID of the Amplify app to export forms to. |
environment_name | string | The name of the backend environment that is a part of the Amplify app. |
id | string | The unique ID of the form to delete. |
region | string | AWS region (default: us-east-1) |
clientToken | string | The unique client token. |
maxResults | integer | The maximum number of forms to retrieve. |
nextToken | string | The token to request the next page of results. |
SELECT examples
- get_form
- list_forms
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
;
Retrieves a list of forms for a specified Amplify app and backend environment.
SELECT
id,
name,
app_id,
data_type,
environment_name,
form_action_type
FROM aws.amplifyuibuilder.forms
WHERE app_id = '{{ app_id }}' -- required
AND environment_name = '{{ environment_name }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_form
- Manifest
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
;
# Description fields are for documentation purposes
- name: forms
props:
- name: app_id
value: "{{ app_id }}"
description: Required parameter for the forms resource.
- name: environment_name
value: "{{ environment_name }}"
description: Required parameter for the forms resource.
- name: region
value: "{{ region }}"
description: Required parameter for the forms resource.
- name: formToCreate
description: |
Represents all of the information that is required to create a form.
value:
name: "{{ name }}"
dataType:
dataSourceType: "{{ dataSourceType }}"
dataTypeName: "{{ dataTypeName }}"
formActionType: "{{ formActionType }}"
fields: "{{ fields }}"
style:
horizontalGap:
tokenReference: "{{ tokenReference }}"
value: "{{ value }}"
verticalGap:
tokenReference: "{{ tokenReference }}"
value: "{{ value }}"
outerPadding:
tokenReference: "{{ tokenReference }}"
value: "{{ value }}"
sectionalElements: "{{ sectionalElements }}"
schemaVersion: "{{ schemaVersion }}"
cta:
position: "{{ position }}"
clear:
excluded: {{ excluded }}
children: "{{ children }}"
position:
fixed: "{{ fixed }}"
rightOf: "{{ rightOf }}"
below: "{{ below }}"
cancel:
excluded: {{ excluded }}
children: "{{ children }}"
position:
fixed: "{{ fixed }}"
rightOf: "{{ rightOf }}"
below: "{{ below }}"
submit:
excluded: {{ excluded }}
children: "{{ children }}"
position:
fixed: "{{ fixed }}"
rightOf: "{{ rightOf }}"
below: "{{ below }}"
tags: "{{ tags }}"
labelDecorator: "{{ labelDecorator }}"
- name: clientToken
value: "{{ clientToken }}"
description: The unique client token.
description: The unique client token.
UPDATE examples
- update_form
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
- delete_form
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
- export_forms
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 }}'
;