Skip to content
v2.278.0

CustomVocabularyProperty Struct ​

Specifies a custom vocabulary.

A custom vocabulary is a list of words that you expect to be used during a conversation with your bot.

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 customVocabularyProperty: lex.CfnBot.CustomVocabularyProperty = {
  customVocabularyItems: [{
    phrase: 'phrase',

    // the properties below are optional
    displayAs: 'displayAs',
    weight: 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

custom_vocabulary_property = lex.CfnBot.CustomVocabularyProperty(
    custom_vocabulary_items=[lex.CfnBot.CustomVocabularyItemProperty(
        phrase="phrase",

        # the properties below are optional
        display_as="displayAs",
        weight=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.*;

CustomVocabularyProperty customVocabularyProperty = CustomVocabularyProperty.builder()
        .customVocabularyItems(List.of(CustomVocabularyItemProperty.builder()
                .phrase("phrase")

                // the properties below are optional
                .displayAs("displayAs")
                .weight(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 customVocabularyProperty = new CustomVocabularyProperty {
    CustomVocabularyItems = new [] { new CustomVocabularyItemProperty {
        Phrase = "phrase",

        // the properties below are optional
        DisplayAs = "displayAs",
        Weight = 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"

customVocabularyProperty := &CustomVocabularyProperty{
	CustomVocabularyItems: []interface{}{
		&CustomVocabularyItemProperty{
			Phrase: jsii.String("phrase"),

			// the properties below are optional
			DisplayAs: jsii.String("displayAs"),
			Weight: jsii.Number(123),
		},
	},
}

Properties ​

customVocabularyItemsIResolvable | IResolvable | CfnBot.CustomVocabularyItemProperty[]custom_vocabulary_itemstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CustomVocabularyItemProperty]]]customVocabularyItemsIResolvableCustomVocabularyItemsIResolvableCustomVocabularyItemsinterface{} required #
Specifies a list of words that you expect to be used during a conversation with your bot.