PromptSpecificationProperty Struct
Specifies a list of message groups that Amazon Lex sends to a user to elicit a response.
Example
ts
// 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';
const promptSpecificationProperty: lex.CfnBot.PromptSpecificationProperty = {
maxRetries: 123,
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,
messageSelectionStrategy: 'messageSelectionStrategy',
promptAttemptsSpecification: {
promptAttemptsSpecificationKey: {
allowedInputTypes: {
allowAudioInput: false,
allowDtmfInput: false,
},
// the properties below are optional
allowInterrupt: false,
audioAndDtmfInputSpecification: {
startTimeoutMs: 123,
// the properties below are optional
audioSpecification: {
endTimeoutMs: 123,
maxLengthMs: 123,
},
dtmfSpecification: {
deletionCharacter: 'deletionCharacter',
endCharacter: 'endCharacter',
endTimeoutMs: 123,
maxLength: 123,
},
},
textInputSpecification: {
startTimeoutMs: 123,
},
},
},
};
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_lex as lex
prompt_specification_property = lex.CfnBot.PromptSpecificationProperty(
max_retries=123,
message_groups_list=[lex.CfnBot.MessageGroupProperty(
message=lex.CfnBot.MessageProperty(
custom_payload=lex.CfnBot.CustomPayloadProperty(
value="value"
),
image_response_card=lex.CfnBot.ImageResponseCardProperty(
title="title",
# the properties below are optional
buttons=[lex.CfnBot.ButtonProperty(
text="text",
value="value"
)],
image_url="imageUrl",
subtitle="subtitle"
),
plain_text_message=lex.CfnBot.PlainTextMessageProperty(
value="value"
),
ssml_message=lex.CfnBot.SSMLMessageProperty(
value="value"
)
),
# the properties below are optional
variations=[lex.CfnBot.MessageProperty(
custom_payload=lex.CfnBot.CustomPayloadProperty(
value="value"
),
image_response_card=lex.CfnBot.ImageResponseCardProperty(
title="title",
# the properties below are optional
buttons=[lex.CfnBot.ButtonProperty(
text="text",
value="value"
)],
image_url="imageUrl",
subtitle="subtitle"
),
plain_text_message=lex.CfnBot.PlainTextMessageProperty(
value="value"
),
ssml_message=lex.CfnBot.SSMLMessageProperty(
value="value"
)
)]
)],
# the properties below are optional
allow_interrupt=False,
message_selection_strategy="messageSelectionStrategy",
prompt_attempts_specification={
"prompt_attempts_specification_key": lex.CfnBot.PromptAttemptSpecificationProperty(
allowed_input_types=lex.CfnBot.AllowedInputTypesProperty(
allow_audio_input=False,
allow_dtmf_input=False
),
# the properties below are optional
allow_interrupt=False,
audio_and_dtmf_input_specification=lex.CfnBot.AudioAndDTMFInputSpecificationProperty(
start_timeout_ms=123,
# the properties below are optional
audio_specification=lex.CfnBot.AudioSpecificationProperty(
end_timeout_ms=123,
max_length_ms=123
),
dtmf_specification=lex.CfnBot.DTMFSpecificationProperty(
deletion_character="deletionCharacter",
end_character="endCharacter",
end_timeout_ms=123,
max_length=123
)
),
text_input_specification=lex.CfnBot.TextInputSpecificationProperty(
start_timeout_ms=123
)
)
}
)
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.lex.*;
PromptSpecificationProperty promptSpecificationProperty = PromptSpecificationProperty.builder()
.maxRetries(123)
.messageGroupsList(List.of(MessageGroupProperty.builder()
.message(MessageProperty.builder()
.customPayload(CustomPayloadProperty.builder()
.value("value")
.build())
.imageResponseCard(ImageResponseCardProperty.builder()
.title("title")
// the properties below are optional
.buttons(List.of(ButtonProperty.builder()
.text("text")
.value("value")
.build()))
.imageUrl("imageUrl")
.subtitle("subtitle")
.build())
.plainTextMessage(PlainTextMessageProperty.builder()
.value("value")
.build())
.ssmlMessage(SSMLMessageProperty.builder()
.value("value")
.build())
.build())
// the properties below are optional
.variations(List.of(MessageProperty.builder()
.customPayload(CustomPayloadProperty.builder()
.value("value")
.build())
.imageResponseCard(ImageResponseCardProperty.builder()
.title("title")
// the properties below are optional
.buttons(List.of(ButtonProperty.builder()
.text("text")
.value("value")
.build()))
.imageUrl("imageUrl")
.subtitle("subtitle")
.build())
.plainTextMessage(PlainTextMessageProperty.builder()
.value("value")
.build())
.ssmlMessage(SSMLMessageProperty.builder()
.value("value")
.build())
.build()))
.build()))
// the properties below are optional
.allowInterrupt(false)
.messageSelectionStrategy("messageSelectionStrategy")
.promptAttemptsSpecification(Map.of(
"promptAttemptsSpecificationKey", PromptAttemptSpecificationProperty.builder()
.allowedInputTypes(AllowedInputTypesProperty.builder()
.allowAudioInput(false)
.allowDtmfInput(false)
.build())
// the properties below are optional
.allowInterrupt(false)
.audioAndDtmfInputSpecification(AudioAndDTMFInputSpecificationProperty.builder()
.startTimeoutMs(123)
// the properties below are optional
.audioSpecification(AudioSpecificationProperty.builder()
.endTimeoutMs(123)
.maxLengthMs(123)
.build())
.dtmfSpecification(DTMFSpecificationProperty.builder()
.deletionCharacter("deletionCharacter")
.endCharacter("endCharacter")
.endTimeoutMs(123)
.maxLength(123)
.build())
.build())
.textInputSpecification(TextInputSpecificationProperty.builder()
.startTimeoutMs(123)
.build())
.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.Lex;
var promptSpecificationProperty = new PromptSpecificationProperty {
MaxRetries = 123,
MessageGroupsList = new [] { new MessageGroupProperty {
Message = new MessageProperty {
CustomPayload = new CustomPayloadProperty {
Value = "value"
},
ImageResponseCard = new ImageResponseCardProperty {
Title = "title",
// the properties below are optional
Buttons = new [] { new ButtonProperty {
Text = "text",
Value = "value"
} },
ImageUrl = "imageUrl",
Subtitle = "subtitle"
},
PlainTextMessage = new PlainTextMessageProperty {
Value = "value"
},
SsmlMessage = new SSMLMessageProperty {
Value = "value"
}
},
// the properties below are optional
Variations = new [] { new MessageProperty {
CustomPayload = new CustomPayloadProperty {
Value = "value"
},
ImageResponseCard = new ImageResponseCardProperty {
Title = "title",
// the properties below are optional
Buttons = new [] { new ButtonProperty {
Text = "text",
Value = "value"
} },
ImageUrl = "imageUrl",
Subtitle = "subtitle"
},
PlainTextMessage = new PlainTextMessageProperty {
Value = "value"
},
SsmlMessage = new SSMLMessageProperty {
Value = "value"
}
} }
} },
// the properties below are optional
AllowInterrupt = false,
MessageSelectionStrategy = "messageSelectionStrategy",
PromptAttemptsSpecification = new Dictionary<string, object> {
{ "promptAttemptsSpecificationKey", new PromptAttemptSpecificationProperty {
AllowedInputTypes = new AllowedInputTypesProperty {
AllowAudioInput = false,
AllowDtmfInput = false
},
// the properties below are optional
AllowInterrupt = false,
AudioAndDtmfInputSpecification = new AudioAndDTMFInputSpecificationProperty {
StartTimeoutMs = 123,
// the properties below are optional
AudioSpecification = new AudioSpecificationProperty {
EndTimeoutMs = 123,
MaxLengthMs = 123
},
DtmfSpecification = new DTMFSpecificationProperty {
DeletionCharacter = "deletionCharacter",
EndCharacter = "endCharacter",
EndTimeoutMs = 123,
MaxLength = 123
}
},
TextInputSpecification = new TextInputSpecificationProperty {
StartTimeoutMs = 123
}
} }
}
};
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"
promptSpecificationProperty := &PromptSpecificationProperty{
MaxRetries: jsii.Number(123),
MessageGroupsList: []interface{}{
&MessageGroupProperty{
Message: &MessageProperty{
CustomPayload: &CustomPayloadProperty{
Value: jsii.String("value"),
},
ImageResponseCard: &ImageResponseCardProperty{
Title: jsii.String("title"),
// the properties below are optional
Buttons: []interface{}{
&ButtonProperty{
Text: jsii.String("text"),
Value: jsii.String("value"),
},
},
ImageUrl: jsii.String("imageUrl"),
Subtitle: jsii.String("subtitle"),
},
PlainTextMessage: &PlainTextMessageProperty{
Value: jsii.String("value"),
},
SsmlMessage: &SSMLMessageProperty{
Value: jsii.String("value"),
},
},
// the properties below are optional
Variations: []interface{}{
&MessageProperty{
CustomPayload: &CustomPayloadProperty{
Value: jsii.String("value"),
},
ImageResponseCard: &ImageResponseCardProperty{
Title: jsii.String("title"),
// the properties below are optional
Buttons: []interface{}{
&ButtonProperty{
Text: jsii.String("text"),
Value: jsii.String("value"),
},
},
ImageUrl: jsii.String("imageUrl"),
Subtitle: jsii.String("subtitle"),
},
PlainTextMessage: &PlainTextMessageProperty{
Value: jsii.String("value"),
},
SsmlMessage: &SSMLMessageProperty{
Value: jsii.String("value"),
},
},
},
},
},
// the properties below are optional
AllowInterrupt: jsii.Boolean(false),
MessageSelectionStrategy: jsii.String("messageSelectionStrategy"),
PromptAttemptsSpecification: map[string]interface{}{
"promptAttemptsSpecificationKey": &PromptAttemptSpecificationProperty{
"allowedInputTypes": &AllowedInputTypesProperty{
"allowAudioInput": jsii.Boolean(false),
"allowDtmfInput": jsii.Boolean(false),
},
// the properties below are optional
"allowInterrupt": jsii.Boolean(false),
"audioAndDtmfInputSpecification": &AudioAndDTMFInputSpecificationProperty{
"startTimeoutMs": jsii.Number(123),
// the properties below are optional
"audioSpecification": &AudioSpecificationProperty{
"endTimeoutMs": jsii.Number(123),
"maxLengthMs": jsii.Number(123),
},
"dtmfSpecification": &DTMFSpecificationProperty{
"deletionCharacter": jsii.String("deletionCharacter"),
"endCharacter": jsii.String("endCharacter"),
"endTimeoutMs": jsii.Number(123),
"maxLength": jsii.Number(123),
},
},
"textInputSpecification": &TextInputSpecificationProperty{
"startTimeoutMs": jsii.Number(123),
},
},
},
}
Properties
allowInterruptoptionalboolean | IResolvableallow_interruptoptionaltyping.Union[bool, IResolvable]allowInterruptoptionalBooleanAllowInterruptoptionalboolAllowInterruptoptionalinterface{}#Indicates whether the user can interrupt a speech prompt from the bot.
The maximum number of times the bot tries to elicit a response from the user using this prompt.
messageGroupsListIResolvable | IResolvable | CfnBot.MessageGroupProperty[]message_groups_listtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MessageGroupProperty]]]messageGroupsListIResolvableMessageGroupsListIResolvableMessageGroupsListinterface{}required#A collection of messages that Amazon Lex can send to the user.
Amazon Lex chooses the actual message to send at runtime.
messageSelectionStrategyoptionalstringmessage_selection_strategyoptionalstrmessageSelectionStrategyoptionalStringMessageSelectionStrategyoptionalstringMessageSelectionStrategyoptional*string#Indicates how a message is selected from a message group among retries.
promptAttemptsSpecificationoptionalIResolvable | { [key: string]: IResolvable | CfnBot.PromptAttemptSpecificationProperty }prompt_attempts_specificationoptionaltyping.Union[IResolvable, typing.Mapping[str, typing.Union[IResolvable, PromptAttemptSpecificationProperty]]]promptAttemptsSpecificationoptionalIResolvablePromptAttemptsSpecificationoptionalIResolvablePromptAttemptsSpecificationoptionalinterface{}#Specifies the advanced settings on each attempt of the prompt.