{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/FarmId"
 ],
 "definitions": {
  "AcceleratorCapabilities": {
   "additionalProperties": false,
   "properties": {
    "Count": {
     "$ref": "#/definitions/AcceleratorCountRange"
    },
    "Selections": {
     "items": {
      "$ref": "#/definitions/AcceleratorSelection"
     },
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "Selections"
   ],
   "type": "object"
  },
  "AcceleratorCountRange": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "maximum": 2147483647,
     "minimum": 0,
     "type": "integer"
    },
    "Min": {
     "maximum": 2147483647,
     "minimum": 0,
     "type": "integer"
    }
   },
   "required": [
    "Min"
   ],
   "type": "object"
  },
  "AcceleratorSelection": {
   "additionalProperties": false,
   "properties": {
    "Name": {
     "enum": [
      "t4",
      "a10g",
      "l4",
      "l40s",
      "rtx-pro-server-6000"
     ],
     "type": "string"
    },
    "Runtime": {
     "maxLength": 100,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "Name"
   ],
   "type": "object"
  },
  "AcceleratorTotalMemoryMiBRange": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "maximum": 2147483647,
     "minimum": 0,
     "type": "integer"
    },
    "Min": {
     "maximum": 2147483647,
     "minimum": 0,
     "type": "integer"
    }
   },
   "required": [
    "Min"
   ],
   "type": "object"
  },
  "AcceleratorType": {
   "enum": [
    "gpu"
   ],
   "type": "string"
  },
  "AutoScalingMode": {
   "enum": [
    "NO_SCALING",
    "EVENT_BASED_AUTO_SCALING"
   ],
   "type": "string"
  },
  "CpuArchitectureType": {
   "enum": [
    "x86_64",
    "arm64"
   ],
   "type": "string"
  },
  "CustomerManagedAutoScalingConfiguration": {
   "additionalProperties": false,
   "properties": {
    "ScaleOutWorkersPerMinute": {
     "maximum": 2147483647,
     "minimum": 1,
     "type": "integer"
    },
    "StandbyWorkerCount": {
     "maximum": 2147483647,
     "minimum": 0,
     "type": "integer"
    },
    "WorkerIdleDurationSeconds": {
     "maximum": 2147483647,
     "minimum": 0,
     "type": "integer"
    }
   },
   "type": "object"
  },
  "CustomerManagedFleetConfiguration": {
   "additionalProperties": false,
   "properties": {
    "AutoScalingConfiguration": {
     "$ref": "#/definitions/CustomerManagedAutoScalingConfiguration"
    },
    "Mode": {
     "$ref": "#/definitions/AutoScalingMode"
    },
    "StorageProfileId": {
     "pattern": "^sp-[0-9a-f]{32}$",
     "type": "string"
    },
    "TagPropagationMode": {
     "$ref": "#/definitions/TagPropagationMode"
    },
    "WorkerCapabilities": {
     "$ref": "#/definitions/CustomerManagedWorkerCapabilities"
    }
   },
   "required": [
    "Mode",
    "WorkerCapabilities"
   ],
   "type": "object"
  },
  "CustomerManagedFleetOperatingSystemFamily": {
   "enum": [
    "WINDOWS",
    "LINUX",
    "MACOS"
   ],
   "type": "string"
  },
  "CustomerManagedWorkerCapabilities": {
   "additionalProperties": false,
   "properties": {
    "AcceleratorCount": {
     "$ref": "#/definitions/AcceleratorCountRange"
    },
    "AcceleratorTotalMemoryMiB": {
     "$ref": "#/definitions/AcceleratorTotalMemoryMiBRange"
    },
    "AcceleratorTypes": {
     "items": {
      "$ref": "#/definitions/AcceleratorType"
     },
     "type": "array"
    },
    "CpuArchitectureType": {
     "$ref": "#/definitions/CpuArchitectureType"
    },
    "CustomAmounts": {
     "items": {
      "$ref": "#/definitions/FleetAmountCapability"
     },
     "maxItems": 15,
     "minItems": 1,
     "type": "array"
    },
    "CustomAttributes": {
     "items": {
      "$ref": "#/definitions/FleetAttributeCapability"
     },
     "maxItems": 15,
     "minItems": 1,
     "type": "array"
    },
    "MemoryMiB": {
     "$ref": "#/definitions/MemoryMiBRange"
    },
    "OsFamily": {
     "$ref": "#/definitions/CustomerManagedFleetOperatingSystemFamily"
    },
    "VCpuCount": {
     "$ref": "#/definitions/VCpuCountRange"
    }
   },
   "required": [
    "CpuArchitectureType",
    "MemoryMiB",
    "OsFamily",
    "VCpuCount"
   ],
   "type": "object"
  },
  "Ec2EbsVolume": {
   "additionalProperties": false,
   "properties": {
    "Iops": {
     "default": 3000,
     "maximum": 16000,
     "minimum": 3000,
     "type": "integer"
    },
    "SizeGiB": {
     "default": 250,
     "type": "integer"
    },
    "ThroughputMiB": {
     "default": 125,
     "maximum": 1000,
     "minimum": 125,
     "type": "integer"
    }
   },
   "type": "object"
  },
  "Ec2MarketType": {
   "enum": [
    "on-demand",
    "spot",
    "wait-and-save"
   ],
   "type": "string"
  },
  "FleetAmountCapability": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "type": "number"
    },
    "Min": {
     "type": "number"
    },
    "Name": {
     "maxLength": 100,
     "minLength": 1,
     "pattern": "^([a-zA-Z][a-zA-Z0-9]{0,63}:)?amount(\\.[a-zA-Z][a-zA-Z0-9]{0,63})+$",
     "type": "string"
    }
   },
   "required": [
    "Min",
    "Name"
   ],
   "type": "object"
  },
  "FleetAttributeCapability": {
   "additionalProperties": false,
   "properties": {
    "Name": {
     "maxLength": 100,
     "minLength": 1,
     "pattern": "^([a-zA-Z][a-zA-Z0-9]{0,63}:)?attr(\\.[a-zA-Z][a-zA-Z0-9]{0,63})+$",
     "type": "string"
    },
    "Values": {
     "items": {
      "maxLength": 100,
      "minLength": 1,
      "pattern": "^[a-zA-Z_]([a-zA-Z0-9_\\-]{0,99})$",
      "type": "string"
     },
     "maxItems": 10,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "Name",
    "Values"
   ],
   "type": "object"
  },
  "FleetCapabilities": {
   "additionalProperties": false,
   "properties": {
    "Amounts": {
     "items": {
      "$ref": "#/definitions/FleetAmountCapability"
     },
     "maxItems": 15,
     "minItems": 1,
     "type": "array"
    },
    "Attributes": {
     "items": {
      "$ref": "#/definitions/FleetAttributeCapability"
     },
     "maxItems": 15,
     "minItems": 1,
     "type": "array"
    }
   },
   "type": "object"
  },
  "FleetConfiguration": {
   "oneOf": [
    {
     "additionalProperties": false,
     "properties": {
      "CustomerManaged": {
       "$ref": "#/definitions/CustomerManagedFleetConfiguration"
      }
     },
     "required": [
      "CustomerManaged"
     ],
     "title": "CustomerManaged",
     "type": "object"
    },
    {
     "additionalProperties": false,
     "properties": {
      "ServiceManagedEc2": {
       "$ref": "#/definitions/ServiceManagedEc2FleetConfiguration"
      }
     },
     "required": [
      "ServiceManagedEc2"
     ],
     "title": "ServiceManagedEc2",
     "type": "object"
    }
   ]
  },
  "FleetStatus": {
   "enum": [
    "ACTIVE",
    "CREATE_IN_PROGRESS",
    "UPDATE_IN_PROGRESS",
    "CREATE_FAILED",
    "UPDATE_FAILED",
    "SUSPENDED"
   ],
   "type": "string"
  },
  "HostConfiguration": {
   "additionalProperties": false,
   "properties": {
    "ScriptBody": {
     "maxLength": 15000,
     "minLength": 0,
     "type": "string"
    },
    "ScriptTimeoutSeconds": {
     "default": 300,
     "maximum": 3600,
     "minimum": 300,
     "type": "integer"
    }
   },
   "required": [
    "ScriptBody"
   ],
   "type": "object"
  },
  "MemoryMiBRange": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "maximum": 2147483647,
     "minimum": 512,
     "type": "integer"
    },
    "Min": {
     "maximum": 2147483647,
     "minimum": 512,
     "type": "integer"
    }
   },
   "required": [
    "Min"
   ],
   "type": "object"
  },
  "PersistentVolumeConfiguration": {
   "additionalProperties": false,
   "properties": {
    "Iops": {
     "default": 3000,
     "maximum": 80000,
     "minimum": 100,
     "type": "integer"
    },
    "LastUsedTtlHours": {
     "default": 168,
     "maximum": 8760,
     "minimum": 1,
     "type": "integer"
    },
    "MountPath": {
     "maxLength": 255,
     "minLength": 1,
     "type": "string"
    },
    "SizeGiB": {
     "default": 250,
     "maximum": 65536,
     "minimum": 1,
     "type": "integer"
    },
    "ThroughputMiB": {
     "default": 125,
     "maximum": 2000,
     "minimum": 125,
     "type": "integer"
    }
   },
   "required": [
    "MountPath"
   ],
   "type": "object"
  },
  "ServiceManagedEc2AutoScalingConfiguration": {
   "additionalProperties": false,
   "properties": {
    "ScaleOutWorkersPerMinute": {
     "maximum": 2147483647,
     "minimum": 1,
     "type": "integer"
    },
    "StandbyWorkerCount": {
     "maximum": 2147483647,
     "minimum": 0,
     "type": "integer"
    },
    "WorkerIdleDurationSeconds": {
     "maximum": 86400,
     "minimum": 0,
     "type": "integer"
    }
   },
   "type": "object"
  },
  "ServiceManagedEc2FleetConfiguration": {
   "additionalProperties": false,
   "properties": {
    "AutoScalingConfiguration": {
     "$ref": "#/definitions/ServiceManagedEc2AutoScalingConfiguration"
    },
    "InstanceCapabilities": {
     "$ref": "#/definitions/ServiceManagedEc2InstanceCapabilities"
    },
    "InstanceMarketOptions": {
     "$ref": "#/definitions/ServiceManagedEc2InstanceMarketOptions"
    },
    "PersistentVolumeConfiguration": {
     "$ref": "#/definitions/PersistentVolumeConfiguration"
    },
    "StorageProfileId": {
     "pattern": "^sp-[0-9a-f]{32}$",
     "type": "string"
    },
    "VpcConfiguration": {
     "$ref": "#/definitions/VpcConfiguration"
    }
   },
   "required": [
    "InstanceCapabilities",
    "InstanceMarketOptions"
   ],
   "type": "object"
  },
  "ServiceManagedEc2InstanceCapabilities": {
   "additionalProperties": false,
   "properties": {
    "AcceleratorCapabilities": {
     "$ref": "#/definitions/AcceleratorCapabilities"
    },
    "AllowedInstanceTypes": {
     "items": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array"
    },
    "CpuArchitectureType": {
     "$ref": "#/definitions/CpuArchitectureType"
    },
    "CustomAmounts": {
     "items": {
      "$ref": "#/definitions/FleetAmountCapability"
     },
     "maxItems": 15,
     "minItems": 1,
     "type": "array"
    },
    "CustomAttributes": {
     "items": {
      "$ref": "#/definitions/FleetAttributeCapability"
     },
     "maxItems": 15,
     "minItems": 1,
     "type": "array"
    },
    "ExcludedInstanceTypes": {
     "items": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array"
    },
    "MemoryMiB": {
     "$ref": "#/definitions/MemoryMiBRange"
    },
    "OsFamily": {
     "$ref": "#/definitions/ServiceManagedFleetOperatingSystemFamily"
    },
    "RootEbsVolume": {
     "$ref": "#/definitions/Ec2EbsVolume"
    },
    "VCpuCount": {
     "$ref": "#/definitions/VCpuCountRange"
    }
   },
   "required": [
    "CpuArchitectureType",
    "MemoryMiB",
    "OsFamily",
    "VCpuCount"
   ],
   "type": "object"
  },
  "ServiceManagedEc2InstanceMarketOptions": {
   "additionalProperties": false,
   "properties": {
    "Type": {
     "$ref": "#/definitions/Ec2MarketType"
    }
   },
   "required": [
    "Type"
   ],
   "type": "object"
  },
  "ServiceManagedFleetOperatingSystemFamily": {
   "enum": [
    "LINUX",
    "WINDOWS"
   ],
   "type": "string"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 127,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 255,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "TagPropagationMode": {
   "enum": [
    "NO_PROPAGATION",
    "PROPAGATE_TAGS_TO_WORKERS_AT_LAUNCH"
   ],
   "type": "string"
  },
  "VCpuCountRange": {
   "additionalProperties": false,
   "properties": {
    "Max": {
     "maximum": 10000,
     "minimum": 1,
     "type": "integer"
    },
    "Min": {
     "maximum": 10000,
     "minimum": 1,
     "type": "integer"
    }
   },
   "required": [
    "Min"
   ],
   "type": "object"
  },
  "VpcConfiguration": {
   "additionalProperties": false,
   "properties": {
    "ResourceConfigurationArns": {
     "items": {
      "maxLength": 2048,
      "minLength": 1,
      "type": "string"
     },
     "type": "array"
    }
   },
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Arn"
 ],
 "properties": {
  "Arn": {
   "pattern": "^arn:(aws[a-zA-Z-]*):deadline:[a-z0-9-]+:[0-9]+:farm/farm-[0-9a-z]{32}/fleet/fleet-[0-9a-z]{32}",
   "type": "string"
  },
  "Capabilities": {
   "$ref": "#/definitions/FleetCapabilities"
  },
  "Configuration": {
   "$ref": "#/definitions/FleetConfiguration"
  },
  "Description": {
   "default": "",
   "maxLength": 100,
   "minLength": 0,
   "type": "string"
  },
  "DisplayName": {
   "maxLength": 100,
   "minLength": 1,
   "type": "string"
  },
  "FarmId": {
   "pattern": "^farm-[0-9a-f]{32}$",
   "type": "string"
  },
  "FleetId": {
   "pattern": "^fleet-[0-9a-f]{32}$",
   "type": "string"
  },
  "HostConfiguration": {
   "$ref": "#/definitions/HostConfiguration"
  },
  "MaxWorkerCount": {
   "maximum": 2147483647,
   "minimum": 0,
   "type": "integer"
  },
  "MinWorkerCount": {
   "default": 0,
   "maximum": 2147483647,
   "minimum": 0,
   "type": "integer"
  },
  "RoleArn": {
   "format": "AWS::IAM::Role.Arn",
   "pattern": "^arn:(aws[a-zA-Z-]*):iam::\\d{12}:role(/[!-.0-~]+)*/[\\w+=,.@-]+$",
   "type": "string"
  },
  "Status": {
   "$ref": "#/definitions/FleetStatus"
  },
  "StatusMessage": {
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "type": "array",
   "uniqueItems": true
  },
  "WorkerCount": {
   "type": "integer"
  }
 },
 "readOnlyProperties": [
  "/properties/Capabilities",
  "/properties/FleetId",
  "/properties/Status",
  "/properties/StatusMessage",
  "/properties/WorkerCount",
  "/properties/Arn"
 ],
 "required": [
  "Configuration",
  "DisplayName",
  "FarmId",
  "MaxWorkerCount",
  "RoleArn"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-deadline",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::Deadline::Fleet"
}
