class ProjectsLocationsJobs extends Resource (View source)

The "jobs" collection of methods.

Typical usage is:

 $cloudschedulerService = new Google\Service\CloudScheduler(...);
 $jobs = $cloudschedulerService->projects_locations_jobs;

Methods

Job
create(string $parent, Job $postBody, array $optParams = [])

Creates a job. (jobs.create)

delete(string $name, array $optParams = [])

Deletes a job. (jobs.delete)

Job
get(string $name, array $optParams = [])

Gets a job. (jobs.get)

listProjectsLocationsJobs(string $parent, array $optParams = [])

Lists jobs. (jobs.listProjectsLocationsJobs)

Job
patch(string $name, Job $postBody, array $optParams = [])

Updates a job. If successful, the updated Job is returned. If the job does not exist, NOT_FOUND is returned. If UpdateJob does not successfully return, it is possible for the job to be in an Job.State.UPDATE_FAILED state.

Job
pause(string $name, PauseJobRequest $postBody, array $optParams = [])

Pauses a job. If a job is paused then the system will stop executing the job until it is re-enabled via ResumeJob. The state of the job is stored in state; if paused it will be set to Job.State.PAUSED. A job must be in Job.State.ENABLED to be paused. (jobs.pause)

Job
resume(string $name, ResumeJobRequest $postBody, array $optParams = [])

Resume a job. This method reenables a job after it has been Job.State.PAUSED.

Job
run(string $name, RunJobRequest $postBody, array $optParams = [])

Forces a job to run now. When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running. (jobs.run)

Details

Job create(string $parent, Job $postBody, array $optParams = [])

Creates a job. (jobs.create)

Parameters

string $parent

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

Job $postBody
array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception

CloudschedulerEmpty delete(string $name, array $optParams = [])

Deletes a job. (jobs.delete)

Parameters

string $name

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

array $optParams

Optional parameters.

Return Value

CloudschedulerEmpty

Exceptions

Exception

Job get(string $name, array $optParams = [])

Gets a job. (jobs.get)

Parameters

string $name

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception

ListJobsResponse listProjectsLocationsJobs(string $parent, array $optParams = [])

Lists jobs. (jobs.listProjectsLocationsJobs)

Parameters

string $parent

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

array $optParams

Optional parameters.

Return Value

ListJobsResponse

Exceptions

Exception

Job patch(string $name, Job $postBody, array $optParams = [])

Updates a job. If successful, the updated Job is returned. If the job does not exist, NOT_FOUND is returned. If UpdateJob does not successfully return, it is possible for the job to be in an Job.State.UPDATE_FAILED state.

A job in this state may not be executed. If this happens, retry the UpdateJob request until a successful response is received. (jobs.patch)

Parameters

string $name

Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID. PROJECT_ID can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects LOCATION_ID is the canonical ID for the job's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * JOB_ID can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum length is 500 characters.

Job $postBody
array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception

Job pause(string $name, PauseJobRequest $postBody, array $optParams = [])

Pauses a job. If a job is paused then the system will stop executing the job until it is re-enabled via ResumeJob. The state of the job is stored in state; if paused it will be set to Job.State.PAUSED. A job must be in Job.State.ENABLED to be paused. (jobs.pause)

Parameters

string $name

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

PauseJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception

Job resume(string $name, ResumeJobRequest $postBody, array $optParams = [])

Resume a job. This method reenables a job after it has been Job.State.PAUSED.

The state of a job is stored in Job.state; after calling this method it will be set to Job.State.ENABLED. A job must be in Job.State.PAUSED to be resumed. (jobs.resume)

Parameters

string $name

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

ResumeJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception

Job run(string $name, RunJobRequest $postBody, array $optParams = [])

Forces a job to run now. When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running. (jobs.run)

Parameters

string $name

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

RunJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception