UpdateForm - AmplifyUIBuilder

UpdateForm

Updates an existing form.

Request Syntax

PATCH /app/appId/environment/environmentName/forms/id?clientToken=clientToken HTTP/1.1 Content-type: application/json { "cta": { "cancel": { "children": "string", "excluded": boolean, "position": { ... } }, "clear": { "children": "string", "excluded": boolean, "position": { ... } }, "position": "string", "submit": { "children": "string", "excluded": boolean, "position": { ... } } }, "dataType": { "dataSourceType": "string", "dataTypeName": "string" }, "fields": { "string" : { "excluded": boolean, "inputType": { "defaultChecked": boolean, "defaultCountryCode": "string", "defaultValue": "string", "descriptiveText": "string", "fileUploaderConfig": { "acceptedFileTypes": [ "string" ], "accessLevel": "string", "isResumable": boolean, "maxFileCount": number, "maxSize": number, "showThumbnails": boolean }, "isArray": boolean, "maxValue": number, "minValue": number, "name": "string", "placeholder": "string", "readOnly": boolean, "required": boolean, "step": number, "type": "string", "value": "string", "valueMappings": { "bindingProperties": { "string" : { "bindingProperties": { "model": "string" }, "type": "string" } }, "values": [ { "displayValue": { "bindingProperties": { "field": "string", "property": "string" }, "concat": [ "FormInputValueProperty" ], "value": "string" }, "value": { "bindingProperties": { "field": "string", "property": "string" }, "concat": [ "FormInputValueProperty" ], "value": "string" } } ] } }, "label": "string", "position": { ... }, "validations": [ { "numValues": [ number ], "strValues": [ "string" ], "type": "string", "validationMessage": "string" } ] } }, "formActionType": "string", "labelDecorator": "string", "name": "string", "schemaVersion": "string", "sectionalElements": { "string" : { "excluded": boolean, "level": number, "orientation": "string", "position": { ... }, "text": "string", "type": "string" } }, "style": { "horizontalGap": { ... }, "outerPadding": { ... }, "verticalGap": { ... } } }

URI Request Parameters

The request uses the following URI parameters.

appId

The unique ID for the Amplify app.

Required: Yes

clientToken

The unique client token.

environmentName

The name of the backend environment that is part of the Amplify app.

Required: Yes

id

The unique ID for the form.

Required: Yes

Request Body

The request accepts the following data in JSON format.

cta

The FormCTA object that stores the call to action configuration for the form.

Type: FormCTA object

Required: No

dataType

The type of data source to use to create the form.

Type: FormDataTypeConfig object

Required: No

fields

The configuration information for the form's fields.

Type: String to FieldConfig object map

Required: No

formActionType

Specifies whether to perform a create or update action on the form.

Type: String

Valid Values: create | update

Required: No

labelDecorator

Specifies an icon or decoration to display on the form.

Type: String

Valid Values: required | optional | none

Required: No

name

The name of the form.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: No

schemaVersion

The schema version of the form.

Type: String

Required: No

sectionalElements

The configuration information for the visual helper elements for the form. These elements are not associated with any data.

Type: String to SectionalElement object map

Required: No

style

The configuration for the form's style.

Type: FormStyle object

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "appId": "string", "cta": { "cancel": { "children": "string", "excluded": boolean, "position": { ... } }, "clear": { "children": "string", "excluded": boolean, "position": { ... } }, "position": "string", "submit": { "children": "string", "excluded": boolean, "position": { ... } } }, "dataType": { "dataSourceType": "string", "dataTypeName": "string" }, "environmentName": "string", "fields": { "string" : { "excluded": boolean, "inputType": { "defaultChecked": boolean, "defaultCountryCode": "string", "defaultValue": "string", "descriptiveText": "string", "fileUploaderConfig": { "acceptedFileTypes": [ "string" ], "accessLevel": "string", "isResumable": boolean, "maxFileCount": number, "maxSize": number, "showThumbnails": boolean }, "isArray": boolean, "maxValue": number, "minValue": number, "name": "string", "placeholder": "string", "readOnly": boolean, "required": boolean, "step": number, "type": "string", "value": "string", "valueMappings": { "bindingProperties": { "string" : { "bindingProperties": { "model": "string" }, "type": "string" } }, "values": [ { "displayValue": { "bindingProperties": { "field": "string", "property": "string" }, "concat": [ "FormInputValueProperty" ], "value": "string" }, "value": { "bindingProperties": { "field": "string", "property": "string" }, "concat": [ "FormInputValueProperty" ], "value": "string" } } ] } }, "label": "string", "position": { ... }, "validations": [ { "numValues": [ number ], "strValues": [ "string" ], "type": "string", "validationMessage": "string" } ] } }, "formActionType": "string", "id": "string", "labelDecorator": "string", "name": "string", "schemaVersion": "string", "sectionalElements": { "string" : { "excluded": boolean, "level": number, "orientation": "string", "position": { ... }, "text": "string", "type": "string" } }, "style": { "horizontalGap": { ... }, "outerPadding": { ... }, "verticalGap": { ... } }, "tags": { "string" : "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

appId

The unique ID of the Amplify app associated with the form.

Type: String

cta

Stores the call to action configuration for the form.

Type: FormCTA object

dataType

The type of data source to use to create the form.

Type: FormDataTypeConfig object

environmentName

The name of the backend environment that is a part of the Amplify app.

Type: String

fields

Stores the information about the form's fields.

Type: String to FieldConfig object map

formActionType

The operation to perform on the specified form.

Type: String

Valid Values: create | update

id

The unique ID of the form.

Type: String

labelDecorator

Specifies an icon or decoration to display on the form.

Type: String

Valid Values: required | optional | none

name

The name of the form.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

schemaVersion

The schema version of the form when it was imported.

Type: String

sectionalElements

Stores the visual helper elements for the form that are not associated with any data.

Type: String to SectionalElement object map

style

Stores the configuration for the form's style.

Type: FormStyle object

tags

One or more key-value pairs to use when tagging the form.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: (?!aws:)[a-zA-Z+-=._:/]+

Value Length Constraints: Minimum length of 1. Maximum length of 256.

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerException

An internal error has occurred. Please retry your request.

HTTP Status Code: 500

InvalidParameterException

An invalid or out-of-range value was supplied for the input parameter.

HTTP Status Code: 400

ResourceConflictException

The resource specified in the request conflicts with an existing resource.

HTTP Status Code: 409

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: