interface ConditionalSpecificationProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Lex.CfnBot.ConditionalSpecificationProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awslex#CfnBot_ConditionalSpecificationProperty |
![]() | software.amazon.awscdk.services.lex.CfnBot.ConditionalSpecificationProperty |
![]() | aws_cdk.aws_lex.CfnBot.ConditionalSpecificationProperty |
![]() | 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
Name | Type | Description |
---|---|---|
conditional | IResolvable | IResolvable | Conditional [] | A list of conditional branches. |
default | IResolvable | Default | The conditional branch that should be followed when the conditions for other branches are not satisfied. |
is | boolean | IResolvable | Determines whether a conditional branch is active. |
conditionalBranches
Type:
IResolvable
|
IResolvable
|
Conditional
[]
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
|
Default
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.