Class: Google::Apis::CloudbuildV1beta1::WorkerPool

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudbuild_v1beta1/classes.rb,
lib/google/apis/cloudbuild_v1beta1/representations.rb,
lib/google/apis/cloudbuild_v1beta1/representations.rb

Overview

Configuration for a WorkerPool to run the builds. Workers provide a build environment where Cloud Build runs your builds. Cloud Build owns and maintains a pool of workers for general use. By default, when you submit a build, Cloud Build uses one of the workers from this pool. Builds that run in the default worker pool have access to the public internet. If your build needs access to resources on a private network, create and use a WorkerPool to run your builds. Custom WorkerPools give your builds access to any single VPC network that you administer, including any on-prem resources connected to that VPC network. For an overview of custom worker pools, see Custom workers overview.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WorkerPool

Returns a new instance of WorkerPool.



2609
2610
2611
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2609

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#annotationsHash<String,String>

User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations. Corresponds to the JSON property annotations

Returns:

  • (Hash<String,String>)


2552
2553
2554
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2552

def annotations
  @annotations
end

#create_timeString

Output only. Time at which the request to create the WorkerPool was received. Corresponds to the JSON property createTime

Returns:

  • (String)


2557
2558
2559
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2557

def create_time
  @create_time
end

#delete_timeString

Output only. Time at which the request to delete the WorkerPool was received. Corresponds to the JSON property deleteTime

Returns:

  • (String)


2562
2563
2564
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2562

def delete_time
  @delete_time
end

#display_nameString

A user-specified, human-readable name for the WorkerPool. If provided, this value must be 1-63 characters. Corresponds to the JSON property displayName

Returns:

  • (String)


2568
2569
2570
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2568

def display_name
  @display_name
end

#etagString

Output only. Checksum computed by the server. May be sent on update and delete requests to ensure that the client has an up-to-date value before proceeding. Corresponds to the JSON property etag

Returns:

  • (String)


2574
2575
2576
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2574

def etag
  @etag
end

#nameString

Output only. The resource name of the WorkerPool, with format projects/ project/locations/location/workerPools/worker_pool. The value of worker_poolis provided by `worker_pool_id` in `CreateWorkerPool` request and the value oflocation`is determined by the endpoint accessed. Corresponds to the JSON propertyname`

Returns:

  • (String)


2582
2583
2584
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2582

def name
  @name
end

#network_configGoogle::Apis::CloudbuildV1beta1::NetworkConfig

Network describes the network configuration for a WorkerPool. Corresponds to the JSON property networkConfig



2587
2588
2589
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2587

def network_config
  @network_config
end

#stateString

Output only. WorkerPool state. Corresponds to the JSON property state

Returns:

  • (String)


2592
2593
2594
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2592

def state
  @state
end

#uidString

Output only. A unique identifier for the WorkerPool. Corresponds to the JSON property uid

Returns:

  • (String)


2597
2598
2599
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2597

def uid
  @uid
end

#update_timeString

Output only. Time at which the request to update the WorkerPool was received. Corresponds to the JSON property updateTime

Returns:

  • (String)


2602
2603
2604
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2602

def update_time
  @update_time
end

#worker_configGoogle::Apis::CloudbuildV1beta1::WorkerConfig

Defines the configuration to be used for creating workers in the pool. Corresponds to the JSON property workerConfig



2607
2608
2609
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2607

def worker_config
  @worker_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
# File 'lib/google/apis/cloudbuild_v1beta1/classes.rb', line 2614

def update!(**args)
  @annotations = args[:annotations] if args.key?(:annotations)
  @create_time = args[:create_time] if args.key?(:create_time)
  @delete_time = args[:delete_time] if args.key?(:delete_time)
  @display_name = args[:display_name] if args.key?(:display_name)
  @etag = args[:etag] if args.key?(:etag)
  @name = args[:name] if args.key?(:name)
  @network_config = args[:network_config] if args.key?(:network_config)
  @state = args[:state] if args.key?(:state)
  @uid = args[:uid] if args.key?(:uid)
  @update_time = args[:update_time] if args.key?(:update_time)
  @worker_config = args[:worker_config] if args.key?(:worker_config)
end