{
  "tagging" : {
    "permissions" : [ "ec2:CreateTags", "ec2:DeleteTags" ],
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "tagProperty" : "/properties/TagSpecifications/*/Tags",
    "cloudFormationSystemTags" : true
  },
  "handlers" : {
    "read" : {
      "permissions" : [ "ec2:DescribeCapacityReservations" ]
    },
    "create" : {
      "permissions" : [ "ec2:CreateCapacityReservation", "ec2:DescribeCapacityReservations", "ec2:CancelCapacityReservation", "ec2:CreateTags" ]
    },
    "update" : {
      "permissions" : [ "ec2:ModifyCapacityReservation", "ec2:CreateCapacityReservation", "ec2:DescribeCapacityReservations", "ec2:CancelCapacityReservation", "ec2:AssociateCapacityReservationBillingOwner", "ec2:CreateTags", "ec2:DeleteTags" ]
    },
    "list" : {
      "permissions" : [ "ec2:DescribeCapacityReservations" ]
    },
    "delete" : {
      "permissions" : [ "ec2:CreateCapacityReservation", "ec2:DescribeCapacityReservations", "ec2:CancelCapacityReservation", "ec2:DeleteTags" ]
    }
  },
  "typeName" : "AWS::EC2::CapacityReservation",
  "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" ],
  "description" : "Resource Type definition for AWS::EC2::CapacityReservation",
  "writeOnlyProperties" : [ "/properties/UnusedReservationBillingOwnerId" ],
  "createOnlyProperties" : [ "/properties/Tenancy", "/properties/InstancePlatform", "/properties/InstanceType", "/properties/AvailabilityZone", "/properties/TagSpecifications", "/properties/OutPostArn", "/properties/EphemeralStorage", "/properties/EbsOptimized", "/properties/PlacementGroupArn", "/properties/AvailabilityZoneId" ],
  "additionalProperties" : false,
  "primaryIdentifier" : [ "/properties/Id" ],
  "definitions" : {
    "CapacityAllocation" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "AllocationType" : {
          "type" : "string"
        },
        "Count" : {
          "type" : "integer"
        }
      }
    },
    "Tag" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Value" : {
          "type" : "string"
        },
        "Key" : {
          "type" : "string"
        }
      },
      "required" : [ "Value", "Key" ]
    },
    "TagSpecification" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "ResourceType" : {
          "type" : "string"
        },
        "Tags" : {
          "uniqueItems" : false,
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/Tag"
          }
        }
      }
    }
  },
  "required" : [ "InstanceCount", "InstancePlatform", "InstanceType" ],
  "properties" : {
    "Tenancy" : {
      "type" : "string"
    },
    "EndDateType" : {
      "type" : "string"
    },
    "TagSpecifications" : {
      "uniqueItems" : false,
      "insertionOrder" : false,
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/TagSpecification"
      }
    },
    "UnusedReservationBillingOwnerId" : {
      "type" : "string"
    },
    "TotalInstanceCount" : {
      "type" : "integer"
    },
    "CreateDate" : {
      "type" : "string"
    },
    "EbsOptimized" : {
      "type" : "boolean"
    },
    "OutPostArn" : {
      "type" : "string"
    },
    "StartDate" : {
      "type" : "string"
    },
    "OwnerId" : {
      "type" : "string"
    },
    "InstanceType" : {
      "type" : "string"
    },
    "CapacityReservationFleetId" : {
      "type" : "string"
    },
    "AvailabilityZoneId" : {
      "type" : "string"
    },
    "AvailabilityZone" : {
      "type" : "string"
    },
    "EndDate" : {
      "type" : "string"
    },
    "InstanceCount" : {
      "type" : "integer"
    },
    "CapacityReservationArn" : {
      "type" : "string"
    },
    "PlacementGroupArn" : {
      "type" : "string"
    },
    "DeliveryPreference" : {
      "type" : "string"
    },
    "CommitmentInfo" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "CommittedInstanceCount" : {
          "type" : "integer"
        },
        "CommitmentEndDate" : {
          "type" : "string"
        }
      }
    },
    "State" : {
      "type" : "string"
    },
    "AvailableInstanceCount" : {
      "type" : "integer"
    },
    "ReservationType" : {
      "type" : "string"
    },
    "InstancePlatform" : {
      "type" : "string"
    },
    "Id" : {
      "type" : "string"
    },
    "CapacityAllocationSet" : {
      "uniqueItems" : false,
      "insertionOrder" : false,
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/CapacityAllocation"
      }
    },
    "EphemeralStorage" : {
      "type" : "boolean"
    },
    "InstanceMatchCriteria" : {
      "type" : "string"
    }
  }
}