Reference documentation and code samples for the Google Cloud Batch V1 Client class Job.
The Cloud Batch Job description.
Generated from protobuf messagegoogle.cloud.batch.v1.Job
Namespace
Google \ Cloud \ Batch \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
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 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.
Custom labels to apply to the job and any Cloud LoggingLogEntrythat it generates. Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiplelabelsfields 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, seeOrganize resources using labels.
For example: "projects/123456/locations/us-central1/jobs/job01".
Returns
Type
Description
string
setName
Output only. Job name.
For example: "projects/123456/locations/us-central1/jobs/job01".
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getUid
Output only. A system generated unique ID for the Job.
Returns
Type
Description
string
setUid
Output only. A system generated unique ID for the Job.
Parameter
Name
Description
var
string
Returns
Type
Description
$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
Type
Description
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
Name
Description
var
int|string
Returns
Type
Description
$this
getTaskGroups
Required. TaskGroups in the Job. Only one TaskGroup is supported now.
Custom labels to apply to the job and any Cloud LoggingLogEntrythat it generates.
Use labels to group and describe the resources they are applied to. Batch
automatically applies predefined labels and supports multiplelabelsfields 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, seeOrganize resources using
labels.
Custom labels to apply to the job and any Cloud LoggingLogEntrythat it generates.
Use labels to group and describe the resources they are applied to. Batch
automatically applies predefined labels and supports multiplelabelsfields 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, seeOrganize resources using
labels.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Batch V1 Client - Class Job (1.2.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.2 (latest)](/php/docs/reference/cloud-batch/latest/V1.Job)\n- [1.2.1](/php/docs/reference/cloud-batch/1.2.1/V1.Job)\n- [1.1.7](/php/docs/reference/cloud-batch/1.1.7/V1.Job)\n- [1.0.3](/php/docs/reference/cloud-batch/1.0.3/V1.Job)\n- [0.17.0](/php/docs/reference/cloud-batch/0.17.0/V1.Job)\n- [0.16.10](/php/docs/reference/cloud-batch/0.16.10/V1.Job)\n- [0.15.0](/php/docs/reference/cloud-batch/0.15.0/V1.Job)\n- [0.14.0](/php/docs/reference/cloud-batch/0.14.0/V1.Job)\n- [0.13.1](/php/docs/reference/cloud-batch/0.13.1/V1.Job)\n- [0.12.1](/php/docs/reference/cloud-batch/0.12.1/V1.Job)\n- [0.11.3](/php/docs/reference/cloud-batch/0.11.3/V1.Job)\n- [0.10.0](/php/docs/reference/cloud-batch/0.10.0/V1.Job)\n- [0.9.0](/php/docs/reference/cloud-batch/0.9.0/V1.Job)\n- [0.8.0](/php/docs/reference/cloud-batch/0.8.0/V1.Job)\n- [0.7.0](/php/docs/reference/cloud-batch/0.7.0/V1.Job)\n- [0.6.0](/php/docs/reference/cloud-batch/0.6.0/V1.Job)\n- [0.5.2](/php/docs/reference/cloud-batch/0.5.2/V1.Job)\n- [0.4.0](/php/docs/reference/cloud-batch/0.4.0/V1.Job)\n- [0.3.0](/php/docs/reference/cloud-batch/0.3.0/V1.Job)\n- [0.2.2](/php/docs/reference/cloud-batch/0.2.2/V1.Job) \nReference documentation and code samples for the Google Cloud Batch V1 Client class Job.\n\nThe Cloud Batch Job description.\n\nGenerated from protobuf message `google.cloud.batch.v1.Job`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Batch \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nOutput only. Job name.\n\nFor example: \"projects/123456/locations/us-central1/jobs/job01\".\n\n### setName\n\nOutput only. Job name.\n\nFor example: \"projects/123456/locations/us-central1/jobs/job01\".\n\n### getUid\n\nOutput only. A system generated unique ID for the Job.\n\n### setUid\n\nOutput only. A system generated unique ID for the Job.\n\n### getPriority\n\nPriority of the Job.\n\nThe valid value range is \\[0, 100). Default value is 0.\nHigher value indicates higher priority.\nA job with higher priority value is more likely to run earlier if all other\nrequirements are satisfied.\n\n### setPriority\n\nPriority of the Job.\n\nThe valid value range is \\[0, 100). Default value is 0.\nHigher value indicates higher priority.\nA job with higher priority value is more likely to run earlier if all other\nrequirements are satisfied.\n\n### getTaskGroups\n\nRequired. TaskGroups in the Job. Only one TaskGroup is supported now.\n\n### setTaskGroups\n\nRequired. TaskGroups in the Job. Only one TaskGroup is supported now.\n\n### getAllocationPolicy\n\nCompute resource allocation for all TaskGroups in the Job.\n\n### hasAllocationPolicy\n\n### clearAllocationPolicy\n\n### setAllocationPolicy\n\nCompute resource allocation for all TaskGroups in the Job.\n\n### getLabels\n\nCustom labels to apply to the job and any Cloud Logging\n[LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)\nthat it generates.\n\nUse labels to group and describe the resources they are applied to. Batch\nautomatically applies predefined labels and supports multiple `labels`\nfields for each job, which each let you apply custom labels to various\nresources. Label names that start with \"goog-\" or \"google-\" are\nreserved for predefined labels. For more information about labels with\nBatch, see\n[Organize resources using\nlabels](https://cloud.google.com/batch/docs/organize-resources-using-labels).\n\n### setLabels\n\nCustom labels to apply to the job and any Cloud Logging\n[LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)\nthat it generates.\n\nUse labels to group and describe the resources they are applied to. Batch\nautomatically applies predefined labels and supports multiple `labels`\nfields for each job, which each let you apply custom labels to various\nresources. Label names that start with \"goog-\" or \"google-\" are\nreserved for predefined labels. For more information about labels with\nBatch, see\n[Organize resources using\nlabels](https://cloud.google.com/batch/docs/organize-resources-using-labels).\n\n### getStatus\n\nOutput only. Job status. It is read only for users.\n\n### hasStatus\n\n### clearStatus\n\n### setStatus\n\nOutput only. Job status. It is read only for users.\n\n### getCreateTime\n\nOutput only. When the Job was created.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. When the Job was created.\n\n### getUpdateTime\n\nOutput only. The last time the Job was updated.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. The last time the Job was updated.\n\n### getLogsPolicy\n\nLog preservation policy for the Job.\n\n### hasLogsPolicy\n\n### clearLogsPolicy\n\n### setLogsPolicy\n\nLog preservation policy for the Job.\n\n### getNotifications\n\nNotification configurations.\n\n### setNotifications\n\nNotification configurations."]]