{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-lex/json-schema/amazon-lex-put-bot-alias-request-schema.json",
  "title": "PutBotAliasRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-lex-aliases-api-openapi.yml#/components/schemas/PutBotAliasRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the alias. The name is not case sensitive."
    },
    "description": {
      "type": "string",
      "description": "A description of the alias."
    },
    "botVersion": {
      "type": "string",
      "description": "The version of the bot."
    },
    "botName": {
      "type": "string",
      "description": "The name of the bot."
    },
    "checksum": {
      "type": "string",
      "description": "Identifies a specific revision of the $LATEST version. When you create a new bot alias, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception. When you want to update a bot alias, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception."
    },
    "conversationLogs": {
      "$ref": "#/$defs/ConversationLogsRequest"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the PutBotAlias operation to update the tags on a bot alias. To update tags, use the TagResource operation."
    }
  },
  "required": [
    "name",
    "botVersion",
    "botName"
  ],
  "$defs": {
    "ConversationLogsRequest": {
      "type": "object",
      "properties": {
        "logSettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LogSettingsRequest"
          },
          "description": "The settings for your conversation logs. You can log the conversation text, conversation audio, or both."
        },
        "iamRoleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of an IAM role with permission to write to your CloudWatch Logs for text logs and your S3 bucket for audio logs. If audio encryption is enabled, this role also provides access permission for the AWS KMS key used for encrypting audio logs. For more information, see Creating an IAM Role and Policy for Conversation Logs."
        }
      },
      "required": [
        "logSettings",
        "iamRoleArn"
      ]
    },
    "LogSettingsRequest": {
      "type": "object",
      "properties": {
        "logType": {
          "type": "string",
          "enum": [
            "AUDIO",
            "TEXT"
          ],
          "description": "The type of logging to enable. Text logs are delivered to a CloudWatch Logs log group. Audio logs are delivered to an S3 bucket."
        },
        "destination": {
          "type": "string",
          "enum": [
            "CLOUDWATCH_LOGS",
            "S3"
          ],
          "description": "Where the logs will be delivered. Text logs are delivered to a CloudWatch Logs log group. Audio logs are delivered to an S3 bucket."
        },
        "kmsKeyArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the AWS KMS customer managed key for encrypting audio logs delivered to an S3 bucket. The key does not apply to CloudWatch Logs and is optional for S3 buckets."
        },
        "resourceArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the CloudWatch Logs log group or S3 bucket where the logs should be delivered."
        }
      },
      "required": [
        "logType",
        "destination",
        "resourceArn"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key for the tag. Keys are not case-sensitive and must be unique."
        },
        "value": {
          "type": "string",
          "description": "The value associated with a key. The value may be an empty string but it can't be null."
        }
      },
      "required": [
        "key",
        "value"
      ]
    }
  }
}