Skip to content
v2.277.0

PromptAttemptSpecificationProperty Struct ​

Specifies the settings on a prompt attempt.

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 promptAttemptSpecificationProperty: lex.CfnBot.PromptAttemptSpecificationProperty = {
  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,
  },
};
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

prompt_attempt_specification_property = lex.CfnBot.PromptAttemptSpecificationProperty(
    allowed_input_types=lex.CfnBot.AllowedInputTypesProperty(
        allow_audio_input=False,
        allow_dtmf_input=False
    ),

    # the properties below are optional
    allow_interrupt=False,
    audio_and_dtmf_input_specification=lex.CfnBot.AudioAndDTMFInputSpecificationProperty(
        start_timeout_ms=123,

        # the properties below are optional
        audio_specification=lex.CfnBot.AudioSpecificationProperty(
            end_timeout_ms=123,
            max_length_ms=123
        ),
        dtmf_specification=lex.CfnBot.DTMFSpecificationProperty(
            deletion_character="deletionCharacter",
            end_character="endCharacter",
            end_timeout_ms=123,
            max_length=123
        )
    ),
    text_input_specification=lex.CfnBot.TextInputSpecificationProperty(
        start_timeout_ms=123
    )
)
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.*;

PromptAttemptSpecificationProperty promptAttemptSpecificationProperty = PromptAttemptSpecificationProperty.builder()
        .allowedInputTypes(AllowedInputTypesProperty.builder()
                .allowAudioInput(false)
                .allowDtmfInput(false)
                .build())

        // the properties below are optional
        .allowInterrupt(false)
        .audioAndDtmfInputSpecification(AudioAndDTMFInputSpecificationProperty.builder()
                .startTimeoutMs(123)

                // the properties below are optional
                .audioSpecification(AudioSpecificationProperty.builder()
                        .endTimeoutMs(123)
                        .maxLengthMs(123)
                        .build())
                .dtmfSpecification(DTMFSpecificationProperty.builder()
                        .deletionCharacter("deletionCharacter")
                        .endCharacter("endCharacter")
                        .endTimeoutMs(123)
                        .maxLength(123)
                        .build())
                .build())
        .textInputSpecification(TextInputSpecificationProperty.builder()
                .startTimeoutMs(123)
                .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 promptAttemptSpecificationProperty = new PromptAttemptSpecificationProperty {
    AllowedInputTypes = new AllowedInputTypesProperty {
        AllowAudioInput = false,
        AllowDtmfInput = false
    },

    // the properties below are optional
    AllowInterrupt = false,
    AudioAndDtmfInputSpecification = new AudioAndDTMFInputSpecificationProperty {
        StartTimeoutMs = 123,

        // the properties below are optional
        AudioSpecification = new AudioSpecificationProperty {
            EndTimeoutMs = 123,
            MaxLengthMs = 123
        },
        DtmfSpecification = new DTMFSpecificationProperty {
            DeletionCharacter = "deletionCharacter",
            EndCharacter = "endCharacter",
            EndTimeoutMs = 123,
            MaxLength = 123
        }
    },
    TextInputSpecification = new TextInputSpecificationProperty {
        StartTimeoutMs = 123
    }
};
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"

promptAttemptSpecificationProperty := &PromptAttemptSpecificationProperty{
	AllowedInputTypes: &AllowedInputTypesProperty{
		AllowAudioInput: jsii.Boolean(false),
		AllowDtmfInput: jsii.Boolean(false),
	},

	// the properties below are optional
	AllowInterrupt: jsii.Boolean(false),
	AudioAndDtmfInputSpecification: &AudioAndDTMFInputSpecificationProperty{
		StartTimeoutMs: jsii.Number(123),

		// the properties below are optional
		AudioSpecification: &AudioSpecificationProperty{
			EndTimeoutMs: jsii.Number(123),
			MaxLengthMs: jsii.Number(123),
		},
		DtmfSpecification: &DTMFSpecificationProperty{
			DeletionCharacter: jsii.String("deletionCharacter"),
			EndCharacter: jsii.String("endCharacter"),
			EndTimeoutMs: jsii.Number(123),
			MaxLength: jsii.Number(123),
		},
	},
	TextInputSpecification: &TextInputSpecificationProperty{
		StartTimeoutMs: jsii.Number(123),
	},
}

Properties ​

allowedInputTypesIResolvable | CfnBot.AllowedInputTypesPropertyallowed_input_typestyping.Union[IResolvable, AllowedInputTypesProperty]allowedInputTypesIResolvableAllowedInputTypesIResolvableAllowedInputTypesinterface{}required#
Indicates the allowed input types of the prompt attempt.
allowInterruptoptionalboolean | IResolvableallow_interruptoptionaltyping.Union[bool, IResolvable]allowInterruptoptionalBooleanAllowInterruptoptionalboolAllowInterruptoptionalinterface{}#
Indicates whether the user can interrupt a speech prompt attempt from the bot.
audioAndDtmfInputSpecificationoptionalIResolvable | CfnBot.AudioAndDTMFInputSpecificationPropertyaudio_and_dtmf_input_specificationoptionaltyping.Union[IResolvable, AudioAndDTMFInputSpecificationProperty]audioAndDtmfInputSpecificationoptionalIResolvableAudioAndDtmfInputSpecificationoptionalIResolvableAudioAndDtmfInputSpecificationoptionalinterface{}#
Specifies the settings on audio and DTMF input.
textInputSpecificationoptionalIResolvable | CfnBot.TextInputSpecificationPropertytext_input_specificationoptionaltyping.Union[IResolvable, TextInputSpecificationProperty]textInputSpecificationoptionalIResolvableTextInputSpecificationoptionalIResolvableTextInputSpecificationoptionalinterface{}#
Specifies the settings on text input.