ComponentConditionPropertyProperty Struct
The ComponentConditionProperty property specifies a conditional expression for setting a component property.
Use ComponentConditionProperty to set a property to different values conditionally, based on the value of another property.
| 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 componentConditionPropertyProperty_: amplifyuibuilder.CfnComponent.ComponentConditionPropertyProperty;
declare const componentPropertyProperty_: amplifyuibuilder.CfnComponent.ComponentPropertyProperty;
const componentConditionPropertyProperty: amplifyuibuilder.CfnComponent.ComponentConditionPropertyProperty = {
else: {
bindingProperties: {
property: 'property',
// the properties below are optional
field: 'field',
},
bindings: {
bindingsKey: {
element: 'element',
property: 'property',
},
},
collectionBindingProperties: {
property: 'property',
// the properties below are optional
field: 'field',
},
componentName: 'componentName',
concat: [componentPropertyProperty_],
condition: componentConditionPropertyProperty_,
configured: false,
defaultValue: 'defaultValue',
event: 'event',
importedValue: 'importedValue',
model: 'model',
property: 'property',
type: 'type',
userAttribute: 'userAttribute',
value: 'value',
},
field: 'field',
operand: 'operand',
operandType: 'operandType',
operator: 'operator',
property: 'property',
then: {
bindingProperties: {
property: 'property',
// the properties below are optional
field: 'field',
},
bindings: {
bindingsKey: {
element: 'element',
property: 'property',
},
},
collectionBindingProperties: {
property: 'property',
// the properties below are optional
field: 'field',
},
componentName: 'componentName',
concat: [componentPropertyProperty_],
condition: componentConditionPropertyProperty_,
configured: false,
defaultValue: 'defaultValue',
event: 'event',
importedValue: 'importedValue',
model: 'model',
property: 'property',
type: 'type',
userAttribute: 'userAttribute',
value: 'value',
},
};
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
# component_condition_property_property_: amplifyuibuilder.CfnComponent.ComponentConditionPropertyProperty
# component_property_property_: amplifyuibuilder.CfnComponent.ComponentPropertyProperty
component_condition_property_property = amplifyuibuilder.CfnComponent.ComponentConditionPropertyProperty(
else=amplifyuibuilder.CfnComponent.ComponentPropertyProperty(
binding_properties=amplifyuibuilder.CfnComponent.ComponentPropertyBindingPropertiesProperty(
property="property",
# the properties below are optional
field="field"
),
bindings={
"bindings_key": amplifyuibuilder.CfnComponent.FormBindingElementProperty(
element="element",
property="property"
)
},
collection_binding_properties=amplifyuibuilder.CfnComponent.ComponentPropertyBindingPropertiesProperty(
property="property",
# the properties below are optional
field="field"
),
component_name="componentName",
concat=[component_property_property_],
condition=component_condition_property_property_,
configured=False,
default_value="defaultValue",
event="event",
imported_value="importedValue",
model="model",
property="property",
type="type",
user_attribute="userAttribute",
value="value"
),
field="field",
operand="operand",
operand_type="operandType",
operator="operator",
property="property",
then=amplifyuibuilder.CfnComponent.ComponentPropertyProperty(
binding_properties=amplifyuibuilder.CfnComponent.ComponentPropertyBindingPropertiesProperty(
property="property",
# the properties below are optional
field="field"
),
bindings={
"bindings_key": amplifyuibuilder.CfnComponent.FormBindingElementProperty(
element="element",
property="property"
)
},
collection_binding_properties=amplifyuibuilder.CfnComponent.ComponentPropertyBindingPropertiesProperty(
property="property",
# the properties below are optional
field="field"
),
component_name="componentName",
concat=[component_property_property_],
condition=component_condition_property_property_,
configured=False,
default_value="defaultValue",
event="event",
imported_value="importedValue",
model="model",
property="property",
type="type",
user_attribute="userAttribute",
value="value"
)
)
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.*;
ComponentConditionPropertyProperty componentConditionPropertyProperty_;
ComponentPropertyProperty componentPropertyProperty_;
ComponentConditionPropertyProperty componentConditionPropertyProperty = ComponentConditionPropertyProperty.builder()
.else(ComponentPropertyProperty.builder()
.bindingProperties(ComponentPropertyBindingPropertiesProperty.builder()
.property("property")
// the properties below are optional
.field("field")
.build())
.bindings(Map.of(
"bindingsKey", FormBindingElementProperty.builder()
.element("element")
.property("property")
.build()))
.collectionBindingProperties(ComponentPropertyBindingPropertiesProperty.builder()
.property("property")
// the properties below are optional
.field("field")
.build())
.componentName("componentName")
.concat(List.of(componentPropertyProperty_))
.condition(componentConditionPropertyProperty_)
.configured(false)
.defaultValue("defaultValue")
.event("event")
.importedValue("importedValue")
.model("model")
.property("property")
.type("type")
.userAttribute("userAttribute")
.value("value")
.build())
.field("field")
.operand("operand")
.operandType("operandType")
.operator("operator")
.property("property")
.then(ComponentPropertyProperty.builder()
.bindingProperties(ComponentPropertyBindingPropertiesProperty.builder()
.property("property")
// the properties below are optional
.field("field")
.build())
.bindings(Map.of(
"bindingsKey", FormBindingElementProperty.builder()
.element("element")
.property("property")
.build()))
.collectionBindingProperties(ComponentPropertyBindingPropertiesProperty.builder()
.property("property")
// the properties below are optional
.field("field")
.build())
.componentName("componentName")
.concat(List.of(componentPropertyProperty_))
.condition(componentConditionPropertyProperty_)
.configured(false)
.defaultValue("defaultValue")
.event("event")
.importedValue("importedValue")
.model("model")
.property("property")
.type("type")
.userAttribute("userAttribute")
.value("value")
.build())
.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;
ComponentConditionPropertyProperty componentConditionPropertyProperty_;
ComponentPropertyProperty componentPropertyProperty_;
var componentConditionPropertyProperty = new ComponentConditionPropertyProperty {
Else = new ComponentPropertyProperty {
BindingProperties = new ComponentPropertyBindingPropertiesProperty {
Property = "property",
// the properties below are optional
Field = "field"
},
Bindings = new Dictionary<string, object> {
{ "bindingsKey", new FormBindingElementProperty {
Element = "element",
Property = "property"
} }
},
CollectionBindingProperties = new ComponentPropertyBindingPropertiesProperty {
Property = "property",
// the properties below are optional
Field = "field"
},
ComponentName = "componentName",
Concat = new [] { componentPropertyProperty_ },
Condition = componentConditionPropertyProperty_,
Configured = false,
DefaultValue = "defaultValue",
Event = "event",
ImportedValue = "importedValue",
Model = "model",
Property = "property",
Type = "type",
UserAttribute = "userAttribute",
Value = "value"
},
Field = "field",
Operand = "operand",
OperandType = "operandType",
Operator = "operator",
Property = "property",
Then = new ComponentPropertyProperty {
BindingProperties = new ComponentPropertyBindingPropertiesProperty {
Property = "property",
// the properties below are optional
Field = "field"
},
Bindings = new Dictionary<string, object> {
{ "bindingsKey", new FormBindingElementProperty {
Element = "element",
Property = "property"
} }
},
CollectionBindingProperties = new ComponentPropertyBindingPropertiesProperty {
Property = "property",
// the properties below are optional
Field = "field"
},
ComponentName = "componentName",
Concat = new [] { componentPropertyProperty_ },
Condition = componentConditionPropertyProperty_,
Configured = false,
DefaultValue = "defaultValue",
Event = "event",
ImportedValue = "importedValue",
Model = "model",
Property = "property",
Type = "type",
UserAttribute = "userAttribute",
Value = "value"
}
};
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 componentConditionPropertyProperty_ ComponentConditionPropertyProperty
var componentPropertyProperty_ ComponentPropertyProperty
componentConditionPropertyProperty := &ComponentConditionPropertyProperty{
Else: &ComponentPropertyProperty{
BindingProperties: &ComponentPropertyBindingPropertiesProperty{
Property: jsii.String("property"),
// the properties below are optional
Field: jsii.String("field"),
},
Bindings: map[string]interface{}{
"bindingsKey": &FormBindingElementProperty{
"element": jsii.String("element"),
"property": jsii.String("property"),
},
},
CollectionBindingProperties: &ComponentPropertyBindingPropertiesProperty{
Property: jsii.String("property"),
// the properties below are optional
Field: jsii.String("field"),
},
ComponentName: jsii.String("componentName"),
Concat: []interface{}{
componentPropertyProperty_,
},
Condition: componentConditionPropertyProperty_,
Configured: jsii.Boolean(false),
DefaultValue: jsii.String("defaultValue"),
Event: jsii.String("event"),
ImportedValue: jsii.String("importedValue"),
Model: jsii.String("model"),
Property: jsii.String("property"),
Type: jsii.String("type"),
UserAttribute: jsii.String("userAttribute"),
Value: jsii.String("value"),
},
Field: jsii.String("field"),
Operand: jsii.String("operand"),
OperandType: jsii.String("operandType"),
Operator: jsii.String("operator"),
Property: jsii.String("property"),
Then: &ComponentPropertyProperty{
BindingProperties: &ComponentPropertyBindingPropertiesProperty{
Property: jsii.String("property"),
// the properties below are optional
Field: jsii.String("field"),
},
Bindings: map[string]interface{}{
"bindingsKey": &FormBindingElementProperty{
"element": jsii.String("element"),
"property": jsii.String("property"),
},
},
CollectionBindingProperties: &ComponentPropertyBindingPropertiesProperty{
Property: jsii.String("property"),
// the properties below are optional
Field: jsii.String("field"),
},
ComponentName: jsii.String("componentName"),
Concat: []interface{}{
componentPropertyProperty_,
},
Condition: componentConditionPropertyProperty_,
Configured: jsii.Boolean(false),
DefaultValue: jsii.String("defaultValue"),
Event: jsii.String("event"),
ImportedValue: jsii.String("importedValue"),
Model: jsii.String("model"),
Property: jsii.String("property"),
Type: jsii.String("type"),
UserAttribute: jsii.String("userAttribute"),
Value: jsii.String("value"),
},
}
Properties
elseoptionalIResolvable | CfnComponent.elseoptionaltyping.Union[IResolvable, ComponentPropertyProperty]elseoptionalIResolvableElseoptionalIResolvableElseoptionalinterface{} #The value to assign to the property if the condition is not met.
The name of a field.
Specify this when the property is a data model.
operandoptionalstringoperandoptionalstroperandoptionalStringOperandoptionalstringOperandoptional*string #The value of the property to evaluate.
operandTypeoptionalstringoperand_typeoptionalstroperandTypeoptionalStringOperandTypeoptionalstringOperandTypeoptional*string #The type of the property to evaluate.
operatoroptionalstringoperatoroptionalstroperatoroptionalStringOperatoroptionalstringOperatoroptional*string #The operator to use to perform the evaluation, such as `eq` to represent equals.
propertyoptionalstringpropertyoptionalstrpropertyoptionalStringPropertyoptionalstringPropertyoptional*string #The name of the conditional property.
thenoptionalIResolvable | CfnComponent.thenoptionaltyping.Union[IResolvable, ComponentPropertyProperty]thenoptionalIResolvableThenoptionalIResolvableThenoptionalinterface{} #The value to assign to the property if the condition is met.