SlotType class
Provides an Amazon Lex Slot Type resource. For more information see Amazon Lex: How It Works
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const flowerTypes = new aws.lex.SlotType("flower_types", {
enumerationValues: [
{
synonyms: [
"Lirium",
"Martagon",
],
value: "lilies",
},
{
synonyms: [
"Eduardoregelia",
"Podonix",
],
value: "tulips",
},
],
createVersion: true,
description: "Types of flowers to order",
name: "FlowerTypes",
valueSelectionStrategy: "ORIGINAL_VALUE",
});
import pulumi
import pulumi_aws as aws
flower_types = aws.lex.SlotType("flower_types",
enumeration_values=[
{
"synonyms": [
"Lirium",
"Martagon",
],
"value": "lilies",
},
{
"synonyms": [
"Eduardoregelia",
"Podonix",
],
"value": "tulips",
},
],
create_version=True,
description="Types of flowers to order",
name="FlowerTypes",
value_selection_strategy="ORIGINAL_VALUE")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var flowerTypes = new Aws.Lex.SlotType("flower_types", new()
{
EnumerationValues = new[]
{
new Aws.Lex.Inputs.SlotTypeEnumerationValueArgs
{
Synonyms = new[]
{
"Lirium",
"Martagon",
},
Value = "lilies",
},
new Aws.Lex.Inputs.SlotTypeEnumerationValueArgs
{
Synonyms = new[]
{
"Eduardoregelia",
"Podonix",
},
Value = "tulips",
},
},
CreateVersion = true,
Description = "Types of flowers to order",
Name = "FlowerTypes",
ValueSelectionStrategy = "ORIGINAL_VALUE",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lex.NewSlotType(ctx, "flower_types", &lex.SlotTypeArgs{
EnumerationValues: lex.SlotTypeEnumerationValueArray{
&lex.SlotTypeEnumerationValueArgs{
Synonyms: pulumi.StringArray{
pulumi.String("Lirium"),
pulumi.String("Martagon"),
},
Value: pulumi.String("lilies"),
},
&lex.SlotTypeEnumerationValueArgs{
Synonyms: pulumi.StringArray{
pulumi.String("Eduardoregelia"),
pulumi.String("Podonix"),
},
Value: pulumi.String("tulips"),
},
},
CreateVersion: pulumi.Bool(true),
Description: pulumi.String("Types of flowers to order"),
Name: pulumi.String("FlowerTypes"),
ValueSelectionStrategy: pulumi.String("ORIGINAL_VALUE"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_lex_slottype" "flower_types" {
enumeration_values {
synonyms = ["Lirium", "Martagon"]
value = "lilies"
}
enumeration_values {
synonyms = ["Eduardoregelia", "Podonix"]
value = "tulips"
}
create_version = true
description = "Types of flowers to order"
name = "FlowerTypes"
value_selection_strategy = "ORIGINAL_VALUE"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lex.SlotType;
import com.pulumi.aws.lex.SlotTypeArgs;
import com.pulumi.aws.lex.inputs.SlotTypeEnumerationValueArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 flowerTypes = new SlotType("flowerTypes", SlotTypeArgs.builder()
.enumerationValues(
SlotTypeEnumerationValueArgs.builder()
.synonyms(
"Lirium",
"Martagon")
.value("lilies")
.build(),
SlotTypeEnumerationValueArgs.builder()
.synonyms(
"Eduardoregelia",
"Podonix")
.value("tulips")
.build())
.createVersion(true)
.description("Types of flowers to order")
.name("FlowerTypes")
.valueSelectionStrategy("ORIGINAL_VALUE")
.build());
}
}
resources:
flowerTypes:
type: aws:lex:SlotType
name: flower_types
properties:
enumerationValues:
- synonyms:
- Lirium
- Martagon
value: lilies
- synonyms:
- Eduardoregelia
- Podonix
value: tulips
createVersion: true
description: Types of flowers to order
name: FlowerTypes
valueSelectionStrategy: ORIGINAL_VALUE
Import
Using pulumi import, import slot types using their name. For example:
$ pulumi import aws:lex/slotType:SlotType flower_types FlowerTypes
Constructors
- SlotType(String name, {SlotTypeArgs? args, CustomResourceOptions? options})
-
Creates a new SlotType.
nameThe Pulumi resource name.argsArguments used to configure this SlotType. The set of arguments for SlotType.optionsResource options controlling this resource's behavior. - SlotType.reference(String urn)
- Creates a typed reference to an existing SlotType resource.
Properties
-
checksum
↔ Output<
String> -
Checksum identifying the version of the slot type that was created. The checksum is
not included as an argument because the resource will add it automatically when updating the slot type.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
createdDate
↔ Output<
String> -
The date when the slot type version was created.
latefinal
-
createVersion
↔ Output<
bool?> -
Determines if a new slot type version is created when the initial resource is created and on each
update. Defaults to
false.latefinal -
description
↔ Output<
String?> -
A description of the slot type. Must be less than or equal to 200 characters in length.
latefinal
-
enumerationValues
↔ Output<
List< SlotTypeEnumerationValue> > -
A list of EnumerationValue objects that defines the values that
the slot type can take. Each value can have a list of synonyms, which are additional values that help
train the machine learning model about the values that it resolves for a slot. Attributes are
documented under enumeration_value.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
lastUpdatedDate
↔ Output<
String> -
The date when the
$LATESTversion of this slot type was updated.latefinal -
name
↔ Output<
String> -
The name of the slot type. The name is not case sensitive. Must be less than or equal to 100 characters in length.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
-
valueSelectionStrategy
↔ Output<
String?> -
Determines the slot resolution strategy that Amazon Lex
uses to return slot type values.
ORIGINAL_VALUEreturns the value entered by the user if the user value is similar to the slot value.TOP_RESOLUTIONreturns the first value in the resolution list if there is a resolution list for the slot, otherwise null is returned. Defaults toORIGINAL_VALUE.latefinal -
version
↔ Output<
String> -
The version of the slot type.
latefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited