{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/AutoScalingGroupProvider/AutoScalingGroupArn",
  "/properties/Name",
  "/properties/ClusterName"
 ],
 "definitions": {
  "AcceleratorCountRequest": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "type": "integer"
    },
    "Min": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "AcceleratorTotalMemoryMiBRequest": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "type": "integer"
    },
    "Min": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "AutoRepairConfiguration": {
   "additionalProperties": false,
   "properties": {
    "ActionsStatus": {
     "enum": [
      "ENABLED",
      "DISABLED"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "AutoScalingGroupProvider": {
   "additionalProperties": false,
   "properties": {
    "AutoScalingGroupArn": {
     "type": "string"
    },
    "ManagedDraining": {
     "enum": [
      "DISABLED",
      "ENABLED"
     ],
     "type": "string"
    },
    "ManagedScaling": {
     "$ref": "#/definitions/ManagedScaling"
    },
    "ManagedTerminationProtection": {
     "enum": [
      "DISABLED",
      "ENABLED"
     ],
     "type": "string"
    }
   },
   "required": [
    "AutoScalingGroupArn"
   ],
   "type": "object"
  },
  "BaselineEbsBandwidthMbpsRequest": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "type": "integer"
    },
    "Min": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "CapacityReservationRequest": {
   "additionalProperties": false,
   "properties": {
    "ReservationGroupArn": {
     "type": "string"
    },
    "ReservationPreference": {
     "enum": [
      "RESERVATIONS_ONLY",
      "RESERVATIONS_FIRST",
      "RESERVATIONS_EXCLUDED"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "InstanceLaunchTemplate": {
   "additionalProperties": false,
   "properties": {
    "CapacityOptionType": {
     "enum": [
      "ON_DEMAND",
      "SPOT",
      "RESERVED"
     ],
     "type": "string"
    },
    "CapacityReservations": {
     "$ref": "#/definitions/CapacityReservationRequest"
    },
    "Ec2InstanceProfileArn": {
     "type": "string"
    },
    "FipsEnabled": {
     "type": "boolean"
    },
    "InstanceMetadataTagsPropagation": {
     "type": "boolean"
    },
    "InstanceRequirements": {
     "$ref": "#/definitions/InstanceRequirementsRequest"
    },
    "LocalStorageConfiguration": {
     "$ref": "#/definitions/ManagedInstancesLocalStorageConfiguration"
    },
    "Monitoring": {
     "$ref": "#/definitions/ManagedInstancesMonitoringOptions"
    },
    "NetworkConfiguration": {
     "$ref": "#/definitions/ManagedInstancesNetworkConfiguration"
    },
    "StorageConfiguration": {
     "$ref": "#/definitions/ManagedInstancesStorageConfiguration"
    }
   },
   "required": [
    "Ec2InstanceProfileArn",
    "NetworkConfiguration"
   ],
   "type": "object"
  },
  "InstanceRequirementsRequest": {
   "additionalProperties": false,
   "properties": {
    "AcceleratorCount": {
     "$ref": "#/definitions/AcceleratorCountRequest"
    },
    "AcceleratorManufacturers": {
     "items": {
      "enum": [
       "amazon-web-services",
       "amd",
       "habana",
       "nvidia",
       "xilinx"
      ],
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "AcceleratorNames": {
     "items": {
      "enum": [
       "a10g",
       "a100",
       "h100",
       "inferentia",
       "k520",
       "k80",
       "m60",
       "radeon-pro-v520",
       "t4",
       "t4g",
       "vu9p",
       "v100",
       "l40s"
      ],
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "AcceleratorTotalMemoryMiB": {
     "$ref": "#/definitions/AcceleratorTotalMemoryMiBRequest"
    },
    "AcceleratorTypes": {
     "items": {
      "enum": [
       "gpu",
       "fpga",
       "inference"
      ],
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "AllowedInstanceTypes": {
     "items": {
      "maxLength": 30,
      "minLength": 1,
      "pattern": "[a-zA-Z0-9\\.\\*]+",
      "type": "string"
     },
     "maxItems": 400,
     "minItems": 0,
     "type": "array",
     "uniqueItems": false
    },
    "BareMetal": {
     "enum": [
      "included",
      "required",
      "excluded"
     ],
     "type": "string"
    },
    "BaselineEbsBandwidthMbps": {
     "$ref": "#/definitions/BaselineEbsBandwidthMbpsRequest"
    },
    "BurstablePerformance": {
     "enum": [
      "included",
      "required",
      "excluded"
     ],
     "type": "string"
    },
    "CpuManufacturers": {
     "items": {
      "enum": [
       "intel",
       "amd",
       "amazon-web-services"
      ],
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "ExcludedInstanceTypes": {
     "items": {
      "maxLength": 30,
      "minLength": 1,
      "pattern": "[a-zA-Z0-9\\.\\*]+",
      "type": "string"
     },
     "maxItems": 400,
     "minItems": 0,
     "type": "array",
     "uniqueItems": false
    },
    "InstanceGenerations": {
     "items": {
      "enum": [
       "current",
       "previous"
      ],
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "LocalStorage": {
     "enum": [
      "included",
      "required",
      "excluded"
     ],
     "type": "string"
    },
    "LocalStorageTypes": {
     "items": {
      "enum": [
       "hdd",
       "ssd"
      ],
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice": {
     "type": "integer"
    },
    "MemoryGiBPerVCpu": {
     "$ref": "#/definitions/MemoryGiBPerVCpuRequest"
    },
    "MemoryMiB": {
     "$ref": "#/definitions/MemoryMiBRequest"
    },
    "NetworkBandwidthGbps": {
     "$ref": "#/definitions/NetworkBandwidthGbpsRequest"
    },
    "NetworkInterfaceCount": {
     "$ref": "#/definitions/NetworkInterfaceCountRequest"
    },
    "OnDemandMaxPricePercentageOverLowestPrice": {
     "type": "integer"
    },
    "RequireHibernateSupport": {
     "type": "boolean"
    },
    "SpotMaxPricePercentageOverLowestPrice": {
     "type": "integer"
    },
    "TotalLocalStorageGB": {
     "$ref": "#/definitions/TotalLocalStorageGBRequest"
    },
    "VCpuCount": {
     "$ref": "#/definitions/VCpuCountRangeRequest"
    }
   },
   "required": [
    "VCpuCount",
    "MemoryMiB"
   ],
   "type": "object"
  },
  "ManagedInstancesLocalStorageConfiguration": {
   "additionalProperties": false,
   "properties": {
    "UseLocalStorage": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "ManagedInstancesMonitoringOptions": {
   "enum": [
    "BASIC",
    "DETAILED"
   ],
   "type": "string"
  },
  "ManagedInstancesNetworkConfiguration": {
   "additionalProperties": false,
   "properties": {
    "SecurityGroups": {
     "format": "AWS::EC2::SecurityGroup.Ids",
     "items": {
      "format": "AWS::EC2::SecurityGroup.Id",
      "type": "string"
     },
     "type": "array"
    },
    "Subnets": {
     "format": "AWS::EC2::Subnet.Ids",
     "items": {
      "format": "AWS::EC2::Subnet.Id",
      "type": "string"
     },
     "type": "array"
    }
   },
   "required": [
    "SecurityGroups",
    "Subnets"
   ],
   "type": "object"
  },
  "ManagedInstancesProvider": {
   "additionalProperties": false,
   "properties": {
    "AutoRepairConfiguration": {
     "$ref": "#/definitions/AutoRepairConfiguration"
    },
    "InfrastructureOptimization": {
     "additionalProperties": false,
     "properties": {
      "ScaleInAfter": {
       "maximum": 3600,
       "minimum": -1,
       "type": "integer"
      }
     },
     "type": "object"
    },
    "InfrastructureRoleArn": {
     "format": "AWS::IAM::Role.Arn",
     "type": "string"
    },
    "InstanceLaunchTemplate": {
     "$ref": "#/definitions/InstanceLaunchTemplate"
    },
    "PropagateTags": {
     "enum": [
      "CAPACITY_PROVIDER",
      "NONE"
     ],
     "type": "string"
    }
   },
   "required": [
    "InfrastructureRoleArn",
    "InstanceLaunchTemplate"
   ],
   "type": "object"
  },
  "ManagedInstancesStorageConfiguration": {
   "additionalProperties": false,
   "properties": {
    "StorageSizeGiB": {
     "minimum": 1,
     "type": "integer"
    }
   },
   "required": [
    "StorageSizeGiB"
   ],
   "type": "object"
  },
  "ManagedScaling": {
   "additionalProperties": false,
   "properties": {
    "InstanceWarmupPeriod": {
     "maximum": 10000,
     "minimum": 0,
     "type": "integer"
    },
    "MaximumScalingStepSize": {
     "maximum": 10000,
     "minimum": 1,
     "type": "integer"
    },
    "MinimumScalingStepSize": {
     "maximum": 10000,
     "minimum": 1,
     "type": "integer"
    },
    "Status": {
     "enum": [
      "DISABLED",
      "ENABLED"
     ],
     "type": "string"
    },
    "TargetCapacity": {
     "maximum": 100,
     "minimum": 1,
     "type": "integer"
    }
   },
   "type": "object"
  },
  "MemoryGiBPerVCpuRequest": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "type": "number"
    },
    "Min": {
     "type": "number"
    }
   },
   "type": "object"
  },
  "MemoryMiBRequest": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "type": "integer"
    },
    "Min": {
     "type": "integer"
    }
   },
   "required": [
    "Min"
   ],
   "type": "object"
  },
  "NetworkBandwidthGbpsRequest": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "type": "number"
    },
    "Min": {
     "type": "number"
    }
   },
   "type": "object"
  },
  "NetworkInterfaceCountRequest": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "type": "integer"
    },
    "Min": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$",
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 1,
     "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "TotalLocalStorageGBRequest": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "type": "number"
    },
    "Min": {
     "type": "number"
    }
   },
   "type": "object"
  },
  "VCpuCountRangeRequest": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "type": "integer"
    },
    "Min": {
     "type": "integer"
    }
   },
   "required": [
    "Min"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Name"
 ],
 "properties": {
  "AutoScalingGroupProvider": {
   "$ref": "#/definitions/AutoScalingGroupProvider"
  },
  "ClusterName": {
   "type": "string"
  },
  "ManagedInstancesProvider": {
   "$ref": "#/definitions/ManagedInstancesProvider"
  },
  "Name": {
   "type": "string"
  },
  "Tags": {
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "minItems": 0,
   "type": "array"
  }
 },
 "propertyTransform": {
  "/properties/AutoScalingGroupProvider/AutoScalingGroupArn": "$split(AutoScalingGroupProvider.AutoScalingGroupArn, \"autoScalingGroupName/\")[-1] $OR $split(AutoScalingGroupArn, \"autoScalingGroupName/\")[-1]"
 },
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::ECS::CapacityProvider"
}
