Google Cloud Scheduler v1 API - Class CloudScheduler.CloudSchedulerBase (3.1.0)

[BindServiceMethod(typeof(CloudScheduler), "BindService")]
public abstract class CloudSchedulerBase

Reference documentation and code samples for the Google Cloud Scheduler v1 API class CloudScheduler.CloudSchedulerBase.

Base class for server-side implementations of CloudScheduler

Inheritance

Object > CloudScheduler.CloudSchedulerBase

Namespace

Google.Cloud.Scheduler.V1

Assembly

Google.Cloud.Scheduler.V1.dll

Methods

CreateJob(CreateJobRequest, ServerCallContext)

public virtual Task<Job> CreateJob(CreateJobRequest request, ServerCallContext context)

Creates a job.

Parameters
NameDescription
requestCreateJobRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Job>

The response to send back to the client (wrapped by a task).

DeleteJob(DeleteJobRequest, ServerCallContext)

public virtual Task<Empty> DeleteJob(DeleteJobRequest request, ServerCallContext context)

Deletes a job.

Parameters
NameDescription
requestDeleteJobRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Empty>

The response to send back to the client (wrapped by a task).

GetJob(GetJobRequest, ServerCallContext)

public virtual Task<Job> GetJob(GetJobRequest request, ServerCallContext context)

Gets a job.

Parameters
NameDescription
requestGetJobRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Job>

The response to send back to the client (wrapped by a task).

ListJobs(ListJobsRequest, ServerCallContext)

public virtual Task<ListJobsResponse> ListJobs(ListJobsRequest request, ServerCallContext context)

Lists jobs.

Parameters
NameDescription
requestListJobsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<ListJobsResponse>

The response to send back to the client (wrapped by a task).

PauseJob(PauseJobRequest, ServerCallContext)

public virtual Task<Job> PauseJob(PauseJobRequest request, ServerCallContext context)

Pauses a job.

If a job is paused then the system will stop executing the job until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The state of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if paused it will be set to [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED] to be paused.

Parameters
NameDescription
requestPauseJobRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Job>

The response to send back to the client (wrapped by a task).

ResumeJob(ResumeJobRequest, ServerCallContext)

public virtual Task<Job> ResumeJob(ResumeJobRequest request, ServerCallContext context)

Resume a job.

This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The state of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state]; after calling this method it will be set to [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job must be in [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed.

Parameters
NameDescription
requestResumeJobRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Job>

The response to send back to the client (wrapped by a task).

RunJob(RunJobRequest, ServerCallContext)

public virtual Task<Job> RunJob(RunJobRequest request, ServerCallContext context)

Forces a job to run now.

When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running.

Parameters
NameDescription
requestRunJobRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Job>

The response to send back to the client (wrapped by a task).

UpdateJob(UpdateJobRequest, ServerCallContext)

public virtual Task<Job> UpdateJob(UpdateJobRequest request, ServerCallContext context)

Updates a job.

If successful, the updated [Job][google.cloud.scheduler.v1.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][google.cloud.scheduler.v1.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.

Parameters
NameDescription
requestUpdateJobRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Job>

The response to send back to the client (wrapped by a task).