{
  "propertyTransform" : {
    "/properties/AutoScalingGroupProvider/AutoScalingGroupArn" : "$split(AutoScalingGroupProvider.AutoScalingGroupArn, \"autoScalingGroupName/\")[-1] $OR $split(AutoScalingGroupArn, \"autoScalingGroupName/\")[-1]"
  },
  "tagging" : {
    "permissions" : [ "ecs:TagResource", "ecs:UntagResource", "ecs:ListTagsForResource" ],
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "tagProperty" : "/properties/Tags",
    "cloudFormationSystemTags" : true
  },
  "handlers" : {
    "read" : {
      "permissions" : [ "ecs:DescribeCapacityProviders" ]
    },
    "create" : {
      "permissions" : [ "autoscaling:CreateOrUpdateTags", "ecs:CreateCapacityProvider", "ecs:DescribeCapacityProviders", "ecs:TagResource", "ecs:PutClusterCapacityProviders", "iam:CreateServiceLinkedRole", "iam:PassRole" ]
    },
    "update" : {
      "permissions" : [ "ecs:UpdateCapacityProvider", "ecs:DescribeCapacityProviders", "ecs:ListTagsForResource", "ecs:PutClusterCapacityProviders", "ecs:TagResource", "ecs:UntagResource", "iam:PassRole" ]
    },
    "list" : {
      "permissions" : [ "ecs:DescribeCapacityProviders" ]
    },
    "delete" : {
      "permissions" : [ "ecs:DescribeCapacityProviders", "ecs:DeleteCapacityProvider", "ecs:PutClusterCapacityProviders" ]
    }
  },
  "typeName" : "AWS::ECS::CapacityProvider",
  "description" : "Resource Type definition for AWS::ECS::CapacityProvider.",
  "createOnlyProperties" : [ "/properties/AutoScalingGroupProvider/AutoScalingGroupArn", "/properties/ManagedInstancesProvider/InstanceLaunchTemplate/FipsEnabled", "/properties/Name", "/properties/ClusterName" ],
  "additionalProperties" : false,
  "primaryIdentifier" : [ "/properties/Name" ],
  "definitions" : {
    "CapacityReservationRequest" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "ReservationGroupArn" : {
          "type" : "string"
        },
        "ReservationPreference" : {
          "type" : "string",
          "enum" : [ "RESERVATIONS_ONLY", "RESERVATIONS_FIRST", "RESERVATIONS_EXCLUDED" ]
        }
      }
    },
    "AutoScalingGroupProvider" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "ManagedScaling" : {
          "$ref" : "#/definitions/ManagedScaling"
        },
        "AutoScalingGroupArn" : {
          "type" : "string"
        },
        "ManagedTerminationProtection" : {
          "type" : "string",
          "enum" : [ "DISABLED", "ENABLED" ]
        },
        "ManagedDraining" : {
          "type" : "string",
          "enum" : [ "DISABLED", "ENABLED" ]
        }
      },
      "required" : [ "AutoScalingGroupArn" ]
    },
    "AcceleratorCountRequest" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Min" : {
          "type" : "integer"
        },
        "Max" : {
          "type" : "integer"
        }
      }
    },
    "MemoryGiBPerVCpuRequest" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Min" : {
          "type" : "number"
        },
        "Max" : {
          "type" : "number"
        }
      }
    },
    "ManagedInstancesNetworkConfiguration" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "SecurityGroups" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "Subnets" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      },
      "required" : [ "SecurityGroups", "Subnets" ]
    },
    "InstanceRequirementsRequest" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "LocalStorageTypes" : {
          "uniqueItems" : false,
          "type" : "array",
          "items" : {
            "type" : "string",
            "enum" : [ "hdd", "ssd" ]
          }
        },
        "InstanceGenerations" : {
          "uniqueItems" : false,
          "type" : "array",
          "items" : {
            "type" : "string",
            "enum" : [ "current", "previous" ]
          }
        },
        "NetworkInterfaceCount" : {
          "$ref" : "#/definitions/NetworkInterfaceCountRequest"
        },
        "MemoryGiBPerVCpu" : {
          "$ref" : "#/definitions/MemoryGiBPerVCpuRequest"
        },
        "AcceleratorTypes" : {
          "uniqueItems" : false,
          "type" : "array",
          "items" : {
            "type" : "string",
            "enum" : [ "gpu", "fpga", "inference" ]
          }
        },
        "VCpuCount" : {
          "$ref" : "#/definitions/VCpuCountRangeRequest"
        },
        "ExcludedInstanceTypes" : {
          "uniqueItems" : false,
          "type" : "array",
          "items" : {
            "minLength" : 1,
            "pattern" : "[a-zA-Z0-9\\.\\*]+",
            "type" : "string",
            "maxLength" : 30
          }
        },
        "AcceleratorManufacturers" : {
          "uniqueItems" : false,
          "type" : "array",
          "items" : {
            "type" : "string",
            "enum" : [ "amazon-web-services", "amd", "habana", "nvidia", "xilinx" ]
          }
        },
        "AllowedInstanceTypes" : {
          "uniqueItems" : false,
          "type" : "array",
          "items" : {
            "minLength" : 1,
            "pattern" : "[a-zA-Z0-9\\.\\*]+",
            "type" : "string",
            "maxLength" : 30
          }
        },
        "LocalStorage" : {
          "type" : "string",
          "enum" : [ "included", "required", "excluded" ]
        },
        "CpuManufacturers" : {
          "uniqueItems" : false,
          "type" : "array",
          "items" : {
            "type" : "string",
            "enum" : [ "intel", "amd", "amazon-web-services" ]
          }
        },
        "NetworkBandwidthGbps" : {
          "$ref" : "#/definitions/NetworkBandwidthGbpsRequest"
        },
        "AcceleratorCount" : {
          "$ref" : "#/definitions/AcceleratorCountRequest"
        },
        "BareMetal" : {
          "type" : "string",
          "enum" : [ "included", "required", "excluded" ]
        },
        "RequireHibernateSupport" : {
          "type" : "boolean"
        },
        "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice" : {
          "type" : "integer"
        },
        "SpotMaxPricePercentageOverLowestPrice" : {
          "type" : "integer"
        },
        "BaselineEbsBandwidthMbps" : {
          "$ref" : "#/definitions/BaselineEbsBandwidthMbpsRequest"
        },
        "OnDemandMaxPricePercentageOverLowestPrice" : {
          "type" : "integer"
        },
        "AcceleratorNames" : {
          "uniqueItems" : false,
          "type" : "array",
          "items" : {
            "type" : "string",
            "enum" : [ "a10g", "a100", "h100", "inferentia", "k520", "k80", "m60", "radeon-pro-v520", "t4", "t4g", "vu9p", "v100", "l40s" ]
          }
        },
        "AcceleratorTotalMemoryMiB" : {
          "$ref" : "#/definitions/AcceleratorTotalMemoryMiBRequest"
        },
        "BurstablePerformance" : {
          "type" : "string",
          "enum" : [ "included", "required", "excluded" ]
        },
        "MemoryMiB" : {
          "$ref" : "#/definitions/MemoryMiBRequest"
        },
        "TotalLocalStorageGB" : {
          "$ref" : "#/definitions/TotalLocalStorageGBRequest"
        }
      },
      "required" : [ "VCpuCount", "MemoryMiB" ]
    },
    "MemoryMiBRequest" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Min" : {
          "type" : "integer"
        },
        "Max" : {
          "type" : "integer"
        }
      },
      "required" : [ "Min" ]
    },
    "TotalLocalStorageGBRequest" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Min" : {
          "type" : "number"
        },
        "Max" : {
          "type" : "number"
        }
      }
    },
    "ManagedInstancesMonitoringOptions" : {
      "type" : "string",
      "enum" : [ "BASIC", "DETAILED" ]
    },
    "NetworkBandwidthGbpsRequest" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Min" : {
          "type" : "number"
        },
        "Max" : {
          "type" : "number"
        }
      }
    },
    "VCpuCountRangeRequest" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Min" : {
          "type" : "integer"
        },
        "Max" : {
          "type" : "integer"
        }
      },
      "required" : [ "Min" ]
    },
    "BaselineEbsBandwidthMbpsRequest" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Min" : {
          "type" : "integer"
        },
        "Max" : {
          "type" : "integer"
        }
      }
    },
    "ManagedScaling" : {
      "description" : "The managed scaling settings for the Auto Scaling group capacity provider.",
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Status" : {
          "type" : "string",
          "enum" : [ "DISABLED", "ENABLED" ]
        },
        "MinimumScalingStepSize" : {
          "type" : "integer"
        },
        "InstanceWarmupPeriod" : {
          "type" : "integer"
        },
        "TargetCapacity" : {
          "type" : "integer"
        },
        "MaximumScalingStepSize" : {
          "type" : "integer"
        }
      }
    },
    "NetworkInterfaceCountRequest" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Min" : {
          "type" : "integer"
        },
        "Max" : {
          "type" : "integer"
        }
      }
    },
    "ManagedInstancesLocalStorageConfiguration" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "UseLocalStorage" : {
          "type" : "boolean"
        }
      }
    },
    "ManagedInstancesStorageConfiguration" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "StorageSizeGiB" : {
          "type" : "integer"
        }
      },
      "required" : [ "StorageSizeGiB" ]
    },
    "AcceleratorTotalMemoryMiBRequest" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Min" : {
          "type" : "integer"
        },
        "Max" : {
          "type" : "integer"
        }
      }
    },
    "Tag" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Value" : {
          "minLength" : 1,
          "type" : "string"
        },
        "Key" : {
          "minLength" : 1,
          "type" : "string"
        }
      }
    },
    "InstanceLaunchTemplate" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Ec2InstanceProfileArn" : {
          "type" : "string"
        },
        "CapacityOptionType" : {
          "type" : "string",
          "enum" : [ "ON_DEMAND", "SPOT", "RESERVED" ]
        },
        "FipsEnabled" : {
          "type" : "boolean"
        },
        "InstanceMetadataTagsPropagation" : {
          "type" : "boolean"
        },
        "StorageConfiguration" : {
          "$ref" : "#/definitions/ManagedInstancesStorageConfiguration"
        },
        "NetworkConfiguration" : {
          "$ref" : "#/definitions/ManagedInstancesNetworkConfiguration"
        },
        "InstanceRequirements" : {
          "$ref" : "#/definitions/InstanceRequirementsRequest"
        },
        "CapacityReservations" : {
          "$ref" : "#/definitions/CapacityReservationRequest"
        },
        "LocalStorageConfiguration" : {
          "$ref" : "#/definitions/ManagedInstancesLocalStorageConfiguration"
        },
        "Monitoring" : {
          "$ref" : "#/definitions/ManagedInstancesMonitoringOptions"
        }
      },
      "required" : [ "Ec2InstanceProfileArn", "NetworkConfiguration" ]
    },
    "ManagedInstancesProvider" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "InfrastructureRoleArn" : {
          "type" : "string"
        },
        "PropagateTags" : {
          "type" : "string",
          "enum" : [ "CAPACITY_PROVIDER", "NONE" ]
        },
        "InfrastructureOptimization" : {
          "description" : "Defines how Amazon ECS Managed Instances optimizes the infrastructure in your capacity provider. Configure it to turn on or off the infrastructure optimization in your capacity provider, and to control the idle EC2 instances optimization delay.",
          "additionalProperties" : false,
          "type" : "object",
          "properties" : {
            "ScaleInAfter" : {
              "description" : "This parameter defines the number of seconds Amazon ECS Managed Instances waits before optimizing EC2 instances that have become idle or underutilized. A longer delay increases the likelihood of placing new tasks on idle instances, reducing startup time. A shorter delay helps reduce infrastructure costs by optimizing idle instances more quickly. Valid values are: Not set (null) - Uses the default optimization behavior, `-1` - Disables automatic infrastructure optimization, `0` to `3600` (inclusive) - Specifies the number of seconds to wait before optimizing instances.",
              "maximum" : 3600,
              "type" : "integer",
              "minimum" : -1
            }
          }
        },
        "InstanceLaunchTemplate" : {
          "$ref" : "#/definitions/InstanceLaunchTemplate"
        }
      },
      "required" : [ "InfrastructureRoleArn", "InstanceLaunchTemplate" ]
    }
  },
  "properties" : {
    "AutoScalingGroupProvider" : {
      "$ref" : "#/definitions/AutoScalingGroupProvider"
    },
    "ClusterName" : {
      "type" : "string"
    },
    "Tags" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "Name" : {
      "type" : "string"
    },
    "ManagedInstancesProvider" : {
      "$ref" : "#/definitions/ManagedInstancesProvider"
    }
  },
  "conditionalCreateOnlyProperties" : [ "/properties/ManagedInstancesProvider/InstanceLaunchTemplate/CapacityOptionType" ]
}