Class v1beta3.JobsV1Beta3Client

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. v1beta3

Package

@google-cloud/dataflow

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of JobsV1Beta3Client.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

jobsV1Beta3Stub

jobsV1Beta3Stub?: Promise<{
        [name: string]: Function;
    }>;

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

aggregatedListJobs(request, options)

aggregatedListJobs(request?: protos.google.dataflow.v1beta3.IListJobsRequest, options?: CallOptions): Promise<[
        protos.google.dataflow.v1beta3.IJob[],
        protos.google.dataflow.v1beta3.IListJobsRequest | null,
        protos.google.dataflow.v1beta3.IListJobsResponse
    ]>;

List the jobs of a project across all regions.

Parameters
NameDescription
request protos.google.dataflow.v1beta3.IListJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.dataflow.v1beta3.IJob[], protos.google.dataflow.v1beta3.IListJobsRequest | null, protos.google.dataflow.v1beta3.IListJobsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Job]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using aggregatedListJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

aggregatedListJobs(request, options, callback)

aggregatedListJobs(request: protos.google.dataflow.v1beta3.IListJobsRequest, options: CallOptions, callback: PaginationCallback<protos.google.dataflow.v1beta3.IListJobsRequest, protos.google.dataflow.v1beta3.IListJobsResponse | null | undefined, protos.google.dataflow.v1beta3.IJob>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.IListJobsRequest
options CallOptions
callback PaginationCallback<protos.google.dataflow.v1beta3.IListJobsRequest, protos.google.dataflow.v1beta3.IListJobsResponse | null | undefined, protos.google.dataflow.v1beta3.IJob>
Returns
TypeDescription
void

aggregatedListJobs(request, callback)

aggregatedListJobs(request: protos.google.dataflow.v1beta3.IListJobsRequest, callback: PaginationCallback<protos.google.dataflow.v1beta3.IListJobsRequest, protos.google.dataflow.v1beta3.IListJobsResponse | null | undefined, protos.google.dataflow.v1beta3.IJob>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.IListJobsRequest
callback PaginationCallback<protos.google.dataflow.v1beta3.IListJobsRequest, protos.google.dataflow.v1beta3.IListJobsResponse | null | undefined, protos.google.dataflow.v1beta3.IJob>
Returns
TypeDescription
void

aggregatedListJobsAsync(request, options)

aggregatedListJobsAsync(request?: protos.google.dataflow.v1beta3.IListJobsRequest, options?: CallOptions): AsyncIterable<protos.google.dataflow.v1beta3.IJob>;

Equivalent to aggregatedListJobs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.dataflow.v1beta3.IListJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.dataflow.v1beta3.IJob>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Job]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The kind of filter to use.
   */
  // const filter = {}
  /**
   *  The project which owns the jobs.
   */
  // const projectId = 'abc123'
  /**
   *  If there are many jobs, limit response to at most this many.
   *  The actual number of jobs returned will be the lesser of max_responses
   *  and an unspecified server-defined limit.
   */
  // const pageSize = 1234
  /**
   *  Set this to the 'next_page_token' field of a previous response
   *  to request additional results in a long list.
   */
  // const pageToken = 'abc123'
  /**
   *  The regional endpoint
   *  (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
   *  contains this job.
   */
  // const location = 'abc123'

  // Imports the Dataflow library
  const {JobsV1Beta3Client} = require('@google-cloud/dataflow').v1beta3;

  // Instantiates a client
  const dataflowClient = new JobsV1Beta3Client();

  async function callAggregatedListJobs() {
    // Construct request
    const request = {};

    // Run request
    const iterable = await dataflowClient.aggregatedListJobsAsync(request);
    for await (const response of iterable) {
      console.log(response);
    }
  }

  callAggregatedListJobs();

aggregatedListJobsStream(request, options)

aggregatedListJobsStream(request?: protos.google.dataflow.v1beta3.IListJobsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.dataflow.v1beta3.IListJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Job] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using aggregatedListJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

checkActiveJobs(request, options)

checkActiveJobs(request?: protos.google.dataflow.v1beta3.ICheckActiveJobsRequest, options?: CallOptions): Promise<[
        protos.google.dataflow.v1beta3.ICheckActiveJobsResponse,
        protos.google.dataflow.v1beta3.ICheckActiveJobsRequest | undefined,
        {} | undefined
    ]>;

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

Parameters
NameDescription
request protos.google.dataflow.v1beta3.ICheckActiveJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.dataflow.v1beta3.ICheckActiveJobsResponse, protos.google.dataflow.v1beta3.ICheckActiveJobsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [CheckActiveJobsResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The project which owns the jobs.
   */
  // const projectId = 'abc123'

  // Imports the Dataflow library
  const {JobsV1Beta3Client} = require('@google-cloud/dataflow').v1beta3;

  // Instantiates a client
  const dataflowClient = new JobsV1Beta3Client();

  async function callCheckActiveJobs() {
    // Construct request
    const request = {};

    // Run request
    const response = await dataflowClient.checkActiveJobs(request);
    console.log(response);
  }

  callCheckActiveJobs();

checkActiveJobs(request, options, callback)

checkActiveJobs(request: protos.google.dataflow.v1beta3.ICheckActiveJobsRequest, options: CallOptions, callback: Callback<protos.google.dataflow.v1beta3.ICheckActiveJobsResponse, protos.google.dataflow.v1beta3.ICheckActiveJobsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.ICheckActiveJobsRequest
options CallOptions
callback Callback<protos.google.dataflow.v1beta3.ICheckActiveJobsResponse, protos.google.dataflow.v1beta3.ICheckActiveJobsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

checkActiveJobs(request, callback)

checkActiveJobs(request: protos.google.dataflow.v1beta3.ICheckActiveJobsRequest, callback: Callback<protos.google.dataflow.v1beta3.ICheckActiveJobsResponse, protos.google.dataflow.v1beta3.ICheckActiveJobsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.ICheckActiveJobsRequest
callback Callback<protos.google.dataflow.v1beta3.ICheckActiveJobsResponse, protos.google.dataflow.v1beta3.ICheckActiveJobsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createJob(request, options)

createJob(request?: protos.google.dataflow.v1beta3.ICreateJobRequest, options?: CallOptions): Promise<[
        protos.google.dataflow.v1beta3.IJob,
        protos.google.dataflow.v1beta3.ICreateJobRequest | undefined,
        {} | undefined
    ]>;

Creates a Cloud Dataflow job.

To create a job, we recommend using projects.locations.jobs.create with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.create is not recommended, as your job will always start in us-central1.

Parameters
NameDescription
request protos.google.dataflow.v1beta3.ICreateJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.ICreateJobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Job]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The ID of the Cloud Platform project that the job belongs to.
   */
  // const projectId = 'abc123'
  /**
   *  The job to create.
   */
  // const job = {}
  /**
   *  The level of information requested in response.
   */
  // const view = {}
  /**
   *  The regional endpoint
   *  (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
   *  contains this job.
   */
  // const location = 'abc123'

  // Imports the Dataflow library
  const {JobsV1Beta3Client} = require('@google-cloud/dataflow').v1beta3;

  // Instantiates a client
  const dataflowClient = new JobsV1Beta3Client();

  async function callCreateJob() {
    // Construct request
    const request = {};

    // Run request
    const response = await dataflowClient.createJob(request);
    console.log(response);
  }

  callCreateJob();

createJob(request, options, callback)

createJob(request: protos.google.dataflow.v1beta3.ICreateJobRequest, options: CallOptions, callback: Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.ICreateJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.ICreateJobRequest
options CallOptions
callback Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.ICreateJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createJob(request, callback)

createJob(request: protos.google.dataflow.v1beta3.ICreateJobRequest, callback: Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.ICreateJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.ICreateJobRequest
callback Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.ICreateJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getJob(request, options)

getJob(request?: protos.google.dataflow.v1beta3.IGetJobRequest, options?: CallOptions): Promise<[
        protos.google.dataflow.v1beta3.IJob,
        protos.google.dataflow.v1beta3.IGetJobRequest | undefined,
        {} | undefined
    ]>;

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] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.get is not recommended, as you can only get the state of jobs that are running in us-central1.

Parameters
NameDescription
request protos.google.dataflow.v1beta3.IGetJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.IGetJobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Job]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The ID of the Cloud Platform project that the job belongs to.
   */
  // const projectId = 'abc123'
  /**
   *  The job ID.
   */
  // const jobId = 'abc123'
  /**
   *  The level of information requested in response.
   */
  // const view = {}
  /**
   *  The regional endpoint
   *  (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
   *  contains this job.
   */
  // const location = 'abc123'

  // Imports the Dataflow library
  const {JobsV1Beta3Client} = require('@google-cloud/dataflow').v1beta3;

  // Instantiates a client
  const dataflowClient = new JobsV1Beta3Client();

  async function callGetJob() {
    // Construct request
    const request = {};

    // Run request
    const response = await dataflowClient.getJob(request);
    console.log(response);
  }

  callGetJob();

getJob(request, options, callback)

getJob(request: protos.google.dataflow.v1beta3.IGetJobRequest, options: CallOptions, callback: Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.IGetJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.IGetJobRequest
options CallOptions
callback Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.IGetJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getJob(request, callback)

getJob(request: protos.google.dataflow.v1beta3.IGetJobRequest, callback: Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.IGetJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.IGetJobRequest
callback Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.IGetJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listJobs(request, options)

listJobs(request?: protos.google.dataflow.v1beta3.IListJobsRequest, options?: CallOptions): Promise<[
        protos.google.dataflow.v1beta3.IJob[],
        protos.google.dataflow.v1beta3.IListJobsRequest | null,
        protos.google.dataflow.v1beta3.IListJobsResponse
    ]>;

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] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 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
NameDescription
request protos.google.dataflow.v1beta3.IListJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.dataflow.v1beta3.IJob[], protos.google.dataflow.v1beta3.IListJobsRequest | null, protos.google.dataflow.v1beta3.IListJobsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Job]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listJobs(request, options, callback)

listJobs(request: protos.google.dataflow.v1beta3.IListJobsRequest, options: CallOptions, callback: PaginationCallback<protos.google.dataflow.v1beta3.IListJobsRequest, protos.google.dataflow.v1beta3.IListJobsResponse | null | undefined, protos.google.dataflow.v1beta3.IJob>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.IListJobsRequest
options CallOptions
callback PaginationCallback<protos.google.dataflow.v1beta3.IListJobsRequest, protos.google.dataflow.v1beta3.IListJobsResponse | null | undefined, protos.google.dataflow.v1beta3.IJob>
Returns
TypeDescription
void

listJobs(request, callback)

listJobs(request: protos.google.dataflow.v1beta3.IListJobsRequest, callback: PaginationCallback<protos.google.dataflow.v1beta3.IListJobsRequest, protos.google.dataflow.v1beta3.IListJobsResponse | null | undefined, protos.google.dataflow.v1beta3.IJob>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.IListJobsRequest
callback PaginationCallback<protos.google.dataflow.v1beta3.IListJobsRequest, protos.google.dataflow.v1beta3.IListJobsResponse | null | undefined, protos.google.dataflow.v1beta3.IJob>
Returns
TypeDescription
void

listJobsAsync(request, options)

listJobsAsync(request?: protos.google.dataflow.v1beta3.IListJobsRequest, options?: CallOptions): AsyncIterable<protos.google.dataflow.v1beta3.IJob>;

Equivalent to listJobs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.dataflow.v1beta3.IListJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.dataflow.v1beta3.IJob>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Job]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The kind of filter to use.
   */
  // const filter = {}
  /**
   *  The project which owns the jobs.
   */
  // const projectId = 'abc123'
  /**
   *  If there are many jobs, limit response to at most this many.
   *  The actual number of jobs returned will be the lesser of max_responses
   *  and an unspecified server-defined limit.
   */
  // const pageSize = 1234
  /**
   *  Set this to the 'next_page_token' field of a previous response
   *  to request additional results in a long list.
   */
  // const pageToken = 'abc123'
  /**
   *  The regional endpoint
   *  (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
   *  contains this job.
   */
  // const location = 'abc123'

  // Imports the Dataflow library
  const {JobsV1Beta3Client} = require('@google-cloud/dataflow').v1beta3;

  // Instantiates a client
  const dataflowClient = new JobsV1Beta3Client();

  async function callListJobs() {
    // Construct request
    const request = {};

    // Run request
    const iterable = await dataflowClient.listJobsAsync(request);
    for await (const response of iterable) {
      console.log(response);
    }
  }

  callListJobs();

listJobsStream(request, options)

listJobsStream(request?: protos.google.dataflow.v1beta3.IListJobsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.dataflow.v1beta3.IListJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Job] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

snapshotJob(request, options)

snapshotJob(request?: protos.google.dataflow.v1beta3.ISnapshotJobRequest, options?: CallOptions): Promise<[
        protos.google.dataflow.v1beta3.ISnapshot,
        protos.google.dataflow.v1beta3.ISnapshotJobRequest | undefined,
        {} | undefined
    ]>;

Snapshot the state of a streaming job.

Parameters
NameDescription
request protos.google.dataflow.v1beta3.ISnapshotJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.dataflow.v1beta3.ISnapshot, protos.google.dataflow.v1beta3.ISnapshotJobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Snapshot]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The project which owns the job to be snapshotted.
   */
  // const projectId = 'abc123'
  /**
   *  The job to be snapshotted.
   */
  // const jobId = 'abc123'
  /**
   *  TTL for the snapshot.
   */
  // const ttl = {}
  /**
   *  The location that contains this job.
   */
  // const location = 'abc123'
  /**
   *  If true, perform snapshots for sources which support this.
   */
  // const snapshotSources = true
  /**
   *  User specified description of the snapshot. Maybe empty.
   */
  // const description = 'abc123'

  // Imports the Dataflow library
  const {JobsV1Beta3Client} = require('@google-cloud/dataflow').v1beta3;

  // Instantiates a client
  const dataflowClient = new JobsV1Beta3Client();

  async function callSnapshotJob() {
    // Construct request
    const request = {};

    // Run request
    const response = await dataflowClient.snapshotJob(request);
    console.log(response);
  }

  callSnapshotJob();

snapshotJob(request, options, callback)

snapshotJob(request: protos.google.dataflow.v1beta3.ISnapshotJobRequest, options: CallOptions, callback: Callback<protos.google.dataflow.v1beta3.ISnapshot, protos.google.dataflow.v1beta3.ISnapshotJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.ISnapshotJobRequest
options CallOptions
callback Callback<protos.google.dataflow.v1beta3.ISnapshot, protos.google.dataflow.v1beta3.ISnapshotJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

snapshotJob(request, callback)

snapshotJob(request: protos.google.dataflow.v1beta3.ISnapshotJobRequest, callback: Callback<protos.google.dataflow.v1beta3.ISnapshot, protos.google.dataflow.v1beta3.ISnapshotJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.ISnapshotJobRequest
callback Callback<protos.google.dataflow.v1beta3.ISnapshot, protos.google.dataflow.v1beta3.ISnapshotJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateJob(request, options)

updateJob(request?: protos.google.dataflow.v1beta3.IUpdateJobRequest, options?: CallOptions): Promise<[
        protos.google.dataflow.v1beta3.IJob,
        protos.google.dataflow.v1beta3.IUpdateJobRequest | undefined,
        {} | undefined
    ]>;

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] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using projects.jobs.update is not recommended, as you can only update the state of jobs that are running in us-central1.

Parameters
NameDescription
request protos.google.dataflow.v1beta3.IUpdateJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.IUpdateJobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Job]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The ID of the Cloud Platform project that the job belongs to.
   */
  // const projectId = 'abc123'
  /**
   *  The job ID.
   */
  // const jobId = 'abc123'
  /**
   *  The updated job.
   *  Only the job state is updatable; other fields will be ignored.
   */
  // const job = {}
  /**
   *  The regional endpoint
   *  (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
   *  contains this job.
   */
  // const location = 'abc123'

  // Imports the Dataflow library
  const {JobsV1Beta3Client} = require('@google-cloud/dataflow').v1beta3;

  // Instantiates a client
  const dataflowClient = new JobsV1Beta3Client();

  async function callUpdateJob() {
    // Construct request
    const request = {};

    // Run request
    const response = await dataflowClient.updateJob(request);
    console.log(response);
  }

  callUpdateJob();

updateJob(request, options, callback)

updateJob(request: protos.google.dataflow.v1beta3.IUpdateJobRequest, options: CallOptions, callback: Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.IUpdateJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.IUpdateJobRequest
options CallOptions
callback Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.IUpdateJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateJob(request, callback)

updateJob(request: protos.google.dataflow.v1beta3.IUpdateJobRequest, callback: Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.IUpdateJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.dataflow.v1beta3.IUpdateJobRequest
callback Callback<protos.google.dataflow.v1beta3.IJob, protos.google.dataflow.v1beta3.IUpdateJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void