ci.runner-pools.create-azure

Create a Windows runner pool of spot VMs in your own Azure subscription

POST /ci/api/runner-pools/azureIAM ci:CreateRunnerPoolChanges state

One VM per job, deleted with its NIC, public IP and disk when the job ends. The first scaling pass bakes the pool’s image into a Compute Gallery in the resource group (about 40 minutes, one regular VM); jobs wait for it. Give the app registration a federated credential with the issuer, subject and audience the pool shows, and Virtual Machine Contributor and Network Contributor plus Compute Gallery write on the resource group (or Contributor on it). The pool’s lastScaleReason says what Azure answered.

Request syntax

POST /ci/api/runner-pools/azure
{
  "name": "string",
  "labels": "array of string",
  "maxSize": "number",
  "monthlyCloudCapEur": "number",
  "runnerGroupId": "string",
  "azure": "object"
}

Request body

  • nameRequired

    string

    Name of the pool, lower-case letters, digits and -, up to 40, unique in the organization (409); its group and template are named runner-pool-<name>

    Constraints: /^[a-z0-9][a-z0-9-]{0,39}$/

  • labelsRequired

    array of string

    Jobs whose runs-on labels are all among these go here, e.g. windows-latest, windows-2025, windows-2022; 1 to 20; a Linux or macOS label is refused (400). The VMs also carry self-hosted, windows and x64

    Constraints: /^[a-z0-9][a-z0-9._-]{0,49}$/

  • maxSizeRequired

    number

    Most job VMs at once, 1 to 50

    Constraints: integer, 1-50

  • monthlyCloudCapEurOptional

    number

    Most the pool's VMs may cost per billing month, euros net: started minutes × azure.hourlyEur. At the cap no VM starts and jobs wait. Omitted or null: no cap

    Constraints: 0-1000000

    May be null.

  • runnerGroupIdOptional

    string

    A runner group whose repository and ref rules decide which runs reach the pool

    Constraints: uuid

  • azureRequired

    object

    Where and how the VMs run. No secret: the pool signs in by workload identity federation; the pool shows the issuer, subject and audience its app registration must trust

    Constraints: JSON

Response

201 with the new pool as the list shows it: provider azure, and azure { config, federatedCredential { name, issuer, subject, audiences } }, what to add to the app registration in Entra. 400 when a label is a Linux or macOS label or a setting is malformed; 404 when runnerGroupId is not a group of this organization; 409 when the name is taken.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow ci:CreateRunnerPool on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud ci runner-pools create-azure --name example --labels '["example"]' --max-size 1 --azure '{}'

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_ci_runner-pools_create-azure.