Class CloudSchedulerClient (2.2.0)

public abstract class CloudSchedulerClient

CloudScheduler client wrapper, for convenient use.

Inheritance

Object > CloudSchedulerClient

Derived Types

Namespace

Google.Cloud.Scheduler.V1

Assembly

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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default CloudScheduler scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default CloudScheduler scopes are:

GrpcClient

public virtual CloudScheduler.CloudSchedulerClient GrpcClient { get; }

The underlying gRPC CloudScheduler client

Property Value
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

jobJob

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
requestCreateJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
parentString

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

jobJob

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
parentLocationName

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

jobJob

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
parentLocationName

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

jobJob

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

jobJob

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

jobJob

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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
NameDescription
requestDeleteJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
requestGetJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
parentLocationName

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListJobsResponse, Job>

A pageable sequence of Job resources.

Example
// 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
NameDescription
requestListJobsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListJobsResponse, Job>

A pageable sequence of Job resources.

Example
// 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
NameDescription
parentString

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListJobsResponse, Job>

A pageable sequence of Job resources.

Example
// 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
NameDescription
parentLocationName

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListJobsResponse, Job>

A pageable asynchronous sequence of Job resources.

Example
// 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
NameDescription
requestListJobsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListJobsResponse, Job>

A pageable asynchronous sequence of Job resources.

Example
// 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
NameDescription
parentString

Required. The location name. For example: projects/PROJECT_ID/locations/LOCATION_ID.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListJobsResponse, Job>

A pageable asynchronous sequence of Job resources.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
requestPauseJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestPauseJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestPauseJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
requestResumeJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestResumeJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestResumeJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
requestRunJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameJobName

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestRunJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestRunJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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
NameDescription
jobJob

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.

updateMaskFieldMask

A mask used to specify which fields of the job are being updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
requestUpdateJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

Example
// 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
NameDescription
jobJob

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.

updateMaskFieldMask

A mask used to specify which fields of the job are being updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
jobJob

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.

updateMaskFieldMask

A mask used to specify which fields of the job are being updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Job>

A Task containing the RPC response.

Example
// 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);