# PromptSpecificationProperty

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

- Source: Generated code
- Type last changed: v2.93.0 · 23 Aug 2023

## 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,
      },
    },
  },
};
```

## Properties

- `allowInterrupt`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Indicates whether the user can interrupt a speech prompt from the bot.

- `maxRetries`: number (required) — The maximum number of times the bot tries to elicit a response from the user using this prompt.

- `messageGroupsList`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBot.MessageGroupProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lex.CfnBot.MessageGroupProperty.html)[] (required) — A collection of messages that Amazon Lex can send to the user.

  Amazon Lex chooses the actual message to send at runtime.

- `messageSelectionStrategy`: string — Indicates how a message is selected from a message group among retries.

- `promptAttemptsSpecification`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBot.PromptAttemptSpecificationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lex.CfnBot.PromptAttemptSpecificationProperty.html) } — Specifies the advanced settings on each attempt of the prompt.
