Reference documentation and code samples for the Google Cloud Batch V1 Client class CreateJobRequest.
CreateJob Request.
Generated from protobuf messagegoogle.cloud.batch.v1.CreateJobRequest
Namespace
Google \ Cloud \ Batch \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ parent
string
Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}"
↳ job_id
string
ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set. The job.name field in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}".
Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
getParent
Required. The parent resource name where the Job will be created.
ID used to uniquely identify the Job within its parent scope.
This field should contain at most 63 characters and must start with
lowercase characters.
Only lowercase characters, numbers and '-' are accepted.
The '-' character cannot be the first or the last one.
A system generated ID will be used if the field is not set.
The job.name field in the request will be ignored and the created resource
name of the Job will be "{parent}/jobs/{job_id}".
Returns
Type
Description
string
setJobId
ID used to uniquely identify the Job within its parent scope.
This field should contain at most 63 characters and must start with
lowercase characters.
Only lowercase characters, numbers and '-' are accepted.
The '-' character cannot be the first or the last one.
A system generated ID will be used if the field is not set.
The job.name field in the request will be ignored and the created resource
name of the Job will be "{parent}/jobs/{job_id}".
Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and
the request times out. If you make the request again with the same request
ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents
clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is
not supported (00000000-0000-0000-0000-000000000000).
Returns
Type
Description
string
setRequestId
Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and
the request times out. If you make the request again with the same request
ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents
clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is
not supported (00000000-0000-0000-0000-000000000000).
Parameter
Name
Description
var
string
Returns
Type
Description
$this
static::build
Parameters
Name
Description
parent
string
Required. The parent resource name where the Job will be created.
Pattern: "projects/{project}/locations/{location}"
Please seeBatchServiceClient::locationName()for help formatting this field.
ID used to uniquely identify the Job within its parent scope.
This field should contain at most 63 characters and must start with
lowercase characters.
Only lowercase characters, numbers and '-' are accepted.
The '-' character cannot be the first or the last one.
A system generated ID will be used if the field is not set.
The job.name field in the request will be ignored and the created resource
name of the Job will be "{parent}/jobs/{job_id}".
[[["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 CreateJobRequest (1.2.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.2 (latest)](/php/docs/reference/cloud-batch/latest/V1.CreateJobRequest)\n- [1.2.1](/php/docs/reference/cloud-batch/1.2.1/V1.CreateJobRequest)\n- [1.1.7](/php/docs/reference/cloud-batch/1.1.7/V1.CreateJobRequest)\n- [1.0.3](/php/docs/reference/cloud-batch/1.0.3/V1.CreateJobRequest)\n- [0.17.0](/php/docs/reference/cloud-batch/0.17.0/V1.CreateJobRequest)\n- [0.16.10](/php/docs/reference/cloud-batch/0.16.10/V1.CreateJobRequest)\n- [0.15.0](/php/docs/reference/cloud-batch/0.15.0/V1.CreateJobRequest)\n- [0.14.0](/php/docs/reference/cloud-batch/0.14.0/V1.CreateJobRequest)\n- [0.13.1](/php/docs/reference/cloud-batch/0.13.1/V1.CreateJobRequest)\n- [0.12.1](/php/docs/reference/cloud-batch/0.12.1/V1.CreateJobRequest)\n- [0.11.3](/php/docs/reference/cloud-batch/0.11.3/V1.CreateJobRequest)\n- [0.10.0](/php/docs/reference/cloud-batch/0.10.0/V1.CreateJobRequest)\n- [0.9.0](/php/docs/reference/cloud-batch/0.9.0/V1.CreateJobRequest)\n- [0.8.0](/php/docs/reference/cloud-batch/0.8.0/V1.CreateJobRequest)\n- [0.7.0](/php/docs/reference/cloud-batch/0.7.0/V1.CreateJobRequest)\n- [0.6.0](/php/docs/reference/cloud-batch/0.6.0/V1.CreateJobRequest)\n- [0.5.2](/php/docs/reference/cloud-batch/0.5.2/V1.CreateJobRequest)\n- [0.4.0](/php/docs/reference/cloud-batch/0.4.0/V1.CreateJobRequest)\n- [0.3.0](/php/docs/reference/cloud-batch/0.3.0/V1.CreateJobRequest)\n- [0.2.2](/php/docs/reference/cloud-batch/0.2.2/V1.CreateJobRequest) \nReference documentation and code samples for the Google Cloud Batch V1 Client class CreateJobRequest.\n\nCreateJob Request.\n\nGenerated from protobuf message `google.cloud.batch.v1.CreateJobRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Batch \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getParent\n\nRequired. The parent resource name where the Job will be created.\n\nPattern: \"projects/{project}/locations/{location}\"\n\n### setParent\n\nRequired. The parent resource name where the Job will be created.\n\nPattern: \"projects/{project}/locations/{location}\"\n\n### getJobId\n\nID used to uniquely identify the Job within its parent scope.\n\nThis field should contain at most 63 characters and must start with\nlowercase characters.\nOnly lowercase characters, numbers and '-' are accepted.\nThe '-' character cannot be the first or the last one.\nA system generated ID will be used if the field is not set.\nThe job.name field in the request will be ignored and the created resource\nname of the Job will be \"{parent}/jobs/{job_id}\".\n\n### setJobId\n\nID used to uniquely identify the Job within its parent scope.\n\nThis field should contain at most 63 characters and must start with\nlowercase characters.\nOnly lowercase characters, numbers and '-' are accepted.\nThe '-' character cannot be the first or the last one.\nA system generated ID will be used if the field is not set.\nThe job.name field in the request will be ignored and the created resource\nname of the Job will be \"{parent}/jobs/{job_id}\".\n\n### getJob\n\nRequired. The Job to create.\n\n### hasJob\n\n### clearJob\n\n### setJob\n\nRequired. The Job to create.\n\n### getRequestId\n\nOptional. An optional request ID to identify requests. Specify a unique\nrequest ID so that if you must retry your request, the server will know to\nignore the request if it has already been completed. The server will\nguarantee that for at least 60 minutes since the first request.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).\n\n### setRequestId\n\nOptional. An optional request ID to identify requests. Specify a unique\nrequest ID so that if you must retry your request, the server will know to\nignore the request if it has already been completed. The server will\nguarantee that for at least 60 minutes since the first request.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same request\nID, the server can check if original operation with the same request ID\nwas received, and if so, will ignore the second request. This prevents\nclients from accidentally creating duplicate commitments.\nThe request ID must be a valid UUID with the exception that zero UUID is\nnot supported (00000000-0000-0000-0000-000000000000).\n\n### static::build"]]