Class: Google::Apis::BatchV1::Job
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::Job
- 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
-
#allocation_policy ⇒ Google::Apis::BatchV1::AllocationPolicy
A Job's resource allocation policy describes when, where, and how compute resources should be allocated for the Job.
-
#create_time ⇒ String
Output only.
-
#labels ⇒ Hash<String,String>
Labels for the Job.
-
#logs_policy ⇒ Google::Apis::BatchV1::LogsPolicy
LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be preserved.
-
#name ⇒ String
Output only.
-
#notifications ⇒ Array<Google::Apis::BatchV1::JobNotification>
Notification configurations.
-
#priority ⇒ Fixnum
Priority of the Job.
-
#status ⇒ Google::Apis::BatchV1::JobStatus
Job status.
-
#task_groups ⇒ Array<Google::Apis::BatchV1::TaskGroup>
Required.
-
#uid ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Job
constructor
A new instance of Job.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Job
Returns a new instance of Job.
1353 1354 1355 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1353 def initialize(**args) update!(**args) end |
Instance Attribute Details
#allocation_policy ⇒ Google::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
1293 1294 1295 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1293 def allocation_policy @allocation_policy end |
#create_time ⇒ String
Output only. When the Job was created.
Corresponds to the JSON property createTime
1298 1299 1300 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1298 def create_time @create_time end |
#labels ⇒ Hash<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
1307 1308 1309 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1307 def labels @labels end |
#logs_policy ⇒ Google::Apis::BatchV1::LogsPolicy
LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be
preserved.
Corresponds to the JSON property logsPolicy
1313 1314 1315 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1313 def logs_policy @logs_policy end |
#name ⇒ String
Output only. Job name. For example: "projects/123456/locations/us-central1/
jobs/job01".
Corresponds to the JSON property name
1319 1320 1321 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1319 def name @name end |
#notifications ⇒ Array<Google::Apis::BatchV1::JobNotification>
Notification configurations.
Corresponds to the JSON property notifications
1324 1325 1326 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1324 def notifications @notifications end |
#priority ⇒ Fixnum
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
1331 1332 1333 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1331 def priority @priority end |
#status ⇒ Google::Apis::BatchV1::JobStatus
Job status.
Corresponds to the JSON property status
1336 1337 1338 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1336 def status @status end |
#task_groups ⇒ Array<Google::Apis::BatchV1::TaskGroup>
Required. TaskGroups in the Job. Only one TaskGroup is supported now.
Corresponds to the JSON property taskGroups
1341 1342 1343 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1341 def task_groups @task_groups end |
#uid ⇒ String
Output only. A system generated unique ID for the Job.
Corresponds to the JSON property uid
1346 1347 1348 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1346 def uid @uid end |
#update_time ⇒ String
Output only. The last time the Job was updated.
Corresponds to the JSON property updateTime
1351 1352 1353 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1351 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1358 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 |