Skip to content

Resource: awsLexBotAlias

Provides an Amazon Lex Bot Alias resource. For more information see Amazon Lex: How It Works

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.lexBotAlias.LexBotAlias(this, "order_flowers_prod", {
  botName: "OrderFlowers",
  botVersion: "1",
  description: "Production Version of the OrderFlowers Bot.",
  name: "OrderFlowersProd",
});

Argument Reference

The following arguments are supported:

  • botName - (Required) The name of the bot.
  • botVersion - (Required) The name of the bot.
  • conversationLogs - (Optional) The settings that determine how Amazon Lex uses conversation logs for the alias. Attributes are documented under conversation_logs.
  • description - (Optional) A description of the alias. Must be less than or equal to 200 characters in length.
  • name - (Required) The name of the alias. The name is not case sensitive. Must be less than or equal to 100 characters in length.

conversationLogs

Contains information about conversation log settings.

  • iamRoleArn - (Required) The Amazon Resource Name (ARN) of the IAM role used to write your logs to CloudWatch Logs or an S3 bucket. Must be between 20 and 2048 characters in length.
  • logSettings - (Optional) The settings for your conversation logs. You can log text, audio, or both. Attributes are documented under log_settings.

logSettings

The settings for conversation logs.

  • destination - (Required) The destination where logs are delivered. Options are CLOUDWATCH_LOGS or s3.
  • kmsKeyArn - (Optional) The Amazon Resource Name (ARN) of the key used to encrypt audio logs in an S3 bucket. This can only be specified when destination is set to s3. Must be between 20 and 2048 characters in length.
  • logType - (Required) The type of logging that is enabled. Options are audio or text.
  • resourceArn - (Required) The Amazon Resource Name (ARN) of the CloudWatch Logs log group or S3 bucket where the logs are delivered. Must be less than or equal to 2048 characters in length.
  • resourcePrefix - (Computed) The prefix of the S3 object key for audio logs or the log stream name for text logs.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - The ARN of the bot alias.
  • checksum - Checksum of the bot alias.
  • createdDate - The date that the bot alias was created.
  • lastUpdatedDate - The date that the bot alias was updated. When you create a resource, the creation date and the last updated date are the same.

Timeouts

Configuration options:

  • create - (Default 1M)
  • update - (Default 1M)
  • delete - (Default 5M)

Import

Bot aliases can be imported using an ID with the format botName:botAliasName.

$ terraform import aws_lex_bot_alias.order_flowers_prod OrderFlowers:OrderFlowersProd