aws-cdk-lib.aws_lex.CfnBot.PromptSpecificationProperty

interface PromptSpecificationProperty

LanguageType name
.NETAmazon.CDK.AWS.Lex.CfnBot.PromptSpecificationProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslex#CfnBot_PromptSpecificationProperty
Javasoftware.amazon.awscdk.services.lex.CfnBot.PromptSpecificationProperty
Pythonaws_cdk.aws_lex.CfnBot.PromptSpecificationProperty
TypeScript aws-cdk-lib » aws_lex » CfnBot » PromptSpecificationProperty

Specifies a list of message groups that Amazon Lex sends to a user to elicit a response.

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';
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,
      },
    },
  },
};

Properties

NameTypeDescription
maxRetriesnumberThe maximum number of times the bot tries to elicit a response from the user using this prompt.
messageGroupsListIResolvable | IResolvable | MessageGroupProperty[]A collection of messages that Amazon Lex can send to the user.
allowInterrupt?boolean | IResolvableIndicates whether the user can interrupt a speech prompt from the bot.
messageSelectionStrategy?stringIndicates how a message is selected from a message group among retries.
promptAttemptsSpecification?IResolvable | { [string]: IResolvable | PromptAttemptSpecificationProperty }Specifies the advanced settings on each attempt of the prompt.

maxRetries

Type: number

The maximum number of times the bot tries to elicit a response from the user using this prompt.


messageGroupsList

Type: IResolvable | IResolvable | MessageGroupProperty[]

A collection of messages that Amazon Lex can send to the user.

Amazon Lex chooses the actual message to send at runtime.


allowInterrupt?

Type: boolean | IResolvable (optional)

Indicates whether the user can interrupt a speech prompt from the bot.


messageSelectionStrategy?

Type: string (optional)

Indicates how a message is selected from a message group among retries.


promptAttemptsSpecification?

Type: IResolvable | { [string]: IResolvable | PromptAttemptSpecificationProperty } (optional)

Specifies the advanced settings on each attempt of the prompt.