ImageResponseCardProperty Struct
A card that is shown to the user by a messaging platform.
You define the contents of the card, the card is displayed by the platform.
When you use a response card, the response from the user is constrained to the text associated with a button on the card.
| Source | |
|---|---|
| Type last changed |
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 imageResponseCardProperty: lex.CfnBot.ImageResponseCardProperty = {
title: 'title',
// the properties below are optional
buttons: [{
text: 'text',
value: 'value',
}],
imageUrl: 'imageUrl',
subtitle: 'subtitle',
};
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
image_response_card_property = lex.CfnBot.ImageResponseCardProperty(
title="title",
# the properties below are optional
buttons=[lex.CfnBot.ButtonProperty(
text="text",
value="value"
)],
image_url="imageUrl",
subtitle="subtitle"
)
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.*;
ImageResponseCardProperty imageResponseCardProperty = ImageResponseCardProperty.builder()
.title("title")
// the properties below are optional
.buttons(List.of(ButtonProperty.builder()
.text("text")
.value("value")
.build()))
.imageUrl("imageUrl")
.subtitle("subtitle")
.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 imageResponseCardProperty = new ImageResponseCardProperty {
Title = "title",
// the properties below are optional
Buttons = new [] { new ButtonProperty {
Text = "text",
Value = "value"
} },
ImageUrl = "imageUrl",
Subtitle = "subtitle"
};
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"
imageResponseCardProperty := &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"),
}
Properties
buttonsoptionalIResolvable | IResolvable | CfnBot.ButtonProperty[]buttonsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ButtonProperty]]]buttonsoptionalIResolvableButtonsoptionalIResolvableButtonsoptionalinterface{} #A list of buttons that should be displayed on the response card.
The arrangement of the buttons is determined by the platform that displays the button.
imageUrloptionalstringimage_urloptionalstrimageUrloptionalStringImageUrloptionalstringImageUrloptional*string #The URL of an image to display on the response card.
The image URL must be publicly available so that the platform displaying the response card has access to the image.
subtitleoptionalstringsubtitleoptionalstrsubtitleoptionalStringSubtitleoptionalstringSubtitleoptional*string #The subtitle to display on the response card.
The format of the subtitle is determined by the platform displaying the response card.
The title to display on the response card.
The format of the title is determined by the platform displaying the response card.