Class v1.DataTransferServiceClient (2.3.0)

The Google BigQuery Data Transfer Service API enables BigQuery users to configure the transfer of their data from other Google Products into BigQuery. This service contains methods that are end user exposed. It backs up the frontend. v1

Package

@google-cloud/bigquery-data-transfer

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of DataTransferServiceClient.

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;

dataTransferServiceStub

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

descriptors

descriptors: Descriptors;

innerApiCalls

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

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

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

checkValidCreds(request, options)

checkValidCreds(request?: protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse, (protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest | undefined), {} | undefined]>;

Returns true if valid credentials exist for the given data source and requesting user. Some data sources doesn't support service account, so we need to talk to them on behalf of the end user. This API just checks whether we have OAuth token for the particular user, which is a pre-requisite before user can create a transfer config.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse, (protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [CheckValidCredsResponse]. 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.
   */
  /**
   *  Required. The data source in the form:
   *  `projects/{project_id}/dataSources/{data_source_id}` or
   *  `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`.
   */
  // const name = 'abc123'

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

  async function callCheckValidCreds() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datatransferClient.checkValidCreds(request);
    console.log(response);
  }

  callCheckValidCreds();

checkValidCreds(request, options, callback)

checkValidCreds(request: protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse, protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse, protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

checkValidCreds(request, callback)

checkValidCreds(request: protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse, protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse, protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest | 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.

createTransferConfig(request, options)

createTransferConfig(request?: protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, (protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest | undefined), {} | undefined]>;

Creates a new data transfer configuration.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, (protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TransferConfig]. 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.
   */
  /**
   *  Required. The BigQuery project id where the transfer configuration should be created.
   *  Must be in the format projects/{project_id}/locations/{location_id} or
   *  projects/{project_id}. If specified location and location of the
   *  destination bigquery dataset do not match - the request will fail.
   */
  // const parent = 'abc123'
  /**
   *  Required. Data transfer configuration to create.
   */
  // const transferConfig = {}
  /**
   *  Optional OAuth2 authorization code to use with this transfer configuration.
   *  This is required if new credentials are needed, as indicated by
   *  `CheckValidCreds`.
   *  In order to obtain authorization_code, please make a
   *  request to
   *  https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=

createTransferConfig(request, options, callback)

createTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createTransferConfig(request, callback)

createTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteTransferConfig(request, options)

deleteTransferConfig(request?: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, (protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest | undefined), {} | undefined]>;

Deletes a data transfer configuration, including any associated transfer runs and logs.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, (protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. 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.
   */
  /**
   *  Required. The field will contain name of the resource requested, for example:
   *  `projects/{project_id}/transferConfigs/{config_id}` or
   *  `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
   */
  // const name = 'abc123'

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

  async function callDeleteTransferConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datatransferClient.deleteTransferConfig(request);
    console.log(response);
  }

  callDeleteTransferConfig();

deleteTransferConfig(request, options, callback)

deleteTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteTransferConfig(request, callback)

deleteTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteTransferRun(request, options)

deleteTransferRun(request?: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, (protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest | undefined), {} | undefined]>;

Deletes the specified transfer run.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.protobuf.IEmpty, (protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. 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.
   */
  /**
   *  Required. The field will contain name of the resource requested, for example:
   *  `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
   *  `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
   */
  // const name = 'abc123'

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

  async function callDeleteTransferRun() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datatransferClient.deleteTransferRun(request);
    console.log(response);
  }

  callDeleteTransferRun();

deleteTransferRun(request, options, callback)

deleteTransferRun(request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteTransferRun(request, callback)

deleteTransferRun(request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDataSource(request, options)

getDataSource(request?: protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.IDataSource, (protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest | undefined), {} | undefined]>;

Retrieves a supported data source and returns its settings, which can be used for UI rendering.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.IDataSource, (protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [DataSource]. 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.
   */
  /**
   *  Required. The field will contain name of the resource requested, for example:
   *  `projects/{project_id}/dataSources/{data_source_id}` or
   *  `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`
   */
  // const name = 'abc123'

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

  async function callGetDataSource() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datatransferClient.getDataSource(request);
    console.log(response);
  }

  callGetDataSource();

getDataSource(request, options, callback)

getDataSource(request: protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IDataSource, protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.IDataSource, protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDataSource(request, callback)

getDataSource(request: protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IDataSource, protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.IDataSource, protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest | 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

getTransferConfig(request, options)

getTransferConfig(request?: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, (protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest | undefined), {} | undefined]>;

Returns information about a data transfer config.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, (protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TransferConfig]. 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.
   */
  /**
   *  Required. The field will contain name of the resource requested, for example:
   *  `projects/{project_id}/transferConfigs/{config_id}` or
   *  `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
   */
  // const name = 'abc123'

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

  async function callGetTransferConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datatransferClient.getTransferConfig(request);
    console.log(response);
  }

  callGetTransferConfig();

getTransferConfig(request, options, callback)

getTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTransferConfig(request, callback)

getTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTransferRun(request, options)

getTransferRun(request?: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferRun, (protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest | undefined), {} | undefined]>;

Returns information about the particular transfer run.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferRun, (protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TransferRun]. 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.
   */
  /**
   *  Required. The field will contain name of the resource requested, for example:
   *  `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
   *  `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
   */
  // const name = 'abc123'

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

  async function callGetTransferRun() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datatransferClient.getTransferRun(request);
    console.log(response);
  }

  callGetTransferRun();

getTransferRun(request, options, callback)

getTransferRun(request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferRun, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferRun, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTransferRun(request, callback)

getTransferRun(request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferRun, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferRun, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest | null | undefined, {} | null | 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.

listDataSources(request, options)

listDataSources(request?: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.IDataSource[], protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest | null, protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse]>;

Lists supported data sources and returns their settings, which can be used for UI rendering.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.IDataSource[], protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest | null, protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [DataSource]. 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 listDataSourcesAsync() 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.

listDataSources(request, options, callback)

listDataSources(request: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.IDataSource>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.IDataSource>
Returns
TypeDescription
void

listDataSources(request, callback)

listDataSources(request: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.IDataSource>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest
callback PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.IDataSource>
Returns
TypeDescription
void

listDataSourcesAsync(request, options)

listDataSourcesAsync(request?: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.IDataSource>;

Equivalent to listDataSources, 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.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.IDataSource>

{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 [DataSource]. 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.
   */
  /**
   *  Required. The BigQuery project id for which data sources should be returned.
   *  Must be in the form: `projects/{project_id}` or
   *  `projects/{project_id}/locations/{location_id}
   */
  // const parent = 'abc123'
  /**
   *  Pagination token, which can be used to request a specific page
   *  of `ListDataSourcesRequest` list results. For multiple-page
   *  results, `ListDataSourcesResponse` outputs
   *  a `next_page` token, which can be used as the
   *  `page_token` value to request the next page of list results.
   */
  // const pageToken = 'abc123'
  /**
   *  Page size. The default page size is the maximum value of 1000 results.
   */
  // const pageSize = 1234

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

  async function callListDataSources() {
    // Construct request
    const request = {
      parent,
    };

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

  callListDataSources();

listDataSourcesStream(request, options)

listDataSourcesStream(request?: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest

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 [DataSource] 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 listDataSourcesAsync() 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.

listTransferConfigs(request, options)

listTransferConfigs(request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig[], protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest | null, protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse]>;

Returns information about all transfer configs owned by a project in the specified location.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig[], protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest | null, protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [TransferConfig]. 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 listTransferConfigsAsync() 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.

listTransferConfigs(request, options, callback)

listTransferConfigs(request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig>
Returns
TypeDescription
void

listTransferConfigs(request, callback)

listTransferConfigs(request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest
callback PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig>
Returns
TypeDescription
void

listTransferConfigsAsync(request, options)

listTransferConfigsAsync(request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig>;

Equivalent to listTransferConfigs, 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.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig>

{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 [TransferConfig]. 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.
   */
  /**
   *  Required. The BigQuery project id for which data sources
   *  should be returned: `projects/{project_id}` or
   *  `projects/{project_id}/locations/{location_id}`
   */
  // const parent = 'abc123'
  /**
   *  When specified, only configurations of requested data sources are returned.
   */
  // const dataSourceIds = 'abc123'
  /**
   *  Pagination token, which can be used to request a specific page
   *  of `ListTransfersRequest` list results. For multiple-page
   *  results, `ListTransfersResponse` outputs
   *  a `next_page` token, which can be used as the
   *  `page_token` value to request the next page of list results.
   */
  // const pageToken = 'abc123'
  /**
   *  Page size. The default page size is the maximum value of 1000 results.
   */
  // const pageSize = 1234

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

  async function callListTransferConfigs() {
    // Construct request
    const request = {
      parent,
    };

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

  callListTransferConfigs();

listTransferConfigsStream(request, options)

listTransferConfigsStream(request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest

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 [TransferConfig] 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 listTransferConfigsAsync() 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.

listTransferLogs(request, options)

listTransferLogs(request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferMessage[], protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest | null, protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse]>;

Returns user facing log messages for the data transfer run.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferMessage[], protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest | null, protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [TransferMessage]. 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 listTransferLogsAsync() 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.

listTransferLogs(request, options, callback)

listTransferLogs(request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferMessage>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferMessage>
Returns
TypeDescription
void

listTransferLogs(request, callback)

listTransferLogs(request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferMessage>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest
callback PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferMessage>
Returns
TypeDescription
void

listTransferLogsAsync(request, options)

listTransferLogsAsync(request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.ITransferMessage>;

Equivalent to listTransferLogs, 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.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.ITransferMessage>

{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 [TransferMessage]. 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.
   */
  /**
   *  Required. Transfer run name in the form:
   *  `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
   *  `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
   */
  // const parent = 'abc123'
  /**
   *  Pagination token, which can be used to request a specific page
   *  of `ListTransferLogsRequest` list results. For multiple-page
   *  results, `ListTransferLogsResponse` outputs
   *  a `next_page` token, which can be used as the
   *  `page_token` value to request the next page of list results.
   */
  // const pageToken = 'abc123'
  /**
   *  Page size. The default page size is the maximum value of 1000 results.
   */
  // const pageSize = 1234
  /**
   *  Message types to return. If not populated - INFO, WARNING and ERROR
   *  messages are returned.
   */
  // const messageTypes = 1234

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

  async function callListTransferLogs() {
    // Construct request
    const request = {
      parent,
    };

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

  callListTransferLogs();

listTransferLogsStream(request, options)

listTransferLogsStream(request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest

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 [TransferMessage] 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 listTransferLogsAsync() 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.

listTransferRuns(request, options)

listTransferRuns(request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferRun[], protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest | null, protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse]>;

Returns information about running and completed jobs.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferRun[], protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest | null, protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [TransferRun]. 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 listTransferRunsAsync() 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.

listTransferRuns(request, options, callback)

listTransferRuns(request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferRun>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferRun>
Returns
TypeDescription
void

listTransferRuns(request, callback)

listTransferRuns(request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferRun>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest
callback PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferRun>
Returns
TypeDescription
void

listTransferRunsAsync(request, options)

listTransferRunsAsync(request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.ITransferRun>;

Equivalent to listTransferRuns, 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.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.ITransferRun>

{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 [TransferRun]. 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.
   */
  /**
   *  Required. Name of transfer configuration for which transfer runs should be retrieved.
   *  Format of transfer configuration resource name is:
   *  `projects/{project_id}/transferConfigs/{config_id}` or
   *  `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
   */
  // const parent = 'abc123'
  /**
   *  When specified, only transfer runs with requested states are returned.
   */
  // const states = 1234
  /**
   *  Pagination token, which can be used to request a specific page
   *  of `ListTransferRunsRequest` list results. For multiple-page
   *  results, `ListTransferRunsResponse` outputs
   *  a `next_page` token, which can be used as the
   *  `page_token` value to request the next page of list results.
   */
  // const pageToken = 'abc123'
  /**
   *  Page size. The default page size is the maximum value of 1000 results.
   */
  // const pageSize = 1234
  /**
   *  Indicates how run attempts are to be pulled.
   */
  // const runAttempt = {}

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

  async function callListTransferRuns() {
    // Construct request
    const request = {
      parent,
    };

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

  callListTransferRuns();

listTransferRunsStream(request, options)

listTransferRunsStream(request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest

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 [TransferRun] 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 listTransferRunsAsync() 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.

matchDataSourceFromProjectDataSourceName(projectDataSourceName)

matchDataSourceFromProjectDataSourceName(projectDataSourceName: string): string | number;

Parse the data_source from ProjectDataSource resource.

Parameter
NameDescription
projectDataSourceName string

A fully-qualified path representing project_data_source resource.

Returns
TypeDescription
string | number

{string} A string representing the data_source.

matchDataSourceFromProjectLocationDataSourceName(projectLocationDataSourceName)

matchDataSourceFromProjectLocationDataSourceName(projectLocationDataSourceName: string): string | number;

Parse the data_source from ProjectLocationDataSource resource.

Parameter
NameDescription
projectLocationDataSourceName string

A fully-qualified path representing project_location_data_source resource.

Returns
TypeDescription
string | number

{string} A string representing the data_source.

matchLocationFromProjectLocationDataSourceName(projectLocationDataSourceName)

matchLocationFromProjectLocationDataSourceName(projectLocationDataSourceName: string): string | number;

Parse the location from ProjectLocationDataSource resource.

Parameter
NameDescription
projectLocationDataSourceName string

A fully-qualified path representing project_location_data_source resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationTransferConfigName(projectLocationTransferConfigName)

matchLocationFromProjectLocationTransferConfigName(projectLocationTransferConfigName: string): string | number;

Parse the location from ProjectLocationTransferConfig resource.

Parameter
NameDescription
projectLocationTransferConfigName string

A fully-qualified path representing project_location_transfer_config resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProjectLocationTransferConfigRunName(projectLocationTransferConfigRunName)

matchLocationFromProjectLocationTransferConfigRunName(projectLocationTransferConfigRunName: string): string | number;

Parse the location from ProjectLocationTransferConfigRun resource.

Parameter
NameDescription
projectLocationTransferConfigRunName string

A fully-qualified path representing project_location_transfer_config_run resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromProjectDataSourceName(projectDataSourceName)

matchProjectFromProjectDataSourceName(projectDataSourceName: string): string | number;

Parse the project from ProjectDataSource resource.

Parameter
NameDescription
projectDataSourceName string

A fully-qualified path representing project_data_source resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationDataSourceName(projectLocationDataSourceName)

matchProjectFromProjectLocationDataSourceName(projectLocationDataSourceName: string): string | number;

Parse the project from ProjectLocationDataSource resource.

Parameter
NameDescription
projectLocationDataSourceName string

A fully-qualified path representing project_location_data_source resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationTransferConfigName(projectLocationTransferConfigName)

matchProjectFromProjectLocationTransferConfigName(projectLocationTransferConfigName: string): string | number;

Parse the project from ProjectLocationTransferConfig resource.

Parameter
NameDescription
projectLocationTransferConfigName string

A fully-qualified path representing project_location_transfer_config resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectLocationTransferConfigRunName(projectLocationTransferConfigRunName)

matchProjectFromProjectLocationTransferConfigRunName(projectLocationTransferConfigRunName: string): string | number;

Parse the project from ProjectLocationTransferConfigRun resource.

Parameter
NameDescription
projectLocationTransferConfigRunName string

A fully-qualified path representing project_location_transfer_config_run resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectTransferConfigName(projectTransferConfigName)

matchProjectFromProjectTransferConfigName(projectTransferConfigName: string): string | number;

Parse the project from ProjectTransferConfig resource.

Parameter
NameDescription
projectTransferConfigName string

A fully-qualified path representing project_transfer_config resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectTransferConfigRunName(projectTransferConfigRunName)

matchProjectFromProjectTransferConfigRunName(projectTransferConfigRunName: string): string | number;

Parse the project from ProjectTransferConfigRun resource.

Parameter
NameDescription
projectTransferConfigRunName string

A fully-qualified path representing project_transfer_config_run resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchRunFromProjectLocationTransferConfigRunName(projectLocationTransferConfigRunName)

matchRunFromProjectLocationTransferConfigRunName(projectLocationTransferConfigRunName: string): string | number;

Parse the run from ProjectLocationTransferConfigRun resource.

Parameter
NameDescription
projectLocationTransferConfigRunName string

A fully-qualified path representing project_location_transfer_config_run resource.

Returns
TypeDescription
string | number

{string} A string representing the run.

matchRunFromProjectTransferConfigRunName(projectTransferConfigRunName)

matchRunFromProjectTransferConfigRunName(projectTransferConfigRunName: string): string | number;

Parse the run from ProjectTransferConfigRun resource.

Parameter
NameDescription
projectTransferConfigRunName string

A fully-qualified path representing project_transfer_config_run resource.

Returns
TypeDescription
string | number

{string} A string representing the run.

matchTransferConfigFromProjectLocationTransferConfigName(projectLocationTransferConfigName)

matchTransferConfigFromProjectLocationTransferConfigName(projectLocationTransferConfigName: string): string | number;

Parse the transfer_config from ProjectLocationTransferConfig resource.

Parameter
NameDescription
projectLocationTransferConfigName string

A fully-qualified path representing project_location_transfer_config resource.

Returns
TypeDescription
string | number

{string} A string representing the transfer_config.

matchTransferConfigFromProjectLocationTransferConfigRunName(projectLocationTransferConfigRunName)

matchTransferConfigFromProjectLocationTransferConfigRunName(projectLocationTransferConfigRunName: string): string | number;

Parse the transfer_config from ProjectLocationTransferConfigRun resource.

Parameter
NameDescription
projectLocationTransferConfigRunName string

A fully-qualified path representing project_location_transfer_config_run resource.

Returns
TypeDescription
string | number

{string} A string representing the transfer_config.

matchTransferConfigFromProjectTransferConfigName(projectTransferConfigName)

matchTransferConfigFromProjectTransferConfigName(projectTransferConfigName: string): string | number;

Parse the transfer_config from ProjectTransferConfig resource.

Parameter
NameDescription
projectTransferConfigName string

A fully-qualified path representing project_transfer_config resource.

Returns
TypeDescription
string | number

{string} A string representing the transfer_config.

matchTransferConfigFromProjectTransferConfigRunName(projectTransferConfigRunName)

matchTransferConfigFromProjectTransferConfigRunName(projectTransferConfigRunName: string): string | number;

Parse the transfer_config from ProjectTransferConfigRun resource.

Parameter
NameDescription
projectTransferConfigRunName string

A fully-qualified path representing project_transfer_config_run resource.

Returns
TypeDescription
string | number

{string} A string representing the transfer_config.

projectDataSourcePath(project, dataSource)

projectDataSourcePath(project: string, dataSource: string): string;

Return a fully-qualified projectDataSource resource name string.

Parameters
NameDescription
project string
dataSource string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationDataSourcePath(project, location, dataSource)

projectLocationDataSourcePath(project: string, location: string, dataSource: string): string;

Return a fully-qualified projectLocationDataSource resource name string.

Parameters
NameDescription
project string
location string
dataSource string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationTransferConfigPath(project, location, transferConfig)

projectLocationTransferConfigPath(project: string, location: string, transferConfig: string): string;

Return a fully-qualified projectLocationTransferConfig resource name string.

Parameters
NameDescription
project string
location string
transferConfig string
Returns
TypeDescription
string

{string} Resource name string.

projectLocationTransferConfigRunPath(project, location, transferConfig, run)

projectLocationTransferConfigRunPath(project: string, location: string, transferConfig: string, run: string): string;

Return a fully-qualified projectLocationTransferConfigRun resource name string.

Parameters
NameDescription
project string
location string
transferConfig string
run string
Returns
TypeDescription
string

{string} Resource name string.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

projectTransferConfigPath(project, transferConfig)

projectTransferConfigPath(project: string, transferConfig: string): string;

Return a fully-qualified projectTransferConfig resource name string.

Parameters
NameDescription
project string
transferConfig string
Returns
TypeDescription
string

{string} Resource name string.

projectTransferConfigRunPath(project, transferConfig, run)

projectTransferConfigRunPath(project: string, transferConfig: string, run: string): string;

Return a fully-qualified projectTransferConfigRun resource name string.

Parameters
NameDescription
project string
transferConfig string
run string
Returns
TypeDescription
string

{string} Resource name string.

scheduleTransferRuns(request, options)

scheduleTransferRuns(request?: protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse, (protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest | undefined), {} | undefined]>;

Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse, (protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [ScheduleTransferRunsResponse]. 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.
   */
  /**
   *  Required. Transfer configuration name in the form:
   *  `projects/{project_id}/transferConfigs/{config_id}` or
   *  `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. Start time of the range of transfer runs. For example,
   *  `"2017-05-25T00:00:00+00:00"`.
   */
  // const startTime = {}
  /**
   *  Required. End time of the range of transfer runs. For example,
   *  `"2017-05-30T00:00:00+00:00"`.
   */
  // const endTime = {}

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

  async function callScheduleTransferRuns() {
    // Construct request
    const request = {
      parent,
      startTime,
      endTime,
    };

    // Run request
    const response = await datatransferClient.scheduleTransferRuns(request);
    console.log(response);
  }

  callScheduleTransferRuns();

scheduleTransferRuns(request, options, callback)

scheduleTransferRuns(request: protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

scheduleTransferRuns(request, callback)

scheduleTransferRuns(request: protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

startManualTransferRuns(request, options)

startManualTransferRuns(request?: protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, (protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest | undefined), {} | undefined]>;

Start manual transfer runs to be executed now with schedule_time equal to current time. The transfer runs can be created for a time range where the run_time is between start_time (inclusive) and end_time (exclusive), or for a specific run_time.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, (protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [StartManualTransferRunsResponse]. 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.
   */
  /**
   *  Transfer configuration name in the form:
   *  `projects/{project_id}/transferConfigs/{config_id}` or
   *  `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
   */
  // const parent = 'abc123'
  /**
   *  Time range for the transfer runs that should be started.
   */
  // const requestedTimeRange = {}
  /**
   *  Specific run_time for a transfer run to be started. The
   *  requested_run_time must not be in the future.
   */
  // const requestedRunTime = {}

  // Imports the Datatransfer library
  const {DataTransferServiceClient} =
    require('@google-cloud/bigquery-data-transfer').v1;

  // Instantiates a client
  const datatransferClient = new DataTransferServiceClient();

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

    // Run request
    const response = await datatransferClient.startManualTransferRuns(request);
    console.log(response);
  }

  callStartManualTransferRuns();

startManualTransferRuns(request, options, callback)

startManualTransferRuns(request: protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

startManualTransferRuns(request, callback)

startManualTransferRuns(request: protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateTransferConfig(request, options)

updateTransferConfig(request?: protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest, options?: CallOptions): Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, (protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest | undefined), {} | undefined]>;

Updates a data transfer configuration. All fields must be set, even if they are not updated.

Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, (protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [TransferConfig]. 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.
   */
  /**
   *  Required. Data transfer configuration to create.
   */
  // const transferConfig = {}
  /**
   *  Optional OAuth2 authorization code to use with this transfer configuration.
   *  If it is provided, the transfer configuration will be associated with the
   *  authorizing user.
   *  In order to obtain authorization_code, please make a
   *  request to
   *  https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=

updateTransferConfig(request, options, callback)

updateTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateTransferConfig(request, callback)

updateTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void