{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-codebuild/json-schema/aws-codebuild-create-fleet-input-schema.json",
  "title": "CreateFleetInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-codebuild-fleet-api-openapi.yml#/components/schemas/CreateFleetInput",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the compute fleet."
    },
    "baseCapacity": {
      "type": "integer",
      "description": "The initial number of machines allocated to the ﬂeet, which deﬁnes the number of builds that can run in parallel."
    },
    "environmentType": {
      "type": "string",
      "enum": [
        "WINDOWS_CONTAINER",
        "LINUX_CONTAINER",
        "LINUX_GPU_CONTAINER",
        "ARM_CONTAINER",
        "WINDOWS_SERVER_2019_CONTAINER",
        "WINDOWS_SERVER_2022_CONTAINER",
        "LINUX_LAMBDA_CONTAINER",
        "ARM_LAMBDA_CONTAINER",
        "LINUX_EC2",
        "ARM_EC2",
        "WINDOWS_EC2",
        "MAC_ARM"
      ],
      "description": "The environment type of the compute fleet. The environment type ARM_CONTAINER is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo). The environment type ARM_EC2 is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai). The environ"
    },
    "computeType": {
      "type": "string",
      "enum": [
        "BUILD_GENERAL1_SMALL",
        "BUILD_GENERAL1_MEDIUM",
        "BUILD_GENERAL1_LARGE",
        "BUILD_GENERAL1_XLARGE",
        "BUILD_GENERAL1_2XLARGE",
        "BUILD_LAMBDA_1GB",
        "BUILD_LAMBDA_2GB",
        "BUILD_LAMBDA_4GB",
        "BUILD_LAMBDA_8GB",
        "BUILD_LAMBDA_10GB",
        "ATTRIBUTE_BASED_COMPUTE",
        "CUSTOM_INSTANCE_TYPE"
      ],
      "description": "Information about the compute resources the compute fleet uses. Available values include: ATTRIBUTE_BASED_COMPUTE: Specify the amount of vCPUs, memory, disk space, and the type of machine. If you use ATTRIBUTE_BASED_COMPUTE, you must define your attributes by using computeConfiguration. CodeBuild will select the cheapest instance that satisfies your specified attributes. For more information, see Reserved capacity environment types in the CodeBuild User Guide. CUSTOM_INSTANCE_TYPE: Specify the instance type for your compute fleet. For a list of supported instance types, see Supported instance "
    },
    "computeConfiguration": {
      "$ref": "#/$defs/ComputeConfiguration"
    },
    "scalingConfiguration": {
      "$ref": "#/$defs/ScalingConfigurationInput"
    },
    "overflowBehavior": {
      "type": "string",
      "enum": [
        "QUEUE",
        "ON_DEMAND"
      ],
      "description": "The compute fleet overflow behavior. For overflow behavior QUEUE, your overflow builds need to wait on the existing fleet instance to become available. For overflow behavior ON_DEMAND, your overflow builds run on CodeBuild on-demand. If you choose to set your overflow behavior to on-demand while creating a VPC-connected fleet, make sure that you add the required VPC permissions to your project service role. For more information, see Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface."
    },
    "vpcConfig": {
      "$ref": "#/$defs/VpcConfig"
    },
    "proxyConfiguration": {
      "$ref": "#/$defs/ProxyConfiguration"
    },
    "imageId": {
      "type": "string",
      "description": "The Amazon Machine Image (AMI) of the compute fleet."
    },
    "fleetServiceRole": {
      "type": "string",
      "description": "The service role associated with the compute fleet. For more information, see Allow a user to add a permission policy for a fleet service role in the CodeBuild User Guide."
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "A list of tag key and value pairs associated with this compute fleet. These tags are available for use by Amazon Web Services services that support CodeBuild build project tags."
    }
  },
  "required": [
    "name",
    "baseCapacity",
    "environmentType",
    "computeType"
  ],
  "$defs": {
    "ComputeConfiguration": {
      "type": "object",
      "properties": {
        "vCpu": {
          "type": "integer",
          "description": "The number of vCPUs of the instance type included in your fleet."
        },
        "memory": {
          "type": "integer",
          "description": "The amount of memory of the instance type included in your fleet."
        },
        "disk": {
          "type": "integer",
          "description": "The amount of disk space of the instance type included in your fleet."
        },
        "machineType": {
          "type": "string",
          "enum": [
            "GENERAL",
            "NVME"
          ],
          "description": "The machine type of the instance type included in your fleet."
        },
        "instanceType": {
          "type": "string",
          "description": "The EC2 instance type to be launched in your fleet."
        }
      }
    },
    "FleetProxyRule": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "DOMAIN",
            "IP"
          ],
          "description": "The type of proxy rule."
        },
        "effect": {
          "type": "string",
          "enum": [
            "ALLOW",
            "DENY"
          ],
          "description": "The behavior of the proxy rule."
        },
        "entities": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The destination of the proxy rule."
        }
      },
      "required": [
        "type",
        "effect",
        "entities"
      ]
    },
    "ProxyConfiguration": {
      "type": "object",
      "properties": {
        "defaultBehavior": {
          "type": "string",
          "enum": [
            "ALLOW_ALL",
            "DENY_ALL"
          ],
          "description": "The default behavior of outgoing traffic."
        },
        "orderedProxyRules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FleetProxyRule"
          },
          "description": "An array of FleetProxyRule objects that represent the specified destination domains or IPs to allow or deny network access control to."
        }
      }
    },
    "ScalingConfigurationInput": {
      "type": "object",
      "properties": {
        "scalingType": {
          "type": "string",
          "enum": [
            "TARGET_TRACKING_SCALING"
          ],
          "description": "The scaling type for a compute fleet."
        },
        "targetTrackingScalingConfigs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TargetTrackingScalingConfiguration"
          },
          "description": "A list of TargetTrackingScalingConfiguration objects."
        },
        "maxCapacity": {
          "type": "integer",
          "description": "The maximum number of instances in the ﬂeet when auto-scaling."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The tag's key."
        },
        "value": {
          "type": "string",
          "description": "The tag's value."
        }
      }
    },
    "TargetTrackingScalingConfiguration": {
      "type": "object",
      "properties": {
        "metricType": {
          "type": "string",
          "enum": [
            "FLEET_UTILIZATION_RATE"
          ],
          "description": "The metric type to determine auto-scaling."
        },
        "targetValue": {
          "type": "number",
          "description": "The value of metricType when to start scaling."
        }
      }
    },
    "VpcConfig": {
      "type": "object",
      "properties": {
        "vpcId": {
          "type": "string",
          "description": "The ID of the Amazon VPC."
        },
        "subnets": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of one or more subnet IDs in your Amazon VPC."
        },
        "securityGroupIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of one or more security groups IDs in your Amazon VPC."
        }
      }
    }
  }
}