Dataflow v1beta3 API - Class JobsV1Beta3Client (2.0.0-beta06)

public abstract class JobsV1Beta3Client

Reference documentation and code samples for the Dataflow v1beta3 API class JobsV1Beta3Client.

JobsV1Beta3 client wrapper, for convenient use.

Inheritance

object > JobsV1Beta3Client

Derived Types

Namespace

Google.Cloud.Dataflow.V1Beta3

Assembly

Google.Cloud.Dataflow.V1Beta3.dll

Remarks

Provides a method to create and modify Google Cloud Dataflow jobs. A Job is a multi-stage computation graph run by the Cloud Dataflow service.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the JobsV1Beta3 service, which is a host of "dataflow.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default JobsV1Beta3 scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual JobsV1Beta3.JobsV1Beta3Client GrpcClient { get; }

The underlying gRPC JobsV1Beta3 client

Property Value
Type Description
JobsV1Beta3JobsV1Beta3Client

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

AggregatedListJobs(ListJobsRequest, CallSettings)

public virtual PagedEnumerable<ListJobsResponse, Job> AggregatedListJobs(ListJobsRequest request, CallSettings callSettings = null)

List the jobs of a project across all regions.

Parameters
Name Description
request ListJobsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListJobsResponseJob

A pageable sequence of Job resources.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = JobsV1Beta3Client.Create();
// Initialize request argument(s)
ListJobsRequest request = new ListJobsRequest
{
    ProjectId = "",
    Filter = ListJobsRequest.Types.Filter.Unknown,
    Location = "",
};
// Make the request
PagedEnumerable<ListJobsResponse, Job> response = jobsV1Beta3Client.AggregatedListJobs(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;

AggregatedListJobsAsync(ListJobsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListJobsResponse, Job> AggregatedListJobsAsync(ListJobsRequest request, CallSettings callSettings = null)

List the jobs of a project across all regions.

Parameters
Name Description
request ListJobsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListJobsResponseJob

A pageable asynchronous sequence of Job resources.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
ListJobsRequest request = new ListJobsRequest
{
    ProjectId = "",
    Filter = ListJobsRequest.Types.Filter.Unknown,
    Location = "",
};
// Make the request
PagedAsyncEnumerable<ListJobsResponse, Job> response = jobsV1Beta3Client.AggregatedListJobsAsync(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;

CheckActiveJobs(CheckActiveJobsRequest, CallSettings)

public virtual CheckActiveJobsResponse CheckActiveJobs(CheckActiveJobsRequest request, CallSettings callSettings = null)

Check for existence of active jobs in the given project across all regions.

Parameters
Name Description
request CheckActiveJobsRequest

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
CheckActiveJobsResponse

The RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = JobsV1Beta3Client.Create();
// Initialize request argument(s)
CheckActiveJobsRequest request = new CheckActiveJobsRequest { ProjectId = "", };
// Make the request
CheckActiveJobsResponse response = jobsV1Beta3Client.CheckActiveJobs(request);

CheckActiveJobsAsync(CheckActiveJobsRequest, CallSettings)

public virtual Task<CheckActiveJobsResponse> CheckActiveJobsAsync(CheckActiveJobsRequest request, CallSettings callSettings = null)

Check for existence of active jobs in the given project across all regions.

Parameters
Name Description
request CheckActiveJobsRequest

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
TaskCheckActiveJobsResponse

A Task containing the RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
CheckActiveJobsRequest request = new CheckActiveJobsRequest { ProjectId = "", };
// Make the request
CheckActiveJobsResponse response = await jobsV1Beta3Client.CheckActiveJobsAsync(request);

CheckActiveJobsAsync(CheckActiveJobsRequest, CancellationToken)

public virtual Task<CheckActiveJobsResponse> CheckActiveJobsAsync(CheckActiveJobsRequest request, CancellationToken cancellationToken)

Check for existence of active jobs in the given project across all regions.

Parameters
Name Description
request CheckActiveJobsRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCheckActiveJobsResponse

A Task containing the RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
CheckActiveJobsRequest request = new CheckActiveJobsRequest { ProjectId = "", };
// Make the request
CheckActiveJobsResponse response = await jobsV1Beta3Client.CheckActiveJobsAsync(request);

Create()

public static JobsV1Beta3Client Create()

Synchronously creates a JobsV1Beta3Client using the default credentials, endpoint and settings. To specify custom credentials or other settings, use JobsV1Beta3ClientBuilder.

Returns
Type Description
JobsV1Beta3Client

The created JobsV1Beta3Client.

CreateAsync(CancellationToken)

public static Task<JobsV1Beta3Client> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a JobsV1Beta3Client using the default credentials, endpoint and settings. To specify custom credentials or other settings, use JobsV1Beta3ClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskJobsV1Beta3Client

The task representing the created JobsV1Beta3Client.

CreateJob(CreateJobRequest, CallSettings)

public virtual Job CreateJob(CreateJobRequest request, CallSettings callSettings = null)

Creates a Cloud Dataflow job.

To create a job, we recommend using projects.locations.jobs.create with a regional endpoint. Using projects.jobs.create is not recommended, as your job will always start in us-central1.

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.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = JobsV1Beta3Client.Create();
// Initialize request argument(s)
CreateJobRequest request = new CreateJobRequest
{
    ProjectId = "",
    Job = new Job(),
    View = JobView.Unknown,
    ReplaceJobId = "",
    Location = "",
};
// Make the request
Job response = jobsV1Beta3Client.CreateJob(request);

CreateJobAsync(CreateJobRequest, CallSettings)

public virtual Task<Job> CreateJobAsync(CreateJobRequest request, CallSettings callSettings = null)

Creates a Cloud Dataflow job.

To create a job, we recommend using projects.locations.jobs.create with a regional endpoint. Using projects.jobs.create is not recommended, as your job will always start in us-central1.

Parameters
Name Description
request CreateJobRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
CreateJobRequest request = new CreateJobRequest
{
    ProjectId = "",
    Job = new Job(),
    View = JobView.Unknown,
    ReplaceJobId = "",
    Location = "",
};
// Make the request
Job response = await jobsV1Beta3Client.CreateJobAsync(request);

CreateJobAsync(CreateJobRequest, CancellationToken)

public virtual Task<Job> CreateJobAsync(CreateJobRequest request, CancellationToken cancellationToken)

Creates a Cloud Dataflow job.

To create a job, we recommend using projects.locations.jobs.create with a regional endpoint. Using projects.jobs.create is not recommended, as your job will always start in us-central1.

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
TaskJob

A Task containing the RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
CreateJobRequest request = new CreateJobRequest
{
    ProjectId = "",
    Job = new Job(),
    View = JobView.Unknown,
    ReplaceJobId = "",
    Location = "",
};
// Make the request
Job response = await jobsV1Beta3Client.CreateJobAsync(request);

GetJob(GetJobRequest, CallSettings)

public virtual Job GetJob(GetJobRequest request, CallSettings callSettings = null)

Gets the state of the specified Cloud Dataflow job.

To get the state of a job, we recommend using projects.locations.jobs.get with a regional endpoint. Using projects.jobs.get is not recommended, as you can only get the state of jobs that are running in us-central1.

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.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = JobsV1Beta3Client.Create();
// Initialize request argument(s)
GetJobRequest request = new GetJobRequest
{
    ProjectId = "",
    JobId = "",
    View = JobView.Unknown,
    Location = "",
};
// Make the request
Job response = jobsV1Beta3Client.GetJob(request);

GetJobAsync(GetJobRequest, CallSettings)

public virtual Task<Job> GetJobAsync(GetJobRequest request, CallSettings callSettings = null)

Gets the state of the specified Cloud Dataflow job.

To get the state of a job, we recommend using projects.locations.jobs.get with a regional endpoint. Using projects.jobs.get is not recommended, as you can only get the state of jobs that are running in us-central1.

Parameters
Name Description
request GetJobRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
GetJobRequest request = new GetJobRequest
{
    ProjectId = "",
    JobId = "",
    View = JobView.Unknown,
    Location = "",
};
// Make the request
Job response = await jobsV1Beta3Client.GetJobAsync(request);

GetJobAsync(GetJobRequest, CancellationToken)

public virtual Task<Job> GetJobAsync(GetJobRequest request, CancellationToken cancellationToken)

Gets the state of the specified Cloud Dataflow job.

To get the state of a job, we recommend using projects.locations.jobs.get with a regional endpoint. Using projects.jobs.get is not recommended, as you can only get the state of jobs that are running in us-central1.

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
TaskJob

A Task containing the RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
GetJobRequest request = new GetJobRequest
{
    ProjectId = "",
    JobId = "",
    View = JobView.Unknown,
    Location = "",
};
// Make the request
Job response = await jobsV1Beta3Client.GetJobAsync(request);

ListJobs(ListJobsRequest, CallSettings)

public virtual PagedEnumerable<ListJobsResponse, Job> ListJobs(ListJobsRequest request, CallSettings callSettings = null)

List the jobs of a project.

To list the jobs of a project in a region, we recommend using projects.locations.jobs.list with a regional endpoint. To list the all jobs across all regions, use projects.jobs.aggregated. Using projects.jobs.list is not recommended, as you can only get the list of jobs that are running in us-central1.

Parameters
Name Description
request ListJobsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListJobsResponseJob

A pageable sequence of Job resources.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = JobsV1Beta3Client.Create();
// Initialize request argument(s)
ListJobsRequest request = new ListJobsRequest
{
    ProjectId = "",
    Filter = ListJobsRequest.Types.Filter.Unknown,
    Location = "",
};
// Make the request
PagedEnumerable<ListJobsResponse, Job> response = jobsV1Beta3Client.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;

ListJobsAsync(ListJobsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListJobsResponse, Job> ListJobsAsync(ListJobsRequest request, CallSettings callSettings = null)

List the jobs of a project.

To list the jobs of a project in a region, we recommend using projects.locations.jobs.list with a regional endpoint. To list the all jobs across all regions, use projects.jobs.aggregated. Using projects.jobs.list is not recommended, as you can only get the list of jobs that are running in us-central1.

Parameters
Name Description
request ListJobsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListJobsResponseJob

A pageable asynchronous sequence of Job resources.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
ListJobsRequest request = new ListJobsRequest
{
    ProjectId = "",
    Filter = ListJobsRequest.Types.Filter.Unknown,
    Location = "",
};
// Make the request
PagedAsyncEnumerable<ListJobsResponse, Job> response = jobsV1Beta3Client.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;

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.

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.

SnapshotJob(SnapshotJobRequest, CallSettings)

public virtual Snapshot SnapshotJob(SnapshotJobRequest request, CallSettings callSettings = null)

Snapshot the state of a streaming job.

Parameters
Name Description
request SnapshotJobRequest

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
Snapshot

The RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = JobsV1Beta3Client.Create();
// Initialize request argument(s)
SnapshotJobRequest request = new SnapshotJobRequest
{
    ProjectId = "",
    JobId = "",
    Ttl = new Duration(),
    Location = "",
    SnapshotSources = false,
    Description = "",
};
// Make the request
Snapshot response = jobsV1Beta3Client.SnapshotJob(request);

SnapshotJobAsync(SnapshotJobRequest, CallSettings)

public virtual Task<Snapshot> SnapshotJobAsync(SnapshotJobRequest request, CallSettings callSettings = null)

Snapshot the state of a streaming job.

Parameters
Name Description
request SnapshotJobRequest

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
TaskSnapshot

A Task containing the RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
SnapshotJobRequest request = new SnapshotJobRequest
{
    ProjectId = "",
    JobId = "",
    Ttl = new Duration(),
    Location = "",
    SnapshotSources = false,
    Description = "",
};
// Make the request
Snapshot response = await jobsV1Beta3Client.SnapshotJobAsync(request);

SnapshotJobAsync(SnapshotJobRequest, CancellationToken)

public virtual Task<Snapshot> SnapshotJobAsync(SnapshotJobRequest request, CancellationToken cancellationToken)

Snapshot the state of a streaming job.

Parameters
Name Description
request SnapshotJobRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSnapshot

A Task containing the RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
SnapshotJobRequest request = new SnapshotJobRequest
{
    ProjectId = "",
    JobId = "",
    Ttl = new Duration(),
    Location = "",
    SnapshotSources = false,
    Description = "",
};
// Make the request
Snapshot response = await jobsV1Beta3Client.SnapshotJobAsync(request);

UpdateJob(UpdateJobRequest, CallSettings)

public virtual Job UpdateJob(UpdateJobRequest request, CallSettings callSettings = null)

Updates the state of an existing Cloud Dataflow job.

To update the state of an existing job, we recommend using projects.locations.jobs.update with a regional endpoint. Using projects.jobs.update is not recommended, as you can only update the state of jobs that are running in us-central1.

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.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = JobsV1Beta3Client.Create();
// Initialize request argument(s)
UpdateJobRequest request = new UpdateJobRequest
{
    ProjectId = "",
    JobId = "",
    Job = new Job(),
    Location = "",
};
// Make the request
Job response = jobsV1Beta3Client.UpdateJob(request);

UpdateJobAsync(UpdateJobRequest, CallSettings)

public virtual Task<Job> UpdateJobAsync(UpdateJobRequest request, CallSettings callSettings = null)

Updates the state of an existing Cloud Dataflow job.

To update the state of an existing job, we recommend using projects.locations.jobs.update with a regional endpoint. Using projects.jobs.update is not recommended, as you can only update the state of jobs that are running in us-central1.

Parameters
Name Description
request UpdateJobRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
UpdateJobRequest request = new UpdateJobRequest
{
    ProjectId = "",
    JobId = "",
    Job = new Job(),
    Location = "",
};
// Make the request
Job response = await jobsV1Beta3Client.UpdateJobAsync(request);

UpdateJobAsync(UpdateJobRequest, CancellationToken)

public virtual Task<Job> UpdateJobAsync(UpdateJobRequest request, CancellationToken cancellationToken)

Updates the state of an existing Cloud Dataflow job.

To update the state of an existing job, we recommend using projects.locations.jobs.update with a regional endpoint. Using projects.jobs.update is not recommended, as you can only update the state of jobs that are running in us-central1.

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
TaskJob

A Task containing the RPC response.

Example
// Create client
JobsV1Beta3Client jobsV1Beta3Client = await JobsV1Beta3Client.CreateAsync();
// Initialize request argument(s)
UpdateJobRequest request = new UpdateJobRequest
{
    ProjectId = "",
    JobId = "",
    Job = new Job(),
    Location = "",
};
// Make the request
Job response = await jobsV1Beta3Client.UpdateJobAsync(request);