Class: Google::Apis::CloudbuildV1alpha1::WorkerPool

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudbuild_v1alpha1/classes.rb,
generated/google/apis/cloudbuild_v1alpha1/representations.rb,
generated/google/apis/cloudbuild_v1alpha1/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.



1171
1172
1173
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1171

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)


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

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)


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

def delete_time
  @delete_time
end

#nameString

User-defined name of the WorkerPool. Corresponds to the JSON property name

Returns:

  • (String)


1126
1127
1128
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1126

def name
  @name
end

#project_idString

The project ID of the GCP project for which the WorkerPool is created. Corresponds to the JSON property projectId

Returns:

  • (String)


1131
1132
1133
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1131

def project_id
  @project_id
end

#regionsArray<String>

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. Corresponds to the JSON property regions

Returns:

  • (Array<String>)


1140
1141
1142
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1140

def regions
  @regions
end

#service_account_emailString

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. Corresponds to the JSON property serviceAccountEmail

Returns:

  • (String)


1147
1148
1149
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1147

def 
  @service_account_email
end

#statusString

Output only. WorkerPool Status. Corresponds to the JSON property status

Returns:

  • (String)


1152
1153
1154
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1152

def status
  @status
end

#update_timeString

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

Returns:

  • (String)


1158
1159
1160
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1158

def update_time
  @update_time
end

#worker_configGoogle::Apis::CloudbuildV1alpha1::WorkerConfig

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



1164
1165
1166
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1164

def worker_config
  @worker_config
end

#worker_countFixnum

Total number of workers to be created across all requested regions. Corresponds to the JSON property workerCount

Returns:

  • (Fixnum)


1169
1170
1171
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1169

def worker_count
  @worker_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
# File 'generated/google/apis/cloudbuild_v1alpha1/classes.rb', line 1176

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)
  @project_id = args[:project_id] if args.key?(:project_id)
  @regions = args[:regions] if args.key?(:regions)
  @service_account_email = args[:service_account_email] if args.key?(:service_account_email)
  @status = args[:status] if args.key?(:status)
  @update_time = args[:update_time] if args.key?(:update_time)
  @worker_config = args[:worker_config] if args.key?(:worker_config)
  @worker_count = args[:worker_count] if args.key?(:worker_count)
end