Class: Google::Apis::CloudbuildV1alpha2::WorkerPool

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

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ WorkerPool

Returns a new instance of WorkerPool.



1123
1124
1125
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 1123

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

Instance Attribute Details

#create_timeString

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

Returns:

  • (String)


1077
1078
1079
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 1077

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)


1083
1084
1085
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 1083

def delete_time
  @delete_time
end

#nameString

Output only. The resource name of the WorkerPool. Format of the name is projects/project_id/workerPools/worker_pool_id`, where the value ofworker_pool_idis provided in the CreateWorkerPool request. Corresponds to the JSON propertyname`

Returns:

  • (String)


1091
1092
1093
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 1091

def name
  @name
end

#network_configGoogle::Apis::CloudbuildV1alpha2::NetworkConfig

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



1096
1097
1098
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 1096

def network_config
  @network_config
end

#regionString

Required. Immutable. The region where the WorkerPool runs. Only "us-central1" is currently supported. Note that region cannot be changed once the WorkerPool is created. Corresponds to the JSON property region

Returns:

  • (String)


1104
1105
1106
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 1104

def region
  @region
end

#stateString

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

Returns:

  • (String)


1109
1110
1111
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 1109

def state
  @state
end

#update_timeString

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

Returns:

  • (String)


1115
1116
1117
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 1115

def update_time
  @update_time
end

#worker_configGoogle::Apis::CloudbuildV1alpha2::WorkerConfig

WorkerConfig defines the configuration to be used for a creating workers in the pool. Corresponds to the JSON property workerConfig



1121
1122
1123
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 1121

def worker_config
  @worker_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
# File 'generated/google/apis/cloudbuild_v1alpha2/classes.rb', line 1128

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