aws-cdk-lib.aws_amplifyuibuilder.CfnComponent.ComponentConditionPropertyProperty

interface ComponentConditionPropertyProperty

LanguageType name
.NETAmazon.CDK.AWS.AmplifyUIBuilder.CfnComponent.ComponentConditionPropertyProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsamplifyuibuilder#CfnComponent_ComponentConditionPropertyProperty
Javasoftware.amazon.awscdk.services.amplifyuibuilder.CfnComponent.ComponentConditionPropertyProperty
Pythonaws_cdk.aws_amplifyuibuilder.CfnComponent.ComponentConditionPropertyProperty
TypeScript aws-cdk-lib » aws_amplifyuibuilder » CfnComponent » ComponentConditionPropertyProperty

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.

Example

// 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 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: {
      else: componentPropertyProperty_,
      field: 'field',
      operand: 'operand',
      operandType: 'operandType',
      operator: 'operator',
      property: 'property',
      then: componentPropertyProperty_,
    },
    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: {
      else: componentPropertyProperty_,
      field: 'field',
      operand: 'operand',
      operandType: 'operandType',
      operator: 'operator',
      property: 'property',
      then: componentPropertyProperty_,
    },
    configured: false,
    defaultValue: 'defaultValue',
    event: 'event',
    importedValue: 'importedValue',
    model: 'model',
    property: 'property',
    type: 'type',
    userAttribute: 'userAttribute',
    value: 'value',
  },
};

Properties

NameTypeDescription
else?IResolvable | ComponentPropertyPropertyThe value to assign to the property if the condition is not met.
field?stringThe name of a field.
operand?stringThe value of the property to evaluate.
operandType?stringThe type of the property to evaluate.
operator?stringThe operator to use to perform the evaluation, such as eq to represent equals.
property?stringThe name of the conditional property.
then?IResolvable | ComponentPropertyPropertyThe value to assign to the property if the condition is met.

else?

Type: IResolvable | ComponentPropertyProperty (optional)

The value to assign to the property if the condition is not met.


field?

Type: string (optional)

The name of a field.

Specify this when the property is a data model.


operand?

Type: string (optional)

The value of the property to evaluate.


operandType?

Type: string (optional)

The type of the property to evaluate.


operator?

Type: string (optional)

The operator to use to perform the evaluation, such as eq to represent equals.


property?

Type: string (optional)

The name of the conditional property.


then?

Type: IResolvable | ComponentPropertyProperty (optional)

The value to assign to the property if the condition is met.