Class: Google::Apis::BatchV1::Job

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

Overview

The Cloud Batch Job description.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Job

Returns a new instance of Job.



1271
1272
1273
# File 'lib/google/apis/batch_v1/classes.rb', line 1271

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

Instance Attribute Details

#allocation_policyGoogle::Apis::BatchV1::AllocationPolicy

A Job's resource allocation policy describes when, where, and how compute resources should be allocated for the Job. Corresponds to the JSON property allocationPolicy



1211
1212
1213
# File 'lib/google/apis/batch_v1/classes.rb', line 1211

def allocation_policy
  @allocation_policy
end

#create_timeString

Output only. When the Job was created. Corresponds to the JSON property createTime

Returns:

  • (String)


1216
1217
1218
# File 'lib/google/apis/batch_v1/classes.rb', line 1216

def create_time
  @create_time
end

#labelsHash<String,String>

Labels for the Job. Labels could be user provided or system generated. For example, "labels": "department": "finance", "environment": "test" You can assign up to 64 labels. Google Compute Engine label restrictions apply. Label names that start with "goog-" or "google-" are reserved. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1225
1226
1227
# File 'lib/google/apis/batch_v1/classes.rb', line 1225

def labels
  @labels
end

#logs_policyGoogle::Apis::BatchV1::LogsPolicy

LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be preserved. Corresponds to the JSON property logsPolicy



1231
1232
1233
# File 'lib/google/apis/batch_v1/classes.rb', line 1231

def logs_policy
  @logs_policy
end

#nameString

Output only. Job name. For example: "projects/123456/locations/us-central1/ jobs/job01". Corresponds to the JSON property name

Returns:

  • (String)


1237
1238
1239
# File 'lib/google/apis/batch_v1/classes.rb', line 1237

def name
  @name
end

#notificationsArray<Google::Apis::BatchV1::JobNotification>

Notification configurations. Corresponds to the JSON property notifications



1242
1243
1244
# File 'lib/google/apis/batch_v1/classes.rb', line 1242

def notifications
  @notifications
end

#priorityFixnum

Priority of the Job. The valid value range is [0, 100). Default value is 0. Higher value indicates higher priority. A job with higher priority value is more likely to run earlier if all other requirements are satisfied. Corresponds to the JSON property priority

Returns:

  • (Fixnum)


1249
1250
1251
# File 'lib/google/apis/batch_v1/classes.rb', line 1249

def priority
  @priority
end

#statusGoogle::Apis::BatchV1::JobStatus

Job status. Corresponds to the JSON property status



1254
1255
1256
# File 'lib/google/apis/batch_v1/classes.rb', line 1254

def status
  @status
end

#task_groupsArray<Google::Apis::BatchV1::TaskGroup>

Required. TaskGroups in the Job. Only one TaskGroup is supported now. Corresponds to the JSON property taskGroups



1259
1260
1261
# File 'lib/google/apis/batch_v1/classes.rb', line 1259

def task_groups
  @task_groups
end

#uidString

Output only. A system generated unique ID (in UUID4 format) for the Job. Corresponds to the JSON property uid

Returns:

  • (String)


1264
1265
1266
# File 'lib/google/apis/batch_v1/classes.rb', line 1264

def uid
  @uid
end

#update_timeString

Output only. The last time the Job was updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


1269
1270
1271
# File 'lib/google/apis/batch_v1/classes.rb', line 1269

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
# File 'lib/google/apis/batch_v1/classes.rb', line 1276

def update!(**args)
  @allocation_policy = args[:allocation_policy] if args.key?(:allocation_policy)
  @create_time = args[:create_time] if args.key?(:create_time)
  @labels = args[:labels] if args.key?(:labels)
  @logs_policy = args[:logs_policy] if args.key?(:logs_policy)
  @name = args[:name] if args.key?(:name)
  @notifications = args[:notifications] if args.key?(:notifications)
  @priority = args[:priority] if args.key?(:priority)
  @status = args[:status] if args.key?(:status)
  @task_groups = args[:task_groups] if args.key?(:task_groups)
  @uid = args[:uid] if args.key?(:uid)
  @update_time = args[:update_time] if args.key?(:update_time)
end