MessageProperty Struct
The object that provides message text and its type.
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 messageProperty: lex.CfnBot.MessageProperty = {
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',
},
};
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
message_property = 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"
)
)
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.*;
MessageProperty messageProperty = 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();
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 messageProperty = 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"
}
};
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"
messageProperty := &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"),
},
}
Properties
customPayloadoptionalIResolvable | CfnBot.CustomPayloadPropertycustom_payloadoptionaltyping.Union[IResolvable, CustomPayloadProperty]customPayloadoptionalIResolvableCustomPayloadoptionalIResolvableCustomPayloadoptionalinterface{}#A message in a custom format defined by the client application.
imageResponseCardoptionalIResolvable | CfnBot.ImageResponseCardPropertyimage_response_cardoptionaltyping.Union[IResolvable, ImageResponseCardProperty]imageResponseCardoptionalIResolvableImageResponseCardoptionalIResolvableImageResponseCardoptionalinterface{}#A message that defines a response card that the client application can show to the user.
plainTextMessageoptionalIResolvable | CfnBot.PlainTextMessagePropertyplain_text_messageoptionaltyping.Union[IResolvable, PlainTextMessageProperty]plainTextMessageoptionalIResolvablePlainTextMessageoptionalIResolvablePlainTextMessageoptionalinterface{}#A message in plain text format.
ssmlMessageoptionalIResolvable | CfnBot.SSMLMessagePropertyssml_messageoptionaltyping.Union[IResolvable, SSMLMessageProperty]ssmlMessageoptionalIResolvableSsmlMessageoptionalIResolvableSsmlMessageoptionalinterface{}#A message in Speech Synthesis Markup Language (SSML).