Google Cloud Build V1 Client - Class WorkerPool (0.4.0)

Reference documentation and code samples for the Google Cloud Build V1 Client class 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.

Generated from protobuf message google.devtools.cloudbuild.v1.WorkerPool

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

User-defined name of the WorkerPool.

↳ project_id string

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

↳ service_account_email 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.

↳ worker_count int|string

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

↳ worker_config Google\Cloud\Build\V1\WorkerConfig

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

↳ regions int[]

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.

↳ create_time Google\Protobuf\Timestamp

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

↳ update_time Google\Protobuf\Timestamp

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

↳ delete_time Google\Protobuf\Timestamp

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

↳ status int

Output only. WorkerPool Status.

getName

User-defined name of the WorkerPool.

Returns
TypeDescription
string

setName

User-defined name of the WorkerPool.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getProjectId

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

Returns
TypeDescription
string

setProjectId

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getServiceAccountEmail

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.

Returns
TypeDescription
string

setServiceAccountEmail

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getWorkerCount

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

Returns
TypeDescription
int|string

setWorkerCount

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

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getWorkerConfig

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

Returns
TypeDescription
Google\Cloud\Build\V1\WorkerConfig|null

hasWorkerConfig

clearWorkerConfig

setWorkerConfig

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

Parameter
NameDescription
var Google\Cloud\Build\V1\WorkerConfig
Returns
TypeDescription
$this

getRegions

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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setRegions

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.

Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getCreateTime

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

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

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

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

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

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

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

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getDeleteTime

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

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasDeleteTime

clearDeleteTime

setDeleteTime

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

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getStatus

Output only. WorkerPool Status.

Returns
TypeDescription
int

setStatus

Output only. WorkerPool Status.

Parameter
NameDescription
var int
Returns
TypeDescription
$this