java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:13.541Z") @Stability(Stable) public class CfnForm extends CfnResource implements IInspectable, ITaggable
The AWS::AmplifyUIBuilder::Form resource specifies all of the information that is required to create a form.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.amplifyuibuilder.*;
 FormInputValuePropertyProperty formInputValuePropertyProperty_;
 CfnForm cfnForm = CfnForm.Builder.create(this, "MyCfnForm")
         .appId("appId")
         .cta(FormCTAProperty.builder()
                 .cancel(FormButtonProperty.builder()
                         .children("children")
                         .excluded(false)
                         .position(FieldPositionProperty.builder()
                                 .below("below")
                                 .fixed("fixed")
                                 .rightOf("rightOf")
                                 .build())
                         .build())
                 .clear(FormButtonProperty.builder()
                         .children("children")
                         .excluded(false)
                         .position(FieldPositionProperty.builder()
                                 .below("below")
                                 .fixed("fixed")
                                 .rightOf("rightOf")
                                 .build())
                         .build())
                 .position("position")
                 .submit(FormButtonProperty.builder()
                         .children("children")
                         .excluded(false)
                         .position(FieldPositionProperty.builder()
                                 .below("below")
                                 .fixed("fixed")
                                 .rightOf("rightOf")
                                 .build())
                         .build())
                 .build())
         .dataType(FormDataTypeConfigProperty.builder()
                 .dataSourceType("dataSourceType")
                 .dataTypeName("dataTypeName")
                 .build())
         .environmentName("environmentName")
         .fields(Map.of(
                 "fieldsKey", FieldConfigProperty.builder()
                         .excluded(false)
                         .inputType(FieldInputConfigProperty.builder()
                                 .type("type")
                                 // the properties below are optional
                                 .defaultChecked(false)
                                 .defaultCountryCode("defaultCountryCode")
                                 .defaultValue("defaultValue")
                                 .descriptiveText("descriptiveText")
                                 .fileUploaderConfig(FileUploaderFieldConfigProperty.builder()
                                         .acceptedFileTypes(List.of("acceptedFileTypes"))
                                         .accessLevel("accessLevel")
                                         // the properties below are optional
                                         .isResumable(false)
                                         .maxFileCount(123)
                                         .maxSize(123)
                                         .showThumbnails(false)
                                         .build())
                                 .isArray(false)
                                 .maxValue(123)
                                 .minValue(123)
                                 .name("name")
                                 .placeholder("placeholder")
                                 .readOnly(false)
                                 .required(false)
                                 .step(123)
                                 .value("value")
                                 .valueMappings(ValueMappingsProperty.builder()
                                         .values(List.of(ValueMappingProperty.builder()
                                                 .value(FormInputValuePropertyProperty.builder()
                                                         .bindingProperties(FormInputValuePropertyBindingPropertiesProperty.builder()
                                                                 .property("property")
                                                                 // the properties below are optional
                                                                 .field("field")
                                                                 .build())
                                                         .concat(List.of(formInputValuePropertyProperty_))
                                                         .value("value")
                                                         .build())
                                                 // the properties below are optional
                                                 .displayValue(FormInputValuePropertyProperty.builder()
                                                         .bindingProperties(FormInputValuePropertyBindingPropertiesProperty.builder()
                                                                 .property("property")
                                                                 // the properties below are optional
                                                                 .field("field")
                                                                 .build())
                                                         .concat(List.of(formInputValuePropertyProperty_))
                                                         .value("value")
                                                         .build())
                                                 .build()))
                                         // the properties below are optional
                                         .bindingProperties(Map.of(
                                                 "bindingPropertiesKey", FormInputBindingPropertiesValueProperty.builder()
                                                         .bindingProperties(FormInputBindingPropertiesValuePropertiesProperty.builder()
                                                                 .model("model")
                                                                 .build())
                                                         .type("type")
                                                         .build()))
                                         .build())
                                 .build())
                         .label("label")
                         .position(FieldPositionProperty.builder()
                                 .below("below")
                                 .fixed("fixed")
                                 .rightOf("rightOf")
                                 .build())
                         .validations(List.of(FieldValidationConfigurationProperty.builder()
                                 .type("type")
                                 // the properties below are optional
                                 .numValues(List.of(123))
                                 .strValues(List.of("strValues"))
                                 .validationMessage("validationMessage")
                                 .build()))
                         .build()))
         .formActionType("formActionType")
         .labelDecorator("labelDecorator")
         .name("name")
         .schemaVersion("schemaVersion")
         .sectionalElements(Map.of(
                 "sectionalElementsKey", SectionalElementProperty.builder()
                         .type("type")
                         // the properties below are optional
                         .excluded(false)
                         .level(123)
                         .orientation("orientation")
                         .position(FieldPositionProperty.builder()
                                 .below("below")
                                 .fixed("fixed")
                                 .rightOf("rightOf")
                                 .build())
                         .text("text")
                         .build()))
         .style(FormStyleProperty.builder()
                 .horizontalGap(FormStyleConfigProperty.builder()
                         .tokenReference("tokenReference")
                         .value("value")
                         .build())
                 .outerPadding(FormStyleConfigProperty.builder()
                         .tokenReference("tokenReference")
                         .value("value")
                         .build())
                 .verticalGap(FormStyleConfigProperty.builder()
                         .tokenReference("tokenReference")
                         .value("value")
                         .build())
                 .build())
         .tags(Map.of(
                 "tagsKey", "tags"))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnForm

      protected CfnForm(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnForm

      protected CfnForm(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnForm

      @Stability(Stable) public CfnForm(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnFormProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties.
    • CfnForm

      @Stability(Stable) public CfnForm(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The ID for the form.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getAppId

      @Stability(Stable) @Nullable public String getAppId()
      The unique ID of the Amplify app associated with the form.
    • setAppId

      @Stability(Stable) public void setAppId(@Nullable String value)
      The unique ID of the Amplify app associated with the form.
    • getCta

      @Stability(Stable) @Nullable public Object getCta()
      The FormCTA object that stores the call to action configuration for the form.
    • setCta

      @Stability(Stable) public void setCta(@Nullable IResolvable value)
      The FormCTA object that stores the call to action configuration for the form.
    • setCta

      @Stability(Stable) public void setCta(@Nullable CfnForm.FormCTAProperty value)
      The FormCTA object that stores the call to action configuration for the form.
    • getDataType

      @Stability(Stable) @Nullable public Object getDataType()
      The type of data source to use to create the form.
    • setDataType

      @Stability(Stable) public void setDataType(@Nullable IResolvable value)
      The type of data source to use to create the form.
    • setDataType

      @Stability(Stable) public void setDataType(@Nullable CfnForm.FormDataTypeConfigProperty value)
      The type of data source to use to create the form.
    • getEnvironmentName

      @Stability(Stable) @Nullable public String getEnvironmentName()
      The name of the backend environment that is a part of the Amplify app.
    • setEnvironmentName

      @Stability(Stable) public void setEnvironmentName(@Nullable String value)
      The name of the backend environment that is a part of the Amplify app.
    • getFields

      @Stability(Stable) @Nullable public Object getFields()
      The configuration information for the form's fields.
    • setFields

      @Stability(Stable) public void setFields(@Nullable IResolvable value)
      The configuration information for the form's fields.
    • setFields

      @Stability(Stable) public void setFields(@Nullable Map<String,Object> value)
      The configuration information for the form's fields.
    • getFormActionType

      @Stability(Stable) @Nullable public String getFormActionType()
      Specifies whether to perform a create or update action on the form.
    • setFormActionType

      @Stability(Stable) public void setFormActionType(@Nullable String value)
      Specifies whether to perform a create or update action on the form.
    • getLabelDecorator

      @Stability(Stable) @Nullable public String getLabelDecorator()
      Specifies an icon or decoration to display on the form.
    • setLabelDecorator

      @Stability(Stable) public void setLabelDecorator(@Nullable String value)
      Specifies an icon or decoration to display on the form.
    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of the form.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of the form.
    • getSchemaVersion

      @Stability(Stable) @Nullable public String getSchemaVersion()
      The schema version of the form.
    • setSchemaVersion

      @Stability(Stable) public void setSchemaVersion(@Nullable String value)
      The schema version of the form.
    • getSectionalElements

      @Stability(Stable) @Nullable public Object getSectionalElements()
      The configuration information for the visual helper elements for the form.
    • setSectionalElements

      @Stability(Stable) public void setSectionalElements(@Nullable IResolvable value)
      The configuration information for the visual helper elements for the form.
    • setSectionalElements

      @Stability(Stable) public void setSectionalElements(@Nullable Map<String,Object> value)
      The configuration information for the visual helper elements for the form.
    • getStyle

      @Stability(Stable) @Nullable public Object getStyle()
      The configuration for the form's style.
    • setStyle

      @Stability(Stable) public void setStyle(@Nullable IResolvable value)
      The configuration for the form's style.
    • setStyle

      @Stability(Stable) public void setStyle(@Nullable CfnForm.FormStyleProperty value)
      The configuration for the form's style.
    • getTagsRaw

      @Stability(Stable) @Nullable public Map<String,String> getTagsRaw()
      One or more key-value pairs to use when tagging the form data.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Map<String,String> value)
      One or more key-value pairs to use when tagging the form data.