GetFormCommand

Returns an existing form for an Amplify app.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { AmplifyUIBuilderClient, GetFormCommand } from "@aws-sdk/client-amplifyuibuilder"; // ES Modules import
// const { AmplifyUIBuilderClient, GetFormCommand } = require("@aws-sdk/client-amplifyuibuilder"); // CommonJS import
const client = new AmplifyUIBuilderClient(config);
const input = { // GetFormRequest
  appId: "STRING_VALUE", // required
  environmentName: "STRING_VALUE", // required
  id: "STRING_VALUE", // required
};
const command = new GetFormCommand(input);
const response = await client.send(command);
// { // GetFormResponse
//   form: { // Form
//     appId: "STRING_VALUE", // required
//     environmentName: "STRING_VALUE", // required
//     id: "STRING_VALUE", // required
//     name: "STRING_VALUE", // required
//     formActionType: "create" || "update", // required
//     style: { // FormStyle
//       horizontalGap: { // FormStyleConfig Union: only one key present
//         tokenReference: "STRING_VALUE",
//         value: "STRING_VALUE",
//       },
//       verticalGap: {//  Union: only one key present
//         tokenReference: "STRING_VALUE",
//         value: "STRING_VALUE",
//       },
//       outerPadding: {//  Union: only one key present
//         tokenReference: "STRING_VALUE",
//         value: "STRING_VALUE",
//       },
//     },
//     dataType: { // FormDataTypeConfig
//       dataSourceType: "STRING_VALUE", // required
//       dataTypeName: "STRING_VALUE", // required
//     },
//     fields: { // FieldsMap // required
//       "<keys>": { // FieldConfig
//         label: "STRING_VALUE",
//         position: { // FieldPosition Union: only one key present
//           fixed: "first",
//           rightOf: "STRING_VALUE",
//           below: "STRING_VALUE",
//         },
//         excluded: true || false,
//         inputType: { // FieldInputConfig
//           type: "STRING_VALUE", // required
//           required: true || false,
//           readOnly: true || false,
//           placeholder: "STRING_VALUE",
//           defaultValue: "STRING_VALUE",
//           descriptiveText: "STRING_VALUE",
//           defaultChecked: true || false,
//           defaultCountryCode: "STRING_VALUE",
//           valueMappings: { // ValueMappings
//             values: [ // ValueMappingList // required
//               { // ValueMapping
//                 displayValue: { // FormInputValueProperty
//                   value: "STRING_VALUE",
//                   bindingProperties: { // FormInputValuePropertyBindingProperties
//                     property: "STRING_VALUE", // required
//                     field: "STRING_VALUE",
//                   },
//                   concat: [ // FormInputValuePropertyList
//                     {
//                       value: "STRING_VALUE",
//                       bindingProperties: {
//                         property: "STRING_VALUE", // required
//                         field: "STRING_VALUE",
//                       },
//                       concat: [
//                         "<FormInputValueProperty>",
//                       ],
//                     },
//                   ],
//                 },
//                 value: "<FormInputValueProperty>", // required
//               },
//             ],
//             bindingProperties: { // FormInputBindingProperties
//               "<keys>": { // FormInputBindingPropertiesValue
//                 type: "STRING_VALUE",
//                 bindingProperties: { // FormInputBindingPropertiesValueProperties
//                   model: "STRING_VALUE",
//                 },
//               },
//             },
//           },
//           name: "STRING_VALUE",
//           minValue: Number("float"),
//           maxValue: Number("float"),
//           step: Number("float"),
//           value: "STRING_VALUE",
//           isArray: true || false,
//           fileUploaderConfig: { // FileUploaderFieldConfig
//             accessLevel: "public" || "protected" || "private", // required
//             acceptedFileTypes: [ // StrValues // required
//               "STRING_VALUE",
//             ],
//             showThumbnails: true || false,
//             isResumable: true || false,
//             maxFileCount: Number("int"),
//             maxSize: Number("int"),
//           },
//         },
//         validations: [ // ValidationsList
//           { // FieldValidationConfiguration
//             type: "STRING_VALUE", // required
//             strValues: [
//               "STRING_VALUE",
//             ],
//             numValues: [ // NumValues
//               Number("int"),
//             ],
//             validationMessage: "STRING_VALUE",
//           },
//         ],
//       },
//     },
//     sectionalElements: { // SectionalElementMap // required
//       "<keys>": { // SectionalElement
//         type: "STRING_VALUE", // required
//         position: {//  Union: only one key present
//           fixed: "first",
//           rightOf: "STRING_VALUE",
//           below: "STRING_VALUE",
//         },
//         text: "STRING_VALUE",
//         level: Number("int"),
//         orientation: "STRING_VALUE",
//         excluded: true || false,
//       },
//     },
//     schemaVersion: "STRING_VALUE", // required
//     tags: { // Tags
//       "<keys>": "STRING_VALUE",
//     },
//     cta: { // FormCTA
//       position: "top" || "bottom" || "top_and_bottom",
//       clear: { // FormButton
//         excluded: true || false,
//         children: "STRING_VALUE",
//         position: {//  Union: only one key present
//           fixed: "first",
//           rightOf: "STRING_VALUE",
//           below: "STRING_VALUE",
//         },
//       },
//       cancel: {
//         excluded: true || false,
//         children: "STRING_VALUE",
//         position: {//  Union: only one key present
//           fixed: "first",
//           rightOf: "STRING_VALUE",
//           below: "STRING_VALUE",
//         },
//       },
//       submit: {
//         excluded: true || false,
//         children: "STRING_VALUE",
//         position: {//  Union: only one key present
//           fixed: "first",
//           rightOf: "STRING_VALUE",
//           below: "STRING_VALUE",
//         },
//       },
//     },
//     labelDecorator: "STRING_VALUE",
//   },
// };

GetFormCommand Input

See GetFormCommandInput for more details

Parameter
Type
Description
appId
Required
string | undefined

The unique ID of the Amplify app.

environmentName
Required
string | undefined

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

id
Required
string | undefined

The unique ID of the form.

GetFormCommand Output

See GetFormCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
form
Form | undefined

Represents the configuration settings for the form.

Throws

Name
Fault
Details
InternalServerException
server

An internal error has occurred. Please retry your request.

InvalidParameterException
client

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

ResourceNotFoundException
client

The requested resource does not exist, or access was denied.

AmplifyUIBuilderServiceException
Base exception class for all service exceptions from AmplifyUIBuilder service.