Skip to main content

job_runs

Creates, updates, deletes, gets or lists a job_runs resource.

Overview

Namejob_runs
TypeResource
Idgoogle.clouddeploy.job_runs

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Name of the JobRun. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}.
advanceChildRolloutJobRunobjectOutput only. Information specific to an advanceChildRollout JobRun (id: AdvanceChildRolloutJobRun)
createChildRolloutJobRunobjectOutput only. Information specific to a createChildRollout JobRun. (id: CreateChildRolloutJobRun)
createTimestring (google-datetime)Output only. Time at which the JobRun was created.
deployJobRunobjectOutput only. Information specific to a deploy JobRun. (id: DeployJobRun)
endTimestring (google-datetime)Output only. Time at which the JobRun ended.
etagstringOutput only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
jobIdstringOutput only. ID of the Rollout job this JobRun corresponds to.
phaseIdstringOutput only. ID of the Rollout phase this JobRun belongs in.
postdeployJobRunobjectOutput only. Information specific to a postdeploy JobRun. (id: PostdeployJobRun)
predeployJobRunobjectOutput only. Information specific to a predeploy JobRun. (id: PredeployJobRun)
startTimestring (google-datetime)Output only. Time at which the JobRun was started.
statestringOutput only. The current state of the JobRun.
uidstringOutput only. Unique identifier of the JobRun.
verifyJobRunobjectOutput only. Information specific to a verify JobRun. (id: VerifyJobRun)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, deliveryPipelinesId, releasesId, rolloutsId, jobRunsIdGets details of a single JobRun.
listselectprojectsId, locationsId, deliveryPipelinesId, releasesId, rolloutsIdpageSize, pageToken, filter, orderByLists JobRuns in a given project and location.
terminateexecprojectsId, locationsId, deliveryPipelinesId, releasesId, rolloutsId, jobRunsIdTerminates a Job Run in a given project and location.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deliveryPipelinesIdstring
jobRunsIdstring
locationsIdstring
projectsIdstring
releasesIdstring
rolloutsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets details of a single JobRun.

SELECT
name,
advanceChildRolloutJobRun,
createChildRolloutJobRun,
createTime,
deployJobRun,
endTime,
etag,
jobId,
phaseId,
postdeployJobRun,
predeployJobRun,
startTime,
state,
uid,
verifyJobRun
FROM google.clouddeploy.job_runs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND deliveryPipelinesId = '{{ deliveryPipelinesId }}' -- required
AND releasesId = '{{ releasesId }}' -- required
AND rolloutsId = '{{ rolloutsId }}' -- required
AND jobRunsId = '{{ jobRunsId }}' -- required;

Lifecycle Methods

Terminates a Job Run in a given project and location.

EXEC google.clouddeploy.job_runs.terminate 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@deliveryPipelinesId='{{ deliveryPipelinesId }}' --required,
@releasesId='{{ releasesId }}' --required,
@rolloutsId='{{ rolloutsId }}' --required,
@jobRunsId='{{ jobRunsId }}' --required
@@json=
'{
"overrideDeployPolicy": "{{ overrideDeployPolicy }}"
}';