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.



1366
1367
1368
# File 'lib/google/apis/batch_v1/classes.rb', line 1366

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



1300
1301
1302
# File 'lib/google/apis/batch_v1/classes.rb', line 1300

def allocation_policy
  @allocation_policy
end

#create_timeString

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

Returns:

  • (String)


1305
1306
1307
# File 'lib/google/apis/batch_v1/classes.rb', line 1305

def create_time
  @create_time
end

#labelsHash<String,String>

Custom labels to apply to the job and any Cloud Logging LogEntry that it generates. Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple labels fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see Organize resources using labels. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1318
1319
1320
# File 'lib/google/apis/batch_v1/classes.rb', line 1318

def labels
  @labels
end

#logs_policyGoogle::Apis::BatchV1::LogsPolicy

LogsPolicy describes if and how a job's logs are preserved. Logs include information that is automatically written by the Batch service agent and any information that you configured the job's runnables to write to the stdout or stderr streams. Corresponds to the JSON property logsPolicy



1326
1327
1328
# File 'lib/google/apis/batch_v1/classes.rb', line 1326

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)


1332
1333
1334
# File 'lib/google/apis/batch_v1/classes.rb', line 1332

def name
  @name
end

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

Notification configurations. Corresponds to the JSON property notifications



1337
1338
1339
# File 'lib/google/apis/batch_v1/classes.rb', line 1337

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)


1344
1345
1346
# File 'lib/google/apis/batch_v1/classes.rb', line 1344

def priority
  @priority
end

#statusGoogle::Apis::BatchV1::JobStatus

Job status. Corresponds to the JSON property status



1349
1350
1351
# File 'lib/google/apis/batch_v1/classes.rb', line 1349

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



1354
1355
1356
# File 'lib/google/apis/batch_v1/classes.rb', line 1354

def task_groups
  @task_groups
end

#uidString

Output only. A system generated unique ID for the Job. Corresponds to the JSON property uid

Returns:

  • (String)


1359
1360
1361
# File 'lib/google/apis/batch_v1/classes.rb', line 1359

def uid
  @uid
end

#update_timeString

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

Returns:

  • (String)


1364
1365
1366
# File 'lib/google/apis/batch_v1/classes.rb', line 1364

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
# File 'lib/google/apis/batch_v1/classes.rb', line 1371

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