Class v1.DataTransferServiceClient (4.2.1)

This API allows users to manage their data transfers into BigQuery. v1

Package

@google-cloud/bigquery-data-transfer

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of DataTransferServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new DataTransferServiceClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

dataTransferServiceStub

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

descriptors

descriptors: Descriptors;

innerApiCalls

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

locationsClient

locationsClient: LocationsClient;

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.

universeDomain

get universeDomain(): string;

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.

Parameters
NameDescription
request 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 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 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 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 only if `transferConfig.dataSourceId` is 'youtube_channel'
   *  and new credentials are needed, as indicated by `CheckValidCreds`. In order
   *  to obtain authorization_code, make a request to the following URL:
   *  
   *  https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
   *  
    • The client_id is the OAuth client_id of the a data source as
  • returned by ListDataSources method.
    • data_source_scopes are the scopes returned by ListDataSources
  • method.
  • Note that this should not be set when service_account_name is used to
  • create the transfer config. / // const authorizationCode = 'abc123' /*
  • Optional version info. This is required only if
  • transferConfig.dataSourceId is not 'youtube_channel' and new credentials
  • are needed, as indicated by CheckValidCreds. In order to obtain version
  • info, make a request to the following URL:
  • https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
    • The client_id is the OAuth client_id of the a data source as
  • returned by ListDataSources method.
    • data_source_scopes are the scopes returned by ListDataSources
  • method.
  • Note that this should not be set when service_account_name is used to
  • create the transfer config. / // const versionInfo = 'abc123' /*
  • Optional service account email. If this field is set, the transfer config
  • will be created with this service account's credentials. It requires that
  • the requesting user calling this API has permissions to act as this service
  • account.
  • Note that not all data sources support service account credentials when
  • creating a transfer config. For the latest list of data sources, read about
  • using service
  • accounts (https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). */ // const serviceAccountName = 'abc123'

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

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

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

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

    callCreateTransferConfig();

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 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 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 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 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 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 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 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 IDeleteTransferRunRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

enrollDataSources(request, options)

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

Enroll data sources in a user project. This allows users to create transfer configurations for these data sources. They will also appear in the ListDataSources RPC and as such, will appear in the [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents can be found in the public guide for [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and [Data Transfer Service](https://cloud.google.com/bigquery/docs/working-with-transfers).

Parameters
NameDescription
request IEnrollDataSourcesRequest

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.IEnrollDataSourcesRequest | 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the project resource in the form:
   *  `projects/{project_id}`
   */
  // const name = 'abc123'
  /**
   *  Data sources that are enrolled. It is required to provide at least one
   *  data source id.
   */
  // const dataSourceIds = ['abc','def']

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

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

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

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

  callEnrollDataSources();

enrollDataSources(request, options, callback)

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

enrollDataSources(request, callback)

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

Parameters
NameDescription
request 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 . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 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 IGetDataSourceRequest
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.IDataSource, protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getLocation(request, options, callback)

getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;

Gets information about a location.

Parameters
NameDescription
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

options CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

callback Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
Promise<google.cloud.location.ILocation>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

const [response] = await client.getLocation(request);

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 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 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 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 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 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 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.

Parameters
NameDescription
request 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 . 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 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 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 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 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. When you iterate the returned iterable, each element will be an object representing . 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 = 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 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 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 for more details and examples.

listLocationsAsync(request, options)

listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;

Lists information about the supported locations for this service. Returns an iterable object.

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

Parameters
NameDescription
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<google.cloud.location.ILocation>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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 for more details and examples.

Example

const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
  // process response
}

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 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 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 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 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 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. 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The BigQuery project id for which transfer configs
   *  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 = ['abc','def']
  /**
   *  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 = 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 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 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 log messages for the transfer run.

Parameters
NameDescription
request 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 . 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 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 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 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 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. When you iterate the returned iterable, each element will be an object representing . 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 = [1,2,3,4]

  // 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 = 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 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 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 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 transfer runs.

Parameters
NameDescription
request 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 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 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 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 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. 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 = [1,2,3,4]
  /**
   *  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 = 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 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 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 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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 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 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 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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'
  /**
   *  A time_range start and end timestamp for historical data files or reports
   *  that are scheduled to be transferred by the scheduled transfer run.
   *  requested_time_range must be a past time and cannot include future time
   *  values.
   */
  // const requestedTimeRange = {}
  /**
   *  A run_time timestamp for historical data files or reports
   *  that are scheduled to be transferred by the scheduled transfer run.
   *  requested_run_time must be a past time and cannot include future time
   *  values.
   */
  // 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 = {
      parent,
    };

    // 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 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 IStartManualTransferRunsRequest
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

unenrollDataSources(request, options)

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

Unenroll data sources in a user project. This allows users to remove transfer configurations for these data sources. They will no longer appear in the ListDataSources RPC and will also no longer appear in the [BigQuery UI](https://console.cloud.google.com/bigquery). Data transfers configurations of unenrolled data sources will not be scheduled.

Parameters
NameDescription
request IUnenrollDataSourcesRequest

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.IUnenrollDataSourcesRequest | 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the project resource in the form:
   *  `projects/{project_id}`
   */
  // const name = 'abc123'
  /**
   *  Data sources that are unenrolled. It is required to provide at least one
   *  data source id.
   */
  // const dataSourceIds = ['abc','def']

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

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

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

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

  callUnenrollDataSources();

unenrollDataSources(request, options, callback)

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

unenrollDataSources(request, callback)

unenrollDataSources(request: protos.google.cloud.bigquery.datatransfer.v1.IUnenrollDataSourcesRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IUnenrollDataSourcesRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUnenrollDataSourcesRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IUnenrollDataSourcesRequest | 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 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * 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.
   *  This is required only if `transferConfig.dataSourceId` is 'youtube_channel'
   *  and new credentials are needed, as indicated by `CheckValidCreds`. In order
   *  to obtain authorization_code, make a request to the following URL:
   *  
   *  https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
   *  
    • The client_id is the OAuth client_id of the a data source as
  • returned by ListDataSources method.
    • data_source_scopes are the scopes returned by ListDataSources
  • method.
  • Note that this should not be set when service_account_name is used to
  • update the transfer config. / // const authorizationCode = 'abc123' /*
  • Required. Required list of fields to be updated in this request. / // const updateMask = {} /*
  • Optional version info. This is required only if
  • transferConfig.dataSourceId is not 'youtube_channel' and new credentials
  • are needed, as indicated by CheckValidCreds. In order to obtain version
  • info, make a request to the following URL:
  • https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
    • The client_id is the OAuth client_id of the a data source as
  • returned by ListDataSources method.
    • data_source_scopes are the scopes returned by ListDataSources
  • method.
  • Note that this should not be set when service_account_name is used to
  • update the transfer config. / // const versionInfo = 'abc123' /*
  • Optional service account email. If this field is set, the transfer config
  • will be created with this service account's credentials. It requires that
  • the requesting user calling this API has permissions to act as this service
  • account.
  • Note that not all data sources support service account credentials when
  • creating a transfer config. For the latest list of data sources, read about
  • using service
  • accounts (https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). */ // const serviceAccountName = 'abc123'

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

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

    async function callUpdateTransferConfig() { // Construct request const request = { transferConfig, updateMask, };

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

    callUpdateTransferConfig();

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 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 IUpdateTransferConfigRequest
callback Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void