@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:35.269Z") public class CfnForm extends CfnResource implements IInspectable
Contains the configuration settings for a Form
user interface (UI) element for an Amplify app. A form is a component you can add to your project by specifying a data source as the default configuration for the 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.*; CfnForm cfnForm = CfnForm.Builder.create(this, "MyCfnForm") .dataType(FormDataTypeConfigProperty.builder() .dataSourceType("dataSourceType") .dataTypeName("dataTypeName") .build()) .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") .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() .value("value") .build()) // the properties below are optional .displayValue(FormInputValuePropertyProperty.builder() .value("value") .build()) .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") .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()) // the properties below are optional .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()) .environmentName("environmentName") .tags(Map.of( "tagsKey", "tags")) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnForm.Builder
A fluent builder for
CfnForm . |
static interface |
CfnForm.FieldConfigProperty
Describes the configuration information for a field in a table.
|
static interface |
CfnForm.FieldInputConfigProperty
Describes the configuration for the default input values to display for a field.
|
static interface |
CfnForm.FieldPositionProperty
Describes the field position.
|
static interface |
CfnForm.FieldValidationConfigurationProperty
Describes the validation configuration for a field.
|
static interface |
CfnForm.FormButtonProperty
Describes the configuration for a button UI element that is a part of a form.
|
static interface |
CfnForm.FormCTAProperty
Describes the call to action button configuration for the form.
|
static interface |
CfnForm.FormDataTypeConfigProperty
Describes the data type configuration for the data source associated with a form.
|
static interface |
CfnForm.FormInputValuePropertyProperty
Describes the configuration for an input field on a form.
|
static interface |
CfnForm.FormStyleConfigProperty
Describes the configuration settings for the form's style properties.
|
static interface |
CfnForm.FormStyleProperty
Describes the configuration for the form's style.
|
static interface |
CfnForm.SectionalElementProperty
Stores the configuration information for a visual helper element for a form.
|
static interface |
CfnForm.ValueMappingProperty
Associates a complex object with a display value.
|
static interface |
CfnForm.ValueMappingsProperty
Represents the data binding configuration for a value map.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnForm(Construct scope,
java.lang.String id,
CfnFormProps props)
Create a new `AWS::AmplifyUIBuilder::Form`.
|
protected |
CfnForm(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnForm(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAppId()
The unique ID of the Amplify app associated with the form.
|
java.lang.String |
getAttrId() |
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getCta()
Stores the call to action configuration for the form.
|
java.lang.Object |
getDataType()
The type of data source to use to create the form.
|
java.lang.String |
getEnvironmentName()
The name of the backend environment that is a part of the Amplify app.
|
java.lang.Object |
getFields()
Stores the information about the form's fields.
|
java.lang.String |
getFormActionType()
The operation to perform on the specified form.
|
java.lang.String |
getName()
The name of the form.
|
java.lang.String |
getSchemaVersion()
The schema version of the form when it was imported.
|
java.lang.Object |
getSectionalElements()
Stores the visual helper elements for the form that are not associated with any data.
|
java.lang.Object |
getStyle()
Stores the configuration for the form's style.
|
TagManager |
getTags()
One or more key-value pairs to use when tagging the form.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAppId(java.lang.String value)
The unique ID of the Amplify app associated with the form.
|
void |
setCta(CfnForm.FormCTAProperty value)
Stores the call to action configuration for the form.
|
void |
setCta(IResolvable value)
Stores the call to action configuration for the form.
|
void |
setDataType(CfnForm.FormDataTypeConfigProperty value)
The type of data source to use to create the form.
|
void |
setDataType(IResolvable value)
The type of data source to use to create the form.
|
void |
setEnvironmentName(java.lang.String value)
The name of the backend environment that is a part of the Amplify app.
|
void |
setFields(IResolvable value)
Stores the information about the form's fields.
|
void |
setFields(java.util.Map<java.lang.String,java.lang.Object> value)
Stores the information about the form's fields.
|
void |
setFormActionType(java.lang.String value)
The operation to perform on the specified form.
|
void |
setName(java.lang.String value)
The name of the form.
|
void |
setSchemaVersion(java.lang.String value)
The schema version of the form when it was imported.
|
void |
setSectionalElements(IResolvable value)
Stores the visual helper elements for the form that are not associated with any data.
|
void |
setSectionalElements(java.util.Map<java.lang.String,java.lang.Object> value)
Stores the visual helper elements for the form that are not associated with any data.
|
void |
setStyle(CfnForm.FormStyleProperty value)
Stores the configuration for the form's style.
|
void |
setStyle(IResolvable value)
Stores the configuration for the form's style.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnForm(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnForm(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnForm(Construct scope, java.lang.String id, CfnFormProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrId()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.Object getDataType()
public void setDataType(IResolvable value)
public void setDataType(CfnForm.FormDataTypeConfigProperty value)
public java.lang.Object getFields()
public void setFields(IResolvable value)
public void setFields(java.util.Map<java.lang.String,java.lang.Object> value)
public java.lang.String getFormActionType()
public void setFormActionType(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getSchemaVersion()
public void setSchemaVersion(java.lang.String value)
public java.lang.Object getSectionalElements()
public void setSectionalElements(IResolvable value)
public void setSectionalElements(java.util.Map<java.lang.String,java.lang.Object> value)
public java.lang.Object getStyle()
public void setStyle(IResolvable value)
public void setStyle(CfnForm.FormStyleProperty value)
public java.lang.String getAppId()
public void setAppId(java.lang.String value)
public java.lang.Object getCta()
public void setCta(IResolvable value)
public void setCta(CfnForm.FormCTAProperty value)
public java.lang.String getEnvironmentName()
public void setEnvironmentName(java.lang.String value)