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

public class CloudScheduler.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 > ClientBaseCloudSchedulerCloudSchedulerClient > CloudScheduler.CloudSchedulerClient

Namespace

GoogleGoogle.CloudGoogle.Cloud.SchedulerV1

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(ClientBaseConfiguration)

protected CloudSchedulerClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

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, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

The call object.

CreateJobAsync(CreateJobRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

The call object.

CreateLocationsClient()

public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of Locations.LocationsClient using the same call invoker as this client.

Returns
TypeDescription
LocationsLocationsClient

A new Locations.LocationsClient for the same target as this client.

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, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallEmpty

The call object.

DeleteJobAsync(DeleteJobRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallEmpty

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, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

The call object.

GetJobAsync(GetJobRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

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, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallListJobsResponse

The call object.

ListJobsAsync(ListJobsRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallListJobsResponse

The call object.

NewInstance(ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
CloudSchedulerCloudSchedulerClient
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, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

The call object.

PauseJobAsync(PauseJobRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

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, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

The call object.

ResumeJobAsync(ResumeJobRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

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, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

The call object.

RunJobAsync(RunJobRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

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, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

The call object.

UpdateJobAsync(UpdateJobRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallJob

The call object.