Google Cloud Batch V1 Client - Class Job (0.11.3)

Reference documentation and code samples for the Google Cloud Batch V1 Client class Job.

The Cloud Batch Job description.

Generated from protobuf message google.cloud.batch.v1.Job

Namespace

Google \ Cloud \ Batch \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. Job name. For example: "projects/123456/locations/us-central1/jobs/job01".

↳ uid string

Output only. A system generated unique ID (in UUID4 format) for the Job.

↳ priority int|string

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.

↳ task_groups array<Google\Cloud\Batch\V1\TaskGroup>

Required. TaskGroups in the Job. Only one TaskGroup is supported now.

↳ allocation_policy Google\Cloud\Batch\V1\AllocationPolicy

Compute resource allocation for all TaskGroups in the Job.

↳ labels array|Google\Protobuf\Internal\MapField

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.

↳ status Google\Cloud\Batch\V1\JobStatus

Output only. Job status. It is read only for users.

↳ create_time Google\Protobuf\Timestamp

Output only. When the Job was created.

↳ update_time Google\Protobuf\Timestamp

Output only. The last time the Job was updated.

↳ logs_policy Google\Cloud\Batch\V1\LogsPolicy

Log preservation policy for the Job.

↳ notifications array<Google\Cloud\Batch\V1\JobNotification>

Notification configurations.

getName

Output only. Job name.

For example: "projects/123456/locations/us-central1/jobs/job01".

Returns
TypeDescription
string

setName

Output only. Job name.

For example: "projects/123456/locations/us-central1/jobs/job01".

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUid

Output only. A system generated unique ID (in UUID4 format) for the Job.

Returns
TypeDescription
string

setUid

Output only. A system generated unique ID (in UUID4 format) for the Job.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getPriority

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.

Returns
TypeDescription
int|string

setPriority

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.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getTaskGroups

Required. TaskGroups in the Job. Only one TaskGroup is supported now.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setTaskGroups

Required. TaskGroups in the Job. Only one TaskGroup is supported now.

Parameter
NameDescription
var array<Google\Cloud\Batch\V1\TaskGroup>
Returns
TypeDescription
$this

getAllocationPolicy

Compute resource allocation for all TaskGroups in the Job.

Returns
TypeDescription
Google\Cloud\Batch\V1\AllocationPolicy|null

hasAllocationPolicy

clearAllocationPolicy

setAllocationPolicy

Compute resource allocation for all TaskGroups in the Job.

Parameter
NameDescription
var Google\Cloud\Batch\V1\AllocationPolicy
Returns
TypeDescription
$this

getLabels

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.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

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.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getStatus

Output only. Job status. It is read only for users.

Returns
TypeDescription
Google\Cloud\Batch\V1\JobStatus|null

hasStatus

clearStatus

setStatus

Output only. Job status. It is read only for users.

Parameter
NameDescription
var Google\Cloud\Batch\V1\JobStatus
Returns
TypeDescription
$this

getCreateTime

Output only. When the Job was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. When the Job was created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

Output only. The last time the Job was updated.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The last time the Job was updated.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getLogsPolicy

Log preservation policy for the Job.

Returns
TypeDescription
Google\Cloud\Batch\V1\LogsPolicy|null

hasLogsPolicy

clearLogsPolicy

setLogsPolicy

Log preservation policy for the Job.

Parameter
NameDescription
var Google\Cloud\Batch\V1\LogsPolicy
Returns
TypeDescription
$this

getNotifications

Notification configurations.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setNotifications

Notification configurations.

Parameter
NameDescription
var array<Google\Cloud\Batch\V1\JobNotification>
Returns
TypeDescription
$this