public abstract class CloudSchedulerClient
CloudScheduler client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Scheduler.V1Assembly
Google.Cloud.Scheduler.V1.dll
Remarks
The Cloud Scheduler API allows external entities to reliably schedule asynchronous jobs.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the CloudScheduler service, which is a host of "cloudscheduler.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default CloudScheduler scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default CloudScheduler scopes are:
GrpcClient
public virtual CloudScheduler.CloudSchedulerClient GrpcClient { get; }
The underlying gRPC CloudScheduler client
Property Value | |
---|---|
Type | Description |
CloudScheduler.CloudSchedulerClient |
Methods
Create()
public static CloudSchedulerClient Create()
Synchronously creates a CloudSchedulerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudSchedulerClientBuilder.
Returns | |
---|---|
Type | Description |
CloudSchedulerClient | The created CloudSchedulerClient. |
CreateAsync(CancellationToken)
public static Task<CloudSchedulerClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a CloudSchedulerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudSchedulerClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<CloudSchedulerClient> | The task representing the created CloudSchedulerClient. |
CreateJob(LocationName, Job, CallSettings)
public virtual Job CreateJob(LocationName parent, Job job, CallSettings callSettings = null)
Creates a job.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The location name. For example:
|
job | Job Required. The job to add. The user can optionally specify a name for the job in [name][google.cloud.scheduler.v1.Job.name]. [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an existing job. If a name is not specified then the system will generate a random unique name that will be returned ([name][google.cloud.scheduler.v1.Job.name]) in the response. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Job job = new Job();
// Make the request
Job response = cloudSchedulerClient.CreateJob(parent, job);
CreateJob(CreateJobRequest, CallSettings)
public virtual 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. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
CreateJobRequest request = new CreateJobRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Job = new Job(),
};
// Make the request
Job response = cloudSchedulerClient.CreateJob(request);
CreateJob(String, Job, CallSettings)
public virtual Job CreateJob(string parent, Job job, CallSettings callSettings = null)
Creates a job.
Parameters | |
---|---|
Name | Description |
parent | String Required. The location name. For example:
|
job | Job Required. The job to add. The user can optionally specify a name for the job in [name][google.cloud.scheduler.v1.Job.name]. [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an existing job. If a name is not specified then the system will generate a random unique name that will be returned ([name][google.cloud.scheduler.v1.Job.name]) in the response. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Job job = new Job();
// Make the request
Job response = cloudSchedulerClient.CreateJob(parent, job);
CreateJobAsync(LocationName, Job, CallSettings)
public virtual Task<Job> CreateJobAsync(LocationName parent, Job job, CallSettings callSettings = null)
Creates a job.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The location name. For example:
|
job | Job Required. The job to add. The user can optionally specify a name for the job in [name][google.cloud.scheduler.v1.Job.name]. [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an existing job. If a name is not specified then the system will generate a random unique name that will be returned ([name][google.cloud.scheduler.v1.Job.name]) in the response. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Job job = new Job();
// Make the request
Job response = await cloudSchedulerClient.CreateJobAsync(parent, job);
CreateJobAsync(LocationName, Job, CancellationToken)
public virtual Task<Job> CreateJobAsync(LocationName parent, Job job, CancellationToken cancellationToken)
Creates a job.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The location name. For example:
|
job | Job Required. The job to add. The user can optionally specify a name for the job in [name][google.cloud.scheduler.v1.Job.name]. [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an existing job. If a name is not specified then the system will generate a random unique name that will be returned ([name][google.cloud.scheduler.v1.Job.name]) in the response. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Job job = new Job();
// Make the request
Job response = await cloudSchedulerClient.CreateJobAsync(parent, job);
CreateJobAsync(CreateJobRequest, CallSettings)
public virtual 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 |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
CreateJobRequest request = new CreateJobRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Job = new Job(),
};
// Make the request
Job response = await cloudSchedulerClient.CreateJobAsync(request);
CreateJobAsync(CreateJobRequest, CancellationToken)
public virtual Task<Job> CreateJobAsync(CreateJobRequest request, CancellationToken cancellationToken)
Creates a job.
Parameters | |
---|---|
Name | Description |
request | CreateJobRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
CreateJobRequest request = new CreateJobRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Job = new Job(),
};
// Make the request
Job response = await cloudSchedulerClient.CreateJobAsync(request);
CreateJobAsync(String, Job, CallSettings)
public virtual Task<Job> CreateJobAsync(string parent, Job job, CallSettings callSettings = null)
Creates a job.
Parameters | |
---|---|
Name | Description |
parent | String Required. The location name. For example:
|
job | Job Required. The job to add. The user can optionally specify a name for the job in [name][google.cloud.scheduler.v1.Job.name]. [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an existing job. If a name is not specified then the system will generate a random unique name that will be returned ([name][google.cloud.scheduler.v1.Job.name]) in the response. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Job job = new Job();
// Make the request
Job response = await cloudSchedulerClient.CreateJobAsync(parent, job);
CreateJobAsync(String, Job, CancellationToken)
public virtual Task<Job> CreateJobAsync(string parent, Job job, CancellationToken cancellationToken)
Creates a job.
Parameters | |
---|---|
Name | Description |
parent | String Required. The location name. For example:
|
job | Job Required. The job to add. The user can optionally specify a name for the job in [name][google.cloud.scheduler.v1.Job.name]. [name][google.cloud.scheduler.v1.Job.name] cannot be the same as an existing job. If a name is not specified then the system will generate a random unique name that will be returned ([name][google.cloud.scheduler.v1.Job.name]) in the response. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Job job = new Job();
// Make the request
Job response = await cloudSchedulerClient.CreateJobAsync(parent, job);
DeleteJob(DeleteJobRequest, CallSettings)
public virtual 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. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
DeleteJobRequest request = new DeleteJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
cloudSchedulerClient.DeleteJob(request);
DeleteJob(JobName, CallSettings)
public virtual void DeleteJob(JobName name, CallSettings callSettings = null)
Deletes a job.
Parameters | |
---|---|
Name | Description |
name | JobName Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
cloudSchedulerClient.DeleteJob(name);
DeleteJob(String, CallSettings)
public virtual void DeleteJob(string name, CallSettings callSettings = null)
Deletes a job.
Parameters | |
---|---|
Name | Description |
name | String Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
cloudSchedulerClient.DeleteJob(name);
DeleteJobAsync(DeleteJobRequest, CallSettings)
public virtual 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. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
DeleteJobRequest request = new DeleteJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
await cloudSchedulerClient.DeleteJobAsync(request);
DeleteJobAsync(DeleteJobRequest, CancellationToken)
public virtual Task DeleteJobAsync(DeleteJobRequest request, CancellationToken cancellationToken)
Deletes a job.
Parameters | |
---|---|
Name | Description |
request | DeleteJobRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
DeleteJobRequest request = new DeleteJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
await cloudSchedulerClient.DeleteJobAsync(request);
DeleteJobAsync(JobName, CallSettings)
public virtual Task DeleteJobAsync(JobName name, CallSettings callSettings = null)
Deletes a job.
Parameters | |
---|---|
Name | Description |
name | JobName Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
await cloudSchedulerClient.DeleteJobAsync(name);
DeleteJobAsync(JobName, CancellationToken)
public virtual Task DeleteJobAsync(JobName name, CancellationToken cancellationToken)
Deletes a job.
Parameters | |
---|---|
Name | Description |
name | JobName Required. The job name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
await cloudSchedulerClient.DeleteJobAsync(name);
DeleteJobAsync(String, CallSettings)
public virtual Task DeleteJobAsync(string name, CallSettings callSettings = null)
Deletes a job.
Parameters | |
---|---|
Name | Description |
name | String Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
await cloudSchedulerClient.DeleteJobAsync(name);
DeleteJobAsync(String, CancellationToken)
public virtual Task DeleteJobAsync(string name, CancellationToken cancellationToken)
Deletes a job.
Parameters | |
---|---|
Name | Description |
name | String Required. The job name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
await cloudSchedulerClient.DeleteJobAsync(name);
GetJob(GetJobRequest, CallSettings)
public virtual 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. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
GetJobRequest request = new GetJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = cloudSchedulerClient.GetJob(request);
GetJob(JobName, CallSettings)
public virtual Job GetJob(JobName name, CallSettings callSettings = null)
Gets a job.
Parameters | |
---|---|
Name | Description |
name | JobName Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = cloudSchedulerClient.GetJob(name);
GetJob(String, CallSettings)
public virtual Job GetJob(string name, CallSettings callSettings = null)
Gets a job.
Parameters | |
---|---|
Name | Description |
name | String Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = cloudSchedulerClient.GetJob(name);
GetJobAsync(GetJobRequest, CallSettings)
public virtual 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 |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
GetJobRequest request = new GetJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = await cloudSchedulerClient.GetJobAsync(request);
GetJobAsync(GetJobRequest, CancellationToken)
public virtual Task<Job> GetJobAsync(GetJobRequest request, CancellationToken cancellationToken)
Gets a job.
Parameters | |
---|---|
Name | Description |
request | GetJobRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
GetJobRequest request = new GetJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = await cloudSchedulerClient.GetJobAsync(request);
GetJobAsync(JobName, CallSettings)
public virtual Task<Job> GetJobAsync(JobName name, CallSettings callSettings = null)
Gets a job.
Parameters | |
---|---|
Name | Description |
name | JobName Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = await cloudSchedulerClient.GetJobAsync(name);
GetJobAsync(JobName, CancellationToken)
public virtual Task<Job> GetJobAsync(JobName name, CancellationToken cancellationToken)
Gets a job.
Parameters | |
---|---|
Name | Description |
name | JobName Required. The job name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = await cloudSchedulerClient.GetJobAsync(name);
GetJobAsync(String, CallSettings)
public virtual Task<Job> GetJobAsync(string name, CallSettings callSettings = null)
Gets a job.
Parameters | |
---|---|
Name | Description |
name | String Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = await cloudSchedulerClient.GetJobAsync(name);
GetJobAsync(String, CancellationToken)
public virtual Task<Job> GetJobAsync(string name, CancellationToken cancellationToken)
Gets a job.
Parameters | |
---|---|
Name | Description |
name | String Required. The job name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = await cloudSchedulerClient.GetJobAsync(name);
ListJobs(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListJobsResponse, Job> ListJobs(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists jobs.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The location name. For example:
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListJobsResponse, Job> | A pageable sequence of Job resources. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListJobsResponse, Job> response = cloudSchedulerClient.ListJobs(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Job item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListJobsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Job item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListJobs(ListJobsRequest, CallSettings)
public virtual 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 |
PagedEnumerable<ListJobsResponse, Job> | A pageable sequence of Job resources. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
ListJobsRequest request = new ListJobsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListJobsResponse, Job> response = cloudSchedulerClient.ListJobs(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Job item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListJobsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Job item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListJobs(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListJobsResponse, Job> ListJobs(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists jobs.
Parameters | |
---|---|
Name | Description |
parent | String Required. The location name. For example:
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListJobsResponse, Job> | A pageable sequence of Job resources. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListJobsResponse, Job> response = cloudSchedulerClient.ListJobs(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Job item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListJobsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Job item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListJobsAsync(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListJobsResponse, Job> ListJobsAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists jobs.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The location name. For example:
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListJobsResponse, Job> | A pageable asynchronous sequence of Job resources. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListJobsResponse, Job> response = cloudSchedulerClient.ListJobsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Job item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListJobsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Job item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListJobsAsync(ListJobsRequest, CallSettings)
public virtual 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 |
PagedAsyncEnumerable<ListJobsResponse, Job> | A pageable asynchronous sequence of Job resources. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
ListJobsRequest request = new ListJobsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListJobsResponse, Job> response = cloudSchedulerClient.ListJobsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Job item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListJobsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Job item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListJobsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListJobsResponse, Job> ListJobsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists jobs.
Parameters | |
---|---|
Name | Description |
parent | String Required. The location name. For example:
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListJobsResponse, Job> | A pageable asynchronous sequence of Job resources. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListJobsResponse, Job> response = cloudSchedulerClient.ListJobsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Job item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListJobsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Job item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
PauseJob(JobName, CallSettings)
public virtual Job PauseJob(JobName name, 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 |
name | JobName Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = cloudSchedulerClient.PauseJob(name);
PauseJob(PauseJobRequest, CallSettings)
public virtual 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. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
PauseJobRequest request = new PauseJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = cloudSchedulerClient.PauseJob(request);
PauseJob(String, CallSettings)
public virtual Job PauseJob(string name, 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 |
name | String Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = cloudSchedulerClient.PauseJob(name);
PauseJobAsync(JobName, CallSettings)
public virtual Task<Job> PauseJobAsync(JobName name, 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 |
name | JobName Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = await cloudSchedulerClient.PauseJobAsync(name);
PauseJobAsync(JobName, CancellationToken)
public virtual Task<Job> PauseJobAsync(JobName name, CancellationToken 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 | |
---|---|
Name | Description |
name | JobName Required. The job name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = await cloudSchedulerClient.PauseJobAsync(name);
PauseJobAsync(PauseJobRequest, CallSettings)
public virtual 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 |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
PauseJobRequest request = new PauseJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = await cloudSchedulerClient.PauseJobAsync(request);
PauseJobAsync(PauseJobRequest, CancellationToken)
public virtual Task<Job> PauseJobAsync(PauseJobRequest request, CancellationToken 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 | |
---|---|
Name | Description |
request | PauseJobRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
PauseJobRequest request = new PauseJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = await cloudSchedulerClient.PauseJobAsync(request);
PauseJobAsync(String, CallSettings)
public virtual Task<Job> PauseJobAsync(string name, 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 |
name | String Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = await cloudSchedulerClient.PauseJobAsync(name);
PauseJobAsync(String, CancellationToken)
public virtual Task<Job> PauseJobAsync(string name, CancellationToken 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 | |
---|---|
Name | Description |
name | String Required. The job name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = await cloudSchedulerClient.PauseJobAsync(name);
ResumeJob(JobName, CallSettings)
public virtual Job ResumeJob(JobName name, 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 |
name | JobName Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = cloudSchedulerClient.ResumeJob(name);
ResumeJob(ResumeJobRequest, CallSettings)
public virtual 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. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
ResumeJobRequest request = new ResumeJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = cloudSchedulerClient.ResumeJob(request);
ResumeJob(String, CallSettings)
public virtual Job ResumeJob(string name, 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 |
name | String Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = cloudSchedulerClient.ResumeJob(name);
ResumeJobAsync(JobName, CallSettings)
public virtual Task<Job> ResumeJobAsync(JobName name, 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 |
name | JobName Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = await cloudSchedulerClient.ResumeJobAsync(name);
ResumeJobAsync(JobName, CancellationToken)
public virtual Task<Job> ResumeJobAsync(JobName name, CancellationToken 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 | |
---|---|
Name | Description |
name | JobName Required. The job name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = await cloudSchedulerClient.ResumeJobAsync(name);
ResumeJobAsync(ResumeJobRequest, CallSettings)
public virtual 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 |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
ResumeJobRequest request = new ResumeJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = await cloudSchedulerClient.ResumeJobAsync(request);
ResumeJobAsync(ResumeJobRequest, CancellationToken)
public virtual Task<Job> ResumeJobAsync(ResumeJobRequest request, CancellationToken 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 | |
---|---|
Name | Description |
request | ResumeJobRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
ResumeJobRequest request = new ResumeJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = await cloudSchedulerClient.ResumeJobAsync(request);
ResumeJobAsync(String, CallSettings)
public virtual Task<Job> ResumeJobAsync(string name, 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 |
name | String Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = await cloudSchedulerClient.ResumeJobAsync(name);
ResumeJobAsync(String, CancellationToken)
public virtual Task<Job> ResumeJobAsync(string name, CancellationToken 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 | |
---|---|
Name | Description |
name | String Required. The job name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = await cloudSchedulerClient.ResumeJobAsync(name);
RunJob(JobName, CallSettings)
public virtual Job RunJob(JobName name, 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 |
name | JobName Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = cloudSchedulerClient.RunJob(name);
RunJob(RunJobRequest, CallSettings)
public virtual 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. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
RunJobRequest request = new RunJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = cloudSchedulerClient.RunJob(request);
RunJob(String, CallSettings)
public virtual Job RunJob(string name, 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 |
name | String Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = cloudSchedulerClient.RunJob(name);
RunJobAsync(JobName, CallSettings)
public virtual Task<Job> RunJobAsync(JobName name, 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 |
name | JobName Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = await cloudSchedulerClient.RunJobAsync(name);
RunJobAsync(JobName, CancellationToken)
public virtual Task<Job> RunJobAsync(JobName name, CancellationToken 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 | |
---|---|
Name | Description |
name | JobName Required. The job name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = await cloudSchedulerClient.RunJobAsync(name);
RunJobAsync(RunJobRequest, CallSettings)
public virtual 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 |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
RunJobRequest request = new RunJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = await cloudSchedulerClient.RunJobAsync(request);
RunJobAsync(RunJobRequest, CancellationToken)
public virtual Task<Job> RunJobAsync(RunJobRequest request, CancellationToken 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 | |
---|---|
Name | Description |
request | RunJobRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
RunJobRequest request = new RunJobRequest
{
JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = await cloudSchedulerClient.RunJobAsync(request);
RunJobAsync(String, CallSettings)
public virtual Task<Job> RunJobAsync(string name, 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 |
name | String Required. The job name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = await cloudSchedulerClient.RunJobAsync(name);
RunJobAsync(String, CancellationToken)
public virtual Task<Job> RunJobAsync(string name, CancellationToken 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 | |
---|---|
Name | Description |
name | String Required. The job name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = await cloudSchedulerClient.RunJobAsync(name);
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateJob(Job, FieldMask, CallSettings)
public virtual Job UpdateJob(Job job, FieldMask updateMask, 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 |
job | Job Required. The new job properties. [name][google.cloud.scheduler.v1.Job.name] must be specified. Output only fields cannot be modified using UpdateJob. Any value specified for an output only field will be ignored. |
updateMask | FieldMask A mask used to specify which fields of the job are being updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Job | The RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
Job job = new Job();
FieldMask updateMask = new FieldMask();
// Make the request
Job response = cloudSchedulerClient.UpdateJob(job, updateMask);
UpdateJob(UpdateJobRequest, CallSettings)
public virtual 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. |
// Create client
CloudSchedulerClient cloudSchedulerClient = CloudSchedulerClient.Create();
// Initialize request argument(s)
UpdateJobRequest request = new UpdateJobRequest
{
Job = new Job(),
UpdateMask = new FieldMask(),
};
// Make the request
Job response = cloudSchedulerClient.UpdateJob(request);
UpdateJobAsync(Job, FieldMask, CallSettings)
public virtual Task<Job> UpdateJobAsync(Job job, FieldMask updateMask, 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 |
job | Job Required. The new job properties. [name][google.cloud.scheduler.v1.Job.name] must be specified. Output only fields cannot be modified using UpdateJob. Any value specified for an output only field will be ignored. |
updateMask | FieldMask A mask used to specify which fields of the job are being updated. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
Job job = new Job();
FieldMask updateMask = new FieldMask();
// Make the request
Job response = await cloudSchedulerClient.UpdateJobAsync(job, updateMask);
UpdateJobAsync(Job, FieldMask, CancellationToken)
public virtual Task<Job> UpdateJobAsync(Job job, FieldMask updateMask, CancellationToken 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 | |
---|---|
Name | Description |
job | Job Required. The new job properties. [name][google.cloud.scheduler.v1.Job.name] must be specified. Output only fields cannot be modified using UpdateJob. Any value specified for an output only field will be ignored. |
updateMask | FieldMask A mask used to specify which fields of the job are being updated. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
Job job = new Job();
FieldMask updateMask = new FieldMask();
// Make the request
Job response = await cloudSchedulerClient.UpdateJobAsync(job, updateMask);
UpdateJobAsync(UpdateJobRequest, CallSettings)
public virtual 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 |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
UpdateJobRequest request = new UpdateJobRequest
{
Job = new Job(),
UpdateMask = new FieldMask(),
};
// Make the request
Job response = await cloudSchedulerClient.UpdateJobAsync(request);
UpdateJobAsync(UpdateJobRequest, CancellationToken)
public virtual Task<Job> UpdateJobAsync(UpdateJobRequest request, CancellationToken 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 | |
---|---|
Name | Description |
request | UpdateJobRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Job> | A Task containing the RPC response. |
// Create client
CloudSchedulerClient cloudSchedulerClient = await CloudSchedulerClient.CreateAsync();
// Initialize request argument(s)
UpdateJobRequest request = new UpdateJobRequest
{
Job = new Job(),
UpdateMask = new FieldMask(),
};
// Make the request
Job response = await cloudSchedulerClient.UpdateJobAsync(request);