{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ecs/json-schema/amazon-ecs-create-capacity-provider-request-schema.json",
  "title": "CreateCapacityProviderRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ecs-capacity-providers-api-openapi.yml#/components/schemas/CreateCapacityProviderRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the capacity provider. Up to 255 characters are allowed. They include letters (both upper and lowercase letters), numbers, underscores (_), and hyphens (-). The name can't be prefixed with \"aws\", \"ecs\", or \"fargate\"."
    },
    "cluster": {
      "type": "string",
      "description": "The name of the cluster to associate with the capacity provider. When you create a capacity provider with Amazon ECS Managed Instances, it becomes available only within the specified cluster."
    },
    "autoScalingGroupProvider": {
      "$ref": "#/$defs/AutoScalingGroupProvider"
    },
    "managedInstancesProvider": {
      "$ref": "#/$defs/CreateManagedInstancesProviderConfiguration"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The metadata that you apply to the capacity provider to categorize and organize them more conveniently. Each tag consists of a key and an optional value. You define both of them. The following basic restrictions apply to tags: Maximum number of tags per resource - 50 For each resource, each tag key must be unique, and each tag key can have only one value. Maximum key length - 128 Unicode characters in UTF-8 Maximum value length - 256 Unicode characters in UTF-8 If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed c"
    }
  },
  "required": [
    "name"
  ],
  "$defs": {
    "AcceleratorCountRequest": {
      "type": "object",
      "properties": {
        "min": {
          "type": "integer",
          "description": "The minimum number of accelerators. Instance types with fewer accelerators are excluded from selection."
        },
        "max": {
          "type": "integer",
          "description": "The maximum number of accelerators. Instance types with more accelerators are excluded from selection."
        }
      }
    },
    "AcceleratorTotalMemoryMiBRequest": {
      "type": "object",
      "properties": {
        "min": {
          "type": "integer",
          "description": "The minimum total accelerator memory in MiB. Instance types with less accelerator memory are excluded from selection."
        },
        "max": {
          "type": "integer",
          "description": "The maximum total accelerator memory in MiB. Instance types with more accelerator memory are excluded from selection."
        }
      }
    },
    "AutoRepairConfiguration": {
      "type": "object",
      "properties": {
        "actionsStatus": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The status of auto repair actions for the capacity provider. When set to ENABLED, Amazon ECS automatically replaces container instances with an IMPAIRED health status. When set to DISABLED, Amazon ECS still monitors container instance health but does not automatically replace impaired instances."
        }
      }
    },
    "AutoScalingGroupProvider": {
      "type": "object",
      "properties": {
        "autoScalingGroupArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) that identifies the Auto Scaling group, or the Auto Scaling group name."
        },
        "managedScaling": {
          "$ref": "#/$defs/ManagedScaling"
        },
        "managedTerminationProtection": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The managed termination protection setting to use for the Auto Scaling group capacity provider. This determines whether the Auto Scaling group has managed termination protection. The default is off. When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn't work. When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance pro"
        },
        "managedDraining": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The managed draining option for the Auto Scaling group capacity provider. When you enable this, Amazon ECS manages and gracefully drains the EC2 container instances that are in the Auto Scaling group capacity provider."
        }
      },
      "required": [
        "autoScalingGroupArn"
      ]
    },
    "BaselineEbsBandwidthMbpsRequest": {
      "type": "object",
      "properties": {
        "min": {
          "type": "integer",
          "description": "The minimum baseline Amazon EBS bandwidth in Mbps. Instance types with lower Amazon EBS bandwidth are excluded from selection."
        },
        "max": {
          "type": "integer",
          "description": "The maximum baseline Amazon EBS bandwidth in Mbps. Instance types with higher Amazon EBS bandwidth are excluded from selection."
        }
      }
    },
    "CapacityReservationRequest": {
      "type": "object",
      "properties": {
        "reservationGroupArn": {
          "type": "string",
          "description": "The ARN of the Capacity Reservation resource group in which to run the instance."
        },
        "reservationPreference": {
          "type": "string",
          "enum": [
            "RESERVATIONS_ONLY",
            "RESERVATIONS_FIRST",
            "RESERVATIONS_EXCLUDED"
          ],
          "description": "The preference on when capacity reservations should be used. Valid values are: RESERVATIONS_ONLY - Exclusively launch instances into capacity reservations that match the instance requirements configured for the capacity provider. If none exist, instances will fail to provision. RESERVATIONS_FIRST - Prefer to launch instances into a capacity reservation if any exist that match the instance requirements configured for the capacity provider. If none exist, fall back to launching instances On-Demand. RESERVATIONS_EXCLUDED - Avoid using capacity reservations and launch exclusively On-Demand."
        }
      }
    },
    "CreateManagedInstancesProviderConfiguration": {
      "type": "object",
      "properties": {
        "infrastructureRoleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the infrastructure role that Amazon ECS uses to manage instances on your behalf. This role must have permissions to launch, terminate, and manage Amazon EC2 instances, as well as access to other Amazon Web Services services required for Amazon ECS Managed Instances functionality. For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide."
        },
        "instanceLaunchTemplate": {
          "$ref": "#/$defs/InstanceLaunchTemplate"
        },
        "propagateTags": {
          "type": "string",
          "enum": [
            "CAPACITY_PROVIDER",
            "NONE"
          ],
          "description": "Specifies whether to propagate tags from the capacity provider to the Amazon ECS Managed Instances. When enabled, tags applied to the capacity provider are automatically applied to all instances launched by this provider."
        },
        "infrastructureOptimization": {
          "$ref": "#/$defs/InfrastructureOptimization"
        },
        "autoRepairConfiguration": {
          "$ref": "#/$defs/AutoRepairConfiguration"
        }
      },
      "required": [
        "infrastructureRoleArn",
        "instanceLaunchTemplate"
      ]
    },
    "InfrastructureOptimization": {
      "type": "object",
      "properties": {
        "scaleInAfter": {
          "type": "integer",
          "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 or underutilized instances instances, reducing startup time. A shorter delay helps reduce infrastructure costs by optimizing idle or underutilized instances,instances more quickly. Valid values are: null - Uses the default optimization behavior. -1 - Disables automatic infrastructure optimization. A value between 0 and 3600 (inclusive) - Specifies the number of seconds to wait"
        }
      }
    },
    "InstanceLaunchTemplate": {
      "type": "object",
      "properties": {
        "ec2InstanceProfileArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances. This instance profile must include the necessary permissions for your tasks to access Amazon Web Services services and resources. For more information, see Amazon ECS instance profile for Managed Instances in the Amazon ECS Developer Guide."
        },
        "networkConfiguration": {
          "$ref": "#/$defs/ManagedInstancesNetworkConfiguration"
        },
        "storageConfiguration": {
          "$ref": "#/$defs/ManagedInstancesStorageConfiguration"
        },
        "localStorageConfiguration": {
          "$ref": "#/$defs/ManagedInstancesLocalStorageConfiguration"
        },
        "monitoring": {
          "type": "string",
          "enum": [
            "BASIC",
            "DETAILED"
          ],
          "description": "CloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring. By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see Detailed monitoring for Amazon ECS Managed Instances in the Amazon ECS Developer Guide."
        },
        "capacityOptionType": {
          "type": "string",
          "enum": [
            "ON_DEMAND",
            "SPOT",
            "RESERVED"
          ],
          "description": "The capacity option type. This determines whether Amazon ECS launches On-Demand, Spot or Capacity Reservation Instances for your managed instance capacity provider. Valid values are: ON_DEMAND - Launches standard On-Demand Instances. On-Demand Instances provide predictable pricing and availability. SPOT - Launches Spot Instances that use spare Amazon EC2 capacity at reduced cost. Spot Instances can be interrupted by Amazon EC2 with a two-minute notification when the capacity is needed back. RESERVED - Launches Instances using Amazon EC2 Capacity Reservations. Capacity Reservations allow you to"
        },
        "instanceMetadataTagsPropagation": {
          "type": "boolean",
          "description": "Determines whether tags are propagated to the instance metadata service (IMDS) for Amazon EC2 instances launched by the Managed Instances capacity provider. When enabled, all tags associated with the instance are available through the instance metadata service. When disabled, tags are not propagated to IMDS. Disable this setting if your tags contain characters that are not compatible with IMDS, such as /. IMDS requires tag keys to match the pattern [0-9a-zA-Z\\-_+=,.@:]{1,255}. The default value is true. For more information, see Work with instance tags in instance metadata in the Amazon EC2 Us"
        },
        "instanceRequirements": {
          "$ref": "#/$defs/InstanceRequirementsRequest"
        },
        "fipsEnabled": {
          "type": "boolean",
          "description": "Determines whether to enable FIPS 140-2 validated cryptographic modules on EC2 instances launched by the capacity provider. If true, instances use FIPS-compliant cryptographic algorithms and modules for enhanced security compliance. If false, instances use standard cryptographic implementations. If not specified, instances are launched with FIPS enabled in Amazon Web Services GovCloud (US) regions and FIPS disabled in other regions."
        },
        "capacityReservations": {
          "$ref": "#/$defs/CapacityReservationRequest"
        }
      },
      "required": [
        "ec2InstanceProfileArn",
        "networkConfiguration"
      ]
    },
    "InstanceRequirementsRequest": {
      "type": "object",
      "properties": {
        "vCpuCount": {
          "$ref": "#/$defs/VCpuCountRangeRequest"
        },
        "memoryMiB": {
          "$ref": "#/$defs/MemoryMiBRequest"
        },
        "cpuManufacturers": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "intel",
              "amd",
              "amazon-web-services"
            ]
          },
          "description": "The CPU manufacturers to include or exclude. You can specify intel, amd, or amazon-web-services to control which CPU types are used for your workloads."
        },
        "memoryGiBPerVCpu": {
          "$ref": "#/$defs/MemoryGiBPerVCpuRequest"
        },
        "excludedInstanceTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The instance types to exclude from selection. Use this to prevent Amazon ECS from selecting specific instance types that may not be suitable for your workloads."
        },
        "instanceGenerations": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "current",
              "previous"
            ]
          },
          "description": "The instance generations to include. You can specify current to use the latest generation instances, or previous to include previous generation instances for cost optimization."
        },
        "spotMaxPricePercentageOverLowestPrice": {
          "type": "integer",
          "description": "The maximum price for Spot instances as a percentage over the lowest priced On-Demand instance. This helps control Spot instance costs while maintaining access to capacity."
        },
        "onDemandMaxPricePercentageOverLowestPrice": {
          "type": "integer",
          "description": "The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon ECS selects instance types with your attributes, we will exclude "
        },
        "bareMetal": {
          "type": "string",
          "enum": [
            "included",
            "required",
            "excluded"
          ],
          "description": "Indicates whether to include bare metal instance types. Set to included to allow bare metal instances, excluded to exclude them, or required to use only bare metal instances."
        },
        "burstablePerformance": {
          "type": "string",
          "enum": [
            "included",
            "required",
            "excluded"
          ],
          "description": "Indicates whether to include burstable performance instance types (T2, T3, T3a, T4g). Set to included to allow burstable instances, excluded to exclude them, or required to use only burstable instances."
        },
        "requireHibernateSupport": {
          "type": "boolean",
          "description": "Indicates whether the instance types must support hibernation. When set to true, only instance types that support hibernation are selected."
        },
        "networkInterfaceCount": {
          "$ref": "#/$defs/NetworkInterfaceCountRequest"
        },
        "localStorage": {
          "type": "string",
          "enum": [
            "included",
            "required",
            "excluded"
          ],
          "description": "Indicates whether to include instance types with local storage. Set to included to allow local storage, excluded to exclude it, or required to use only instances with local storage."
        },
        "localStorageTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "hdd",
              "ssd"
            ]
          },
          "description": "The local storage types to include. You can specify hdd for hard disk drives, ssd for solid state drives, or both."
        },
        "totalLocalStorageGB": {
          "$ref": "#/$defs/TotalLocalStorageGBRequest"
        },
        "baselineEbsBandwidthMbps": {
          "$ref": "#/$defs/BaselineEbsBandwidthMbpsRequest"
        },
        "acceleratorTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "gpu",
              "fpga",
              "inference"
            ]
          },
          "description": "The accelerator types to include. You can specify gpu for graphics processing units, fpga for field programmable gate arrays, or inference for machine learning inference accelerators."
        },
        "acceleratorCount": {
          "$ref": "#/$defs/AcceleratorCountRequest"
        },
        "acceleratorManufacturers": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "amazon-web-services",
              "amd",
              "nvidia",
              "xilinx",
              "habana"
            ]
          },
          "description": "The accelerator manufacturers to include. You can specify nvidia, amd, amazon-web-services, or xilinx depending on your accelerator requirements."
        },
        "acceleratorNames": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "a100",
              "inferentia",
              "k520",
              "k80",
              "m60",
              "radeon-pro-v520",
              "t4",
              "vu9p",
              "v100",
              "a10g",
              "h100",
              "t4g"
            ]
          },
          "description": "The specific accelerator names to include. For example, you can specify a100, v100, k80, or other specific accelerator models."
        },
        "acceleratorTotalMemoryMiB": {
          "$ref": "#/$defs/AcceleratorTotalMemoryMiBRequest"
        },
        "networkBandwidthGbps": {
          "$ref": "#/$defs/NetworkBandwidthGbpsRequest"
        },
        "allowedInstanceTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The instance types to include in the selection. When specified, Amazon ECS only considers these instance types, subject to the other requirements specified."
        },
        "maxSpotPriceAsPercentageOfOptimalOnDemandPrice": {
          "type": "integer",
          "description": "The maximum price for Spot instances as a percentage of the optimal On-Demand price. This provides more precise cost control for Spot instance selection."
        }
      },
      "required": [
        "vCpuCount",
        "memoryMiB"
      ]
    },
    "ManagedInstancesLocalStorageConfiguration": {
      "type": "object",
      "properties": {
        "useLocalStorage": {
          "type": "boolean",
          "description": "Use instance store volumes for data storage when available. EBS volumes are not provisioned for data storage. If the container instance has multiple instance store volumes, a single data volume is created. Consider defining instance store requirements using the localStorage, localStorageTypes and totalLocalStorageGB properties."
        }
      }
    },
    "ManagedInstancesNetworkConfiguration": {
      "type": "object",
      "properties": {
        "subnets": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of subnet IDs where Amazon ECS can launch Amazon ECS Managed Instances. Instances are distributed across the specified subnets for high availability. All subnets must be in the same VPC."
        },
        "securityGroups": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of security group IDs to apply to Amazon ECS Managed Instances. These security groups control the network traffic allowed to and from the instances."
        }
      }
    },
    "ManagedInstancesStorageConfiguration": {
      "type": "object",
      "properties": {
        "storageSizeGiB": {
          "type": "integer",
          "description": "The size of the data volume."
        }
      }
    },
    "ManagedScaling": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Determines whether to use managed scaling for the capacity provider."
        },
        "targetCapacity": {
          "type": "integer",
          "description": "The target capacity utilization as a percentage for the capacity provider. The specified value must be greater than 0 and less than or equal to 100. For example, if you want the capacity provider to maintain 10% spare capacity, then that means the utilization is 90%, so use a targetCapacity of 90. The default value of 100 percent results in the Amazon EC2 instances in your Auto Scaling group being completely used."
        },
        "minimumScalingStepSize": {
          "type": "integer",
          "description": "The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time. The scale in process is not affected by this parameter If this parameter is omitted, the default value of 1 is used. When additional capacity is required, Amazon ECS will scale up the minimum scaling step size even if the actual demand is less than the minimum scaling step size."
        },
        "maximumScalingStepSize": {
          "type": "integer",
          "description": "The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time. If this parameter is omitted, the default value of 10000 is used."
        },
        "instanceWarmupPeriod": {
          "type": "integer",
          "description": "The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group. If this parameter is omitted, the default value of 300 seconds is used."
        }
      }
    },
    "MemoryGiBPerVCpuRequest": {
      "type": "object",
      "properties": {
        "min": {
          "type": "number",
          "description": "The minimum amount of memory per vCPU in GiB. Instance types with a lower memory-to-vCPU ratio are excluded from selection."
        },
        "max": {
          "type": "number",
          "description": "The maximum amount of memory per vCPU in GiB. Instance types with a higher memory-to-vCPU ratio are excluded from selection."
        }
      }
    },
    "MemoryMiBRequest": {
      "type": "object",
      "properties": {
        "min": {
          "type": "integer",
          "description": "The minimum amount of memory in MiB. Instance types with less memory than this value are excluded from selection."
        },
        "max": {
          "type": "integer",
          "description": "The maximum amount of memory in MiB. Instance types with more memory than this value are excluded from selection."
        }
      },
      "required": [
        "min"
      ]
    },
    "NetworkBandwidthGbpsRequest": {
      "type": "object",
      "properties": {
        "min": {
          "type": "number",
          "description": "The minimum network bandwidth in Gbps. Instance types with lower network bandwidth are excluded from selection."
        },
        "max": {
          "type": "number",
          "description": "The maximum network bandwidth in Gbps. Instance types with higher network bandwidth are excluded from selection."
        }
      }
    },
    "NetworkInterfaceCountRequest": {
      "type": "object",
      "properties": {
        "min": {
          "type": "integer",
          "description": "The minimum number of network interfaces. Instance types that support fewer network interfaces are excluded from selection."
        },
        "max": {
          "type": "integer",
          "description": "The maximum number of network interfaces. Instance types that support more network interfaces are excluded from selection."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values."
        },
        "value": {
          "type": "string",
          "description": "The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key)."
        }
      }
    },
    "TotalLocalStorageGBRequest": {
      "type": "object",
      "properties": {
        "min": {
          "type": "number",
          "description": "The minimum total local storage in GB. Instance types with less local storage are excluded from selection."
        },
        "max": {
          "type": "number",
          "description": "The maximum total local storage in GB. Instance types with more local storage are excluded from selection."
        }
      }
    },
    "VCpuCountRangeRequest": {
      "type": "object",
      "properties": {
        "min": {
          "type": "integer",
          "description": "The minimum number of vCPUs. Instance types with fewer vCPUs than this value are excluded from selection."
        },
        "max": {
          "type": "integer",
          "description": "The maximum number of vCPUs. Instance types with more vCPUs than this value are excluded from selection."
        }
      },
      "required": [
        "min"
      ]
    }
  }
}