1. Packages
  2. AWS
  3. API Docs
  4. lex
  5. V2modelsBotVersion
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.lex.V2modelsBotVersion

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Resource for managing an AWS Lex V2 Models Bot Version.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.lex.V2modelsBotVersion("test", {
        botId: testAwsLexv2modelsBot.id,
        localeSpecification: {
            en_US: {
                sourceBotVersion: "DRAFT",
            },
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.lex.V2modelsBotVersion("test",
        bot_id=test_aws_lexv2models_bot["id"],
        locale_specification={
            "en_US": {
                "source_bot_version": "DRAFT",
            },
        })
    
    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.NewV2modelsBotVersion(ctx, "test", &lex.V2modelsBotVersionArgs{
    			BotId: pulumi.Any(testAwsLexv2modelsBot.Id),
    			LocaleSpecification: lex.V2modelsBotVersionLocaleSpecificationMap{
    				"en_US": &lex.V2modelsBotVersionLocaleSpecificationArgs{
    					SourceBotVersion: pulumi.String("DRAFT"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.Lex.V2modelsBotVersion("test", new()
        {
            BotId = testAwsLexv2modelsBot.Id,
            LocaleSpecification = 
            {
                { "en_US", new Aws.Lex.Inputs.V2modelsBotVersionLocaleSpecificationArgs
                {
                    SourceBotVersion = "DRAFT",
                } },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lex.V2modelsBotVersion;
    import com.pulumi.aws.lex.V2modelsBotVersionArgs;
    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 test = new V2modelsBotVersion("test", V2modelsBotVersionArgs.builder()
                .botId(testAwsLexv2modelsBot.id())
                .localeSpecification(Map.of("en_US", Map.of("sourceBotVersion", "DRAFT")))
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:lex:V2modelsBotVersion
        properties:
          botId: ${testAwsLexv2modelsBot.id}
          localeSpecification:
            en_US:
              sourceBotVersion: DRAFT
    

    Create V2modelsBotVersion Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new V2modelsBotVersion(name: string, args: V2modelsBotVersionArgs, opts?: CustomResourceOptions);
    @overload
    def V2modelsBotVersion(resource_name: str,
                           args: V2modelsBotVersionArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def V2modelsBotVersion(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           bot_id: Optional[str] = None,
                           locale_specification: Optional[Mapping[str, V2modelsBotVersionLocaleSpecificationArgs]] = None,
                           bot_version: Optional[str] = None,
                           description: Optional[str] = None,
                           timeouts: Optional[V2modelsBotVersionTimeoutsArgs] = None)
    func NewV2modelsBotVersion(ctx *Context, name string, args V2modelsBotVersionArgs, opts ...ResourceOption) (*V2modelsBotVersion, error)
    public V2modelsBotVersion(string name, V2modelsBotVersionArgs args, CustomResourceOptions? opts = null)
    public V2modelsBotVersion(String name, V2modelsBotVersionArgs args)
    public V2modelsBotVersion(String name, V2modelsBotVersionArgs args, CustomResourceOptions options)
    
    type: aws:lex:V2modelsBotVersion
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args V2modelsBotVersionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args V2modelsBotVersionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args V2modelsBotVersionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args V2modelsBotVersionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args V2modelsBotVersionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var v2modelsBotVersionResource = new Aws.Lex.V2modelsBotVersion("v2modelsBotVersionResource", new()
    {
        BotId = "string",
        LocaleSpecification = 
        {
            { "string", new Aws.Lex.Inputs.V2modelsBotVersionLocaleSpecificationArgs
            {
                SourceBotVersion = "string",
            } },
        },
        BotVersion = "string",
        Description = "string",
        Timeouts = new Aws.Lex.Inputs.V2modelsBotVersionTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := lex.NewV2modelsBotVersion(ctx, "v2modelsBotVersionResource", &lex.V2modelsBotVersionArgs{
    	BotId: pulumi.String("string"),
    	LocaleSpecification: lex.V2modelsBotVersionLocaleSpecificationMap{
    		"string": &lex.V2modelsBotVersionLocaleSpecificationArgs{
    			SourceBotVersion: pulumi.String("string"),
    		},
    	},
    	BotVersion:  pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Timeouts: &lex.V2modelsBotVersionTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var v2modelsBotVersionResource = new V2modelsBotVersion("v2modelsBotVersionResource", V2modelsBotVersionArgs.builder()
        .botId("string")
        .localeSpecification(Map.of("string", Map.of("sourceBotVersion", "string")))
        .botVersion("string")
        .description("string")
        .timeouts(V2modelsBotVersionTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    v2models_bot_version_resource = aws.lex.V2modelsBotVersion("v2modelsBotVersionResource",
        bot_id="string",
        locale_specification={
            "string": {
                "sourceBotVersion": "string",
            },
        },
        bot_version="string",
        description="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const v2modelsBotVersionResource = new aws.lex.V2modelsBotVersion("v2modelsBotVersionResource", {
        botId: "string",
        localeSpecification: {
            string: {
                sourceBotVersion: "string",
            },
        },
        botVersion: "string",
        description: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: aws:lex:V2modelsBotVersion
    properties:
        botId: string
        botVersion: string
        description: string
        localeSpecification:
            string:
                sourceBotVersion: string
        timeouts:
            create: string
            delete: string
    

    V2modelsBotVersion Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The V2modelsBotVersion resource accepts the following input properties:

    BotId string
    Idientifier of the bot to create the version for.
    LocaleSpecification Dictionary<string, V2modelsBotVersionLocaleSpecificationArgs>

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    BotVersion string
    Version number assigned to the version.
    Description string
    A description of the version. Use the description to help identify the version in lists.
    Timeouts V2modelsBotVersionTimeouts
    BotId string
    Idientifier of the bot to create the version for.
    LocaleSpecification map[string]V2modelsBotVersionLocaleSpecificationArgs

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    BotVersion string
    Version number assigned to the version.
    Description string
    A description of the version. Use the description to help identify the version in lists.
    Timeouts V2modelsBotVersionTimeoutsArgs
    botId String
    Idientifier of the bot to create the version for.
    localeSpecification Map<String,V2modelsBotVersionLocaleSpecificationArgs>

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    botVersion String
    Version number assigned to the version.
    description String
    A description of the version. Use the description to help identify the version in lists.
    timeouts V2modelsBotVersionTimeouts
    botId string
    Idientifier of the bot to create the version for.
    localeSpecification {[key: string]: V2modelsBotVersionLocaleSpecificationArgs}

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    botVersion string
    Version number assigned to the version.
    description string
    A description of the version. Use the description to help identify the version in lists.
    timeouts V2modelsBotVersionTimeouts
    bot_id str
    Idientifier of the bot to create the version for.
    locale_specification Mapping[str, V2modelsBotVersionLocaleSpecificationArgs]

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    bot_version str
    Version number assigned to the version.
    description str
    A description of the version. Use the description to help identify the version in lists.
    timeouts V2modelsBotVersionTimeoutsArgs
    botId String
    Idientifier of the bot to create the version for.
    localeSpecification Map<Property Map>

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    botVersion String
    Version number assigned to the version.
    description String
    A description of the version. Use the description to help identify the version in lists.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the V2modelsBotVersion resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing V2modelsBotVersion Resource

    Get an existing V2modelsBotVersion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: V2modelsBotVersionState, opts?: CustomResourceOptions): V2modelsBotVersion
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bot_id: Optional[str] = None,
            bot_version: Optional[str] = None,
            description: Optional[str] = None,
            locale_specification: Optional[Mapping[str, V2modelsBotVersionLocaleSpecificationArgs]] = None,
            timeouts: Optional[V2modelsBotVersionTimeoutsArgs] = None) -> V2modelsBotVersion
    func GetV2modelsBotVersion(ctx *Context, name string, id IDInput, state *V2modelsBotVersionState, opts ...ResourceOption) (*V2modelsBotVersion, error)
    public static V2modelsBotVersion Get(string name, Input<string> id, V2modelsBotVersionState? state, CustomResourceOptions? opts = null)
    public static V2modelsBotVersion get(String name, Output<String> id, V2modelsBotVersionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BotId string
    Idientifier of the bot to create the version for.
    BotVersion string
    Version number assigned to the version.
    Description string
    A description of the version. Use the description to help identify the version in lists.
    LocaleSpecification Dictionary<string, V2modelsBotVersionLocaleSpecificationArgs>

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    Timeouts V2modelsBotVersionTimeouts
    BotId string
    Idientifier of the bot to create the version for.
    BotVersion string
    Version number assigned to the version.
    Description string
    A description of the version. Use the description to help identify the version in lists.
    LocaleSpecification map[string]V2modelsBotVersionLocaleSpecificationArgs

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    Timeouts V2modelsBotVersionTimeoutsArgs
    botId String
    Idientifier of the bot to create the version for.
    botVersion String
    Version number assigned to the version.
    description String
    A description of the version. Use the description to help identify the version in lists.
    localeSpecification Map<String,V2modelsBotVersionLocaleSpecificationArgs>

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    timeouts V2modelsBotVersionTimeouts
    botId string
    Idientifier of the bot to create the version for.
    botVersion string
    Version number assigned to the version.
    description string
    A description of the version. Use the description to help identify the version in lists.
    localeSpecification {[key: string]: V2modelsBotVersionLocaleSpecificationArgs}

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    timeouts V2modelsBotVersionTimeouts
    bot_id str
    Idientifier of the bot to create the version for.
    bot_version str
    Version number assigned to the version.
    description str
    A description of the version. Use the description to help identify the version in lists.
    locale_specification Mapping[str, V2modelsBotVersionLocaleSpecificationArgs]

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    timeouts V2modelsBotVersionTimeoutsArgs
    botId String
    Idientifier of the bot to create the version for.
    botVersion String
    Version number assigned to the version.
    description String
    A description of the version. Use the description to help identify the version in lists.
    localeSpecification Map<Property Map>

    Specifies the locales that Amazon Lex adds to this version. You can choose the draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.

    The attribute value is a map with one or more entries, each of which has a locale name as the key and an object with the following attribute as the value:

    • sourceBotVersion - (Required) The version of a bot used for a bot locale. Valid values: DRAFT, a numeric version.
    timeouts Property Map

    Supporting Types

    V2modelsBotVersionLocaleSpecification, V2modelsBotVersionLocaleSpecificationArgs

    V2modelsBotVersionTimeouts, V2modelsBotVersionTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.

    Import

    Using pulumi import, import Lex V2 Models Bot Version using the id. For example:

    $ pulumi import aws:lex/v2modelsBotVersion:V2modelsBotVersion example id-12345678,1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi