Class V2modelsSlotType


  • public class V2modelsSlotType
    extends com.pulumi.resources.CustomResource
    Resource for managing an AWS Lex V2 Models Slot Type. ## Example Usage ### Basic Usage
     
     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.inputs.V2modelsBotVersionLocaleSpecificationArgs;
     import com.pulumi.aws.lex.V2modelsSlotType;
     import com.pulumi.aws.lex.V2modelsSlotTypeArgs;
     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 example = new V2modelsBot("example", V2modelsBotArgs.builder()
                 .dataPrivacies(V2modelsBotDataPrivacyArgs.builder()
                     .childDirected(true)
                     .build())
                 .name("example")
                 .idleSessionTtlInSeconds(60)
                 .roleArn(exampleAwsIamRole.arn())
                 .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());
     
         }
     }
     
     
    ### valueSelectionSetting Usage
     
     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.V2modelsSlotTypeValueSelectionSettingAdvancedRecognitionSettingArgs;
     import com.pulumi.aws.lex.inputs.V2modelsSlotTypeSlotTypeValueArgs;
     import com.pulumi.aws.lex.inputs.V2modelsSlotTypeSlotTypeValueSampleValueArgs;
     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 example = new V2modelsSlotType("example", V2modelsSlotTypeArgs.builder()
                 .valueSelectionSetting(V2modelsSlotTypeValueSelectionSettingArgs.builder()
                     .advancedRecognitionSettings(V2modelsSlotTypeValueSelectionSettingAdvancedRecognitionSettingArgs.builder()
                         .audioRecognitionStrategy("UseSlotValuesAsCustomVocabulary")
                         .build())
                     .resolutionStrategy("OriginalValue")
                     .build())
                 .slotTypeValues(V2modelsSlotTypeSlotTypeValueArgs.builder()
                     .sampleValues(V2modelsSlotTypeSlotTypeValueSampleValueArgs.builder()
                         .value("exampleValue")
                         .build())
                     .build())
                 .botId(exampleAwsLexv2modelsBot.id())
                 .botVersion(exampleAwsLexv2modelsBotLocale.botVersion())
                 .name("example")
                 .localeId(exampleAwsLexv2modelsBotLocale.localeId())
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import Lex V2 Models Slot Type using using a comma-delimited string concatenating `botId`, `botVersion`, `localeId`, and `slotTypeId`. For example: ```sh $ pulumi import aws:lex/v2modelsSlotType:V2modelsSlotType example bot-1234,DRAFT,en_US,slot_type-id-12345678 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Detail

      • V2modelsSlotType

        public V2modelsSlotType​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • V2modelsSlotType

        public V2modelsSlotType​(java.lang.String name,
                                V2modelsSlotTypeArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • V2modelsSlotType

        public V2modelsSlotType​(java.lang.String name,
                                V2modelsSlotTypeArgs args,
                                @Nullable
                                com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • botId

        public com.pulumi.core.Output<java.lang.String> botId()
        Returns:
        Identifier of the bot associated with this slot type.
      • botVersion

        public com.pulumi.core.Output<java.lang.String> botVersion()
        Returns:
        Version of the bot associated with this slot type.
      • compositeSlotTypeSettings

        public com.pulumi.core.Output<java.util.Optional<java.util.List<V2modelsSlotTypeCompositeSlotTypeSetting>>> compositeSlotTypeSettings()
        Returns:
        Specifications for a composite slot type. See `compositeSlotTypeSetting` argument reference below.
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        Description of the slot type.
      • externalSourceSettings

        public com.pulumi.core.Output<java.util.Optional<java.util.List<V2modelsSlotTypeExternalSourceSetting>>> externalSourceSettings()
        Returns:
        Type of external information used to create the slot type. See `externalSourceSetting` argument reference below.
      • localeId

        public com.pulumi.core.Output<java.lang.String> localeId()
        Returns:
        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.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Name of the slot type. The following arguments are optional:
      • parentSlotTypeSignature

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> parentSlotTypeSignature()
        Returns:
        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.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • slotTypeId

        public com.pulumi.core.Output<java.lang.String> slotTypeId()
        Returns:
        Unique identifier for the slot type.
      • slotTypeValues

        public com.pulumi.core.Output<java.util.Optional<java.util.List<V2modelsSlotTypeSlotTypeValue>>> slotTypeValues()
        Returns:
        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 `slotTypeValues` argument reference below.
      • valueSelectionSetting

        public com.pulumi.core.Output<java.util.Optional<V2modelsSlotTypeValueSelectionSetting>> valueSelectionSetting()
        Returns:
        Determines the strategy that Amazon Lex uses to select a value from the list of possible values. See `valueSelectionSetting` argument reference below.
      • get

        public static V2modelsSlotType get​(java.lang.String name,
                                           com.pulumi.core.Output<java.lang.String> id,
                                           @Nullable
                                           V2modelsSlotTypeState state,
                                           @Nullable
                                           com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.