REST Resource: projects.workerPools

Resource: WorkerPool

Configuration for a WorkerPool to run the builds.

Workers are machines that Cloud Build uses to run your builds. By default, all workers run in a project owned by Cloud Build. To have full control over the workers that execute your builds -- such as enabling them to access private resources on your private network -- you can request Cloud Build to run the workers in your own project by creating a custom workers pool.

JSON representation
{
  "name": string,
  "projectId": string,
  "serviceAccountEmail": string,
  "workerCount": string,
  "workerConfig": {
    object (WorkerConfig)
  },
  "regions": [
    enum (Region)
  ],
  "createTime": string,
  "updateTime": string,
  "deleteTime": string,
  "status": enum (Status)
}
Fields
name

string

User-defined name of the WorkerPool.

projectId

string

The project ID of the GCP project for which the WorkerPool is created.

serviceAccountEmail

string

Output only. The service account used to manage the WorkerPool. The service account must have the Compute Instance Admin (Beta) permission at the project level.

workerCount

string (int64 format)

Total number of workers to be created across all requested regions.

workerConfig

object (WorkerConfig)

Configuration to be used for a creating workers in the WorkerPool.

regions[]

enum (Region)

List of regions to create the WorkerPool. Regions can't be empty. If Cloud Build adds a new GCP region in the future, the existing WorkerPool will not be enabled in the new region automatically; you must add the new region to the regions field to enable the WorkerPool in that region.

createTime

string (Timestamp format)

Output only. Time at which the request to create the WorkerPool was received.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Time at which the request to update the WorkerPool was received.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

deleteTime

string (Timestamp format)

Output only. Time at which the request to delete the WorkerPool was received.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

status

enum (Status)

Output only. WorkerPool Status.

WorkerConfig

WorkerConfig defines the configuration to be used for a creating workers in the pool.

JSON representation
{
  "machineType": string,
  "diskSizeGb": string,
  "network": {
    object (Network)
  },
  "tag": string
}
Fields
machineType

string

Machine Type of the worker, such as n1-standard-1. See https://cloud.google.com/compute/docs/machine-types. If left blank, Cloud Build will use a standard unspecified machine to create the worker pool. machineType is overridden if you specify a different machine type in build_options. In this case, the VM specified in the build_options will be created on demand at build time. For more information see https://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes

diskSizeGb

string (int64 format)

Size of the disk attached to the worker, in GB. See https://cloud.google.com/compute/docs/disks/ If 0 is specified, Cloud Build will use a standard disk size. disk_size is overridden if you specify a different disk size in build_options. In this case, a VM with a disk size specified in the build_options will be created on demand at build time. For more information see https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions

network

object (Network)

The network definition used to create the worker. If this section is left empty, the workers will be created in WorkerPool.project_id on the default network.

tag

string

The tag applied to the worker, and the same tag used by the firewall rule. It is used to identify the Cloud Build workers among other VMs. The default value for tag is worker.

Network

Network describes the GCP network used to create workers in.

JSON representation
{
  "projectId": string,
  "network": string,
  "subnetwork": string
}
Fields
projectId

string

Project id containing the defined network and subnetwork. For a peered VPC, this will be the same as the projectId in which the workers are created. For a shared VPC, this will be the project sharing the network with the projectId project in which workers will be created. For custom workers with no VPC, this will be the same as projectId.

network

string

Network on which the workers are created. "default" network is used if empty.

subnetwork

string

Subnetwork on which the workers are created. "default" subnetwork is used if empty.

Region

Supported GCP regions to create the WorkerPool.

Enums
REGION_UNSPECIFIED no region
US_CENTRAL1 us-central1 region
US_WEST1 us-west1 region
US_EAST1 us-east1 region
US_EAST4 us-east4 region

Status

WorkerPool status

Enums
STATUS_UNSPECIFIED Status of the WorkerPool is unknown.
CREATING WorkerPool is being created.
RUNNING WorkerPool is running.
DELETING WorkerPool is being deleting: cancelling builds and draining workers.
DELETED WorkerPool is deleted.

Methods

create

Creates a WorkerPool to run the builds, and returns the new worker pool.

delete

Deletes a WorkerPool by its project ID and WorkerPool name.

get

Returns information about a WorkerPool.

list

List project's WorkerPools.

patch

Update a WorkerPool.

Palautteen aihe:

Tämä sivu
Cloud Build