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.
Namespace
Google.Cloud.Scheduler.V1Assembly
Google.Cloud.Scheduler.V1.dll
Remarks
The Cloud Scheduler API allows external entities to reliably schedule asynchronous jobs.
Constructors
CloudSchedulerClientImpl(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 | |
---|---|
Name | Description |
grpcClient | CloudSchedulerCloudSchedulerClient The underlying gRPC client. |
settings | CloudSchedulerSettings The base CloudSchedulerSettings used within this client. |
logger | ILogger Optional ILogger to use within this client. |
Properties
GrpcClient
public override CloudScheduler.CloudSchedulerClient GrpcClient { get; }
The underlying gRPC CloudScheduler client
Property Value | |
---|---|
Type | Description |
CloudSchedulerCloudSchedulerClient |
LocationsClient
public override LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
Methods
CreateJob(CreateJobRequest, CallSettings)
public override Job CreateJob(CreateJobRequest request, CallSettings callSettings = null)
Creates a job.
Parameters | |
---|---|
Name | Description |
request | CreateJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
CreateJobAsync(CreateJobRequest, CallSettings)
public override Task<Job> CreateJobAsync(CreateJobRequest request, CallSettings callSettings = null)
Creates a job.
Parameters | |
---|---|
Name | Description |
request | CreateJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskJob | A Task containing the RPC response. |
DeleteJob(DeleteJobRequest, CallSettings)
public override void DeleteJob(DeleteJobRequest request, CallSettings callSettings = null)
Deletes a job.
Parameters | |
---|---|
Name | Description |
request | DeleteJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
DeleteJobAsync(DeleteJobRequest, CallSettings)
public override Task DeleteJobAsync(DeleteJobRequest request, CallSettings callSettings = null)
Deletes a job.
Parameters | |
---|---|
Name | Description |
request | DeleteJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
GetJob(GetJobRequest, CallSettings)
public override Job GetJob(GetJobRequest request, CallSettings callSettings = null)
Gets a job.
Parameters | |
---|---|
Name | Description |
request | GetJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
GetJobAsync(GetJobRequest, CallSettings)
public override Task<Job> GetJobAsync(GetJobRequest request, CallSettings callSettings = null)
Gets a job.
Parameters | |
---|---|
Name | Description |
request | GetJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskJob | A Task containing the RPC response. |
ListJobs(ListJobsRequest, CallSettings)
public override PagedEnumerable<ListJobsResponse, Job> ListJobs(ListJobsRequest request, CallSettings callSettings = null)
Lists jobs.
Parameters | |
---|---|
Name | Description |
request | ListJobsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListJobsResponseJob | A pageable sequence of Job resources. |
ListJobsAsync(ListJobsRequest, CallSettings)
public override PagedAsyncEnumerable<ListJobsResponse, Job> ListJobsAsync(ListJobsRequest request, CallSettings callSettings = null)
Lists jobs.
Parameters | |
---|---|
Name | Description |
request | ListJobsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListJobsResponseJob | A pageable asynchronous sequence of Job resources. |
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 | |
---|---|
Name | Description |
request | PauseJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
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 | |
---|---|
Name | Description |
request | PauseJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskJob | A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request | ResumeJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
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 | |
---|---|
Name | Description |
request | ResumeJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskJob | A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request | RunJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
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 | |
---|---|
Name | Description |
request | RunJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskJob | A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request | UpdateJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
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 | |
---|---|
Name | Description |
request | UpdateJobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskJob | A Task containing the RPC response. |