updateForm method
Updates an existing form.
May throw InternalServerException.
May throw InvalidParameterException.
May throw ResourceConflictException.
Parameter appId :
The unique ID for the Amplify app.
Parameter environmentName :
The name of the backend environment that is part of the Amplify app.
Parameter id :
The unique ID for the form.
Parameter updatedForm :
The request accepts the following data in JSON format.
Parameter clientToken :
The unique client token.
Implementation
Future<UpdateFormResponse> updateForm({
required String appId,
required String environmentName,
required String id,
required UpdateFormData updatedForm,
String? clientToken,
}) async {
final $query = <String, List<String>>{
if (clientToken != null) 'clientToken': [clientToken],
};
final response = await _protocol.sendRaw(
payload: updatedForm,
method: 'PATCH',
requestUri:
'/app/${Uri.encodeComponent(appId)}/environment/${Uri.encodeComponent(environmentName)}/forms/${Uri.encodeComponent(id)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return UpdateFormResponse(
entity: Form.fromJson($json),
);
}