{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/Tenancy",
  "/properties/InstancePlatform",
  "/properties/InstanceType",
  "/properties/AvailabilityZone",
  "/properties/TagSpecifications",
  "/properties/OutPostArn",
  "/properties/EphemeralStorage",
  "/properties/EbsOptimized",
  "/properties/PlacementGroupArn",
  "/properties/AvailabilityZoneId"
 ],
 "definitions": {
  "CapacityAllocation": {
   "additionalProperties": false,
   "properties": {
    "AllocationType": {
     "type": "string"
    },
    "Count": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "Value": {
     "type": "string"
    }
   },
   "required": [
    "Value",
    "Key"
   ],
   "type": "object"
  },
  "TagSpecification": {
   "additionalProperties": false,
   "properties": {
    "ResourceType": {
     "enum": [
      "capacity-block",
      "capacity-manager-data-export",
      "capacity-reservation",
      "capacity-reservation-fleet",
      "carrier-gateway",
      "client-vpn-endpoint",
      "coip-pool",
      "customer-gateway",
      "declarative-policies-report",
      "dedicated-host",
      "dhcp-options",
      "egress-only-internet-gateway",
      "elastic-gpu",
      "elastic-ip",
      "export-image-task",
      "export-instance-task",
      "fleet",
      "fpga-image",
      "host-reservation",
      "image",
      "image-usage-report",
      "import-image-task",
      "import-snapshot-task",
      "instance",
      "instance-connect-endpoint",
      "instance-event-window",
      "internet-gateway",
      "ipam",
      "ipam-external-resource-verification-token",
      "ipam-policy",
      "ipam-pool",
      "ipam-prefix-list-resolver",
      "ipam-prefix-list-resolver-target",
      "ipam-resource-discovery",
      "ipam-resource-discovery-association",
      "ipam-scope",
      "ipv4pool-ec2",
      "ipv6pool-ec2",
      "key-pair",
      "launch-template",
      "local-gateway",
      "local-gateway-route-table",
      "local-gateway-route-table-virtual-interface-group-association",
      "local-gateway-route-table-vpc-association",
      "local-gateway-virtual-interface",
      "local-gateway-virtual-interface-group",
      "mac-modification-task",
      "natgateway",
      "network-acl",
      "network-insights-access-scope",
      "network-insights-access-scope-analysis",
      "network-insights-analysis",
      "network-insights-path",
      "network-interface",
      "outpost-lag",
      "placement-group",
      "prefix-list",
      "replace-root-volume-task",
      "reserved-instances",
      "route-server",
      "route-server-endpoint",
      "route-server-peer",
      "route-table",
      "security-group",
      "security-group-rule",
      "service-link-virtual-interface",
      "snapshot",
      "spot-fleet-request",
      "spot-instances-request",
      "subnet",
      "subnet-cidr-reservation",
      "traffic-mirror-filter",
      "traffic-mirror-filter-rule",
      "traffic-mirror-session",
      "traffic-mirror-target",
      "transit-gateway",
      "transit-gateway-attachment",
      "transit-gateway-connect-peer",
      "transit-gateway-metering-policy",
      "transit-gateway-multicast-domain",
      "transit-gateway-policy-table",
      "transit-gateway-route-table",
      "transit-gateway-route-table-announcement",
      "verified-access-endpoint",
      "verified-access-endpoint-target",
      "verified-access-group",
      "verified-access-instance",
      "verified-access-policy",
      "verified-access-trust-provider",
      "volume",
      "vpc",
      "vpc-block-public-access-exclusion",
      "vpc-encryption-control",
      "vpc-endpoint",
      "vpc-endpoint-connection",
      "vpc-endpoint-connection-device-type",
      "vpc-endpoint-service",
      "vpc-endpoint-service-permission",
      "vpc-flow-log",
      "vpc-peering-connection",
      "vpn-concentrator",
      "vpn-connection",
      "vpn-connection-device-type",
      "vpn-gateway"
     ],
     "type": "string"
    },
    "Tags": {
     "insertionOrder": false,
     "items": {
      "$ref": "#/definitions/Tag"
     },
     "type": "array",
     "uniqueItems": false
    }
   },
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Id"
 ],
 "properties": {
  "AvailabilityZone": {
   "type": "string"
  },
  "AvailabilityZoneId": {
   "type": "string"
  },
  "AvailableInstanceCount": {
   "type": "integer"
  },
  "CapacityAllocationSet": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/CapacityAllocation"
   },
   "type": "array",
   "uniqueItems": false
  },
  "CapacityReservationArn": {
   "type": "string"
  },
  "CapacityReservationFleetId": {
   "type": "string"
  },
  "CommitmentInfo": {
   "additionalProperties": false,
   "properties": {
    "CommitmentEndDate": {
     "type": "string"
    },
    "CommittedInstanceCount": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "CreateDate": {
   "type": "string"
  },
  "DeliveryPreference": {
   "enum": [
    "fixed",
    "incremental"
   ],
   "type": "string"
  },
  "EbsOptimized": {
   "type": "boolean"
  },
  "EndDate": {
   "type": "string"
  },
  "EndDateType": {
   "enum": [
    "limited",
    "unlimited"
   ],
   "type": "string"
  },
  "EphemeralStorage": {
   "type": "boolean"
  },
  "Id": {
   "type": "string"
  },
  "InstanceCount": {
   "type": "integer"
  },
  "InstanceMatchCriteria": {
   "enum": [
    "open",
    "targeted"
   ],
   "type": "string"
  },
  "InstancePlatform": {
   "enum": [
    "Linux with SQL Server Enterprise",
    "Linux with SQL Server Standard",
    "Linux with SQL Server Web",
    "Linux/UNIX",
    "RHEL with HA",
    "RHEL with HA and SQL Server Enterprise",
    "RHEL with HA and SQL Server Standard",
    "RHEL with SQL Server Enterprise",
    "RHEL with SQL Server Standard",
    "RHEL with SQL Server Web",
    "Red Hat Enterprise Linux",
    "SUSE Linux",
    "Ubuntu Pro",
    "Windows",
    "Windows with SQL Server",
    "Windows with SQL Server Enterprise",
    "Windows with SQL Server Standard",
    "Windows with SQL Server Web"
   ],
   "type": "string"
  },
  "InstanceType": {
   "type": "string"
  },
  "OutPostArn": {
   "pattern": "^arn:aws([a-z-]+)?:outposts:[a-z\\d-]+:\\d{12}:outpost/op-[a-f0-9]{17}$",
   "type": "string"
  },
  "OwnerId": {
   "type": "string"
  },
  "PlacementGroupArn": {
   "pattern": "^arn:aws([a-z-]+)?:ec2:[a-z\\d-]+:\\d{12}:placement-group/^.{1,255}$",
   "type": "string"
  },
  "ReservationType": {
   "type": "string"
  },
  "StartDate": {
   "type": "string"
  },
  "State": {
   "type": "string"
  },
  "TagSpecifications": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/TagSpecification"
   },
   "type": "array",
   "uniqueItems": false
  },
  "Tenancy": {
   "enum": [
    "dedicated",
    "default"
   ],
   "type": "string"
  },
  "TotalInstanceCount": {
   "type": "integer"
  },
  "UnusedReservationBillingOwnerId": {
   "type": "string"
  }
 },
 "readOnlyProperties": [
  "/properties/Id",
  "/properties/AvailableInstanceCount",
  "/properties/TotalInstanceCount",
  "/properties/StartDate",
  "/properties/CapacityReservationArn",
  "/properties/CreateDate",
  "/properties/State",
  "/properties/OwnerId",
  "/properties/ReservationType",
  "/properties/CapacityAllocationSet",
  "/properties/CommitmentInfo",
  "/properties/DeliveryPreference",
  "/properties/CapacityReservationFleetId"
 ],
 "required": [
  "InstanceCount",
  "InstancePlatform",
  "InstanceType"
 ],
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/TagSpecifications/*/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::EC2::CapacityReservation",
 "writeOnlyProperties": [
  "/properties/UnusedReservationBillingOwnerId"
 ]
}
