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

public class CloudSchedulerClient : ClientBase<CloudScheduler.CloudSchedulerClient>

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

Client for CloudScheduler

Inheritance

Object > ClientBase > ClientBase<CloudScheduler.CloudSchedulerClient> > CloudScheduler.CloudSchedulerClient

Namespace

Google.Cloud.Scheduler.V1

Assembly

Google.Cloud.Scheduler.V1.dll

Constructors

CloudSchedulerClient()

protected CloudSchedulerClient()

Protected parameterless constructor to allow creation of test doubles.

CloudSchedulerClient(CallInvoker)

public CloudSchedulerClient(CallInvoker callInvoker)

Creates a new client for CloudScheduler that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

CloudSchedulerClient(ChannelBase)

public CloudSchedulerClient(ChannelBase channel)

Creates a new client for CloudScheduler

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

CloudSchedulerClient(ClientBase.ClientBaseConfiguration)

protected CloudSchedulerClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

CreateJob(CreateJobRequest, CallOptions)

public virtual Job CreateJob(CreateJobRequest request, CallOptions options)

Creates a job.

Parameters
NameDescription
requestCreateJobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Job

The response received from the server.

CreateJob(CreateJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Job CreateJob(CreateJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Creates a job.

Parameters
NameDescription
requestCreateJobRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Job

The response received from the server.

CreateJobAsync(CreateJobRequest, CallOptions)

public virtual AsyncUnaryCall<Job> CreateJobAsync(CreateJobRequest request, CallOptions options)

Creates a job.

Parameters
NameDescription
requestCreateJobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.

CreateJobAsync(CreateJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Job> CreateJobAsync(CreateJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Creates a job.

Parameters
NameDescription
requestCreateJobRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.

DeleteJob(DeleteJobRequest, CallOptions)

public virtual Empty DeleteJob(DeleteJobRequest request, CallOptions options)

Deletes a job.

Parameters
NameDescription
requestDeleteJobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteJob(DeleteJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Empty DeleteJob(DeleteJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Deletes a job.

Parameters
NameDescription
requestDeleteJobRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteJobAsync(DeleteJobRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteJobAsync(DeleteJobRequest request, CallOptions options)

Deletes a job.

Parameters
NameDescription
requestDeleteJobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Empty>

The call object.

DeleteJobAsync(DeleteJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteJobAsync(DeleteJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Deletes a job.

Parameters
NameDescription
requestDeleteJobRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Empty>

The call object.

GetJob(GetJobRequest, CallOptions)

public virtual Job GetJob(GetJobRequest request, CallOptions options)

Gets a job.

Parameters
NameDescription
requestGetJobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Job

The response received from the server.

GetJob(GetJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Job GetJob(GetJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Gets a job.

Parameters
NameDescription
requestGetJobRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Job

The response received from the server.

GetJobAsync(GetJobRequest, CallOptions)

public virtual AsyncUnaryCall<Job> GetJobAsync(GetJobRequest request, CallOptions options)

Gets a job.

Parameters
NameDescription
requestGetJobRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.

GetJobAsync(GetJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Job> GetJobAsync(GetJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Gets a job.

Parameters
NameDescription
requestGetJobRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.

ListJobs(ListJobsRequest, CallOptions)

public virtual ListJobsResponse ListJobs(ListJobsRequest request, CallOptions options)

Lists jobs.

Parameters
NameDescription
requestListJobsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListJobsResponse

The response received from the server.

ListJobs(ListJobsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ListJobsResponse ListJobs(ListJobsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Lists jobs.

Parameters
NameDescription
requestListJobsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListJobsResponse

The response received from the server.

ListJobsAsync(ListJobsRequest, CallOptions)

public virtual AsyncUnaryCall<ListJobsResponse> ListJobsAsync(ListJobsRequest request, CallOptions options)

Lists jobs.

Parameters
NameDescription
requestListJobsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ListJobsResponse>

The call object.

ListJobsAsync(ListJobsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ListJobsResponse> ListJobsAsync(ListJobsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Lists jobs.

Parameters
NameDescription
requestListJobsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<ListJobsResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

protected override CloudScheduler.CloudSchedulerClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
CloudScheduler.CloudSchedulerClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Scheduler.V1.CloudScheduler.CloudSchedulerClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

PauseJob(PauseJobRequest, CallOptions)

public virtual Job PauseJob(PauseJobRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Job

The response received from the server.

PauseJob(PauseJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Job PauseJob(PauseJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Job

The response received from the server.

PauseJobAsync(PauseJobRequest, CallOptions)

public virtual AsyncUnaryCall<Job> PauseJobAsync(PauseJobRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.

PauseJobAsync(PauseJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Job> PauseJobAsync(PauseJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.

ResumeJob(ResumeJobRequest, CallOptions)

public virtual Job ResumeJob(ResumeJobRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Job

The response received from the server.

ResumeJob(ResumeJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Job ResumeJob(ResumeJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Job

The response received from the server.

ResumeJobAsync(ResumeJobRequest, CallOptions)

public virtual AsyncUnaryCall<Job> ResumeJobAsync(ResumeJobRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.

ResumeJobAsync(ResumeJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Job> ResumeJobAsync(ResumeJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.

RunJob(RunJobRequest, CallOptions)

public virtual Job RunJob(RunJobRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Job

The response received from the server.

RunJob(RunJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Job RunJob(RunJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Job

The response received from the server.

RunJobAsync(RunJobRequest, CallOptions)

public virtual AsyncUnaryCall<Job> RunJobAsync(RunJobRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.

RunJobAsync(RunJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Job> RunJobAsync(RunJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.

UpdateJob(UpdateJobRequest, CallOptions)

public virtual Job UpdateJob(UpdateJobRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Job

The response received from the server.

UpdateJob(UpdateJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Job UpdateJob(UpdateJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Job

The response received from the server.

UpdateJobAsync(UpdateJobRequest, CallOptions)

public virtual AsyncUnaryCall<Job> UpdateJobAsync(UpdateJobRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.

UpdateJobAsync(UpdateJobRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Job> UpdateJobAsync(UpdateJobRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Job>

The call object.