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 | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
User-defined name of the |
↳ project_id |
string
The project ID of the GCP project for which the |
↳ service_account_email |
string
Output only. The service account used to manage the |
↳ 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 |
↳ regions |
int[]
List of regions to create the |
↳ create_time |
Google\Protobuf\Timestamp
Output only. Time at which the request to create the |
↳ update_time |
Google\Protobuf\Timestamp
Output only. Time at which the request to update the |
↳ delete_time |
Google\Protobuf\Timestamp
Output only. Time at which the request to delete the |
↳ status |
int
Output only. WorkerPool Status. |
getName
User-defined name of the WorkerPool.
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
User-defined name of the WorkerPool.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getProjectId
The project ID of the GCP project for which the WorkerPool is created.
| Returns | |
|---|---|
| Type | Description |
string |
|
setProjectId
The project ID of the GCP project for which the WorkerPool is created.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getWorkerCount
Total number of workers to be created across all requested regions.
| Returns | |
|---|---|
| Type | Description |
int|string |
|
setWorkerCount
Total number of workers to be created across all requested regions.
| Parameter | |
|---|---|
| Name | Description |
var |
int|string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getWorkerConfig
Configuration to be used for a creating workers in the WorkerPool.
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Build\V1\WorkerConfig|null |
|
hasWorkerConfig
clearWorkerConfig
setWorkerConfig
Configuration to be used for a creating workers in the WorkerPool.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Cloud\Build\V1\WorkerConfig
|
| Returns | |
|---|---|
| Type | Description |
$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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
var |
int[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCreateTime
Output only. Time at which the request to create the WorkerPool was
received.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null |
|
hasCreateTime
clearCreateTime
setCreateTime
Output only. Time at which the request to create the WorkerPool was
received.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Timestamp
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUpdateTime
Output only. Time at which the request to update the WorkerPool was
received.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null |
|
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. Time at which the request to update the WorkerPool was
received.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Timestamp
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDeleteTime
Output only. Time at which the request to delete the WorkerPool was
received.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null |
|
hasDeleteTime
clearDeleteTime
setDeleteTime
Output only. Time at which the request to delete the WorkerPool was
received.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Timestamp
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getStatus
Output only. WorkerPool Status.
| Returns | |
|---|---|
| Type | Description |
int |
|
setStatus
Output only. WorkerPool Status.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|