UpdateForm
Updates an existing form.
Request Syntax
PATCH /app/appId
/environment/environmentName
/forms/id
?clientToken=clientToken
HTTP/1.1
Content-type: application/json
{
"updatedForm": {
"cta": {
"cancel": {
"children": "string
",
"excluded": boolean
,
"position": {
"below": "string
",
"fixed": "string
",
"rightOf": "string
"
}
},
"clear": {
"children": "string
",
"excluded": boolean
,
"position": {
"below": "string
",
"fixed": "string
",
"rightOf": "string
"
}
},
"position": "string
",
"submit": {
"children": "string
",
"excluded": boolean
,
"position": {
"below": "string
",
"fixed": "string
",
"rightOf": "string
"
}
}
},
"dataType": {
"dataSourceType": "string
",
"dataTypeName": "string
"
},
"fields": {
"string
" : {
"excluded": boolean
,
"inputType": {
"defaultChecked": boolean
,
"defaultCountryCode": "string
",
"defaultValue": "string
",
"descriptiveText": "string
",
"isArray": boolean
,
"maxValue": number
,
"minValue": number
,
"name": "string
",
"placeholder": "string
",
"readOnly": boolean
,
"required": boolean
,
"step": number
,
"type": "string
",
"value": "string
",
"valueMappings": {
"values": [
{
"displayValue": {
"value": "string
"
},
"value": {
"value": "string
"
}
}
]
}
},
"label": "string
",
"position": {
"below": "string
",
"fixed": "string
",
"rightOf": "string
"
},
"validations": [
{
"numValues": [ number
],
"strValues": [ "string
" ],
"type": "string
",
"validationMessage": "string
"
}
]
}
},
"formActionType": "string
",
"name": "string
",
"schemaVersion": "string
",
"sectionalElements": {
"string
" : {
"level": number
,
"orientation": "string
",
"position": {
"below": "string
",
"fixed": "string
",
"rightOf": "string
"
},
"text": "string
",
"type": "string
"
}
},
"style": {
"horizontalGap": {
"tokenReference": "string
",
"value": "string
"
},
"outerPadding": {
"tokenReference": "string
",
"value": "string
"
},
"verticalGap": {
"tokenReference": "string
",
"value": "string
"
}
}
}
}
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.
- updatedForm
-
The request accepts the following data in JSON format.
Type: UpdateFormData object
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"entity": {
"appId": "string",
"cta": {
"cancel": {
"children": "string",
"excluded": boolean,
"position": {
"below": "string",
"fixed": "string",
"rightOf": "string"
}
},
"clear": {
"children": "string",
"excluded": boolean,
"position": {
"below": "string",
"fixed": "string",
"rightOf": "string"
}
},
"position": "string",
"submit": {
"children": "string",
"excluded": boolean,
"position": {
"below": "string",
"fixed": "string",
"rightOf": "string"
}
}
},
"dataType": {
"dataSourceType": "string",
"dataTypeName": "string"
},
"environmentName": "string",
"fields": {
"string" : {
"excluded": boolean,
"inputType": {
"defaultChecked": boolean,
"defaultCountryCode": "string",
"defaultValue": "string",
"descriptiveText": "string",
"isArray": boolean,
"maxValue": number,
"minValue": number,
"name": "string",
"placeholder": "string",
"readOnly": boolean,
"required": boolean,
"step": number,
"type": "string",
"value": "string",
"valueMappings": {
"values": [
{
"displayValue": {
"value": "string"
},
"value": {
"value": "string"
}
}
]
}
},
"label": "string",
"position": {
"below": "string",
"fixed": "string",
"rightOf": "string"
},
"validations": [
{
"numValues": [ number ],
"strValues": [ "string" ],
"type": "string",
"validationMessage": "string"
}
]
}
},
"formActionType": "string",
"id": "string",
"name": "string",
"schemaVersion": "string",
"sectionalElements": {
"string" : {
"level": number,
"orientation": "string",
"position": {
"below": "string",
"fixed": "string",
"rightOf": "string"
},
"text": "string",
"type": "string"
}
},
"style": {
"horizontalGap": {
"tokenReference": "string",
"value": "string"
},
"outerPadding": {
"tokenReference": "string",
"value": "string"
},
"verticalGap": {
"tokenReference": "string",
"value": "string"
}
},
"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.
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: