{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-athena-capacityreservation.json",
  "title": "AWSAthenaCapacityReservationProperties",
  "description": "Resource schema for AWS::Athena::CapacityReservation. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-athena.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-athena-capacityreservation.json",
    "sourceSha256": "c30651ce85bb9c9284a70adbd9c288e7fa898f375f148a28d17607f791b50405"
  },
  "type": "object",
  "properties": {
    "Name": {
      "oneOf": [
        {
          "pattern": "[a-zA-Z0-9._-]{1,128}",
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The reservation name."
    },
    "TargetDpus": {
      "description": "The number of DPUs to request to be allocated to the reservation.",
      "type": "integer",
      "format": "int64",
      "minimum": 1
    },
    "CapacityAssignmentConfiguration": {
      "$ref": "#/$defs/CapacityAssignmentConfiguration"
    },
    "Tags": {
      "description": "An array of key-value pairs to apply to this resource.",
      "type": "array",
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::Athena::CapacityReservation",
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-athena.git",
  "additionalProperties": false,
  "additionalIdentifiers": [
    [
      "/properties/Name"
    ]
  ],
  "$defs": {
    "Arn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$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 specified capacity reservation",
      "title": "AWSAthenaCapacityReservationArnDefinition"
    },
    "Tag": {
      "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"
            }
          ]
        },
        "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"
            }
          ]
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSAthenaCapacityReservationTagDefinition",
      "additionalProperties": false
    },
    "WorkgroupName": {
      "oneOf": [
        {
          "pattern": "[a-zA-Z0-9._-]{1,128}",
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSAthenaCapacityReservationWorkgroupNameDefinition"
    },
    "WorkgroupNames": {
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/WorkgroupName"
      },
      "title": "AWSAthenaCapacityReservationWorkgroupNamesDefinition"
    },
    "CapacityAssignment": {
      "type": "object",
      "properties": {
        "WorkgroupNames": {
          "$ref": "#/$defs/WorkgroupNames"
        }
      },
      "required": [
        "WorkgroupNames"
      ],
      "title": "AWSAthenaCapacityReservationCapacityAssignmentDefinition",
      "additionalProperties": false
    },
    "CapacityAssignments": {
      "description": "List of capacity assignments",
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/CapacityAssignment"
      },
      "title": "AWSAthenaCapacityReservationCapacityAssignmentsDefinition"
    },
    "CapacityAssignmentConfiguration": {
      "description": "Assignment configuration to assign workgroups to a reservation",
      "type": "object",
      "properties": {
        "CapacityAssignments": {
          "$ref": "#/$defs/CapacityAssignments"
        }
      },
      "required": [
        "CapacityAssignments"
      ],
      "title": "AWSAthenaCapacityReservationCapacityAssignmentConfigurationDefinition",
      "additionalProperties": false
    },
    "CapacityReservationStatus": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "PENDING",
            "ACTIVE",
            "CANCELLING",
            "CANCELLED",
            "FAILED",
            "UPDATE_PENDING"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSAthenaCapacityReservationCapacityReservationStatusDefinition"
    }
  },
  "required": [
    "Name",
    "TargetDpus"
  ],
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/Status",
    "/properties/AllocatedDpus",
    "/properties/CreationTime",
    "/properties/LastSuccessfulAllocationTime"
  ],
  "createOnlyProperties": [
    "/properties/Name"
  ],
  "primaryIdentifier": [
    "/properties/Arn"
  ]
}
