google-apis-batch_v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/batch_v1/classes.rb +2264 -0
- data/lib/google/apis/batch_v1/gem_version.rb +28 -0
- data/lib/google/apis/batch_v1/representations.rb +962 -0
- data/lib/google/apis/batch_v1/service.rb +920 -0
- data/lib/google/apis/batch_v1.rb +36 -0
- data/lib/google-apis-batch_v1.rb +15 -0
- metadata +82 -0
@@ -0,0 +1,2264 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module BatchV1
|
24
|
+
|
25
|
+
# Accelerator describes Compute Engine accelerators to be attached to the VM.
|
26
|
+
class Accelerator
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# The number of accelerators of this type.
|
30
|
+
# Corresponds to the JSON property `count`
|
31
|
+
# @return [Fixnum]
|
32
|
+
attr_accessor :count
|
33
|
+
|
34
|
+
# Deprecated: please use instances[0].install_gpu_drivers instead.
|
35
|
+
# Corresponds to the JSON property `installGpuDrivers`
|
36
|
+
# @return [Boolean]
|
37
|
+
attr_accessor :install_gpu_drivers
|
38
|
+
alias_method :install_gpu_drivers?, :install_gpu_drivers
|
39
|
+
|
40
|
+
# The accelerator type. For example, "nvidia-tesla-t4". See `gcloud compute
|
41
|
+
# accelerator-types list`.
|
42
|
+
# Corresponds to the JSON property `type`
|
43
|
+
# @return [String]
|
44
|
+
attr_accessor :type
|
45
|
+
|
46
|
+
def initialize(**args)
|
47
|
+
update!(**args)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Update properties of this object
|
51
|
+
def update!(**args)
|
52
|
+
@count = args[:count] if args.key?(:count)
|
53
|
+
@install_gpu_drivers = args[:install_gpu_drivers] if args.key?(:install_gpu_drivers)
|
54
|
+
@type = args[:type] if args.key?(:type)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Conditions for actions to deal with task failures.
|
59
|
+
class ActionCondition
|
60
|
+
include Google::Apis::Core::Hashable
|
61
|
+
|
62
|
+
# Exit codes of a task execution. If there are more than 1 exit codes, when task
|
63
|
+
# executes with any of the exit code in the list, the condition is met and the
|
64
|
+
# action will be executed.
|
65
|
+
# Corresponds to the JSON property `exitCodes`
|
66
|
+
# @return [Array<Fixnum>]
|
67
|
+
attr_accessor :exit_codes
|
68
|
+
|
69
|
+
def initialize(**args)
|
70
|
+
update!(**args)
|
71
|
+
end
|
72
|
+
|
73
|
+
# Update properties of this object
|
74
|
+
def update!(**args)
|
75
|
+
@exit_codes = args[:exit_codes] if args.key?(:exit_codes)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# VM Agent Info.
|
80
|
+
class AgentInfo
|
81
|
+
include Google::Apis::Core::Hashable
|
82
|
+
|
83
|
+
# The assigned Job ID
|
84
|
+
# Corresponds to the JSON property `jobId`
|
85
|
+
# @return [String]
|
86
|
+
attr_accessor :job_id
|
87
|
+
|
88
|
+
# When the AgentInfo is generated.
|
89
|
+
# Corresponds to the JSON property `reportTime`
|
90
|
+
# @return [String]
|
91
|
+
attr_accessor :report_time
|
92
|
+
|
93
|
+
# Agent state.
|
94
|
+
# Corresponds to the JSON property `state`
|
95
|
+
# @return [String]
|
96
|
+
attr_accessor :state
|
97
|
+
|
98
|
+
# The assigned task group ID.
|
99
|
+
# Corresponds to the JSON property `taskGroupId`
|
100
|
+
# @return [String]
|
101
|
+
attr_accessor :task_group_id
|
102
|
+
|
103
|
+
# Task Info.
|
104
|
+
# Corresponds to the JSON property `tasks`
|
105
|
+
# @return [Array<Google::Apis::BatchV1::AgentTaskInfo>]
|
106
|
+
attr_accessor :tasks
|
107
|
+
|
108
|
+
def initialize(**args)
|
109
|
+
update!(**args)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Update properties of this object
|
113
|
+
def update!(**args)
|
114
|
+
@job_id = args[:job_id] if args.key?(:job_id)
|
115
|
+
@report_time = args[:report_time] if args.key?(:report_time)
|
116
|
+
@state = args[:state] if args.key?(:state)
|
117
|
+
@task_group_id = args[:task_group_id] if args.key?(:task_group_id)
|
118
|
+
@tasks = args[:tasks] if args.key?(:tasks)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# AgentMetadata never changes for a single instance of VM agent.
|
123
|
+
class AgentMetadata
|
124
|
+
include Google::Apis::Core::Hashable
|
125
|
+
|
126
|
+
# When the VM agent started.
|
127
|
+
# Corresponds to the JSON property `creationTime`
|
128
|
+
# @return [String]
|
129
|
+
attr_accessor :creation_time
|
130
|
+
|
131
|
+
# Full name of the entity that created this vm. For MIG, this path is: projects/`
|
132
|
+
# project`/regions/`region`/InstanceGroupManagers/`igm` The value is retrieved
|
133
|
+
# from the vm metadata key of "created-by".
|
134
|
+
# Corresponds to the JSON property `creator`
|
135
|
+
# @return [String]
|
136
|
+
attr_accessor :creator
|
137
|
+
|
138
|
+
# GCP instance name (go/instance-name).
|
139
|
+
# Corresponds to the JSON property `instance`
|
140
|
+
# @return [String]
|
141
|
+
attr_accessor :instance
|
142
|
+
|
143
|
+
# GCP instance ID (go/instance-id).
|
144
|
+
# Corresponds to the JSON property `instanceId`
|
145
|
+
# @return [Fixnum]
|
146
|
+
attr_accessor :instance_id
|
147
|
+
|
148
|
+
# parsed contents of /etc/os-release
|
149
|
+
# Corresponds to the JSON property `osRelease`
|
150
|
+
# @return [Hash<String,String>]
|
151
|
+
attr_accessor :os_release
|
152
|
+
|
153
|
+
# agent binary version running on VM
|
154
|
+
# Corresponds to the JSON property `version`
|
155
|
+
# @return [String]
|
156
|
+
attr_accessor :version
|
157
|
+
|
158
|
+
# Agent zone.
|
159
|
+
# Corresponds to the JSON property `zone`
|
160
|
+
# @return [String]
|
161
|
+
attr_accessor :zone
|
162
|
+
|
163
|
+
def initialize(**args)
|
164
|
+
update!(**args)
|
165
|
+
end
|
166
|
+
|
167
|
+
# Update properties of this object
|
168
|
+
def update!(**args)
|
169
|
+
@creation_time = args[:creation_time] if args.key?(:creation_time)
|
170
|
+
@creator = args[:creator] if args.key?(:creator)
|
171
|
+
@instance = args[:instance] if args.key?(:instance)
|
172
|
+
@instance_id = args[:instance_id] if args.key?(:instance_id)
|
173
|
+
@os_release = args[:os_release] if args.key?(:os_release)
|
174
|
+
@version = args[:version] if args.key?(:version)
|
175
|
+
@zone = args[:zone] if args.key?(:zone)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# TODO(b/182501497) The message needs to be redefined when the Agent API server
|
180
|
+
# updates data in storage per the backend design.
|
181
|
+
class AgentTask
|
182
|
+
include Google::Apis::Core::Hashable
|
183
|
+
|
184
|
+
# The intended state of the task.
|
185
|
+
# Corresponds to the JSON property `intendedState`
|
186
|
+
# @return [String]
|
187
|
+
attr_accessor :intended_state
|
188
|
+
|
189
|
+
# The highest barrier reached by all tasks in the task's TaskGroup.
|
190
|
+
# Corresponds to the JSON property `reachedBarrier`
|
191
|
+
# @return [Fixnum]
|
192
|
+
attr_accessor :reached_barrier
|
193
|
+
|
194
|
+
# Spec of a task
|
195
|
+
# Corresponds to the JSON property `spec`
|
196
|
+
# @return [Google::Apis::BatchV1::TaskSpec]
|
197
|
+
attr_accessor :spec
|
198
|
+
|
199
|
+
# Status of a task
|
200
|
+
# Corresponds to the JSON property `status`
|
201
|
+
# @return [Google::Apis::BatchV1::TaskStatus]
|
202
|
+
attr_accessor :status
|
203
|
+
|
204
|
+
# Task name.
|
205
|
+
# Corresponds to the JSON property `task`
|
206
|
+
# @return [String]
|
207
|
+
attr_accessor :task
|
208
|
+
|
209
|
+
def initialize(**args)
|
210
|
+
update!(**args)
|
211
|
+
end
|
212
|
+
|
213
|
+
# Update properties of this object
|
214
|
+
def update!(**args)
|
215
|
+
@intended_state = args[:intended_state] if args.key?(:intended_state)
|
216
|
+
@reached_barrier = args[:reached_barrier] if args.key?(:reached_barrier)
|
217
|
+
@spec = args[:spec] if args.key?(:spec)
|
218
|
+
@status = args[:status] if args.key?(:status)
|
219
|
+
@task = args[:task] if args.key?(:task)
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
# Task Info
|
224
|
+
class AgentTaskInfo
|
225
|
+
include Google::Apis::Core::Hashable
|
226
|
+
|
227
|
+
# The highest index of a runnable started by the agent for this task. The
|
228
|
+
# runnables are indexed from 1. Value 0 is undefined.
|
229
|
+
# Corresponds to the JSON property `runnable`
|
230
|
+
# @return [Fixnum]
|
231
|
+
attr_accessor :runnable
|
232
|
+
|
233
|
+
# ID of the Task
|
234
|
+
# Corresponds to the JSON property `taskId`
|
235
|
+
# @return [String]
|
236
|
+
attr_accessor :task_id
|
237
|
+
|
238
|
+
# Status of a task
|
239
|
+
# Corresponds to the JSON property `taskStatus`
|
240
|
+
# @return [Google::Apis::BatchV1::TaskStatus]
|
241
|
+
attr_accessor :task_status
|
242
|
+
|
243
|
+
def initialize(**args)
|
244
|
+
update!(**args)
|
245
|
+
end
|
246
|
+
|
247
|
+
# Update properties of this object
|
248
|
+
def update!(**args)
|
249
|
+
@runnable = args[:runnable] if args.key?(:runnable)
|
250
|
+
@task_id = args[:task_id] if args.key?(:task_id)
|
251
|
+
@task_status = args[:task_status] if args.key?(:task_status)
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
# A Job's resource allocation policy describes when, where, and how compute
|
256
|
+
# resources should be allocated for the Job.
|
257
|
+
class AllocationPolicy
|
258
|
+
include Google::Apis::Core::Hashable
|
259
|
+
|
260
|
+
# Describe instances that can be created by this AllocationPolicy. Only
|
261
|
+
# instances[0] is supported now.
|
262
|
+
# Corresponds to the JSON property `instances`
|
263
|
+
# @return [Array<Google::Apis::BatchV1::InstancePolicyOrTemplate>]
|
264
|
+
attr_accessor :instances
|
265
|
+
|
266
|
+
# Labels applied to all VM instances and other resources created by
|
267
|
+
# AllocationPolicy. Labels could be user provided or system generated. You can
|
268
|
+
# assign up to 64 labels. [Google Compute Engine label restrictions](https://
|
269
|
+
# cloud.google.com/compute/docs/labeling-resources#restrictions) apply. Label
|
270
|
+
# names that start with "goog-" or "google-" are reserved.
|
271
|
+
# Corresponds to the JSON property `labels`
|
272
|
+
# @return [Hash<String,String>]
|
273
|
+
attr_accessor :labels
|
274
|
+
|
275
|
+
# Location where compute resources should be allocated for the Job.
|
276
|
+
# Corresponds to the JSON property `location`
|
277
|
+
# @return [Google::Apis::BatchV1::LocationPolicy]
|
278
|
+
attr_accessor :location
|
279
|
+
|
280
|
+
# NetworkPolicy describes VM instance network configurations.
|
281
|
+
# Corresponds to the JSON property `network`
|
282
|
+
# @return [Google::Apis::BatchV1::NetworkPolicy]
|
283
|
+
attr_accessor :network
|
284
|
+
|
285
|
+
# Carries information about a Google Cloud service account.
|
286
|
+
# Corresponds to the JSON property `serviceAccount`
|
287
|
+
# @return [Google::Apis::BatchV1::ServiceAccount]
|
288
|
+
attr_accessor :service_account
|
289
|
+
|
290
|
+
def initialize(**args)
|
291
|
+
update!(**args)
|
292
|
+
end
|
293
|
+
|
294
|
+
# Update properties of this object
|
295
|
+
def update!(**args)
|
296
|
+
@instances = args[:instances] if args.key?(:instances)
|
297
|
+
@labels = args[:labels] if args.key?(:labels)
|
298
|
+
@location = args[:location] if args.key?(:location)
|
299
|
+
@network = args[:network] if args.key?(:network)
|
300
|
+
@service_account = args[:service_account] if args.key?(:service_account)
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
# A new or an existing persistent disk (PD) or a local ssd attached to a VM
|
305
|
+
# instance.
|
306
|
+
class AttachedDisk
|
307
|
+
include Google::Apis::Core::Hashable
|
308
|
+
|
309
|
+
# Device name that the guest operating system will see. It is used by Runnable.
|
310
|
+
# volumes field to mount disks. So please specify the device_name if you want
|
311
|
+
# Batch to help mount the disk, and it should match the device_name field in
|
312
|
+
# volumes.
|
313
|
+
# Corresponds to the JSON property `deviceName`
|
314
|
+
# @return [String]
|
315
|
+
attr_accessor :device_name
|
316
|
+
|
317
|
+
# Name of an existing PD.
|
318
|
+
# Corresponds to the JSON property `existingDisk`
|
319
|
+
# @return [String]
|
320
|
+
attr_accessor :existing_disk
|
321
|
+
|
322
|
+
# A new persistent disk or a local ssd. A VM can only have one local SSD setting
|
323
|
+
# but multiple local SSD partitions. https://cloud.google.com/compute/docs/disks#
|
324
|
+
# pdspecs. https://cloud.google.com/compute/docs/disks#localssds.
|
325
|
+
# Corresponds to the JSON property `newDisk`
|
326
|
+
# @return [Google::Apis::BatchV1::Disk]
|
327
|
+
attr_accessor :new_disk
|
328
|
+
|
329
|
+
def initialize(**args)
|
330
|
+
update!(**args)
|
331
|
+
end
|
332
|
+
|
333
|
+
# Update properties of this object
|
334
|
+
def update!(**args)
|
335
|
+
@device_name = args[:device_name] if args.key?(:device_name)
|
336
|
+
@existing_disk = args[:existing_disk] if args.key?(:existing_disk)
|
337
|
+
@new_disk = args[:new_disk] if args.key?(:new_disk)
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
# Specifies the audit configuration for a service. The configuration determines
|
342
|
+
# which permission types are logged, and what identities, if any, are exempted
|
343
|
+
# from logging. An AuditConfig must have one or more AuditLogConfigs. If there
|
344
|
+
# are AuditConfigs for both `allServices` and a specific service, the union of
|
345
|
+
# the two AuditConfigs is used for that service: the log_types specified in each
|
346
|
+
# AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
|
347
|
+
# exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
|
348
|
+
# service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
|
349
|
+
# exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
|
350
|
+
# ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
|
351
|
+
# "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
|
352
|
+
# , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
|
353
|
+
# this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
|
354
|
+
# exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com`
|
355
|
+
# from DATA_WRITE logging.
|
356
|
+
class AuditConfig
|
357
|
+
include Google::Apis::Core::Hashable
|
358
|
+
|
359
|
+
# The configuration for logging of each type of permission.
|
360
|
+
# Corresponds to the JSON property `auditLogConfigs`
|
361
|
+
# @return [Array<Google::Apis::BatchV1::AuditLogConfig>]
|
362
|
+
attr_accessor :audit_log_configs
|
363
|
+
|
364
|
+
# Specifies a service that will be enabled for audit logging. For example, `
|
365
|
+
# storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
|
366
|
+
# value that covers all services.
|
367
|
+
# Corresponds to the JSON property `service`
|
368
|
+
# @return [String]
|
369
|
+
attr_accessor :service
|
370
|
+
|
371
|
+
def initialize(**args)
|
372
|
+
update!(**args)
|
373
|
+
end
|
374
|
+
|
375
|
+
# Update properties of this object
|
376
|
+
def update!(**args)
|
377
|
+
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
|
378
|
+
@service = args[:service] if args.key?(:service)
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
# Provides the configuration for logging a type of permissions. Example: ` "
|
383
|
+
# audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
|
384
|
+
# jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
|
385
|
+
# DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
|
386
|
+
# DATA_READ logging.
|
387
|
+
class AuditLogConfig
|
388
|
+
include Google::Apis::Core::Hashable
|
389
|
+
|
390
|
+
# Specifies the identities that do not cause logging for this type of permission.
|
391
|
+
# Follows the same format of Binding.members.
|
392
|
+
# Corresponds to the JSON property `exemptedMembers`
|
393
|
+
# @return [Array<String>]
|
394
|
+
attr_accessor :exempted_members
|
395
|
+
|
396
|
+
# The log type that this config enables.
|
397
|
+
# Corresponds to the JSON property `logType`
|
398
|
+
# @return [String]
|
399
|
+
attr_accessor :log_type
|
400
|
+
|
401
|
+
def initialize(**args)
|
402
|
+
update!(**args)
|
403
|
+
end
|
404
|
+
|
405
|
+
# Update properties of this object
|
406
|
+
def update!(**args)
|
407
|
+
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
|
408
|
+
@log_type = args[:log_type] if args.key?(:log_type)
|
409
|
+
end
|
410
|
+
end
|
411
|
+
|
412
|
+
# Barrier runnable blocks until all tasks in a taskgroup reach it.
|
413
|
+
class Barrier
|
414
|
+
include Google::Apis::Core::Hashable
|
415
|
+
|
416
|
+
# Barriers are identified by their index in runnable list. Names are not
|
417
|
+
# required, but if present should be an identifier.
|
418
|
+
# Corresponds to the JSON property `name`
|
419
|
+
# @return [String]
|
420
|
+
attr_accessor :name
|
421
|
+
|
422
|
+
def initialize(**args)
|
423
|
+
update!(**args)
|
424
|
+
end
|
425
|
+
|
426
|
+
# Update properties of this object
|
427
|
+
def update!(**args)
|
428
|
+
@name = args[:name] if args.key?(:name)
|
429
|
+
end
|
430
|
+
end
|
431
|
+
|
432
|
+
# Associates `members`, or principals, with a `role`.
|
433
|
+
class Binding
|
434
|
+
include Google::Apis::Core::Hashable
|
435
|
+
|
436
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
437
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
438
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
439
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
440
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
441
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
442
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
443
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
444
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
445
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
446
|
+
# string" description: "Create a notification string with a timestamp."
|
447
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
448
|
+
# exact variables and functions that may be referenced within an expression are
|
449
|
+
# determined by the service that evaluates it. See the service documentation for
|
450
|
+
# additional information.
|
451
|
+
# Corresponds to the JSON property `condition`
|
452
|
+
# @return [Google::Apis::BatchV1::Expr]
|
453
|
+
attr_accessor :condition
|
454
|
+
|
455
|
+
# Specifies the principals requesting access for a Google Cloud resource. `
|
456
|
+
# members` can have the following values: * `allUsers`: A special identifier
|
457
|
+
# that represents anyone who is on the internet; with or without a Google
|
458
|
+
# account. * `allAuthenticatedUsers`: A special identifier that represents
|
459
|
+
# anyone who is authenticated with a Google account or a service account. Does
|
460
|
+
# not include identities that come from external identity providers (IdPs)
|
461
|
+
# through identity federation. * `user:`emailid``: An email address that
|
462
|
+
# represents a specific Google account. For example, `alice@example.com` . * `
|
463
|
+
# serviceAccount:`emailid``: An email address that represents a Google service
|
464
|
+
# account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
|
465
|
+
# serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
|
466
|
+
# identifier for a [Kubernetes service account](https://cloud.google.com/
|
467
|
+
# kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
|
468
|
+
# project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
|
469
|
+
# email address that represents a Google group. For example, `admins@example.com`
|
470
|
+
# . * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
|
471
|
+
# identifier) representing a user that has been recently deleted. For example, `
|
472
|
+
# alice@example.com?uid=123456789012345678901`. If the user is recovered, this
|
473
|
+
# value reverts to `user:`emailid`` and the recovered user retains the role in
|
474
|
+
# the binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email
|
475
|
+
# address (plus unique identifier) representing a service account that has been
|
476
|
+
# recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
|
477
|
+
# 123456789012345678901`. If the service account is undeleted, this value
|
478
|
+
# reverts to `serviceAccount:`emailid`` and the undeleted service account
|
479
|
+
# retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
|
480
|
+
# An email address (plus unique identifier) representing a Google group that has
|
481
|
+
# been recently deleted. For example, `admins@example.com?uid=
|
482
|
+
# 123456789012345678901`. If the group is recovered, this value reverts to `
|
483
|
+
# group:`emailid`` and the recovered group retains the role in the binding. * `
|
484
|
+
# domain:`domain``: The G Suite domain (primary) that represents all the users
|
485
|
+
# of that domain. For example, `google.com` or `example.com`.
|
486
|
+
# Corresponds to the JSON property `members`
|
487
|
+
# @return [Array<String>]
|
488
|
+
attr_accessor :members
|
489
|
+
|
490
|
+
# Role that is assigned to the list of `members`, or principals. For example, `
|
491
|
+
# roles/viewer`, `roles/editor`, or `roles/owner`.
|
492
|
+
# Corresponds to the JSON property `role`
|
493
|
+
# @return [String]
|
494
|
+
attr_accessor :role
|
495
|
+
|
496
|
+
def initialize(**args)
|
497
|
+
update!(**args)
|
498
|
+
end
|
499
|
+
|
500
|
+
# Update properties of this object
|
501
|
+
def update!(**args)
|
502
|
+
@condition = args[:condition] if args.key?(:condition)
|
503
|
+
@members = args[:members] if args.key?(:members)
|
504
|
+
@role = args[:role] if args.key?(:role)
|
505
|
+
end
|
506
|
+
end
|
507
|
+
|
508
|
+
# The request message for Operations.CancelOperation.
|
509
|
+
class CancelOperationRequest
|
510
|
+
include Google::Apis::Core::Hashable
|
511
|
+
|
512
|
+
def initialize(**args)
|
513
|
+
update!(**args)
|
514
|
+
end
|
515
|
+
|
516
|
+
# Update properties of this object
|
517
|
+
def update!(**args)
|
518
|
+
end
|
519
|
+
end
|
520
|
+
|
521
|
+
# Compute resource requirements
|
522
|
+
class ComputeResource
|
523
|
+
include Google::Apis::Core::Hashable
|
524
|
+
|
525
|
+
# Extra boot disk size in MiB for each task.
|
526
|
+
# Corresponds to the JSON property `bootDiskMib`
|
527
|
+
# @return [Fixnum]
|
528
|
+
attr_accessor :boot_disk_mib
|
529
|
+
|
530
|
+
# The milliCPU count.
|
531
|
+
# Corresponds to the JSON property `cpuMilli`
|
532
|
+
# @return [Fixnum]
|
533
|
+
attr_accessor :cpu_milli
|
534
|
+
|
535
|
+
# Memory in MiB.
|
536
|
+
# Corresponds to the JSON property `memoryMib`
|
537
|
+
# @return [Fixnum]
|
538
|
+
attr_accessor :memory_mib
|
539
|
+
|
540
|
+
def initialize(**args)
|
541
|
+
update!(**args)
|
542
|
+
end
|
543
|
+
|
544
|
+
# Update properties of this object
|
545
|
+
def update!(**args)
|
546
|
+
@boot_disk_mib = args[:boot_disk_mib] if args.key?(:boot_disk_mib)
|
547
|
+
@cpu_milli = args[:cpu_milli] if args.key?(:cpu_milli)
|
548
|
+
@memory_mib = args[:memory_mib] if args.key?(:memory_mib)
|
549
|
+
end
|
550
|
+
end
|
551
|
+
|
552
|
+
# Container runnable.
|
553
|
+
class Container
|
554
|
+
include Google::Apis::Core::Hashable
|
555
|
+
|
556
|
+
# If set to true, external network access to and from container will be blocked.
|
557
|
+
# The container will use the default internal network 'goog-internal'.
|
558
|
+
# Corresponds to the JSON property `blockExternalNetwork`
|
559
|
+
# @return [Boolean]
|
560
|
+
attr_accessor :block_external_network
|
561
|
+
alias_method :block_external_network?, :block_external_network
|
562
|
+
|
563
|
+
# Overrides the `CMD` specified in the container. If there is an ENTRYPOINT (
|
564
|
+
# either in the container image or with the entrypoint field below) then
|
565
|
+
# commands are appended as arguments to the ENTRYPOINT.
|
566
|
+
# Corresponds to the JSON property `commands`
|
567
|
+
# @return [Array<String>]
|
568
|
+
attr_accessor :commands
|
569
|
+
|
570
|
+
# Overrides the `ENTRYPOINT` specified in the container.
|
571
|
+
# Corresponds to the JSON property `entrypoint`
|
572
|
+
# @return [String]
|
573
|
+
attr_accessor :entrypoint
|
574
|
+
|
575
|
+
# The URI to pull the container image from.
|
576
|
+
# Corresponds to the JSON property `imageUri`
|
577
|
+
# @return [String]
|
578
|
+
attr_accessor :image_uri
|
579
|
+
|
580
|
+
# Arbitrary additional options to include in the "docker run" command when
|
581
|
+
# running this container, e.g. "--network host".
|
582
|
+
# Corresponds to the JSON property `options`
|
583
|
+
# @return [String]
|
584
|
+
attr_accessor :options
|
585
|
+
|
586
|
+
# Optional password for logging in to a docker registry. If password matches "
|
587
|
+
# projects/*/secrets/*/versions/*" then Batch will read the password from the
|
588
|
+
# Secret Manager;
|
589
|
+
# Corresponds to the JSON property `password`
|
590
|
+
# @return [String]
|
591
|
+
attr_accessor :password
|
592
|
+
|
593
|
+
# Optional username for logging in to a docker registry. If username matches "
|
594
|
+
# projects/*/secrets/*/versions/*" then Batch will read the username from the
|
595
|
+
# Secret Manager.
|
596
|
+
# Corresponds to the JSON property `username`
|
597
|
+
# @return [String]
|
598
|
+
attr_accessor :username
|
599
|
+
|
600
|
+
# Volumes to mount (bind mount) from the host machine files or directories into
|
601
|
+
# the container, formatted to match docker run's --volume option, e.g. /foo:/bar,
|
602
|
+
# or /foo:/bar:ro
|
603
|
+
# Corresponds to the JSON property `volumes`
|
604
|
+
# @return [Array<String>]
|
605
|
+
attr_accessor :volumes
|
606
|
+
|
607
|
+
def initialize(**args)
|
608
|
+
update!(**args)
|
609
|
+
end
|
610
|
+
|
611
|
+
# Update properties of this object
|
612
|
+
def update!(**args)
|
613
|
+
@block_external_network = args[:block_external_network] if args.key?(:block_external_network)
|
614
|
+
@commands = args[:commands] if args.key?(:commands)
|
615
|
+
@entrypoint = args[:entrypoint] if args.key?(:entrypoint)
|
616
|
+
@image_uri = args[:image_uri] if args.key?(:image_uri)
|
617
|
+
@options = args[:options] if args.key?(:options)
|
618
|
+
@password = args[:password] if args.key?(:password)
|
619
|
+
@username = args[:username] if args.key?(:username)
|
620
|
+
@volumes = args[:volumes] if args.key?(:volumes)
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
|
+
# A new persistent disk or a local ssd. A VM can only have one local SSD setting
|
625
|
+
# but multiple local SSD partitions. https://cloud.google.com/compute/docs/disks#
|
626
|
+
# pdspecs. https://cloud.google.com/compute/docs/disks#localssds.
|
627
|
+
class Disk
|
628
|
+
include Google::Apis::Core::Hashable
|
629
|
+
|
630
|
+
# Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not
|
631
|
+
# indicated, "NVMe" will be the default one for local ssds. We only support "
|
632
|
+
# SCSI" for persistent disks now.
|
633
|
+
# Corresponds to the JSON property `diskInterface`
|
634
|
+
# @return [String]
|
635
|
+
attr_accessor :disk_interface
|
636
|
+
|
637
|
+
# Name of a public or custom image used as the data source.
|
638
|
+
# Corresponds to the JSON property `image`
|
639
|
+
# @return [String]
|
640
|
+
attr_accessor :image
|
641
|
+
|
642
|
+
# Disk size in GB. This field is ignored if `data_source` is `disk` or `image`.
|
643
|
+
# If `type` is `local-ssd`, size_gb should be a multiple of 375GB, otherwise,
|
644
|
+
# the final size will be the next greater multiple of 375 GB.
|
645
|
+
# Corresponds to the JSON property `sizeGb`
|
646
|
+
# @return [Fixnum]
|
647
|
+
attr_accessor :size_gb
|
648
|
+
|
649
|
+
# Name of a snapshot used as the data source.
|
650
|
+
# Corresponds to the JSON property `snapshot`
|
651
|
+
# @return [String]
|
652
|
+
attr_accessor :snapshot
|
653
|
+
|
654
|
+
# Disk type as shown in `gcloud compute disk-types list` For example, "pd-ssd", "
|
655
|
+
# pd-standard", "pd-balanced", "local-ssd".
|
656
|
+
# Corresponds to the JSON property `type`
|
657
|
+
# @return [String]
|
658
|
+
attr_accessor :type
|
659
|
+
|
660
|
+
def initialize(**args)
|
661
|
+
update!(**args)
|
662
|
+
end
|
663
|
+
|
664
|
+
# Update properties of this object
|
665
|
+
def update!(**args)
|
666
|
+
@disk_interface = args[:disk_interface] if args.key?(:disk_interface)
|
667
|
+
@image = args[:image] if args.key?(:image)
|
668
|
+
@size_gb = args[:size_gb] if args.key?(:size_gb)
|
669
|
+
@snapshot = args[:snapshot] if args.key?(:snapshot)
|
670
|
+
@type = args[:type] if args.key?(:type)
|
671
|
+
end
|
672
|
+
end
|
673
|
+
|
674
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
675
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
676
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
677
|
+
# protobuf.Empty) returns (google.protobuf.Empty); `
|
678
|
+
class Empty
|
679
|
+
include Google::Apis::Core::Hashable
|
680
|
+
|
681
|
+
def initialize(**args)
|
682
|
+
update!(**args)
|
683
|
+
end
|
684
|
+
|
685
|
+
# Update properties of this object
|
686
|
+
def update!(**args)
|
687
|
+
end
|
688
|
+
end
|
689
|
+
|
690
|
+
# An Environment describes a collection of environment variables to set when
|
691
|
+
# executing Tasks.
|
692
|
+
class Environment
|
693
|
+
include Google::Apis::Core::Hashable
|
694
|
+
|
695
|
+
# A map of environment variable names to values.
|
696
|
+
# Corresponds to the JSON property `variables`
|
697
|
+
# @return [Hash<String,String>]
|
698
|
+
attr_accessor :variables
|
699
|
+
|
700
|
+
def initialize(**args)
|
701
|
+
update!(**args)
|
702
|
+
end
|
703
|
+
|
704
|
+
# Update properties of this object
|
705
|
+
def update!(**args)
|
706
|
+
@variables = args[:variables] if args.key?(:variables)
|
707
|
+
end
|
708
|
+
end
|
709
|
+
|
710
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
711
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
712
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
713
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
714
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
715
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
716
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
717
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
718
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
719
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
720
|
+
# string" description: "Create a notification string with a timestamp."
|
721
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
722
|
+
# exact variables and functions that may be referenced within an expression are
|
723
|
+
# determined by the service that evaluates it. See the service documentation for
|
724
|
+
# additional information.
|
725
|
+
class Expr
|
726
|
+
include Google::Apis::Core::Hashable
|
727
|
+
|
728
|
+
# Optional. Description of the expression. This is a longer text which describes
|
729
|
+
# the expression, e.g. when hovered over it in a UI.
|
730
|
+
# Corresponds to the JSON property `description`
|
731
|
+
# @return [String]
|
732
|
+
attr_accessor :description
|
733
|
+
|
734
|
+
# Textual representation of an expression in Common Expression Language syntax.
|
735
|
+
# Corresponds to the JSON property `expression`
|
736
|
+
# @return [String]
|
737
|
+
attr_accessor :expression
|
738
|
+
|
739
|
+
# Optional. String indicating the location of the expression for error reporting,
|
740
|
+
# e.g. a file name and a position in the file.
|
741
|
+
# Corresponds to the JSON property `location`
|
742
|
+
# @return [String]
|
743
|
+
attr_accessor :location
|
744
|
+
|
745
|
+
# Optional. Title for the expression, i.e. a short string describing its purpose.
|
746
|
+
# This can be used e.g. in UIs which allow to enter the expression.
|
747
|
+
# Corresponds to the JSON property `title`
|
748
|
+
# @return [String]
|
749
|
+
attr_accessor :title
|
750
|
+
|
751
|
+
def initialize(**args)
|
752
|
+
update!(**args)
|
753
|
+
end
|
754
|
+
|
755
|
+
# Update properties of this object
|
756
|
+
def update!(**args)
|
757
|
+
@description = args[:description] if args.key?(:description)
|
758
|
+
@expression = args[:expression] if args.key?(:expression)
|
759
|
+
@location = args[:location] if args.key?(:location)
|
760
|
+
@title = args[:title] if args.key?(:title)
|
761
|
+
end
|
762
|
+
end
|
763
|
+
|
764
|
+
# Represents a Google Cloud Storage volume.
|
765
|
+
class Gcs
|
766
|
+
include Google::Apis::Core::Hashable
|
767
|
+
|
768
|
+
# Remote path, either a bucket name or a subdirectory of a bucket, e.g.:
|
769
|
+
# bucket_name, bucket_name/subdirectory/
|
770
|
+
# Corresponds to the JSON property `remotePath`
|
771
|
+
# @return [String]
|
772
|
+
attr_accessor :remote_path
|
773
|
+
|
774
|
+
def initialize(**args)
|
775
|
+
update!(**args)
|
776
|
+
end
|
777
|
+
|
778
|
+
# Update properties of this object
|
779
|
+
def update!(**args)
|
780
|
+
@remote_path = args[:remote_path] if args.key?(:remote_path)
|
781
|
+
end
|
782
|
+
end
|
783
|
+
|
784
|
+
# InstancePolicy describes an instance type and resources attached to each VM
|
785
|
+
# created by this InstancePolicy.
|
786
|
+
class InstancePolicy
|
787
|
+
include Google::Apis::Core::Hashable
|
788
|
+
|
789
|
+
# The accelerators attached to each VM instance.
|
790
|
+
# Corresponds to the JSON property `accelerators`
|
791
|
+
# @return [Array<Google::Apis::BatchV1::Accelerator>]
|
792
|
+
attr_accessor :accelerators
|
793
|
+
|
794
|
+
# Non-boot disks to be attached for each VM created by this InstancePolicy. New
|
795
|
+
# disks will be deleted when the VM is deleted.
|
796
|
+
# Corresponds to the JSON property `disks`
|
797
|
+
# @return [Array<Google::Apis::BatchV1::AttachedDisk>]
|
798
|
+
attr_accessor :disks
|
799
|
+
|
800
|
+
# The Compute Engine machine type.
|
801
|
+
# Corresponds to the JSON property `machineType`
|
802
|
+
# @return [String]
|
803
|
+
attr_accessor :machine_type
|
804
|
+
|
805
|
+
# The minimum CPU platform. See `https://cloud.google.com/compute/docs/instances/
|
806
|
+
# specify-min-cpu-platform`. Not yet implemented.
|
807
|
+
# Corresponds to the JSON property `minCpuPlatform`
|
808
|
+
# @return [String]
|
809
|
+
attr_accessor :min_cpu_platform
|
810
|
+
|
811
|
+
# The provisioning model.
|
812
|
+
# Corresponds to the JSON property `provisioningModel`
|
813
|
+
# @return [String]
|
814
|
+
attr_accessor :provisioning_model
|
815
|
+
|
816
|
+
def initialize(**args)
|
817
|
+
update!(**args)
|
818
|
+
end
|
819
|
+
|
820
|
+
# Update properties of this object
|
821
|
+
def update!(**args)
|
822
|
+
@accelerators = args[:accelerators] if args.key?(:accelerators)
|
823
|
+
@disks = args[:disks] if args.key?(:disks)
|
824
|
+
@machine_type = args[:machine_type] if args.key?(:machine_type)
|
825
|
+
@min_cpu_platform = args[:min_cpu_platform] if args.key?(:min_cpu_platform)
|
826
|
+
@provisioning_model = args[:provisioning_model] if args.key?(:provisioning_model)
|
827
|
+
end
|
828
|
+
end
|
829
|
+
|
830
|
+
# Either an InstancePolicy or an instance template.
|
831
|
+
class InstancePolicyOrTemplate
|
832
|
+
include Google::Apis::Core::Hashable
|
833
|
+
|
834
|
+
# Set this field true if users want Batch to help fetch drivers from a third
|
835
|
+
# party location and install them for GPUs specified in policy.accelerators or
|
836
|
+
# instance_template on their behalf. Default is false.
|
837
|
+
# Corresponds to the JSON property `installGpuDrivers`
|
838
|
+
# @return [Boolean]
|
839
|
+
attr_accessor :install_gpu_drivers
|
840
|
+
alias_method :install_gpu_drivers?, :install_gpu_drivers
|
841
|
+
|
842
|
+
# Name of an instance template used to create VMs. Named the field as '
|
843
|
+
# instance_template' instead of 'template' to avoid c++ keyword conflict.
|
844
|
+
# Corresponds to the JSON property `instanceTemplate`
|
845
|
+
# @return [String]
|
846
|
+
attr_accessor :instance_template
|
847
|
+
|
848
|
+
# InstancePolicy describes an instance type and resources attached to each VM
|
849
|
+
# created by this InstancePolicy.
|
850
|
+
# Corresponds to the JSON property `policy`
|
851
|
+
# @return [Google::Apis::BatchV1::InstancePolicy]
|
852
|
+
attr_accessor :policy
|
853
|
+
|
854
|
+
def initialize(**args)
|
855
|
+
update!(**args)
|
856
|
+
end
|
857
|
+
|
858
|
+
# Update properties of this object
|
859
|
+
def update!(**args)
|
860
|
+
@install_gpu_drivers = args[:install_gpu_drivers] if args.key?(:install_gpu_drivers)
|
861
|
+
@instance_template = args[:instance_template] if args.key?(:instance_template)
|
862
|
+
@policy = args[:policy] if args.key?(:policy)
|
863
|
+
end
|
864
|
+
end
|
865
|
+
|
866
|
+
# VM instance status.
|
867
|
+
class InstanceStatus
|
868
|
+
include Google::Apis::Core::Hashable
|
869
|
+
|
870
|
+
# The Compute Engine machine type.
|
871
|
+
# Corresponds to the JSON property `machineType`
|
872
|
+
# @return [String]
|
873
|
+
attr_accessor :machine_type
|
874
|
+
|
875
|
+
# The VM instance provisioning model.
|
876
|
+
# Corresponds to the JSON property `provisioningModel`
|
877
|
+
# @return [String]
|
878
|
+
attr_accessor :provisioning_model
|
879
|
+
|
880
|
+
# The max number of tasks can be assigned to this instance type.
|
881
|
+
# Corresponds to the JSON property `taskPack`
|
882
|
+
# @return [Fixnum]
|
883
|
+
attr_accessor :task_pack
|
884
|
+
|
885
|
+
def initialize(**args)
|
886
|
+
update!(**args)
|
887
|
+
end
|
888
|
+
|
889
|
+
# Update properties of this object
|
890
|
+
def update!(**args)
|
891
|
+
@machine_type = args[:machine_type] if args.key?(:machine_type)
|
892
|
+
@provisioning_model = args[:provisioning_model] if args.key?(:provisioning_model)
|
893
|
+
@task_pack = args[:task_pack] if args.key?(:task_pack)
|
894
|
+
end
|
895
|
+
end
|
896
|
+
|
897
|
+
# The Cloud Batch Job description.
|
898
|
+
class Job
|
899
|
+
include Google::Apis::Core::Hashable
|
900
|
+
|
901
|
+
# A Job's resource allocation policy describes when, where, and how compute
|
902
|
+
# resources should be allocated for the Job.
|
903
|
+
# Corresponds to the JSON property `allocationPolicy`
|
904
|
+
# @return [Google::Apis::BatchV1::AllocationPolicy]
|
905
|
+
attr_accessor :allocation_policy
|
906
|
+
|
907
|
+
# Output only. When the Job was created.
|
908
|
+
# Corresponds to the JSON property `createTime`
|
909
|
+
# @return [String]
|
910
|
+
attr_accessor :create_time
|
911
|
+
|
912
|
+
# Labels for the Job. Labels could be user provided or system generated. For
|
913
|
+
# example, "labels": ` "department": "finance", "environment": "test" ` You can
|
914
|
+
# assign up to 64 labels. [Google Compute Engine label restrictions](https://
|
915
|
+
# cloud.google.com/compute/docs/labeling-resources#restrictions) apply. Label
|
916
|
+
# names that start with "goog-" or "google-" are reserved.
|
917
|
+
# Corresponds to the JSON property `labels`
|
918
|
+
# @return [Hash<String,String>]
|
919
|
+
attr_accessor :labels
|
920
|
+
|
921
|
+
# LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be
|
922
|
+
# preserved.
|
923
|
+
# Corresponds to the JSON property `logsPolicy`
|
924
|
+
# @return [Google::Apis::BatchV1::LogsPolicy]
|
925
|
+
attr_accessor :logs_policy
|
926
|
+
|
927
|
+
# Output only. Job name. For example: "projects/123456/locations/us-central1/
|
928
|
+
# jobs/job01".
|
929
|
+
# Corresponds to the JSON property `name`
|
930
|
+
# @return [String]
|
931
|
+
attr_accessor :name
|
932
|
+
|
933
|
+
# Notification configurations.
|
934
|
+
# Corresponds to the JSON property `notifications`
|
935
|
+
# @return [Array<Google::Apis::BatchV1::JobNotification>]
|
936
|
+
attr_accessor :notifications
|
937
|
+
|
938
|
+
# Priority of the Job. The valid value range is [0, 100). A job with higher
|
939
|
+
# priority value is more likely to run earlier if all other requirements are
|
940
|
+
# satisfied.
|
941
|
+
# Corresponds to the JSON property `priority`
|
942
|
+
# @return [Fixnum]
|
943
|
+
attr_accessor :priority
|
944
|
+
|
945
|
+
# Job status.
|
946
|
+
# Corresponds to the JSON property `status`
|
947
|
+
# @return [Google::Apis::BatchV1::JobStatus]
|
948
|
+
attr_accessor :status
|
949
|
+
|
950
|
+
# Required. TaskGroups in the Job. Only one TaskGroup is supported now.
|
951
|
+
# Corresponds to the JSON property `taskGroups`
|
952
|
+
# @return [Array<Google::Apis::BatchV1::TaskGroup>]
|
953
|
+
attr_accessor :task_groups
|
954
|
+
|
955
|
+
# Output only. A system generated unique ID (in UUID4 format) for the Job.
|
956
|
+
# Corresponds to the JSON property `uid`
|
957
|
+
# @return [String]
|
958
|
+
attr_accessor :uid
|
959
|
+
|
960
|
+
# Output only. The last time the Job was updated.
|
961
|
+
# Corresponds to the JSON property `updateTime`
|
962
|
+
# @return [String]
|
963
|
+
attr_accessor :update_time
|
964
|
+
|
965
|
+
def initialize(**args)
|
966
|
+
update!(**args)
|
967
|
+
end
|
968
|
+
|
969
|
+
# Update properties of this object
|
970
|
+
def update!(**args)
|
971
|
+
@allocation_policy = args[:allocation_policy] if args.key?(:allocation_policy)
|
972
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
973
|
+
@labels = args[:labels] if args.key?(:labels)
|
974
|
+
@logs_policy = args[:logs_policy] if args.key?(:logs_policy)
|
975
|
+
@name = args[:name] if args.key?(:name)
|
976
|
+
@notifications = args[:notifications] if args.key?(:notifications)
|
977
|
+
@priority = args[:priority] if args.key?(:priority)
|
978
|
+
@status = args[:status] if args.key?(:status)
|
979
|
+
@task_groups = args[:task_groups] if args.key?(:task_groups)
|
980
|
+
@uid = args[:uid] if args.key?(:uid)
|
981
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
982
|
+
end
|
983
|
+
end
|
984
|
+
|
985
|
+
# Notification configurations.
|
986
|
+
class JobNotification
|
987
|
+
include Google::Apis::Core::Hashable
|
988
|
+
|
989
|
+
# Message details. Describe the attribute that a message should have. Without
|
990
|
+
# specified message attributes, no message will be sent by default.
|
991
|
+
# Corresponds to the JSON property `message`
|
992
|
+
# @return [Google::Apis::BatchV1::Message]
|
993
|
+
attr_accessor :message
|
994
|
+
|
995
|
+
# The Pub/Sub topic where notifications like the job state changes will be
|
996
|
+
# published. This topic exist in the same project as the job and billings will
|
997
|
+
# be charged to this project. If not specified, no Pub/Sub messages will be sent.
|
998
|
+
# Topic format: `projects/`project`/topics/`topic``.
|
999
|
+
# Corresponds to the JSON property `pubsubTopic`
|
1000
|
+
# @return [String]
|
1001
|
+
attr_accessor :pubsub_topic
|
1002
|
+
|
1003
|
+
def initialize(**args)
|
1004
|
+
update!(**args)
|
1005
|
+
end
|
1006
|
+
|
1007
|
+
# Update properties of this object
|
1008
|
+
def update!(**args)
|
1009
|
+
@message = args[:message] if args.key?(:message)
|
1010
|
+
@pubsub_topic = args[:pubsub_topic] if args.key?(:pubsub_topic)
|
1011
|
+
end
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
# Job status.
|
1015
|
+
class JobStatus
|
1016
|
+
include Google::Apis::Core::Hashable
|
1017
|
+
|
1018
|
+
# The duration of time that the Job spent in status RUNNING.
|
1019
|
+
# Corresponds to the JSON property `runDuration`
|
1020
|
+
# @return [String]
|
1021
|
+
attr_accessor :run_duration
|
1022
|
+
|
1023
|
+
# Job state
|
1024
|
+
# Corresponds to the JSON property `state`
|
1025
|
+
# @return [String]
|
1026
|
+
attr_accessor :state
|
1027
|
+
|
1028
|
+
# Job status events
|
1029
|
+
# Corresponds to the JSON property `statusEvents`
|
1030
|
+
# @return [Array<Google::Apis::BatchV1::StatusEvent>]
|
1031
|
+
attr_accessor :status_events
|
1032
|
+
|
1033
|
+
# Aggregated task status for each TaskGroup in the Job. The map key is TaskGroup
|
1034
|
+
# ID.
|
1035
|
+
# Corresponds to the JSON property `taskGroups`
|
1036
|
+
# @return [Hash<String,Google::Apis::BatchV1::TaskGroupStatus>]
|
1037
|
+
attr_accessor :task_groups
|
1038
|
+
|
1039
|
+
def initialize(**args)
|
1040
|
+
update!(**args)
|
1041
|
+
end
|
1042
|
+
|
1043
|
+
# Update properties of this object
|
1044
|
+
def update!(**args)
|
1045
|
+
@run_duration = args[:run_duration] if args.key?(:run_duration)
|
1046
|
+
@state = args[:state] if args.key?(:state)
|
1047
|
+
@status_events = args[:status_events] if args.key?(:status_events)
|
1048
|
+
@task_groups = args[:task_groups] if args.key?(:task_groups)
|
1049
|
+
end
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
# LifecyclePolicy describes how to deal with task failures based on different
|
1053
|
+
# conditions.
|
1054
|
+
class LifecyclePolicy
|
1055
|
+
include Google::Apis::Core::Hashable
|
1056
|
+
|
1057
|
+
# Action to execute when ActionCondition is true.
|
1058
|
+
# Corresponds to the JSON property `action`
|
1059
|
+
# @return [String]
|
1060
|
+
attr_accessor :action
|
1061
|
+
|
1062
|
+
# Conditions for actions to deal with task failures.
|
1063
|
+
# Corresponds to the JSON property `actionCondition`
|
1064
|
+
# @return [Google::Apis::BatchV1::ActionCondition]
|
1065
|
+
attr_accessor :action_condition
|
1066
|
+
|
1067
|
+
def initialize(**args)
|
1068
|
+
update!(**args)
|
1069
|
+
end
|
1070
|
+
|
1071
|
+
# Update properties of this object
|
1072
|
+
def update!(**args)
|
1073
|
+
@action = args[:action] if args.key?(:action)
|
1074
|
+
@action_condition = args[:action_condition] if args.key?(:action_condition)
|
1075
|
+
end
|
1076
|
+
end
|
1077
|
+
|
1078
|
+
# ListJob Response.
|
1079
|
+
class ListJobsResponse
|
1080
|
+
include Google::Apis::Core::Hashable
|
1081
|
+
|
1082
|
+
# Jobs.
|
1083
|
+
# Corresponds to the JSON property `jobs`
|
1084
|
+
# @return [Array<Google::Apis::BatchV1::Job>]
|
1085
|
+
attr_accessor :jobs
|
1086
|
+
|
1087
|
+
# Next page token.
|
1088
|
+
# Corresponds to the JSON property `nextPageToken`
|
1089
|
+
# @return [String]
|
1090
|
+
attr_accessor :next_page_token
|
1091
|
+
|
1092
|
+
# Locations that could not be reached.
|
1093
|
+
# Corresponds to the JSON property `unreachable`
|
1094
|
+
# @return [Array<String>]
|
1095
|
+
attr_accessor :unreachable
|
1096
|
+
|
1097
|
+
def initialize(**args)
|
1098
|
+
update!(**args)
|
1099
|
+
end
|
1100
|
+
|
1101
|
+
# Update properties of this object
|
1102
|
+
def update!(**args)
|
1103
|
+
@jobs = args[:jobs] if args.key?(:jobs)
|
1104
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1105
|
+
@unreachable = args[:unreachable] if args.key?(:unreachable)
|
1106
|
+
end
|
1107
|
+
end
|
1108
|
+
|
1109
|
+
# The response message for Locations.ListLocations.
|
1110
|
+
class ListLocationsResponse
|
1111
|
+
include Google::Apis::Core::Hashable
|
1112
|
+
|
1113
|
+
# A list of locations that matches the specified filter in the request.
|
1114
|
+
# Corresponds to the JSON property `locations`
|
1115
|
+
# @return [Array<Google::Apis::BatchV1::Location>]
|
1116
|
+
attr_accessor :locations
|
1117
|
+
|
1118
|
+
# The standard List next-page token.
|
1119
|
+
# Corresponds to the JSON property `nextPageToken`
|
1120
|
+
# @return [String]
|
1121
|
+
attr_accessor :next_page_token
|
1122
|
+
|
1123
|
+
def initialize(**args)
|
1124
|
+
update!(**args)
|
1125
|
+
end
|
1126
|
+
|
1127
|
+
# Update properties of this object
|
1128
|
+
def update!(**args)
|
1129
|
+
@locations = args[:locations] if args.key?(:locations)
|
1130
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1131
|
+
end
|
1132
|
+
end
|
1133
|
+
|
1134
|
+
# The response message for Operations.ListOperations.
|
1135
|
+
class ListOperationsResponse
|
1136
|
+
include Google::Apis::Core::Hashable
|
1137
|
+
|
1138
|
+
# The standard List next-page token.
|
1139
|
+
# Corresponds to the JSON property `nextPageToken`
|
1140
|
+
# @return [String]
|
1141
|
+
attr_accessor :next_page_token
|
1142
|
+
|
1143
|
+
# A list of operations that matches the specified filter in the request.
|
1144
|
+
# Corresponds to the JSON property `operations`
|
1145
|
+
# @return [Array<Google::Apis::BatchV1::Operation>]
|
1146
|
+
attr_accessor :operations
|
1147
|
+
|
1148
|
+
def initialize(**args)
|
1149
|
+
update!(**args)
|
1150
|
+
end
|
1151
|
+
|
1152
|
+
# Update properties of this object
|
1153
|
+
def update!(**args)
|
1154
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1155
|
+
@operations = args[:operations] if args.key?(:operations)
|
1156
|
+
end
|
1157
|
+
end
|
1158
|
+
|
1159
|
+
# ListTasks Response.
|
1160
|
+
class ListTasksResponse
|
1161
|
+
include Google::Apis::Core::Hashable
|
1162
|
+
|
1163
|
+
# Next page token.
|
1164
|
+
# Corresponds to the JSON property `nextPageToken`
|
1165
|
+
# @return [String]
|
1166
|
+
attr_accessor :next_page_token
|
1167
|
+
|
1168
|
+
# Tasks.
|
1169
|
+
# Corresponds to the JSON property `tasks`
|
1170
|
+
# @return [Array<Google::Apis::BatchV1::Task>]
|
1171
|
+
attr_accessor :tasks
|
1172
|
+
|
1173
|
+
# Locations that could not be reached.
|
1174
|
+
# Corresponds to the JSON property `unreachable`
|
1175
|
+
# @return [Array<String>]
|
1176
|
+
attr_accessor :unreachable
|
1177
|
+
|
1178
|
+
def initialize(**args)
|
1179
|
+
update!(**args)
|
1180
|
+
end
|
1181
|
+
|
1182
|
+
# Update properties of this object
|
1183
|
+
def update!(**args)
|
1184
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1185
|
+
@tasks = args[:tasks] if args.key?(:tasks)
|
1186
|
+
@unreachable = args[:unreachable] if args.key?(:unreachable)
|
1187
|
+
end
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
# A resource that represents Google Cloud Platform location.
|
1191
|
+
class Location
|
1192
|
+
include Google::Apis::Core::Hashable
|
1193
|
+
|
1194
|
+
# The friendly name for this location, typically a nearby city name. For example,
|
1195
|
+
# "Tokyo".
|
1196
|
+
# Corresponds to the JSON property `displayName`
|
1197
|
+
# @return [String]
|
1198
|
+
attr_accessor :display_name
|
1199
|
+
|
1200
|
+
# Cross-service attributes for the location. For example `"cloud.googleapis.com/
|
1201
|
+
# region": "us-east1"`
|
1202
|
+
# Corresponds to the JSON property `labels`
|
1203
|
+
# @return [Hash<String,String>]
|
1204
|
+
attr_accessor :labels
|
1205
|
+
|
1206
|
+
# The canonical id for this location. For example: `"us-east1"`.
|
1207
|
+
# Corresponds to the JSON property `locationId`
|
1208
|
+
# @return [String]
|
1209
|
+
attr_accessor :location_id
|
1210
|
+
|
1211
|
+
# Service-specific metadata. For example the available capacity at the given
|
1212
|
+
# location.
|
1213
|
+
# Corresponds to the JSON property `metadata`
|
1214
|
+
# @return [Hash<String,Object>]
|
1215
|
+
attr_accessor :metadata
|
1216
|
+
|
1217
|
+
# Resource name for the location, which may vary between implementations. For
|
1218
|
+
# example: `"projects/example-project/locations/us-east1"`
|
1219
|
+
# Corresponds to the JSON property `name`
|
1220
|
+
# @return [String]
|
1221
|
+
attr_accessor :name
|
1222
|
+
|
1223
|
+
def initialize(**args)
|
1224
|
+
update!(**args)
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
# Update properties of this object
|
1228
|
+
def update!(**args)
|
1229
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1230
|
+
@labels = args[:labels] if args.key?(:labels)
|
1231
|
+
@location_id = args[:location_id] if args.key?(:location_id)
|
1232
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1233
|
+
@name = args[:name] if args.key?(:name)
|
1234
|
+
end
|
1235
|
+
end
|
1236
|
+
|
1237
|
+
#
|
1238
|
+
class LocationPolicy
|
1239
|
+
include Google::Apis::Core::Hashable
|
1240
|
+
|
1241
|
+
# A list of allowed location names represented by internal URLs. Each location
|
1242
|
+
# can be a region or a zone. Only one region or multiple zones in one region is
|
1243
|
+
# supported now. For example, ["regions/us-central1"] allow VMs in any zones in
|
1244
|
+
# region us-central1. ["zones/us-central1-a", "zones/us-central1-c"] only allow
|
1245
|
+
# VMs in zones us-central1-a and us-central1-c. All locations end up in
|
1246
|
+
# different regions would cause errors. For example, ["regions/us-central1", "
|
1247
|
+
# zones/us-central1-a", "zones/us-central1-b", "zones/us-west1-a"] contains 2
|
1248
|
+
# regions "us-central1" and "us-west1". An error is expected in this case.
|
1249
|
+
# Corresponds to the JSON property `allowedLocations`
|
1250
|
+
# @return [Array<String>]
|
1251
|
+
attr_accessor :allowed_locations
|
1252
|
+
|
1253
|
+
def initialize(**args)
|
1254
|
+
update!(**args)
|
1255
|
+
end
|
1256
|
+
|
1257
|
+
# Update properties of this object
|
1258
|
+
def update!(**args)
|
1259
|
+
@allowed_locations = args[:allowed_locations] if args.key?(:allowed_locations)
|
1260
|
+
end
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
# LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be
|
1264
|
+
# preserved.
|
1265
|
+
class LogsPolicy
|
1266
|
+
include Google::Apis::Core::Hashable
|
1267
|
+
|
1268
|
+
# Where logs should be saved.
|
1269
|
+
# Corresponds to the JSON property `destination`
|
1270
|
+
# @return [String]
|
1271
|
+
attr_accessor :destination
|
1272
|
+
|
1273
|
+
# The path to which logs are saved when the destination = PATH. This can be a
|
1274
|
+
# local file path on the VM, or under the mount point of a Persistent Disk or
|
1275
|
+
# Filestore, or a Cloud Storage path.
|
1276
|
+
# Corresponds to the JSON property `logsPath`
|
1277
|
+
# @return [String]
|
1278
|
+
attr_accessor :logs_path
|
1279
|
+
|
1280
|
+
def initialize(**args)
|
1281
|
+
update!(**args)
|
1282
|
+
end
|
1283
|
+
|
1284
|
+
# Update properties of this object
|
1285
|
+
def update!(**args)
|
1286
|
+
@destination = args[:destination] if args.key?(:destination)
|
1287
|
+
@logs_path = args[:logs_path] if args.key?(:logs_path)
|
1288
|
+
end
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
# Message details. Describe the attribute that a message should have. Without
|
1292
|
+
# specified message attributes, no message will be sent by default.
|
1293
|
+
class Message
|
1294
|
+
include Google::Apis::Core::Hashable
|
1295
|
+
|
1296
|
+
# The new job state.
|
1297
|
+
# Corresponds to the JSON property `newJobState`
|
1298
|
+
# @return [String]
|
1299
|
+
attr_accessor :new_job_state
|
1300
|
+
|
1301
|
+
# The new task state.
|
1302
|
+
# Corresponds to the JSON property `newTaskState`
|
1303
|
+
# @return [String]
|
1304
|
+
attr_accessor :new_task_state
|
1305
|
+
|
1306
|
+
# The message type.
|
1307
|
+
# Corresponds to the JSON property `type`
|
1308
|
+
# @return [String]
|
1309
|
+
attr_accessor :type
|
1310
|
+
|
1311
|
+
def initialize(**args)
|
1312
|
+
update!(**args)
|
1313
|
+
end
|
1314
|
+
|
1315
|
+
# Update properties of this object
|
1316
|
+
def update!(**args)
|
1317
|
+
@new_job_state = args[:new_job_state] if args.key?(:new_job_state)
|
1318
|
+
@new_task_state = args[:new_task_state] if args.key?(:new_task_state)
|
1319
|
+
@type = args[:type] if args.key?(:type)
|
1320
|
+
end
|
1321
|
+
end
|
1322
|
+
|
1323
|
+
# Represents an NFS volume.
|
1324
|
+
class Nfs
|
1325
|
+
include Google::Apis::Core::Hashable
|
1326
|
+
|
1327
|
+
# Remote source path exported from the NFS, e.g., "/share".
|
1328
|
+
# Corresponds to the JSON property `remotePath`
|
1329
|
+
# @return [String]
|
1330
|
+
attr_accessor :remote_path
|
1331
|
+
|
1332
|
+
# The IP address of the NFS.
|
1333
|
+
# Corresponds to the JSON property `server`
|
1334
|
+
# @return [String]
|
1335
|
+
attr_accessor :server
|
1336
|
+
|
1337
|
+
def initialize(**args)
|
1338
|
+
update!(**args)
|
1339
|
+
end
|
1340
|
+
|
1341
|
+
# Update properties of this object
|
1342
|
+
def update!(**args)
|
1343
|
+
@remote_path = args[:remote_path] if args.key?(:remote_path)
|
1344
|
+
@server = args[:server] if args.key?(:server)
|
1345
|
+
end
|
1346
|
+
end
|
1347
|
+
|
1348
|
+
# A network interface.
|
1349
|
+
class NetworkInterface
|
1350
|
+
include Google::Apis::Core::Hashable
|
1351
|
+
|
1352
|
+
# The URL of the network resource.
|
1353
|
+
# Corresponds to the JSON property `network`
|
1354
|
+
# @return [String]
|
1355
|
+
attr_accessor :network
|
1356
|
+
|
1357
|
+
# Default is false (with an external IP address). Required if no external public
|
1358
|
+
# IP address is attached to the VM. If no external public IP address, additional
|
1359
|
+
# configuration is required to allow the VM to access Google Services. See https:
|
1360
|
+
# //cloud.google.com/vpc/docs/configure-private-google-access and https://cloud.
|
1361
|
+
# google.com/nat/docs/gce-example#create-nat for more information.
|
1362
|
+
# Corresponds to the JSON property `noExternalIpAddress`
|
1363
|
+
# @return [Boolean]
|
1364
|
+
attr_accessor :no_external_ip_address
|
1365
|
+
alias_method :no_external_ip_address?, :no_external_ip_address
|
1366
|
+
|
1367
|
+
# The URL of the Subnetwork resource.
|
1368
|
+
# Corresponds to the JSON property `subnetwork`
|
1369
|
+
# @return [String]
|
1370
|
+
attr_accessor :subnetwork
|
1371
|
+
|
1372
|
+
def initialize(**args)
|
1373
|
+
update!(**args)
|
1374
|
+
end
|
1375
|
+
|
1376
|
+
# Update properties of this object
|
1377
|
+
def update!(**args)
|
1378
|
+
@network = args[:network] if args.key?(:network)
|
1379
|
+
@no_external_ip_address = args[:no_external_ip_address] if args.key?(:no_external_ip_address)
|
1380
|
+
@subnetwork = args[:subnetwork] if args.key?(:subnetwork)
|
1381
|
+
end
|
1382
|
+
end
|
1383
|
+
|
1384
|
+
# NetworkPolicy describes VM instance network configurations.
|
1385
|
+
class NetworkPolicy
|
1386
|
+
include Google::Apis::Core::Hashable
|
1387
|
+
|
1388
|
+
# Network configurations.
|
1389
|
+
# Corresponds to the JSON property `networkInterfaces`
|
1390
|
+
# @return [Array<Google::Apis::BatchV1::NetworkInterface>]
|
1391
|
+
attr_accessor :network_interfaces
|
1392
|
+
|
1393
|
+
def initialize(**args)
|
1394
|
+
update!(**args)
|
1395
|
+
end
|
1396
|
+
|
1397
|
+
# Update properties of this object
|
1398
|
+
def update!(**args)
|
1399
|
+
@network_interfaces = args[:network_interfaces] if args.key?(:network_interfaces)
|
1400
|
+
end
|
1401
|
+
end
|
1402
|
+
|
1403
|
+
# This resource represents a long-running operation that is the result of a
|
1404
|
+
# network API call.
|
1405
|
+
class Operation
|
1406
|
+
include Google::Apis::Core::Hashable
|
1407
|
+
|
1408
|
+
# If the value is `false`, it means the operation is still in progress. If `true`
|
1409
|
+
# , the operation is completed, and either `error` or `response` is available.
|
1410
|
+
# Corresponds to the JSON property `done`
|
1411
|
+
# @return [Boolean]
|
1412
|
+
attr_accessor :done
|
1413
|
+
alias_method :done?, :done
|
1414
|
+
|
1415
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1416
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1417
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1418
|
+
# data: error code, error message, and error details. You can find out more
|
1419
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1420
|
+
# //cloud.google.com/apis/design/errors).
|
1421
|
+
# Corresponds to the JSON property `error`
|
1422
|
+
# @return [Google::Apis::BatchV1::Status]
|
1423
|
+
attr_accessor :error
|
1424
|
+
|
1425
|
+
# Service-specific metadata associated with the operation. It typically contains
|
1426
|
+
# progress information and common metadata such as create time. Some services
|
1427
|
+
# might not provide such metadata. Any method that returns a long-running
|
1428
|
+
# operation should document the metadata type, if any.
|
1429
|
+
# Corresponds to the JSON property `metadata`
|
1430
|
+
# @return [Hash<String,Object>]
|
1431
|
+
attr_accessor :metadata
|
1432
|
+
|
1433
|
+
# The server-assigned name, which is only unique within the same service that
|
1434
|
+
# originally returns it. If you use the default HTTP mapping, the `name` should
|
1435
|
+
# be a resource name ending with `operations/`unique_id``.
|
1436
|
+
# Corresponds to the JSON property `name`
|
1437
|
+
# @return [String]
|
1438
|
+
attr_accessor :name
|
1439
|
+
|
1440
|
+
# The normal response of the operation in case of success. If the original
|
1441
|
+
# method returns no data on success, such as `Delete`, the response is `google.
|
1442
|
+
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
|
1443
|
+
# the response should be the resource. For other methods, the response should
|
1444
|
+
# have the type `XxxResponse`, where `Xxx` is the original method name. For
|
1445
|
+
# example, if the original method name is `TakeSnapshot()`, the inferred
|
1446
|
+
# response type is `TakeSnapshotResponse`.
|
1447
|
+
# Corresponds to the JSON property `response`
|
1448
|
+
# @return [Hash<String,Object>]
|
1449
|
+
attr_accessor :response
|
1450
|
+
|
1451
|
+
def initialize(**args)
|
1452
|
+
update!(**args)
|
1453
|
+
end
|
1454
|
+
|
1455
|
+
# Update properties of this object
|
1456
|
+
def update!(**args)
|
1457
|
+
@done = args[:done] if args.key?(:done)
|
1458
|
+
@error = args[:error] if args.key?(:error)
|
1459
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1460
|
+
@name = args[:name] if args.key?(:name)
|
1461
|
+
@response = args[:response] if args.key?(:response)
|
1462
|
+
end
|
1463
|
+
end
|
1464
|
+
|
1465
|
+
# Represents the metadata of the long-running operation.
|
1466
|
+
class OperationMetadata
|
1467
|
+
include Google::Apis::Core::Hashable
|
1468
|
+
|
1469
|
+
# Output only. API version used to start the operation.
|
1470
|
+
# Corresponds to the JSON property `apiVersion`
|
1471
|
+
# @return [String]
|
1472
|
+
attr_accessor :api_version
|
1473
|
+
|
1474
|
+
# Output only. The time the operation was created.
|
1475
|
+
# Corresponds to the JSON property `createTime`
|
1476
|
+
# @return [String]
|
1477
|
+
attr_accessor :create_time
|
1478
|
+
|
1479
|
+
# Output only. The time the operation finished running.
|
1480
|
+
# Corresponds to the JSON property `endTime`
|
1481
|
+
# @return [String]
|
1482
|
+
attr_accessor :end_time
|
1483
|
+
|
1484
|
+
# Output only. Identifies whether the user has requested cancellation of the
|
1485
|
+
# operation. Operations that have successfully been cancelled have Operation.
|
1486
|
+
# error value with a google.rpc.Status.code of 1, corresponding to `Code.
|
1487
|
+
# CANCELLED`.
|
1488
|
+
# Corresponds to the JSON property `requestedCancellation`
|
1489
|
+
# @return [Boolean]
|
1490
|
+
attr_accessor :requested_cancellation
|
1491
|
+
alias_method :requested_cancellation?, :requested_cancellation
|
1492
|
+
|
1493
|
+
# Output only. Human-readable status of the operation, if any.
|
1494
|
+
# Corresponds to the JSON property `statusMessage`
|
1495
|
+
# @return [String]
|
1496
|
+
attr_accessor :status_message
|
1497
|
+
|
1498
|
+
# Output only. Server-defined resource path for the target of the operation.
|
1499
|
+
# Corresponds to the JSON property `target`
|
1500
|
+
# @return [String]
|
1501
|
+
attr_accessor :target
|
1502
|
+
|
1503
|
+
# Output only. Name of the verb executed by the operation.
|
1504
|
+
# Corresponds to the JSON property `verb`
|
1505
|
+
# @return [String]
|
1506
|
+
attr_accessor :verb
|
1507
|
+
|
1508
|
+
def initialize(**args)
|
1509
|
+
update!(**args)
|
1510
|
+
end
|
1511
|
+
|
1512
|
+
# Update properties of this object
|
1513
|
+
def update!(**args)
|
1514
|
+
@api_version = args[:api_version] if args.key?(:api_version)
|
1515
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
1516
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
1517
|
+
@requested_cancellation = args[:requested_cancellation] if args.key?(:requested_cancellation)
|
1518
|
+
@status_message = args[:status_message] if args.key?(:status_message)
|
1519
|
+
@target = args[:target] if args.key?(:target)
|
1520
|
+
@verb = args[:verb] if args.key?(:verb)
|
1521
|
+
end
|
1522
|
+
end
|
1523
|
+
|
1524
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
1525
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
1526
|
+
# A `binding` binds one or more `members`, or principals, to a single `role`.
|
1527
|
+
# Principals can be user accounts, service accounts, Google groups, and domains (
|
1528
|
+
# such as G Suite). A `role` is a named list of permissions; each `role` can be
|
1529
|
+
# an IAM predefined role or a user-created custom role. For some types of Google
|
1530
|
+
# Cloud resources, a `binding` can also specify a `condition`, which is a
|
1531
|
+
# logical expression that allows access to a resource only if the expression
|
1532
|
+
# evaluates to `true`. A condition can add constraints based on attributes of
|
1533
|
+
# the request, the resource, or both. To learn which resources support
|
1534
|
+
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
1535
|
+
# google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
|
1536
|
+
# bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
|
1537
|
+
# "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
|
1538
|
+
# serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
|
1539
|
+
# roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
|
1540
|
+
# ], "condition": ` "title": "expirable access", "description": "Does not grant
|
1541
|
+
# access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
|
1542
|
+
# 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
|
1543
|
+
# bindings: - members: - user:mike@example.com - group:admins@example.com -
|
1544
|
+
# domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
1545
|
+
# role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
|
1546
|
+
# com role: roles/resourcemanager.organizationViewer condition: title: expirable
|
1547
|
+
# access description: Does not grant access after Sep 2020 expression: request.
|
1548
|
+
# time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
|
1549
|
+
# a description of IAM and its features, see the [IAM documentation](https://
|
1550
|
+
# cloud.google.com/iam/docs/).
|
1551
|
+
class Policy
|
1552
|
+
include Google::Apis::Core::Hashable
|
1553
|
+
|
1554
|
+
# Specifies cloud audit logging configuration for this policy.
|
1555
|
+
# Corresponds to the JSON property `auditConfigs`
|
1556
|
+
# @return [Array<Google::Apis::BatchV1::AuditConfig>]
|
1557
|
+
attr_accessor :audit_configs
|
1558
|
+
|
1559
|
+
# Associates a list of `members`, or principals, with a `role`. Optionally, may
|
1560
|
+
# specify a `condition` that determines how and when the `bindings` are applied.
|
1561
|
+
# Each of the `bindings` must contain at least one principal. The `bindings` in
|
1562
|
+
# a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
|
1563
|
+
# can be Google groups. Each occurrence of a principal counts towards these
|
1564
|
+
# limits. For example, if the `bindings` grant 50 different roles to `user:alice@
|
1565
|
+
# example.com`, and not to any other principal, then you can add another 1,450
|
1566
|
+
# principals to the `bindings` in the `Policy`.
|
1567
|
+
# Corresponds to the JSON property `bindings`
|
1568
|
+
# @return [Array<Google::Apis::BatchV1::Binding>]
|
1569
|
+
attr_accessor :bindings
|
1570
|
+
|
1571
|
+
# `etag` is used for optimistic concurrency control as a way to help prevent
|
1572
|
+
# simultaneous updates of a policy from overwriting each other. It is strongly
|
1573
|
+
# suggested that systems make use of the `etag` in the read-modify-write cycle
|
1574
|
+
# to perform policy updates in order to avoid race conditions: An `etag` is
|
1575
|
+
# returned in the response to `getIamPolicy`, and systems are expected to put
|
1576
|
+
# that etag in the request to `setIamPolicy` to ensure that their change will be
|
1577
|
+
# applied to the same version of the policy. **Important:** If you use IAM
|
1578
|
+
# Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
|
1579
|
+
# If you omit this field, then IAM allows you to overwrite a version `3` policy
|
1580
|
+
# with a version `1` policy, and all of the conditions in the version `3` policy
|
1581
|
+
# are lost.
|
1582
|
+
# Corresponds to the JSON property `etag`
|
1583
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1584
|
+
# @return [String]
|
1585
|
+
attr_accessor :etag
|
1586
|
+
|
1587
|
+
# Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
|
1588
|
+
# Requests that specify an invalid value are rejected. Any operation that
|
1589
|
+
# affects conditional role bindings must specify version `3`. This requirement
|
1590
|
+
# applies to the following operations: * Getting a policy that includes a
|
1591
|
+
# conditional role binding * Adding a conditional role binding to a policy *
|
1592
|
+
# Changing a conditional role binding in a policy * Removing any role binding,
|
1593
|
+
# with or without a condition, from a policy that includes conditions **
|
1594
|
+
# Important:** If you use IAM Conditions, you must include the `etag` field
|
1595
|
+
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
|
1596
|
+
# to overwrite a version `3` policy with a version `1` policy, and all of the
|
1597
|
+
# conditions in the version `3` policy are lost. If a policy does not include
|
1598
|
+
# any conditions, operations on that policy may specify any valid version or
|
1599
|
+
# leave the field unset. To learn which resources support conditions in their
|
1600
|
+
# IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
|
1601
|
+
# conditions/resource-policies).
|
1602
|
+
# Corresponds to the JSON property `version`
|
1603
|
+
# @return [Fixnum]
|
1604
|
+
attr_accessor :version
|
1605
|
+
|
1606
|
+
def initialize(**args)
|
1607
|
+
update!(**args)
|
1608
|
+
end
|
1609
|
+
|
1610
|
+
# Update properties of this object
|
1611
|
+
def update!(**args)
|
1612
|
+
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
|
1613
|
+
@bindings = args[:bindings] if args.key?(:bindings)
|
1614
|
+
@etag = args[:etag] if args.key?(:etag)
|
1615
|
+
@version = args[:version] if args.key?(:version)
|
1616
|
+
end
|
1617
|
+
end
|
1618
|
+
|
1619
|
+
# Request to report agent's state. The Request itself implies the agent is
|
1620
|
+
# healthy.
|
1621
|
+
class ReportAgentStateRequest
|
1622
|
+
include Google::Apis::Core::Hashable
|
1623
|
+
|
1624
|
+
# VM Agent Info.
|
1625
|
+
# Corresponds to the JSON property `agentInfo`
|
1626
|
+
# @return [Google::Apis::BatchV1::AgentInfo]
|
1627
|
+
attr_accessor :agent_info
|
1628
|
+
|
1629
|
+
# AgentMetadata never changes for a single instance of VM agent.
|
1630
|
+
# Corresponds to the JSON property `metadata`
|
1631
|
+
# @return [Google::Apis::BatchV1::AgentMetadata]
|
1632
|
+
attr_accessor :metadata
|
1633
|
+
|
1634
|
+
def initialize(**args)
|
1635
|
+
update!(**args)
|
1636
|
+
end
|
1637
|
+
|
1638
|
+
# Update properties of this object
|
1639
|
+
def update!(**args)
|
1640
|
+
@agent_info = args[:agent_info] if args.key?(:agent_info)
|
1641
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1642
|
+
end
|
1643
|
+
end
|
1644
|
+
|
1645
|
+
# Response to ReportAgentStateRequest.
|
1646
|
+
class ReportAgentStateResponse
|
1647
|
+
include Google::Apis::Core::Hashable
|
1648
|
+
|
1649
|
+
# Tasks assigned to the agent
|
1650
|
+
# Corresponds to the JSON property `tasks`
|
1651
|
+
# @return [Array<Google::Apis::BatchV1::AgentTask>]
|
1652
|
+
attr_accessor :tasks
|
1653
|
+
|
1654
|
+
def initialize(**args)
|
1655
|
+
update!(**args)
|
1656
|
+
end
|
1657
|
+
|
1658
|
+
# Update properties of this object
|
1659
|
+
def update!(**args)
|
1660
|
+
@tasks = args[:tasks] if args.key?(:tasks)
|
1661
|
+
end
|
1662
|
+
end
|
1663
|
+
|
1664
|
+
# Runnable describes instructions for executing a specific script or container
|
1665
|
+
# as part of a Task.
|
1666
|
+
class Runnable
|
1667
|
+
include Google::Apis::Core::Hashable
|
1668
|
+
|
1669
|
+
# By default, after a Runnable fails, no further Runnable are executed. This
|
1670
|
+
# flag indicates that this Runnable must be run even if the Task has already
|
1671
|
+
# failed. This is useful for Runnables that copy output files off of the VM or
|
1672
|
+
# for debugging. The always_run flag does not override the Task's overall
|
1673
|
+
# max_run_duration. If the max_run_duration has expired then no further
|
1674
|
+
# Runnables will execute, not even always_run Runnables.
|
1675
|
+
# Corresponds to the JSON property `alwaysRun`
|
1676
|
+
# @return [Boolean]
|
1677
|
+
attr_accessor :always_run
|
1678
|
+
alias_method :always_run?, :always_run
|
1679
|
+
|
1680
|
+
# This flag allows a Runnable to continue running in the background while the
|
1681
|
+
# Task executes subsequent Runnables. This is useful to provide services to
|
1682
|
+
# other Runnables (or to provide debugging support tools like SSH servers).
|
1683
|
+
# Corresponds to the JSON property `background`
|
1684
|
+
# @return [Boolean]
|
1685
|
+
attr_accessor :background
|
1686
|
+
alias_method :background?, :background
|
1687
|
+
|
1688
|
+
# Barrier runnable blocks until all tasks in a taskgroup reach it.
|
1689
|
+
# Corresponds to the JSON property `barrier`
|
1690
|
+
# @return [Google::Apis::BatchV1::Barrier]
|
1691
|
+
attr_accessor :barrier
|
1692
|
+
|
1693
|
+
# Container runnable.
|
1694
|
+
# Corresponds to the JSON property `container`
|
1695
|
+
# @return [Google::Apis::BatchV1::Container]
|
1696
|
+
attr_accessor :container
|
1697
|
+
|
1698
|
+
# An Environment describes a collection of environment variables to set when
|
1699
|
+
# executing Tasks.
|
1700
|
+
# Corresponds to the JSON property `environment`
|
1701
|
+
# @return [Google::Apis::BatchV1::Environment]
|
1702
|
+
attr_accessor :environment
|
1703
|
+
|
1704
|
+
# Normally, a non-zero exit status causes the Task to fail. This flag allows
|
1705
|
+
# execution of other Runnables to continue instead.
|
1706
|
+
# Corresponds to the JSON property `ignoreExitStatus`
|
1707
|
+
# @return [Boolean]
|
1708
|
+
attr_accessor :ignore_exit_status
|
1709
|
+
alias_method :ignore_exit_status?, :ignore_exit_status
|
1710
|
+
|
1711
|
+
# Script runnable.
|
1712
|
+
# Corresponds to the JSON property `script`
|
1713
|
+
# @return [Google::Apis::BatchV1::Script]
|
1714
|
+
attr_accessor :script
|
1715
|
+
|
1716
|
+
# Timeout for this Runnable.
|
1717
|
+
# Corresponds to the JSON property `timeout`
|
1718
|
+
# @return [String]
|
1719
|
+
attr_accessor :timeout
|
1720
|
+
|
1721
|
+
def initialize(**args)
|
1722
|
+
update!(**args)
|
1723
|
+
end
|
1724
|
+
|
1725
|
+
# Update properties of this object
|
1726
|
+
def update!(**args)
|
1727
|
+
@always_run = args[:always_run] if args.key?(:always_run)
|
1728
|
+
@background = args[:background] if args.key?(:background)
|
1729
|
+
@barrier = args[:barrier] if args.key?(:barrier)
|
1730
|
+
@container = args[:container] if args.key?(:container)
|
1731
|
+
@environment = args[:environment] if args.key?(:environment)
|
1732
|
+
@ignore_exit_status = args[:ignore_exit_status] if args.key?(:ignore_exit_status)
|
1733
|
+
@script = args[:script] if args.key?(:script)
|
1734
|
+
@timeout = args[:timeout] if args.key?(:timeout)
|
1735
|
+
end
|
1736
|
+
end
|
1737
|
+
|
1738
|
+
# Script runnable.
|
1739
|
+
class Script
|
1740
|
+
include Google::Apis::Core::Hashable
|
1741
|
+
|
1742
|
+
# Script file path on the host VM.
|
1743
|
+
# Corresponds to the JSON property `path`
|
1744
|
+
# @return [String]
|
1745
|
+
attr_accessor :path
|
1746
|
+
|
1747
|
+
# Shell script text.
|
1748
|
+
# Corresponds to the JSON property `text`
|
1749
|
+
# @return [String]
|
1750
|
+
attr_accessor :text
|
1751
|
+
|
1752
|
+
def initialize(**args)
|
1753
|
+
update!(**args)
|
1754
|
+
end
|
1755
|
+
|
1756
|
+
# Update properties of this object
|
1757
|
+
def update!(**args)
|
1758
|
+
@path = args[:path] if args.key?(:path)
|
1759
|
+
@text = args[:text] if args.key?(:text)
|
1760
|
+
end
|
1761
|
+
end
|
1762
|
+
|
1763
|
+
# Carries information about a Google Cloud service account.
|
1764
|
+
class ServiceAccount
|
1765
|
+
include Google::Apis::Core::Hashable
|
1766
|
+
|
1767
|
+
# Email address of the service account. If not specified, the default Compute
|
1768
|
+
# Engine service account for the project will be used. If instance template is
|
1769
|
+
# being used, the service account has to be specified in the instance template
|
1770
|
+
# and it has to match the email field here.
|
1771
|
+
# Corresponds to the JSON property `email`
|
1772
|
+
# @return [String]
|
1773
|
+
attr_accessor :email
|
1774
|
+
|
1775
|
+
def initialize(**args)
|
1776
|
+
update!(**args)
|
1777
|
+
end
|
1778
|
+
|
1779
|
+
# Update properties of this object
|
1780
|
+
def update!(**args)
|
1781
|
+
@email = args[:email] if args.key?(:email)
|
1782
|
+
end
|
1783
|
+
end
|
1784
|
+
|
1785
|
+
# Request message for `SetIamPolicy` method.
|
1786
|
+
class SetIamPolicyRequest
|
1787
|
+
include Google::Apis::Core::Hashable
|
1788
|
+
|
1789
|
+
# An Identity and Access Management (IAM) policy, which specifies access
|
1790
|
+
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
1791
|
+
# A `binding` binds one or more `members`, or principals, to a single `role`.
|
1792
|
+
# Principals can be user accounts, service accounts, Google groups, and domains (
|
1793
|
+
# such as G Suite). A `role` is a named list of permissions; each `role` can be
|
1794
|
+
# an IAM predefined role or a user-created custom role. For some types of Google
|
1795
|
+
# Cloud resources, a `binding` can also specify a `condition`, which is a
|
1796
|
+
# logical expression that allows access to a resource only if the expression
|
1797
|
+
# evaluates to `true`. A condition can add constraints based on attributes of
|
1798
|
+
# the request, the resource, or both. To learn which resources support
|
1799
|
+
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
1800
|
+
# google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
|
1801
|
+
# bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
|
1802
|
+
# "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
|
1803
|
+
# serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
|
1804
|
+
# roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
|
1805
|
+
# ], "condition": ` "title": "expirable access", "description": "Does not grant
|
1806
|
+
# access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
|
1807
|
+
# 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
|
1808
|
+
# bindings: - members: - user:mike@example.com - group:admins@example.com -
|
1809
|
+
# domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
1810
|
+
# role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
|
1811
|
+
# com role: roles/resourcemanager.organizationViewer condition: title: expirable
|
1812
|
+
# access description: Does not grant access after Sep 2020 expression: request.
|
1813
|
+
# time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
|
1814
|
+
# a description of IAM and its features, see the [IAM documentation](https://
|
1815
|
+
# cloud.google.com/iam/docs/).
|
1816
|
+
# Corresponds to the JSON property `policy`
|
1817
|
+
# @return [Google::Apis::BatchV1::Policy]
|
1818
|
+
attr_accessor :policy
|
1819
|
+
|
1820
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
1821
|
+
# the fields in the mask will be modified. If no mask is provided, the following
|
1822
|
+
# default mask is used: `paths: "bindings, etag"`
|
1823
|
+
# Corresponds to the JSON property `updateMask`
|
1824
|
+
# @return [String]
|
1825
|
+
attr_accessor :update_mask
|
1826
|
+
|
1827
|
+
def initialize(**args)
|
1828
|
+
update!(**args)
|
1829
|
+
end
|
1830
|
+
|
1831
|
+
# Update properties of this object
|
1832
|
+
def update!(**args)
|
1833
|
+
@policy = args[:policy] if args.key?(:policy)
|
1834
|
+
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
1835
|
+
end
|
1836
|
+
end
|
1837
|
+
|
1838
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1839
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1840
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1841
|
+
# data: error code, error message, and error details. You can find out more
|
1842
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1843
|
+
# //cloud.google.com/apis/design/errors).
|
1844
|
+
class Status
|
1845
|
+
include Google::Apis::Core::Hashable
|
1846
|
+
|
1847
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
1848
|
+
# Corresponds to the JSON property `code`
|
1849
|
+
# @return [Fixnum]
|
1850
|
+
attr_accessor :code
|
1851
|
+
|
1852
|
+
# A list of messages that carry the error details. There is a common set of
|
1853
|
+
# message types for APIs to use.
|
1854
|
+
# Corresponds to the JSON property `details`
|
1855
|
+
# @return [Array<Hash<String,Object>>]
|
1856
|
+
attr_accessor :details
|
1857
|
+
|
1858
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
1859
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
1860
|
+
# field, or localized by the client.
|
1861
|
+
# Corresponds to the JSON property `message`
|
1862
|
+
# @return [String]
|
1863
|
+
attr_accessor :message
|
1864
|
+
|
1865
|
+
def initialize(**args)
|
1866
|
+
update!(**args)
|
1867
|
+
end
|
1868
|
+
|
1869
|
+
# Update properties of this object
|
1870
|
+
def update!(**args)
|
1871
|
+
@code = args[:code] if args.key?(:code)
|
1872
|
+
@details = args[:details] if args.key?(:details)
|
1873
|
+
@message = args[:message] if args.key?(:message)
|
1874
|
+
end
|
1875
|
+
end
|
1876
|
+
|
1877
|
+
# Status event
|
1878
|
+
class StatusEvent
|
1879
|
+
include Google::Apis::Core::Hashable
|
1880
|
+
|
1881
|
+
# Description of the event.
|
1882
|
+
# Corresponds to the JSON property `description`
|
1883
|
+
# @return [String]
|
1884
|
+
attr_accessor :description
|
1885
|
+
|
1886
|
+
# The time this event occurred.
|
1887
|
+
# Corresponds to the JSON property `eventTime`
|
1888
|
+
# @return [String]
|
1889
|
+
attr_accessor :event_time
|
1890
|
+
|
1891
|
+
# This Task Execution field includes detail information for task execution
|
1892
|
+
# procedures, based on StatusEvent types.
|
1893
|
+
# Corresponds to the JSON property `taskExecution`
|
1894
|
+
# @return [Google::Apis::BatchV1::TaskExecution]
|
1895
|
+
attr_accessor :task_execution
|
1896
|
+
|
1897
|
+
# Type of the event.
|
1898
|
+
# Corresponds to the JSON property `type`
|
1899
|
+
# @return [String]
|
1900
|
+
attr_accessor :type
|
1901
|
+
|
1902
|
+
def initialize(**args)
|
1903
|
+
update!(**args)
|
1904
|
+
end
|
1905
|
+
|
1906
|
+
# Update properties of this object
|
1907
|
+
def update!(**args)
|
1908
|
+
@description = args[:description] if args.key?(:description)
|
1909
|
+
@event_time = args[:event_time] if args.key?(:event_time)
|
1910
|
+
@task_execution = args[:task_execution] if args.key?(:task_execution)
|
1911
|
+
@type = args[:type] if args.key?(:type)
|
1912
|
+
end
|
1913
|
+
end
|
1914
|
+
|
1915
|
+
# A Cloud Batch task.
|
1916
|
+
class Task
|
1917
|
+
include Google::Apis::Core::Hashable
|
1918
|
+
|
1919
|
+
# Task name. The name is generated from the parent TaskGroup name and 'id' field.
|
1920
|
+
# For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/
|
1921
|
+
# group01/tasks/task01".
|
1922
|
+
# Corresponds to the JSON property `name`
|
1923
|
+
# @return [String]
|
1924
|
+
attr_accessor :name
|
1925
|
+
|
1926
|
+
# Status of a task
|
1927
|
+
# Corresponds to the JSON property `status`
|
1928
|
+
# @return [Google::Apis::BatchV1::TaskStatus]
|
1929
|
+
attr_accessor :status
|
1930
|
+
|
1931
|
+
def initialize(**args)
|
1932
|
+
update!(**args)
|
1933
|
+
end
|
1934
|
+
|
1935
|
+
# Update properties of this object
|
1936
|
+
def update!(**args)
|
1937
|
+
@name = args[:name] if args.key?(:name)
|
1938
|
+
@status = args[:status] if args.key?(:status)
|
1939
|
+
end
|
1940
|
+
end
|
1941
|
+
|
1942
|
+
# This Task Execution field includes detail information for task execution
|
1943
|
+
# procedures, based on StatusEvent types.
|
1944
|
+
class TaskExecution
|
1945
|
+
include Google::Apis::Core::Hashable
|
1946
|
+
|
1947
|
+
# When task is completed as the status of FAILED or SUCCEEDED, exit code is for
|
1948
|
+
# one task execution result, default is 0 as success.
|
1949
|
+
# Corresponds to the JSON property `exitCode`
|
1950
|
+
# @return [Fixnum]
|
1951
|
+
attr_accessor :exit_code
|
1952
|
+
|
1953
|
+
def initialize(**args)
|
1954
|
+
update!(**args)
|
1955
|
+
end
|
1956
|
+
|
1957
|
+
# Update properties of this object
|
1958
|
+
def update!(**args)
|
1959
|
+
@exit_code = args[:exit_code] if args.key?(:exit_code)
|
1960
|
+
end
|
1961
|
+
end
|
1962
|
+
|
1963
|
+
# A TaskGroup contains one or multiple Tasks that share the same Runnable but
|
1964
|
+
# with different runtime parameters.
|
1965
|
+
class TaskGroup
|
1966
|
+
include Google::Apis::Core::Hashable
|
1967
|
+
|
1968
|
+
# Output only. TaskGroup name. The system generates this field based on parent
|
1969
|
+
# Job name. For example: "projects/123456/locations/us-west1/jobs/job01/
|
1970
|
+
# taskGroups/group01".
|
1971
|
+
# Corresponds to the JSON property `name`
|
1972
|
+
# @return [String]
|
1973
|
+
attr_accessor :name
|
1974
|
+
|
1975
|
+
# Max number of tasks that can run in parallel. Default to min(task_count, 1000).
|
1976
|
+
# Corresponds to the JSON property `parallelism`
|
1977
|
+
# @return [Fixnum]
|
1978
|
+
attr_accessor :parallelism
|
1979
|
+
|
1980
|
+
# When true, Batch will configure SSH to allow passwordless login between VMs
|
1981
|
+
# running the Batch tasks in the same TaskGroup.
|
1982
|
+
# Corresponds to the JSON property `permissiveSsh`
|
1983
|
+
# @return [Boolean]
|
1984
|
+
attr_accessor :permissive_ssh
|
1985
|
+
alias_method :permissive_ssh?, :permissive_ssh
|
1986
|
+
|
1987
|
+
# When true, Batch will populate a file with a list of all VMs assigned to the
|
1988
|
+
# TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of
|
1989
|
+
# that file. Defaults to false.
|
1990
|
+
# Corresponds to the JSON property `requireHostsFile`
|
1991
|
+
# @return [Boolean]
|
1992
|
+
attr_accessor :require_hosts_file
|
1993
|
+
alias_method :require_hosts_file?, :require_hosts_file
|
1994
|
+
|
1995
|
+
# Number of Tasks in the TaskGroup. default is 1
|
1996
|
+
# Corresponds to the JSON property `taskCount`
|
1997
|
+
# @return [Fixnum]
|
1998
|
+
attr_accessor :task_count
|
1999
|
+
|
2000
|
+
# Max number of tasks that can be run on a VM at the same time. If not specified,
|
2001
|
+
# the system will decide a value based on available compute resources on a VM
|
2002
|
+
# and task requirements.
|
2003
|
+
# Corresponds to the JSON property `taskCountPerNode`
|
2004
|
+
# @return [Fixnum]
|
2005
|
+
attr_accessor :task_count_per_node
|
2006
|
+
|
2007
|
+
# An array of environment variable mappings, which are passed to Tasks with
|
2008
|
+
# matching indices. If task_environments is used then task_count should not be
|
2009
|
+
# specified in the request (and will be ignored). Task count will be the length
|
2010
|
+
# of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT
|
2011
|
+
# environment variable, in addition to any environment variables set in
|
2012
|
+
# task_environments, specifying the number of Tasks in the Task's parent
|
2013
|
+
# TaskGroup, and the specific Task's index in the TaskGroup (0 through
|
2014
|
+
# BATCH_TASK_COUNT - 1). task_environments supports up to 200 entries.
|
2015
|
+
# Corresponds to the JSON property `taskEnvironments`
|
2016
|
+
# @return [Array<Google::Apis::BatchV1::Environment>]
|
2017
|
+
attr_accessor :task_environments
|
2018
|
+
|
2019
|
+
# Spec of a task
|
2020
|
+
# Corresponds to the JSON property `taskSpec`
|
2021
|
+
# @return [Google::Apis::BatchV1::TaskSpec]
|
2022
|
+
attr_accessor :task_spec
|
2023
|
+
|
2024
|
+
def initialize(**args)
|
2025
|
+
update!(**args)
|
2026
|
+
end
|
2027
|
+
|
2028
|
+
# Update properties of this object
|
2029
|
+
def update!(**args)
|
2030
|
+
@name = args[:name] if args.key?(:name)
|
2031
|
+
@parallelism = args[:parallelism] if args.key?(:parallelism)
|
2032
|
+
@permissive_ssh = args[:permissive_ssh] if args.key?(:permissive_ssh)
|
2033
|
+
@require_hosts_file = args[:require_hosts_file] if args.key?(:require_hosts_file)
|
2034
|
+
@task_count = args[:task_count] if args.key?(:task_count)
|
2035
|
+
@task_count_per_node = args[:task_count_per_node] if args.key?(:task_count_per_node)
|
2036
|
+
@task_environments = args[:task_environments] if args.key?(:task_environments)
|
2037
|
+
@task_spec = args[:task_spec] if args.key?(:task_spec)
|
2038
|
+
end
|
2039
|
+
end
|
2040
|
+
|
2041
|
+
# Aggregated task status for a TaskGroup.
|
2042
|
+
class TaskGroupStatus
|
2043
|
+
include Google::Apis::Core::Hashable
|
2044
|
+
|
2045
|
+
# Count of task in each state in the TaskGroup. The map key is task state name.
|
2046
|
+
# Corresponds to the JSON property `counts`
|
2047
|
+
# @return [Hash<String,Fixnum>]
|
2048
|
+
attr_accessor :counts
|
2049
|
+
|
2050
|
+
# Status of instances allocated for the TaskGroup.
|
2051
|
+
# Corresponds to the JSON property `instances`
|
2052
|
+
# @return [Array<Google::Apis::BatchV1::InstanceStatus>]
|
2053
|
+
attr_accessor :instances
|
2054
|
+
|
2055
|
+
def initialize(**args)
|
2056
|
+
update!(**args)
|
2057
|
+
end
|
2058
|
+
|
2059
|
+
# Update properties of this object
|
2060
|
+
def update!(**args)
|
2061
|
+
@counts = args[:counts] if args.key?(:counts)
|
2062
|
+
@instances = args[:instances] if args.key?(:instances)
|
2063
|
+
end
|
2064
|
+
end
|
2065
|
+
|
2066
|
+
# Spec of a task
|
2067
|
+
class TaskSpec
|
2068
|
+
include Google::Apis::Core::Hashable
|
2069
|
+
|
2070
|
+
# Compute resource requirements
|
2071
|
+
# Corresponds to the JSON property `computeResource`
|
2072
|
+
# @return [Google::Apis::BatchV1::ComputeResource]
|
2073
|
+
attr_accessor :compute_resource
|
2074
|
+
|
2075
|
+
# An Environment describes a collection of environment variables to set when
|
2076
|
+
# executing Tasks.
|
2077
|
+
# Corresponds to the JSON property `environment`
|
2078
|
+
# @return [Google::Apis::BatchV1::Environment]
|
2079
|
+
attr_accessor :environment
|
2080
|
+
|
2081
|
+
# Environment variables to set before running the Task. You can set up to 100
|
2082
|
+
# environments.
|
2083
|
+
# Corresponds to the JSON property `environments`
|
2084
|
+
# @return [Hash<String,String>]
|
2085
|
+
attr_accessor :environments
|
2086
|
+
|
2087
|
+
# Lifecycle management schema when any task in a task group is failed. The valid
|
2088
|
+
# size of lifecycle policies are [0, 10]. For each lifecycle policy, when the
|
2089
|
+
# condition is met, the action in that policy will execute. If there are
|
2090
|
+
# multiple policies that the task execution result matches, we use the action
|
2091
|
+
# from the first matched policy. If task execution result does not meet with any
|
2092
|
+
# of the defined lifecycle policy, we consider it as the default policy. Default
|
2093
|
+
# policy means if the exit code is 0, exit task. If task ends with non-zero exit
|
2094
|
+
# code, retry the task with max_retry_count.
|
2095
|
+
# Corresponds to the JSON property `lifecyclePolicies`
|
2096
|
+
# @return [Array<Google::Apis::BatchV1::LifecyclePolicy>]
|
2097
|
+
attr_accessor :lifecycle_policies
|
2098
|
+
|
2099
|
+
# Maximum number of retries on failures. The default, 0, which means never retry.
|
2100
|
+
# The valid value range is [0, 10].
|
2101
|
+
# Corresponds to the JSON property `maxRetryCount`
|
2102
|
+
# @return [Fixnum]
|
2103
|
+
attr_accessor :max_retry_count
|
2104
|
+
|
2105
|
+
# Maximum duration the task should run. The task will be killed and marked as
|
2106
|
+
# FAILED if over this limit.
|
2107
|
+
# Corresponds to the JSON property `maxRunDuration`
|
2108
|
+
# @return [String]
|
2109
|
+
attr_accessor :max_run_duration
|
2110
|
+
|
2111
|
+
# The sequence of scripts or containers to run for this Task. Each Task using
|
2112
|
+
# this TaskSpec executes its list of runnables in order. The Task succeeds if
|
2113
|
+
# all of its runnables either exit with a zero status or any that exit with a
|
2114
|
+
# non-zero status have the ignore_exit_status flag. Background runnables are
|
2115
|
+
# killed automatically (if they have not already exited) a short time after all
|
2116
|
+
# foreground runnables have completed. Even though this is likely to result in a
|
2117
|
+
# non-zero exit status for the background runnable, these automatic kills are
|
2118
|
+
# not treated as Task failures.
|
2119
|
+
# Corresponds to the JSON property `runnables`
|
2120
|
+
# @return [Array<Google::Apis::BatchV1::Runnable>]
|
2121
|
+
attr_accessor :runnables
|
2122
|
+
|
2123
|
+
# Volumes to mount before running Tasks using this TaskSpec.
|
2124
|
+
# Corresponds to the JSON property `volumes`
|
2125
|
+
# @return [Array<Google::Apis::BatchV1::Volume>]
|
2126
|
+
attr_accessor :volumes
|
2127
|
+
|
2128
|
+
def initialize(**args)
|
2129
|
+
update!(**args)
|
2130
|
+
end
|
2131
|
+
|
2132
|
+
# Update properties of this object
|
2133
|
+
def update!(**args)
|
2134
|
+
@compute_resource = args[:compute_resource] if args.key?(:compute_resource)
|
2135
|
+
@environment = args[:environment] if args.key?(:environment)
|
2136
|
+
@environments = args[:environments] if args.key?(:environments)
|
2137
|
+
@lifecycle_policies = args[:lifecycle_policies] if args.key?(:lifecycle_policies)
|
2138
|
+
@max_retry_count = args[:max_retry_count] if args.key?(:max_retry_count)
|
2139
|
+
@max_run_duration = args[:max_run_duration] if args.key?(:max_run_duration)
|
2140
|
+
@runnables = args[:runnables] if args.key?(:runnables)
|
2141
|
+
@volumes = args[:volumes] if args.key?(:volumes)
|
2142
|
+
end
|
2143
|
+
end
|
2144
|
+
|
2145
|
+
# Status of a task
|
2146
|
+
class TaskStatus
|
2147
|
+
include Google::Apis::Core::Hashable
|
2148
|
+
|
2149
|
+
# Task state
|
2150
|
+
# Corresponds to the JSON property `state`
|
2151
|
+
# @return [String]
|
2152
|
+
attr_accessor :state
|
2153
|
+
|
2154
|
+
# Detailed info about why the state is reached.
|
2155
|
+
# Corresponds to the JSON property `statusEvents`
|
2156
|
+
# @return [Array<Google::Apis::BatchV1::StatusEvent>]
|
2157
|
+
attr_accessor :status_events
|
2158
|
+
|
2159
|
+
def initialize(**args)
|
2160
|
+
update!(**args)
|
2161
|
+
end
|
2162
|
+
|
2163
|
+
# Update properties of this object
|
2164
|
+
def update!(**args)
|
2165
|
+
@state = args[:state] if args.key?(:state)
|
2166
|
+
@status_events = args[:status_events] if args.key?(:status_events)
|
2167
|
+
end
|
2168
|
+
end
|
2169
|
+
|
2170
|
+
# Request message for `TestIamPermissions` method.
|
2171
|
+
class TestIamPermissionsRequest
|
2172
|
+
include Google::Apis::Core::Hashable
|
2173
|
+
|
2174
|
+
# The set of permissions to check for the `resource`. Permissions with wildcards
|
2175
|
+
# (such as `*` or `storage.*`) are not allowed. For more information see [IAM
|
2176
|
+
# Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
2177
|
+
# Corresponds to the JSON property `permissions`
|
2178
|
+
# @return [Array<String>]
|
2179
|
+
attr_accessor :permissions
|
2180
|
+
|
2181
|
+
def initialize(**args)
|
2182
|
+
update!(**args)
|
2183
|
+
end
|
2184
|
+
|
2185
|
+
# Update properties of this object
|
2186
|
+
def update!(**args)
|
2187
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
2188
|
+
end
|
2189
|
+
end
|
2190
|
+
|
2191
|
+
# Response message for `TestIamPermissions` method.
|
2192
|
+
class TestIamPermissionsResponse
|
2193
|
+
include Google::Apis::Core::Hashable
|
2194
|
+
|
2195
|
+
# A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
|
2196
|
+
# Corresponds to the JSON property `permissions`
|
2197
|
+
# @return [Array<String>]
|
2198
|
+
attr_accessor :permissions
|
2199
|
+
|
2200
|
+
def initialize(**args)
|
2201
|
+
update!(**args)
|
2202
|
+
end
|
2203
|
+
|
2204
|
+
# Update properties of this object
|
2205
|
+
def update!(**args)
|
2206
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
2207
|
+
end
|
2208
|
+
end
|
2209
|
+
|
2210
|
+
# Volume describes a volume and parameters for it to be mounted to a VM.
|
2211
|
+
class Volume
|
2212
|
+
include Google::Apis::Core::Hashable
|
2213
|
+
|
2214
|
+
# Device name of an attached disk volume, which should align with a device_name
|
2215
|
+
# specified by job.allocation_policy.instances[0].policy.disks[i].device_name or
|
2216
|
+
# defined by the given instance template in job.allocation_policy.instances[0].
|
2217
|
+
# instance_template.
|
2218
|
+
# Corresponds to the JSON property `deviceName`
|
2219
|
+
# @return [String]
|
2220
|
+
attr_accessor :device_name
|
2221
|
+
|
2222
|
+
# Represents a Google Cloud Storage volume.
|
2223
|
+
# Corresponds to the JSON property `gcs`
|
2224
|
+
# @return [Google::Apis::BatchV1::Gcs]
|
2225
|
+
attr_accessor :gcs
|
2226
|
+
|
2227
|
+
# For Google Cloud Storage (GCS), mount options are the options supported by the
|
2228
|
+
# gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). For existing
|
2229
|
+
# persistent disks, mount options provided by the mount command (https://man7.
|
2230
|
+
# org/linux/man-pages/man8/mount.8.html) except writing are supported. This is
|
2231
|
+
# due to restrictions of multi-writer mode (https://cloud.google.com/compute/
|
2232
|
+
# docs/disks/sharing-disks-between-vms). For other attached disks and Network
|
2233
|
+
# File System (NFS), mount options are these supported by the mount command (
|
2234
|
+
# https://man7.org/linux/man-pages/man8/mount.8.html).
|
2235
|
+
# Corresponds to the JSON property `mountOptions`
|
2236
|
+
# @return [Array<String>]
|
2237
|
+
attr_accessor :mount_options
|
2238
|
+
|
2239
|
+
# The mount path for the volume, e.g. /mnt/disks/share.
|
2240
|
+
# Corresponds to the JSON property `mountPath`
|
2241
|
+
# @return [String]
|
2242
|
+
attr_accessor :mount_path
|
2243
|
+
|
2244
|
+
# Represents an NFS volume.
|
2245
|
+
# Corresponds to the JSON property `nfs`
|
2246
|
+
# @return [Google::Apis::BatchV1::Nfs]
|
2247
|
+
attr_accessor :nfs
|
2248
|
+
|
2249
|
+
def initialize(**args)
|
2250
|
+
update!(**args)
|
2251
|
+
end
|
2252
|
+
|
2253
|
+
# Update properties of this object
|
2254
|
+
def update!(**args)
|
2255
|
+
@device_name = args[:device_name] if args.key?(:device_name)
|
2256
|
+
@gcs = args[:gcs] if args.key?(:gcs)
|
2257
|
+
@mount_options = args[:mount_options] if args.key?(:mount_options)
|
2258
|
+
@mount_path = args[:mount_path] if args.key?(:mount_path)
|
2259
|
+
@nfs = args[:nfs] if args.key?(:nfs)
|
2260
|
+
end
|
2261
|
+
end
|
2262
|
+
end
|
2263
|
+
end
|
2264
|
+
end
|