{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-lex-botalias.json",
  "title": "AWSLexBotAliasProperties",
  "description": "A Bot Alias enables you to change the version of a bot without updating applications that use the bot. Source:- <https://docs.aws.amazon.com/lexv2/latest/dg/API_CreateBotAlias.html>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-lex-botalias.json",
    "sourceSha256": "1b4d981d2f8e51e544fe04ba4e54011a8922bf0bd8266c21afca26e6a995fa2a"
  },
  "type": "object",
  "properties": {
    "BotId": {
      "$ref": "#/$defs/Id"
    },
    "BotAliasLocaleSettings": {
      "$ref": "#/$defs/BotAliasLocaleSettingsList"
    },
    "BotAliasName": {
      "$ref": "#/$defs/Name"
    },
    "BotVersion": {
      "$ref": "#/$defs/BotVersion"
    },
    "ConversationLogSettings": {
      "$ref": "#/$defs/ConversationLogSettings"
    },
    "Description": {
      "$ref": "#/$defs/Description"
    },
    "SentimentAnalysisSettings": {
      "description": "Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.",
      "type": "object",
      "properties": {
        "DetectSentiment": {
          "type": "boolean",
          "description": "Enable to call Amazon Comprehend for Sentiment natively within Lex"
        }
      },
      "required": [
        "DetectSentiment"
      ],
      "additionalProperties": false
    },
    "BotAliasTags": {
      "description": "A list of tags to add to the bot alias.",
      "type": "array",
      "uniqueItems": true,
      "maxItems": 200,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::Lex::BotAlias",
  "writeOnlyProperties": [
    "/properties/BotAliasTags"
  ],
  "sourceUrl": "https://docs.aws.amazon.com/lexv2/latest/dg/API_CreateBotAlias.html",
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/BotId"
  ],
  "taggable": false,
  "$defs": {
    "LocaleId": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The identifier of the language and locale that the bot alias will be configured in.",
      "title": "AWSLexBotAliasLocaleIdDefinition"
    },
    "BotAliasLocaleSettingsList": {
      "description": "A list of bot alias locale settings to add to the bot alias.",
      "type": "array",
      "uniqueItems": true,
      "maxItems": 50,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/BotAliasLocaleSettingsItem"
      },
      "title": "AWSLexBotAliasBotAliasLocaleSettingsListDefinition"
    },
    "BotAliasStatus": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "Creating",
            "Available",
            "Deleting",
            "Failed"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSLexBotAliasBotAliasStatusDefinition"
    },
    "BotAliasLocaleSettingsItem": {
      "description": "A locale setting in alias",
      "type": "object",
      "properties": {
        "LocaleId": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A string used to identify the locale"
        },
        "BotAliasLocaleSetting": {
          "$ref": "#/$defs/BotAliasLocaleSettings"
        }
      },
      "required": [
        "LocaleId",
        "BotAliasLocaleSetting"
      ],
      "title": "AWSLexBotAliasBotAliasLocaleSettingsItemDefinition",
      "additionalProperties": false
    },
    "BotAliasLocaleSettings": {
      "description": "You can use this parameter to specify a specific Lambda function to run different functions in different locales.",
      "type": "object",
      "properties": {
        "CodeHookSpecification": {
          "$ref": "#/$defs/CodeHookSpecification"
        },
        "Enabled": {
          "type": "boolean",
          "description": "Whether the Lambda code hook is enabled"
        }
      },
      "required": [
        "Enabled"
      ],
      "title": "AWSLexBotAliasBotAliasLocaleSettingsDefinition",
      "additionalProperties": false
    },
    "CodeHookSpecification": {
      "description": "Contains information about code hooks that Amazon Lex calls during a conversation.",
      "type": "object",
      "properties": {
        "LambdaCodeHook": {
          "$ref": "#/$defs/LambdaCodeHook"
        }
      },
      "required": [
        "LambdaCodeHook"
      ],
      "title": "AWSLexBotAliasCodeHookSpecificationDefinition",
      "additionalProperties": false
    },
    "LambdaCodeHook": {
      "description": "Contains information about code hooks that Amazon Lex calls during a conversation.",
      "type": "object",
      "properties": {
        "CodeHookInterfaceVersion": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 5
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The version of the request-response that you want Amazon Lex to use to invoke your Lambda function."
        },
        "LambdaArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 20,
              "maxLength": 2048
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of the Lambda function."
        }
      },
      "required": [
        "CodeHookInterfaceVersion",
        "LambdaArn"
      ],
      "title": "AWSLexBotAliasLambdaCodeHookDefinition",
      "additionalProperties": false
    },
    "ConversationLogSettings": {
      "description": "Contains information about code hooks that Amazon Lex calls during a conversation.",
      "type": "object",
      "properties": {
        "AudioLogSettings": {
          "$ref": "#/$defs/AudioLogSettings"
        },
        "TextLogSettings": {
          "$ref": "#/$defs/TextLogSettings"
        }
      },
      "title": "AWSLexBotAliasConversationLogSettingsDefinition",
      "additionalProperties": false
    },
    "AudioLogSettings": {
      "description": "List of audio log settings",
      "type": "array",
      "maxItems": 1,
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/AudioLogSetting"
      },
      "title": "AWSLexBotAliasAudioLogSettingsDefinition"
    },
    "TextLogSettings": {
      "description": "List of text log settings",
      "type": "array",
      "maxItems": 1,
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/TextLogSetting"
      },
      "title": "AWSLexBotAliasTextLogSettingsDefinition"
    },
    "AudioLogSetting": {
      "description": "Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.",
      "type": "object",
      "properties": {
        "Destination": {
          "$ref": "#/$defs/AudioLogDestination"
        },
        "Enabled": {
          "type": "boolean",
          "description": ""
        }
      },
      "required": [
        "Destination",
        "Enabled"
      ],
      "title": "AWSLexBotAliasAudioLogSettingDefinition",
      "additionalProperties": false
    },
    "TextLogSetting": {
      "description": "Contains information about code hooks that Amazon Lex calls during a conversation.",
      "type": "object",
      "properties": {
        "Destination": {
          "$ref": "#/$defs/TextLogDestination"
        },
        "Enabled": {
          "type": "boolean",
          "description": ""
        }
      },
      "required": [
        "Destination",
        "Enabled"
      ],
      "title": "AWSLexBotAliasTextLogSettingDefinition",
      "additionalProperties": false
    },
    "AudioLogDestination": {
      "description": "The location of audio log files collected when conversation logging is enabled for a bot.",
      "type": "object",
      "properties": {
        "S3Bucket": {
          "$ref": "#/$defs/S3BucketLogDestination"
        }
      },
      "required": [
        "S3Bucket"
      ],
      "title": "AWSLexBotAliasAudioLogDestinationDefinition",
      "additionalProperties": false
    },
    "TextLogDestination": {
      "description": "Defines the Amazon CloudWatch Logs destination log group for conversation text logs.",
      "type": "object",
      "properties": {
        "CloudWatch": {
          "$ref": "#/$defs/CloudWatchLogGroupLogDestination"
        }
      },
      "required": [
        "CloudWatch"
      ],
      "title": "AWSLexBotAliasTextLogDestinationDefinition",
      "additionalProperties": false
    },
    "CloudWatchLogGroupLogDestination": {
      "type": "object",
      "properties": {
        "CloudWatchLogGroupArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A string used to identify the groupArn for the Cloudwatch Log Group"
        },
        "LogPrefix": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 1024
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A string containing the value for the Log Prefix"
        }
      },
      "required": [
        "CloudWatchLogGroupArn",
        "LogPrefix"
      ],
      "title": "AWSLexBotAliasCloudWatchLogGroupLogDestinationDefinition",
      "additionalProperties": false
    },
    "S3BucketLogDestination": {
      "description": "Specifies an Amazon S3 bucket for logging audio conversations",
      "type": "object",
      "properties": {
        "S3BucketArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^arn:[\\w\\-]+:s3:::[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored."
        },
        "LogPrefix": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 1024
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon S3 key of the deployment package."
        },
        "KmsKeyArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 20,
              "maxLength": 2048,
              "pattern": "^arn:[\\w\\-]+:kms:[\\w\\-]+:[0-9]{12}:(?:key\\/[\\w\\-]+|alias\\/[a-zA-Z0-9:\\/_\\-]{1,256})$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket."
        }
      },
      "required": [
        "LogPrefix",
        "S3BucketArn"
      ],
      "title": "AWSLexBotAliasS3BucketLogDestinationDefinition",
      "additionalProperties": false
    },
    "Id": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 10,
          "maxLength": 10,
          "pattern": "^[0-9a-zA-Z]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Unique ID of resource",
      "title": "AWSLexBotAliasIdDefinition"
    },
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^([0-9a-zA-Z][_-]?)+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A unique identifier for a resource.",
      "title": "AWSLexBotAliasNameDefinition"
    },
    "BotVersion": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 5,
          "pattern": "^(DRAFT|[0-9]+)$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The version of a bot.",
      "title": "AWSLexBotAliasBotVersionDefinition"
    },
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A description of the bot alias. Use the description to help identify the bot alias in lists.",
      "title": "AWSLexBotAliasDescriptionDefinition"
    },
    "Arn": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSLexBotAliasArnDefinition"
    },
    "Tag": {
      "description": "A label for tagging Lex resources",
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A string used to identify this tag"
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A string containing the value for the tag"
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSLexBotAliasTagDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "BotId",
    "BotAliasName"
  ],
  "readOnlyProperties": [
    "/properties/BotAliasId",
    "/properties/Arn",
    "/properties/BotAliasStatus"
  ],
  "primaryIdentifier": [
    "/properties/BotAliasId",
    "/properties/BotId"
  ]
}
