CfnFormProps Struct
Properties for defining a CfnForm.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_amplifyuibuilder as amplifyuibuilder } from 'aws-cdk-lib';
declare const formInputValuePropertyProperty_: amplifyuibuilder.CfnForm.FormInputValuePropertyProperty;
const cfnFormProps: amplifyuibuilder.CfnFormProps = {
appId: 'appId',
cta: {
cancel: {
children: 'children',
excluded: false,
position: {
below: 'below',
fixed: 'fixed',
rightOf: 'rightOf',
},
},
clear: {
children: 'children',
excluded: false,
position: {
below: 'below',
fixed: 'fixed',
rightOf: 'rightOf',
},
},
position: 'position',
submit: {
children: 'children',
excluded: false,
position: {
below: 'below',
fixed: 'fixed',
rightOf: 'rightOf',
},
},
},
dataType: {
dataSourceType: 'dataSourceType',
dataTypeName: 'dataTypeName',
},
environmentName: 'environmentName',
fields: {
fieldsKey: {
excluded: false,
inputType: {
type: 'type',
// the properties below are optional
defaultChecked: false,
defaultCountryCode: 'defaultCountryCode',
defaultValue: 'defaultValue',
descriptiveText: 'descriptiveText',
fileUploaderConfig: {
acceptedFileTypes: ['acceptedFileTypes'],
accessLevel: 'accessLevel',
// the properties below are optional
isResumable: false,
maxFileCount: 123,
maxSize: 123,
showThumbnails: false,
},
isArray: false,
maxValue: 123,
minValue: 123,
name: 'name',
placeholder: 'placeholder',
readOnly: false,
required: false,
step: 123,
value: 'value',
valueMappings: {
values: [{
value: {
bindingProperties: {
property: 'property',
// the properties below are optional
field: 'field',
},
concat: [formInputValuePropertyProperty_],
value: 'value',
},
// the properties below are optional
displayValue: {
bindingProperties: {
property: 'property',
// the properties below are optional
field: 'field',
},
concat: [formInputValuePropertyProperty_],
value: 'value',
},
}],
// the properties below are optional
bindingProperties: {
bindingPropertiesKey: {
bindingProperties: {
model: 'model',
},
type: 'type',
},
},
},
},
label: 'label',
position: {
below: 'below',
fixed: 'fixed',
rightOf: 'rightOf',
},
validations: [{
type: 'type',
// the properties below are optional
numValues: [123],
strValues: ['strValues'],
validationMessage: 'validationMessage',
}],
},
},
formActionType: 'formActionType',
labelDecorator: 'labelDecorator',
name: 'name',
schemaVersion: 'schemaVersion',
sectionalElements: {
sectionalElementsKey: {
type: 'type',
// the properties below are optional
excluded: false,
level: 123,
orientation: 'orientation',
position: {
below: 'below',
fixed: 'fixed',
rightOf: 'rightOf',
},
text: 'text',
},
},
style: {
horizontalGap: {
tokenReference: 'tokenReference',
value: 'value',
},
outerPadding: {
tokenReference: 'tokenReference',
value: 'value',
},
verticalGap: {
tokenReference: 'tokenReference',
value: 'value',
},
},
tags: {
tagsKey: 'tags',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_amplifyuibuilder as amplifyuibuilder
# form_input_value_property_property_: amplifyuibuilder.CfnForm.FormInputValuePropertyProperty
cfn_form_props = amplifyuibuilder.CfnFormProps(
app_id="appId",
cta=amplifyuibuilder.CfnForm.FormCTAProperty(
cancel=amplifyuibuilder.CfnForm.FormButtonProperty(
children="children",
excluded=False,
position=amplifyuibuilder.CfnForm.FieldPositionProperty(
below="below",
fixed="fixed",
right_of="rightOf"
)
),
clear=amplifyuibuilder.CfnForm.FormButtonProperty(
children="children",
excluded=False,
position=amplifyuibuilder.CfnForm.FieldPositionProperty(
below="below",
fixed="fixed",
right_of="rightOf"
)
),
position="position",
submit=amplifyuibuilder.CfnForm.FormButtonProperty(
children="children",
excluded=False,
position=amplifyuibuilder.CfnForm.FieldPositionProperty(
below="below",
fixed="fixed",
right_of="rightOf"
)
)
),
data_type=amplifyuibuilder.CfnForm.FormDataTypeConfigProperty(
data_source_type="dataSourceType",
data_type_name="dataTypeName"
),
environment_name="environmentName",
fields={
"fields_key": amplifyuibuilder.CfnForm.FieldConfigProperty(
excluded=False,
input_type=amplifyuibuilder.CfnForm.FieldInputConfigProperty(
type="type",
# the properties below are optional
default_checked=False,
default_country_code="defaultCountryCode",
default_value="defaultValue",
descriptive_text="descriptiveText",
file_uploader_config=amplifyuibuilder.CfnForm.FileUploaderFieldConfigProperty(
accepted_file_types=["acceptedFileTypes"],
access_level="accessLevel",
# the properties below are optional
is_resumable=False,
max_file_count=123,
max_size=123,
show_thumbnails=False
),
is_array=False,
max_value=123,
min_value=123,
name="name",
placeholder="placeholder",
read_only=False,
required=False,
step=123,
value="value",
value_mappings=amplifyuibuilder.CfnForm.ValueMappingsProperty(
values=[amplifyuibuilder.CfnForm.ValueMappingProperty(
value=amplifyuibuilder.CfnForm.FormInputValuePropertyProperty(
binding_properties=amplifyuibuilder.CfnForm.FormInputValuePropertyBindingPropertiesProperty(
property="property",
# the properties below are optional
field="field"
),
concat=[form_input_value_property_property_],
value="value"
),
# the properties below are optional
display_value=amplifyuibuilder.CfnForm.FormInputValuePropertyProperty(
binding_properties=amplifyuibuilder.CfnForm.FormInputValuePropertyBindingPropertiesProperty(
property="property",
# the properties below are optional
field="field"
),
concat=[form_input_value_property_property_],
value="value"
)
)],
# the properties below are optional
binding_properties={
"binding_properties_key": amplifyuibuilder.CfnForm.FormInputBindingPropertiesValueProperty(
binding_properties=amplifyuibuilder.CfnForm.FormInputBindingPropertiesValuePropertiesProperty(
model="model"
),
type="type"
)
}
)
),
label="label",
position=amplifyuibuilder.CfnForm.FieldPositionProperty(
below="below",
fixed="fixed",
right_of="rightOf"
),
validations=[amplifyuibuilder.CfnForm.FieldValidationConfigurationProperty(
type="type",
# the properties below are optional
num_values=[123],
str_values=["strValues"],
validation_message="validationMessage"
)]
)
},
form_action_type="formActionType",
label_decorator="labelDecorator",
name="name",
schema_version="schemaVersion",
sectional_elements={
"sectional_elements_key": amplifyuibuilder.CfnForm.SectionalElementProperty(
type="type",
# the properties below are optional
excluded=False,
level=123,
orientation="orientation",
position=amplifyuibuilder.CfnForm.FieldPositionProperty(
below="below",
fixed="fixed",
right_of="rightOf"
),
text="text"
)
},
style=amplifyuibuilder.CfnForm.FormStyleProperty(
horizontal_gap=amplifyuibuilder.CfnForm.FormStyleConfigProperty(
token_reference="tokenReference",
value="value"
),
outer_padding=amplifyuibuilder.CfnForm.FormStyleConfigProperty(
token_reference="tokenReference",
value="value"
),
vertical_gap=amplifyuibuilder.CfnForm.FormStyleConfigProperty(
token_reference="tokenReference",
value="value"
)
),
tags={
"tags_key": "tags"
}
)
java
// 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_;
CfnFormProps cfnFormProps = CfnFormProps.builder()
.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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AmplifyUIBuilder;
FormInputValuePropertyProperty formInputValuePropertyProperty_;
var cfnFormProps = new CfnFormProps {
AppId = "appId",
Cta = new FormCTAProperty {
Cancel = new FormButtonProperty {
Children = "children",
Excluded = false,
Position = new FieldPositionProperty {
Below = "below",
Fixed = "fixed",
RightOf = "rightOf"
}
},
Clear = new FormButtonProperty {
Children = "children",
Excluded = false,
Position = new FieldPositionProperty {
Below = "below",
Fixed = "fixed",
RightOf = "rightOf"
}
},
Position = "position",
Submit = new FormButtonProperty {
Children = "children",
Excluded = false,
Position = new FieldPositionProperty {
Below = "below",
Fixed = "fixed",
RightOf = "rightOf"
}
}
},
DataType = new FormDataTypeConfigProperty {
DataSourceType = "dataSourceType",
DataTypeName = "dataTypeName"
},
EnvironmentName = "environmentName",
Fields = new Dictionary<string, object> {
{ "fieldsKey", new FieldConfigProperty {
Excluded = false,
InputType = new FieldInputConfigProperty {
Type = "type",
// the properties below are optional
DefaultChecked = false,
DefaultCountryCode = "defaultCountryCode",
DefaultValue = "defaultValue",
DescriptiveText = "descriptiveText",
FileUploaderConfig = new FileUploaderFieldConfigProperty {
AcceptedFileTypes = new [] { "acceptedFileTypes" },
AccessLevel = "accessLevel",
// the properties below are optional
IsResumable = false,
MaxFileCount = 123,
MaxSize = 123,
ShowThumbnails = false
},
IsArray = false,
MaxValue = 123,
MinValue = 123,
Name = "name",
Placeholder = "placeholder",
ReadOnly = false,
Required = false,
Step = 123,
Value = "value",
ValueMappings = new ValueMappingsProperty {
Values = new [] { new ValueMappingProperty {
Value = new FormInputValuePropertyProperty {
BindingProperties = new FormInputValuePropertyBindingPropertiesProperty {
Property = "property",
// the properties below are optional
Field = "field"
},
Concat = new [] { formInputValuePropertyProperty_ },
Value = "value"
},
// the properties below are optional
DisplayValue = new FormInputValuePropertyProperty {
BindingProperties = new FormInputValuePropertyBindingPropertiesProperty {
Property = "property",
// the properties below are optional
Field = "field"
},
Concat = new [] { formInputValuePropertyProperty_ },
Value = "value"
}
} },
// the properties below are optional
BindingProperties = new Dictionary<string, object> {
{ "bindingPropertiesKey", new FormInputBindingPropertiesValueProperty {
BindingProperties = new FormInputBindingPropertiesValuePropertiesProperty {
Model = "model"
},
Type = "type"
} }
}
}
},
Label = "label",
Position = new FieldPositionProperty {
Below = "below",
Fixed = "fixed",
RightOf = "rightOf"
},
Validations = new [] { new FieldValidationConfigurationProperty {
Type = "type",
// the properties below are optional
NumValues = new [] { 123 },
StrValues = new [] { "strValues" },
ValidationMessage = "validationMessage"
} }
} }
},
FormActionType = "formActionType",
LabelDecorator = "labelDecorator",
Name = "name",
SchemaVersion = "schemaVersion",
SectionalElements = new Dictionary<string, object> {
{ "sectionalElementsKey", new SectionalElementProperty {
Type = "type",
// the properties below are optional
Excluded = false,
Level = 123,
Orientation = "orientation",
Position = new FieldPositionProperty {
Below = "below",
Fixed = "fixed",
RightOf = "rightOf"
},
Text = "text"
} }
},
Style = new FormStyleProperty {
HorizontalGap = new FormStyleConfigProperty {
TokenReference = "tokenReference",
Value = "value"
},
OuterPadding = new FormStyleConfigProperty {
TokenReference = "tokenReference",
Value = "value"
},
VerticalGap = new FormStyleConfigProperty {
TokenReference = "tokenReference",
Value = "value"
}
},
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var formInputValuePropertyProperty_ FormInputValuePropertyProperty
cfnFormProps := &CfnFormProps{
AppId: jsii.String("appId"),
Cta: &FormCTAProperty{
Cancel: &FormButtonProperty{
Children: jsii.String("children"),
Excluded: jsii.Boolean(false),
Position: &FieldPositionProperty{
Below: jsii.String("below"),
Fixed: jsii.String("fixed"),
RightOf: jsii.String("rightOf"),
},
},
Clear: &FormButtonProperty{
Children: jsii.String("children"),
Excluded: jsii.Boolean(false),
Position: &FieldPositionProperty{
Below: jsii.String("below"),
Fixed: jsii.String("fixed"),
RightOf: jsii.String("rightOf"),
},
},
Position: jsii.String("position"),
Submit: &FormButtonProperty{
Children: jsii.String("children"),
Excluded: jsii.Boolean(false),
Position: &FieldPositionProperty{
Below: jsii.String("below"),
Fixed: jsii.String("fixed"),
RightOf: jsii.String("rightOf"),
},
},
},
DataType: &FormDataTypeConfigProperty{
DataSourceType: jsii.String("dataSourceType"),
DataTypeName: jsii.String("dataTypeName"),
},
EnvironmentName: jsii.String("environmentName"),
Fields: map[string]interface{}{
"fieldsKey": &FieldConfigProperty{
"excluded": jsii.Boolean(false),
"inputType": &FieldInputConfigProperty{
"type": jsii.String("type"),
// the properties below are optional
"defaultChecked": jsii.Boolean(false),
"defaultCountryCode": jsii.String("defaultCountryCode"),
"defaultValue": jsii.String("defaultValue"),
"descriptiveText": jsii.String("descriptiveText"),
"fileUploaderConfig": &FileUploaderFieldConfigProperty{
"acceptedFileTypes": []*string{
jsii.String("acceptedFileTypes"),
},
"accessLevel": jsii.String("accessLevel"),
// the properties below are optional
"isResumable": jsii.Boolean(false),
"maxFileCount": jsii.Number(123),
"maxSize": jsii.Number(123),
"showThumbnails": jsii.Boolean(false),
},
"isArray": jsii.Boolean(false),
"maxValue": jsii.Number(123),
"minValue": jsii.Number(123),
"name": jsii.String("name"),
"placeholder": jsii.String("placeholder"),
"readOnly": jsii.Boolean(false),
"required": jsii.Boolean(false),
"step": jsii.Number(123),
"value": jsii.String("value"),
"valueMappings": &ValueMappingsProperty{
"values": []interface{}{
&ValueMappingProperty{
"value": &FormInputValuePropertyProperty{
"bindingProperties": &FormInputValuePropertyBindingPropertiesProperty{
"property": jsii.String("property"),
// the properties below are optional
"field": jsii.String("field"),
},
"concat": []interface{}{
formInputValuePropertyProperty_,
},
"value": jsii.String("value"),
},
// the properties below are optional
"displayValue": &FormInputValuePropertyProperty{
"bindingProperties": &FormInputValuePropertyBindingPropertiesProperty{
"property": jsii.String("property"),
// the properties below are optional
"field": jsii.String("field"),
},
"concat": []interface{}{
formInputValuePropertyProperty_,
},
"value": jsii.String("value"),
},
},
},
// the properties below are optional
"bindingProperties": map[string]interface{}{
"bindingPropertiesKey": &FormInputBindingPropertiesValueProperty{
"bindingProperties": &FormInputBindingPropertiesValuePropertiesProperty{
"model": jsii.String("model"),
},
"type": jsii.String("type"),
},
},
},
},
"label": jsii.String("label"),
"position": &FieldPositionProperty{
"below": jsii.String("below"),
"fixed": jsii.String("fixed"),
"rightOf": jsii.String("rightOf"),
},
"validations": []interface{}{
&FieldValidationConfigurationProperty{
"type": jsii.String("type"),
// the properties below are optional
"numValues": []interface{}{
jsii.Number(123),
},
"strValues": []*string{
jsii.String("strValues"),
},
"validationMessage": jsii.String("validationMessage"),
},
},
},
},
FormActionType: jsii.String("formActionType"),
LabelDecorator: jsii.String("labelDecorator"),
Name: jsii.String("name"),
SchemaVersion: jsii.String("schemaVersion"),
SectionalElements: map[string]interface{}{
"sectionalElementsKey": &SectionalElementProperty{
"type": jsii.String("type"),
// the properties below are optional
"excluded": jsii.Boolean(false),
"level": jsii.Number(123),
"orientation": jsii.String("orientation"),
"position": &FieldPositionProperty{
"below": jsii.String("below"),
"fixed": jsii.String("fixed"),
"rightOf": jsii.String("rightOf"),
},
"text": jsii.String("text"),
},
},
Style: &FormStyleProperty{
HorizontalGap: &FormStyleConfigProperty{
TokenReference: jsii.String("tokenReference"),
Value: jsii.String("value"),
},
OuterPadding: &FormStyleConfigProperty{
TokenReference: jsii.String("tokenReference"),
Value: jsii.String("value"),
},
VerticalGap: &FormStyleConfigProperty{
TokenReference: jsii.String("tokenReference"),
Value: jsii.String("value"),
},
},
Tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
}
Properties
The unique ID of the Amplify app associated with the form.
ctaoptionalIResolvable | CfnForm.FormCTAPropertyctaoptionaltyping.Union[IResolvable, FormCTAProperty]ctaoptionalIResolvableCtaoptionalIResolvableCtaoptionalinterface{} #The `FormCTA` object that stores the call to action configuration for the form.
dataTypeoptionalIResolvable | CfnForm.data_typeoptionaltyping.Union[IResolvable, FormDataTypeConfigProperty]dataTypeoptionalIResolvableDataTypeoptionalIResolvableDataTypeoptionalinterface{} #The type of data source to use to create the form.
environmentNameoptionalstringenvironment_nameoptionalstrenvironmentNameoptionalStringEnvironmentNameoptionalstringEnvironmentNameoptional*string #The name of the backend environment that is a part of the Amplify app.
fieldsoptionalIResolvable | { [key: string]: IResolvable | CfnForm.FieldConfigProperty }fieldsoptionaltyping.Union[IResolvable, typing.Mapping[str, typing.Union[IResolvable, FieldConfigProperty]]]fieldsoptionalIResolvableFieldsoptionalIResolvableFieldsoptionalinterface{} #The configuration information for the form's fields.
formActionTypeoptionalstringform_action_typeoptionalstrformActionTypeoptionalStringFormActionTypeoptionalstringFormActionTypeoptional*string #Specifies whether to perform a create or update action on the form.
labelDecoratoroptionalstringlabel_decoratoroptionalstrlabelDecoratoroptionalStringLabelDecoratoroptionalstringLabelDecoratoroptional*string #Specifies an icon or decoration to display on the form.
The name of the form.
schemaVersionoptionalstringschema_versionoptionalstrschemaVersionoptionalStringSchemaVersionoptionalstringSchemaVersionoptional*string #The schema version of the form.
sectionalElementsoptionalIResolvable | { [key: string]: IResolvable | CfnForm.SectionalElementProperty }sectional_elementsoptionaltyping.Union[IResolvable, typing.Mapping[str, typing.Union[IResolvable, SectionalElementProperty]]]sectionalElementsoptionalIResolvableSectionalElementsoptionalIResolvableSectionalElementsoptionalinterface{} #The configuration information for the visual helper elements for the form.
These elements are not associated with any data.
styleoptionalIResolvable | CfnForm.FormStylePropertystyleoptionaltyping.Union[IResolvable, FormStyleProperty]styleoptionalIResolvableStyleoptionalIResolvableStyleoptionalinterface{} #The configuration for the form's style.
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #One or more key-value pairs to use when tagging the form data.