V2modelsSlotTypeArgs

data class V2modelsSlotTypeArgs(val botId: Output<String>? = null, val botVersion: Output<String>? = null, val compositeSlotTypeSetting: Output<V2modelsSlotTypeCompositeSlotTypeSettingArgs>? = null, val description: Output<String>? = null, val externalSourceSetting: Output<V2modelsSlotTypeExternalSourceSettingArgs>? = null, val localeId: Output<String>? = null, val name: Output<String>? = null, val parentSlotTypeSignature: Output<String>? = null, val slotTypeValues: Output<V2modelsSlotTypeSlotTypeValuesArgs>? = null, val timeouts: Output<V2modelsSlotTypeTimeoutsArgs>? = null, val valueSelectionSetting: Output<V2modelsSlotTypeValueSelectionSettingArgs>? = null) : ConvertibleToJava<V2modelsSlotTypeArgs>

Resource for managing an AWS Lex V2 Models Slot Type.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lex.V2modelsBot("example", {
name: "example",
idleSessionTtlInSeconds: 60,
roleArn: exampleAwsIamRole.arn,
dataPrivacies: [{
childDirected: true,
}],
});
const exampleV2modelsBotLocale = new aws.lex.V2modelsBotLocale("example", {
localeId: "en_US",
botId: example.id,
botVersion: "DRAFT",
nLuIntentConfidenceThreshold: 0.7,
});
const exampleV2modelsBotVersion = new aws.lex.V2modelsBotVersion("example", {
botId: example.id,
localeSpecification: exampleV2modelsBotLocale.localeId.apply(localeId => {
[localeId]: {
sourceBotVersion: "DRAFT",
},
}),
});
const exampleV2modelsSlotType = new aws.lex.V2modelsSlotType("example", {
botId: example.id,
botVersion: exampleV2modelsBotLocale.botVersion,
name: "example",
localeId: exampleV2modelsBotLocale.localeId,
});
import pulumi
import pulumi_aws as aws
example = aws.lex.V2modelsBot("example",
name="example",
idle_session_ttl_in_seconds=60,
role_arn=example_aws_iam_role["arn"],
data_privacies=[{
"child_directed": True,
}])
example_v2models_bot_locale = aws.lex.V2modelsBotLocale("example",
locale_id="en_US",
bot_id=example.id,
bot_version="DRAFT",
n_lu_intent_confidence_threshold=0.7)
example_v2models_bot_version = aws.lex.V2modelsBotVersion("example",
bot_id=example.id,
locale_specification=example_v2models_bot_locale.locale_id.apply(lambda locale_id: {
locale_id: {
"sourceBotVersion": "DRAFT",
},
}))
example_v2models_slot_type = aws.lex.V2modelsSlotType("example",
bot_id=example.id,
bot_version=example_v2models_bot_locale.bot_version,
name="example",
locale_id=example_v2models_bot_locale.locale_id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Lex.V2modelsBot("example", new()
{
Name = "example",
IdleSessionTtlInSeconds = 60,
RoleArn = exampleAwsIamRole.Arn,
DataPrivacies = new[]
{
new Aws.Lex.Inputs.V2modelsBotDataPrivacyArgs
{
ChildDirected = true,
},
},
});
var exampleV2modelsBotLocale = new Aws.Lex.V2modelsBotLocale("example", new()
{
LocaleId = "en_US",
BotId = example.Id,
BotVersion = "DRAFT",
NLuIntentConfidenceThreshold = 0.7,
});
var exampleV2modelsBotVersion = new Aws.Lex.V2modelsBotVersion("example", new()
{
BotId = example.Id,
LocaleSpecification = exampleV2modelsBotLocale.LocaleId.Apply(localeId =>
{
{ localeId,
{
{ "sourceBotVersion", "DRAFT" },
} },
}),
});
var exampleV2modelsSlotType = new Aws.Lex.V2modelsSlotType("example", new()
{
BotId = example.Id,
BotVersion = exampleV2modelsBotLocale.BotVersion,
Name = "example",
LocaleId = exampleV2modelsBotLocale.LocaleId,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := lex.NewV2modelsBot(ctx, "example", &lex.V2modelsBotArgs{
Name: pulumi.String("example"),
IdleSessionTtlInSeconds: pulumi.Int(60),
RoleArn: pulumi.Any(exampleAwsIamRole.Arn),
DataPrivacies: lex.V2modelsBotDataPrivacyArray{
&lex.V2modelsBotDataPrivacyArgs{
ChildDirected: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
exampleV2modelsBotLocale, err := lex.NewV2modelsBotLocale(ctx, "example", &lex.V2modelsBotLocaleArgs{
LocaleId: pulumi.String("en_US"),
BotId: example.ID(),
BotVersion: pulumi.String("DRAFT"),
NLuIntentConfidenceThreshold: pulumi.Float64(0.7),
})
if err != nil {
return err
}
_, err = lex.NewV2modelsBotVersion(ctx, "example", &lex.V2modelsBotVersionArgs{
BotId: example.ID(),
LocaleSpecification: exampleV2modelsBotLocale.LocaleId.ApplyT(func(localeId string) (map[string]map[string]interface{}, error) {
return map[string]map[string]interface{}{
localeId: map[string]interface{}{
"sourceBotVersion": "DRAFT",
},
}, nil
}).(pulumi.Map[string]map[string]interface{}Output),
})
if err != nil {
return err
}
_, err = lex.NewV2modelsSlotType(ctx, "example", &lex.V2modelsSlotTypeArgs{
BotId: example.ID(),
BotVersion: exampleV2modelsBotLocale.BotVersion,
Name: pulumi.String("example"),
LocaleId: exampleV2modelsBotLocale.LocaleId,
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lex.V2modelsBot;
import com.pulumi.aws.lex.V2modelsBotArgs;
import com.pulumi.aws.lex.inputs.V2modelsBotDataPrivacyArgs;
import com.pulumi.aws.lex.V2modelsBotLocale;
import com.pulumi.aws.lex.V2modelsBotLocaleArgs;
import com.pulumi.aws.lex.V2modelsBotVersion;
import com.pulumi.aws.lex.V2modelsBotVersionArgs;
import com.pulumi.aws.lex.V2modelsSlotType;
import com.pulumi.aws.lex.V2modelsSlotTypeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new V2modelsBot("example", V2modelsBotArgs.builder()
.name("example")
.idleSessionTtlInSeconds(60)
.roleArn(exampleAwsIamRole.arn())
.dataPrivacies(V2modelsBotDataPrivacyArgs.builder()
.childDirected(true)
.build())
.build());
var exampleV2modelsBotLocale = new V2modelsBotLocale("exampleV2modelsBotLocale", V2modelsBotLocaleArgs.builder()
.localeId("en_US")
.botId(example.id())
.botVersion("DRAFT")
.nLuIntentConfidenceThreshold(0.7)
.build());
var exampleV2modelsBotVersion = new V2modelsBotVersion("exampleV2modelsBotVersion", V2modelsBotVersionArgs.builder()
.botId(example.id())
.localeSpecification(exampleV2modelsBotLocale.localeId().applyValue(_localeId -> Map.of(_localeId, Map.of("sourceBotVersion", "DRAFT"))))
.build());
var exampleV2modelsSlotType = new V2modelsSlotType("exampleV2modelsSlotType", V2modelsSlotTypeArgs.builder()
.botId(example.id())
.botVersion(exampleV2modelsBotLocale.botVersion())
.name("example")
.localeId(exampleV2modelsBotLocale.localeId())
.build());
}
}
resources:
example:
type: aws:lex:V2modelsBot
properties:
name: example
idleSessionTtlInSeconds: 60
roleArn: ${exampleAwsIamRole.arn}
dataPrivacies:
- childDirected: true
exampleV2modelsBotLocale:
type: aws:lex:V2modelsBotLocale
name: example
properties:
localeId: en_US
botId: ${example.id}
botVersion: DRAFT
nLuIntentConfidenceThreshold: 0.7
exampleV2modelsBotVersion:
type: aws:lex:V2modelsBotVersion
name: example
properties:
botId: ${example.id}
localeSpecification:
${exampleV2modelsBotLocale.localeId}:
sourceBotVersion: DRAFT
exampleV2modelsSlotType:
type: aws:lex:V2modelsSlotType
name: example
properties:
botId: ${example.id}
botVersion: ${exampleV2modelsBotLocale.botVersion}
name: example
localeId: ${exampleV2modelsBotLocale.localeId}

value_selection_setting Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lex.V2modelsSlotType("example", {
botId: exampleAwsLexv2modelsBot.id,
botVersion: exampleAwsLexv2modelsBotLocale.botVersion,
name: "example",
localeId: exampleAwsLexv2modelsBotLocale.localeId,
valueSelectionSetting: {
resolutionStrategy: "OriginalValue",
advancedRecognitionSettings: [{
audioRecognitionStrategy: "UseSlotValuesAsCustomVocabulary",
}],
},
slotTypeValues: {
sampleValues: [{
value: "exampleValue",
}],
},
});
import pulumi
import pulumi_aws as aws
example = aws.lex.V2modelsSlotType("example",
bot_id=example_aws_lexv2models_bot["id"],
bot_version=example_aws_lexv2models_bot_locale["botVersion"],
name="example",
locale_id=example_aws_lexv2models_bot_locale["localeId"],
value_selection_setting={
"resolution_strategy": "OriginalValue",
"advanced_recognition_settings": [{
"audio_recognition_strategy": "UseSlotValuesAsCustomVocabulary",
}],
},
slot_type_values={
"sample_values": [{
"value": "exampleValue",
}],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Lex.V2modelsSlotType("example", new()
{
BotId = exampleAwsLexv2modelsBot.Id,
BotVersion = exampleAwsLexv2modelsBotLocale.BotVersion,
Name = "example",
LocaleId = exampleAwsLexv2modelsBotLocale.LocaleId,
ValueSelectionSetting = new Aws.Lex.Inputs.V2modelsSlotTypeValueSelectionSettingArgs
{
ResolutionStrategy = "OriginalValue",
AdvancedRecognitionSettings = new[]
{
new Aws.Lex.Inputs.V2modelsSlotTypeValueSelectionSettingAdvancedRecognitionSettingArgs
{
AudioRecognitionStrategy = "UseSlotValuesAsCustomVocabulary",
},
},
},
SlotTypeValues = new Aws.Lex.Inputs.V2modelsSlotTypeSlotTypeValuesArgs
{
SampleValues = new[]
{
new Aws.Lex.Inputs.V2modelsSlotTypeSlotTypeValuesSampleValueArgs
{
Value = "exampleValue",
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lex.NewV2modelsSlotType(ctx, "example", &lex.V2modelsSlotTypeArgs{
BotId: pulumi.Any(exampleAwsLexv2modelsBot.Id),
BotVersion: pulumi.Any(exampleAwsLexv2modelsBotLocale.BotVersion),
Name: pulumi.String("example"),
LocaleId: pulumi.Any(exampleAwsLexv2modelsBotLocale.LocaleId),
ValueSelectionSetting: &lex.V2modelsSlotTypeValueSelectionSettingArgs{
ResolutionStrategy: pulumi.String("OriginalValue"),
AdvancedRecognitionSettings: lex.V2modelsSlotTypeValueSelectionSettingAdvancedRecognitionSettingArray{
&lex.V2modelsSlotTypeValueSelectionSettingAdvancedRecognitionSettingArgs{
AudioRecognitionStrategy: pulumi.String("UseSlotValuesAsCustomVocabulary"),
},
},
},
SlotTypeValues: &lex.V2modelsSlotTypeSlotTypeValuesArgs{
SampleValues: lex.V2modelsSlotTypeSlotTypeValuesSampleValueArray{
&lex.V2modelsSlotTypeSlotTypeValuesSampleValueArgs{
Value: pulumi.String("exampleValue"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lex.V2modelsSlotType;
import com.pulumi.aws.lex.V2modelsSlotTypeArgs;
import com.pulumi.aws.lex.inputs.V2modelsSlotTypeValueSelectionSettingArgs;
import com.pulumi.aws.lex.inputs.V2modelsSlotTypeSlotTypeValuesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new V2modelsSlotType("example", V2modelsSlotTypeArgs.builder()
.botId(exampleAwsLexv2modelsBot.id())
.botVersion(exampleAwsLexv2modelsBotLocale.botVersion())
.name("example")
.localeId(exampleAwsLexv2modelsBotLocale.localeId())
.valueSelectionSetting(V2modelsSlotTypeValueSelectionSettingArgs.builder()
.resolutionStrategy("OriginalValue")
.advancedRecognitionSettings(V2modelsSlotTypeValueSelectionSettingAdvancedRecognitionSettingArgs.builder()
.audioRecognitionStrategy("UseSlotValuesAsCustomVocabulary")
.build())
.build())
.slotTypeValues(V2modelsSlotTypeSlotTypeValuesArgs.builder()
.sampleValues(V2modelsSlotTypeSlotTypeValuesSampleValueArgs.builder()
.value("exampleValue")
.build())
.build())
.build());
}
}
resources:
example:
type: aws:lex:V2modelsSlotType
properties:
botId: ${exampleAwsLexv2modelsBot.id}
botVersion: ${exampleAwsLexv2modelsBotLocale.botVersion}
name: example
localeId: ${exampleAwsLexv2modelsBotLocale.localeId}
valueSelectionSetting:
resolutionStrategy: OriginalValue
advancedRecognitionSettings:
- audioRecognitionStrategy: UseSlotValuesAsCustomVocabulary
slotTypeValues:
sampleValues:
- value: exampleValue

Import

Using pulumi import, import Lex V2 Models Slot Type using using a comma-delimited string concatenating bot_id, bot_version, locale_id, and slot_type_id. For example:

$ pulumi import aws:lex/v2modelsSlotType:V2modelsSlotType example bot-1234,DRAFT,en_US,slot_type-id-12345678

Constructors

Link copied to clipboard
constructor(botId: Output<String>? = null, botVersion: Output<String>? = null, compositeSlotTypeSetting: Output<V2modelsSlotTypeCompositeSlotTypeSettingArgs>? = null, description: Output<String>? = null, externalSourceSetting: Output<V2modelsSlotTypeExternalSourceSettingArgs>? = null, localeId: Output<String>? = null, name: Output<String>? = null, parentSlotTypeSignature: Output<String>? = null, slotTypeValues: Output<V2modelsSlotTypeSlotTypeValuesArgs>? = null, timeouts: Output<V2modelsSlotTypeTimeoutsArgs>? = null, valueSelectionSetting: Output<V2modelsSlotTypeValueSelectionSettingArgs>? = null)

Properties

Link copied to clipboard
val botId: Output<String>? = null

Identifier of the bot associated with this slot type.

Link copied to clipboard
val botVersion: Output<String>? = null

Version of the bot associated with this slot type.

Link copied to clipboard

Specifications for a composite slot type. See composite_slot_type_setting argument reference below.

Link copied to clipboard
val description: Output<String>? = null

Description of the slot type.

Link copied to clipboard

Type of external information used to create the slot type. See external_source_setting argument reference below.

Link copied to clipboard
val localeId: Output<String>? = null

Identifier of the language and locale where this slot type is used. All of the bots, slot types, and slots used by the intent must have the same locale.

Link copied to clipboard
val name: Output<String>? = null

Name of the slot type. The following arguments are optional:

Link copied to clipboard
val parentSlotTypeSignature: Output<String>? = null

Built-in slot type used as a parent of this slot type. When you define a parent slot type, the new slot type has the configuration of the parent slot type. Only AMAZON.AlphaNumeric is supported.

Link copied to clipboard

List of SlotTypeValue objects that defines the values that the slot type can take. Each value can have a list of synonyms, additional values that help train the machine learning model about the values that it resolves for a slot. See slot_type_values argument reference below.

Link copied to clipboard
Link copied to clipboard

Determines the strategy that Amazon Lex uses to select a value from the list of possible values. See value_selection_setting argument reference below.

Functions

Link copied to clipboard
open override fun toJava(): V2modelsSlotTypeArgs