Skip to content
v2.278.0

FulfillmentStartResponseSpecificationProperty Struct ​

Provides settings for a message that is sent to the user when a fulfillment Lambda function starts running.

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 fulfillmentStartResponseSpecificationProperty: lex.CfnBot.FulfillmentStartResponseSpecificationProperty = {
  delayInSeconds: 123,
  messageGroups: [{
    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,
};
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

fulfillment_start_response_specification_property = lex.CfnBot.FulfillmentStartResponseSpecificationProperty(
    delay_in_seconds=123,
    message_groups=[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
)
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.*;

FulfillmentStartResponseSpecificationProperty fulfillmentStartResponseSpecificationProperty = FulfillmentStartResponseSpecificationProperty.builder()
        .delayInSeconds(123)
        .messageGroups(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)
        .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 fulfillmentStartResponseSpecificationProperty = new FulfillmentStartResponseSpecificationProperty {
    DelayInSeconds = 123,
    MessageGroups = 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
};
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"

fulfillmentStartResponseSpecificationProperty := &FulfillmentStartResponseSpecificationProperty{
	DelayInSeconds: jsii.Number(123),
	MessageGroups: []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),
}

Properties ​

allowInterruptoptionalboolean | IResolvableallow_interruptoptionaltyping.Union[bool, IResolvable]allowInterruptoptionalBooleanAllowInterruptoptionalboolAllowInterruptoptionalinterface{} #
Determines whether the user can interrupt the start message while it is playing.
delayInSecondsnumberdelay_in_secondsint | floatdelayInSecondsNumberDelayInSecondsdoubleDelayInSeconds*float64 required #
The delay between when the Lambda fulfillment function starts running and the start message is played.

If the Lambda function returns before the delay is over, the start message isn't played.

messageGroupsIResolvable | IResolvable | CfnBot.MessageGroupProperty[]message_groupstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MessageGroupProperty]]]messageGroupsIResolvableMessageGroupsIResolvableMessageGroupsinterface{} required #
1 - 5 message groups that contain start messages.

Amazon Lex chooses one of the messages to play to the user.