forms
Creates, updates, deletes or gets a form resource or lists forms in a region
Overview
| Name | forms |
| Type | Resource |
| Description | Definition of AWS::AmplifyUIBuilder::Form Resource Type |
| Id | awscc.amplifyuibuilder.forms |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
app_id | string | |
cta | object | |
data_type | object | |
environment_name | string | |
fields | object | |
form_action_type | string | |
id | string | |
label_decorator | string | |
name | string | |
schema_version | string | |
sectional_elements | object | |
style | object | |
tags | object | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
app_id | string | |
environment_name | string | |
id | string | |
name | string | |
region | string | AWS region. |
For more information, see AWS::AmplifyUIBuilder::Form.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | forms | INSERT | region |
delete_resource | forms | DELETE | Identifier, region |
update_resource | forms | UPDATE | Identifier, PatchDocument, region |
list_resources | forms_list_only | SELECT | region |
get_resource | forms | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual form.
SELECT
region,
app_id,
cta,
data_type,
environment_name,
fields,
form_action_type,
id,
label_decorator,
name,
schema_version,
sectional_elements,
style,
tags
FROM awscc.amplifyuibuilder.forms
WHERE
region = 'us-east-1' AND
Identifier = '{{ app_id }}|{{ environment_name }}|{{ id }}';
Lists all forms in a region.
SELECT
region,
app_id,
environment_name,
id
FROM awscc.amplifyuibuilder.forms_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new form resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.amplifyuibuilder.forms (
AppId,
Cta,
DataType,
EnvironmentName,
Fields,
FormActionType,
LabelDecorator,
Name,
SchemaVersion,
SectionalElements,
Style,
Tags,
region
)
SELECT
'{{ app_id }}',
'{{ cta }}',
'{{ data_type }}',
'{{ environment_name }}',
'{{ fields }}',
'{{ form_action_type }}',
'{{ label_decorator }}',
'{{ name }}',
'{{ schema_version }}',
'{{ sectional_elements }}',
'{{ style }}',
'{{ tags }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.amplifyuibuilder.forms (
AppId,
Cta,
DataType,
EnvironmentName,
Fields,
FormActionType,
LabelDecorator,
Name,
SchemaVersion,
SectionalElements,
Style,
Tags,
region
)
SELECT
'{{ app_id }}',
'{{ cta }}',
'{{ data_type }}',
'{{ environment_name }}',
'{{ fields }}',
'{{ form_action_type }}',
'{{ label_decorator }}',
'{{ name }}',
'{{ schema_version }}',
'{{ sectional_elements }}',
'{{ style }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: form
props:
- name: app_id
value: '{{ app_id }}'
- name: cta
value:
position: '{{ position }}'
clear:
excluded: '{{ excluded }}'
children: '{{ children }}'
position: null
cancel: null
submit: null
- name: data_type
value:
data_source_type: '{{ data_source_type }}'
data_type_name: '{{ data_type_name }}'
- name: environment_name
value: '{{ environment_name }}'
- name: fields
value: {}
- name: form_action_type
value: '{{ form_action_type }}'
- name: label_decorator
value: '{{ label_decorator }}'
- name: name
value: '{{ name }}'
- name: schema_version
value: '{{ schema_version }}'
- name: sectional_elements
value: {}
- name: style
value:
horizontal_gap: null
vertical_gap: null
outer_padding: null
- name: tags
value: {}
UPDATE example
Use the following StackQL query and manifest file to update a form resource, using stack-deploy.
/*+ update */
UPDATE awscc.amplifyuibuilder.forms
SET PatchDocument = string('{{ {
"Cta": cta,
"DataType": data_type,
"Fields": fields,
"FormActionType": form_action_type,
"LabelDecorator": label_decorator,
"Name": name,
"SchemaVersion": schema_version,
"SectionalElements": sectional_elements,
"Style": style,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ app_id }}|{{ environment_name }}|{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.amplifyuibuilder.forms
WHERE
Identifier = '{{ app_id }}|{{ environment_name }}|{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the forms resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
amplify:GetApp,
amplifyuibuilder:CreateForm,
amplifyuibuilder:GetForm,
amplifyuibuilder:TagResource
amplify:GetApp,
amplifyuibuilder:GetForm
amplify:GetApp,
amplifyuibuilder:GetForm,
amplifyuibuilder:TagResource,
amplifyuibuilder:UntagResource,
amplifyuibuilder:UpdateForm
amplify:GetApp,
amplifyuibuilder:DeleteForm,
amplifyuibuilder:UntagResource
amplify:GetApp,
amplifyuibuilder:ListForms