Google Cloud Scheduler v1 API - Class CloudSchedulerClientImpl (3.1.0)

public sealed class CloudSchedulerClientImpl : CloudSchedulerClient

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

CloudScheduler client wrapper implementation, for convenient use.

Inheritance

Object > CloudSchedulerClient > CloudSchedulerClientImpl

Namespace

Google.Cloud.Scheduler.V1

Assembly

Google.Cloud.Scheduler.V1.dll

Remarks

The Cloud Scheduler API allows external entities to reliably schedule asynchronous jobs.

Constructors

CloudSchedulerClientImpl(CloudScheduler.CloudSchedulerClient, CloudSchedulerSettings, ILogger)

public CloudSchedulerClientImpl(CloudScheduler.CloudSchedulerClient grpcClient, CloudSchedulerSettings settings, ILogger logger)

Constructs a client wrapper for the CloudScheduler service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientCloudScheduler.CloudSchedulerClient

The underlying gRPC client.

settingsCloudSchedulerSettings

The base CloudSchedulerSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override CloudScheduler.CloudSchedulerClient GrpcClient { get; }

The underlying gRPC CloudScheduler client

Property Value
TypeDescription
CloudScheduler.CloudSchedulerClient
Overrides

Methods

CreateJob(CreateJobRequest, CallSettings)

public override Job CreateJob(CreateJobRequest request, CallSettings callSettings = null)

Creates a job.

Parameters
NameDescription
requestCreateJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Overrides

CreateJobAsync(CreateJobRequest, CallSettings)

public override Task<Job> CreateJobAsync(CreateJobRequest request, CallSettings callSettings = null)

Creates a job.

Parameters
NameDescription
requestCreateJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Overrides

DeleteJob(DeleteJobRequest, CallSettings)

public override void DeleteJob(DeleteJobRequest request, CallSettings callSettings = null)

Deletes a job.

Parameters
NameDescription
requestDeleteJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteJobAsync(DeleteJobRequest, CallSettings)

public override Task DeleteJobAsync(DeleteJobRequest request, CallSettings callSettings = null)

Deletes a job.

Parameters
NameDescription
requestDeleteJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Overrides

GetJob(GetJobRequest, CallSettings)

public override Job GetJob(GetJobRequest request, CallSettings callSettings = null)

Gets a job.

Parameters
NameDescription
requestGetJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Overrides

GetJobAsync(GetJobRequest, CallSettings)

public override Task<Job> GetJobAsync(GetJobRequest request, CallSettings callSettings = null)

Gets a job.

Parameters
NameDescription
requestGetJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Overrides

ListJobs(ListJobsRequest, CallSettings)

public override PagedEnumerable<ListJobsResponse, Job> ListJobs(ListJobsRequest request, CallSettings callSettings = null)

Lists jobs.

Parameters
NameDescription
requestListJobsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListJobsResponse, Job>

A pageable sequence of Job resources.

Overrides

ListJobsAsync(ListJobsRequest, CallSettings)

public override PagedAsyncEnumerable<ListJobsResponse, Job> ListJobsAsync(ListJobsRequest request, CallSettings callSettings = null)

Lists jobs.

Parameters
NameDescription
requestListJobsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListJobsResponse, Job>

A pageable asynchronous sequence of Job resources.

Overrides

PauseJob(PauseJobRequest, CallSettings)

public override Job PauseJob(PauseJobRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Overrides

PauseJobAsync(PauseJobRequest, CallSettings)

public override Task<Job> PauseJobAsync(PauseJobRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Overrides

ResumeJob(ResumeJobRequest, CallSettings)

public override Job ResumeJob(ResumeJobRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Overrides

ResumeJobAsync(ResumeJobRequest, CallSettings)

public override Task<Job> ResumeJobAsync(ResumeJobRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Overrides

RunJob(RunJobRequest, CallSettings)

public override Job RunJob(RunJobRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Overrides

RunJobAsync(RunJobRequest, CallSettings)

public override Task<Job> RunJobAsync(RunJobRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Overrides

UpdateJob(UpdateJobRequest, CallSettings)

public override Job UpdateJob(UpdateJobRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Overrides

UpdateJobAsync(UpdateJobRequest, CallSettings)

public override Task<Job> UpdateJobAsync(UpdateJobRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Overrides