aws-cdk-lib.aws_lex.CfnBot.ConditionalSpecificationProperty

interface ConditionalSpecificationProperty

LanguageType name
.NETAmazon.CDK.AWS.Lex.CfnBot.ConditionalSpecificationProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslex#CfnBot_ConditionalSpecificationProperty
Javasoftware.amazon.awscdk.services.lex.CfnBot.ConditionalSpecificationProperty
Pythonaws_cdk.aws_lex.CfnBot.ConditionalSpecificationProperty
TypeScript aws-cdk-lib » aws_lex » CfnBot » ConditionalSpecificationProperty

Provides a list of conditional branches.

Branches are evaluated in the order that they are entered in the list. The first branch with a condition that evaluates to true is executed. The last branch in the list is the default branch. The default branch should not have any condition expression. The default branch is executed if no other branch has a matching condition.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lex as lex } from 'aws-cdk-lib';

declare const slotValueOverrideProperty_: lex.CfnBot.SlotValueOverrideProperty;
const conditionalSpecificationProperty: lex.CfnBot.ConditionalSpecificationProperty = {
  conditionalBranches: [{
    condition: {
      expressionString: 'expressionString',
    },
    name: 'name',
    nextStep: {
      dialogAction: {
        type: 'type',

        // the properties below are optional
        slotToElicit: 'slotToElicit',
        suppressNextMessage: false,
      },
      intent: {
        name: 'name',
        slots: [{
          slotName: 'slotName',
          slotValueOverride: {
            shape: 'shape',
            value: {
              interpretedValue: 'interpretedValue',
            },
            values: [slotValueOverrideProperty_],
          },
        }],
      },
      sessionAttributes: [{
        key: 'key',

        // the properties below are optional
        value: 'value',
      }],
    },

    // the properties below are optional
    response: {
      messageGroupsList: [{
        message: {
          customPayload: {
            value: 'value',
          },
          imageResponseCard: {
            title: 'title',

            // the properties below are optional
            buttons: [{
              text: 'text',
              value: 'value',
            }],
            imageUrl: 'imageUrl',
            subtitle: 'subtitle',
          },
          plainTextMessage: {
            value: 'value',
          },
          ssmlMessage: {
            value: 'value',
          },
        },

        // the properties below are optional
        variations: [{
          customPayload: {
            value: 'value',
          },
          imageResponseCard: {
            title: 'title',

            // the properties below are optional
            buttons: [{
              text: 'text',
              value: 'value',
            }],
            imageUrl: 'imageUrl',
            subtitle: 'subtitle',
          },
          plainTextMessage: {
            value: 'value',
          },
          ssmlMessage: {
            value: 'value',
          },
        }],
      }],

      // the properties below are optional
      allowInterrupt: false,
    },
  }],
  defaultBranch: {
    nextStep: {
      dialogAction: {
        type: 'type',

        // the properties below are optional
        slotToElicit: 'slotToElicit',
        suppressNextMessage: false,
      },
      intent: {
        name: 'name',
        slots: [{
          slotName: 'slotName',
          slotValueOverride: {
            shape: 'shape',
            value: {
              interpretedValue: 'interpretedValue',
            },
            values: [slotValueOverrideProperty_],
          },
        }],
      },
      sessionAttributes: [{
        key: 'key',

        // the properties below are optional
        value: 'value',
      }],
    },
    response: {
      messageGroupsList: [{
        message: {
          customPayload: {
            value: 'value',
          },
          imageResponseCard: {
            title: 'title',

            // the properties below are optional
            buttons: [{
              text: 'text',
              value: 'value',
            }],
            imageUrl: 'imageUrl',
            subtitle: 'subtitle',
          },
          plainTextMessage: {
            value: 'value',
          },
          ssmlMessage: {
            value: 'value',
          },
        },

        // the properties below are optional
        variations: [{
          customPayload: {
            value: 'value',
          },
          imageResponseCard: {
            title: 'title',

            // the properties below are optional
            buttons: [{
              text: 'text',
              value: 'value',
            }],
            imageUrl: 'imageUrl',
            subtitle: 'subtitle',
          },
          plainTextMessage: {
            value: 'value',
          },
          ssmlMessage: {
            value: 'value',
          },
        }],
      }],

      // the properties below are optional
      allowInterrupt: false,
    },
  },
  isActive: false,
};

Properties

NameTypeDescription
conditionalBranchesIResolvable | IResolvable | ConditionalBranchProperty[]A list of conditional branches.
defaultBranchIResolvable | DefaultConditionalBranchPropertyThe conditional branch that should be followed when the conditions for other branches are not satisfied.
isActiveboolean | IResolvableDetermines whether a conditional branch is active.

conditionalBranches

Type: IResolvable | IResolvable | ConditionalBranchProperty[]

A list of conditional branches.

A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.


defaultBranch

Type: IResolvable | DefaultConditionalBranchProperty

The conditional branch that should be followed when the conditions for other branches are not satisfied.

A conditional branch is made up of a condition, a response and a next step.


isActive

Type: boolean | IResolvable

Determines whether a conditional branch is active.

When IsActive is false, the conditions are not evaluated.