Class v1beta1.AnalyticsHubServiceClient (0.4.2)

The AnalyticsHubService API facilitates data sharing within and across organizations. It allows data providers to publish listings that reference shared datasets. With Analytics Hub, users can discover and search for listings that they have access to. Subscribers can view and subscribe to listings. When you subscribe to a listing, Analytics Hub creates a linked dataset in your project. v1beta1

Package

@google-cloud/bigquery-data-exchange

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of AnalyticsHubServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.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 AnalyticsHubServiceClient({fallback: 'rest'}, gax); ```

Properties

analyticsHubServiceStub

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

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

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

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.

warn

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

Methods

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.

createDataExchange(request, options)

createDataExchange(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest, options?: CallOptions): Promise<[
        protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange,
        (protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest | undefined),
        {} | undefined
    ]>;

Creates a new data exchange.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, (protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 parent resource path of the data exchange.
   *  e.g. `projects/myproject/locations/US`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the data exchange.
   *  Must contain only Unicode letters, numbers (0-9), underscores (_).
   *  Should not use characters that require URL-escaping, or characters
   *  outside of ASCII, spaces.
   *  Max length: 100 bytes.
   */
  // const dataExchangeId = 'abc123'
  /**
   *  Required. The data exchange to create.
   */
  // const dataExchange = {}

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

  async function callCreateDataExchange() {
    // Construct request
    const request = {
      parent,
      dataExchangeId,
      dataExchange,
    };

    // Run request
    const response = await dataexchangeClient.createDataExchange(request);
    console.log(response);
  }

  callCreateDataExchange();

createDataExchange(request, options, callback)

createDataExchange(request: protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createDataExchange(request, callback)

createDataExchange(request: protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateDataExchangeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createListing(request, options)

createListing(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest, options?: CallOptions): Promise<[
        protos.google.cloud.bigquery.dataexchange.v1beta1.IListing,
        (protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest | undefined),
        {} | undefined
    ]>;

Creates a new listing.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, (protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 parent resource path of the listing.
   *  e.g. `projects/myproject/locations/US/dataExchanges/123`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the listing to create.
   *  Must contain only Unicode letters, numbers (0-9), underscores (_).
   *  Should not use characters that require URL-escaping, or characters
   *  outside of ASCII, spaces.
   *  Max length: 100 bytes.
   */
  // const listingId = 'abc123'
  /**
   *  Required. The listing to create.
   */
  // const listing = {}

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

  async function callCreateListing() {
    // Construct request
    const request = {
      parent,
      listingId,
      listing,
    };

    // Run request
    const response = await dataexchangeClient.createListing(request);
    console.log(response);
  }

  callCreateListing();

createListing(request, options, callback)

createListing(request: protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createListing(request, callback)

createListing(request: protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.ICreateListingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

dataExchangePath(project, location, dataExchange)

dataExchangePath(project: string, location: string, dataExchange: string): string;

Return a fully-qualified dataExchange resource name string.

Parameters
NameDescription
project string
location string
dataExchange string
Returns
TypeDescription
string

{string} Resource name string.

deleteDataExchange(request, options)

deleteDataExchange(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteDataExchangeRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteDataExchangeRequest | undefined),
        {} | undefined
    ]>;

Deletes an existing data exchange.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteDataExchangeRequest

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.dataexchange.v1beta1.IDeleteDataExchangeRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 full name of the data exchange resource that you want to delete.
   *  For example, `projects/myproject/locations/US/dataExchanges/123`.
   */
  // const name = 'abc123'

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

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

    // Run request
    const response = await dataexchangeClient.deleteDataExchange(request);
    console.log(response);
  }

  callDeleteDataExchange();

deleteDataExchange(request, options, callback)

deleteDataExchange(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteDataExchangeRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteDataExchangeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteDataExchangeRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteDataExchangeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteDataExchange(request, callback)

deleteDataExchange(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteDataExchangeRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteDataExchangeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteDataExchangeRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteDataExchangeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteListing(request, options)

deleteListing(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteListingRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteListingRequest | undefined),
        {} | undefined
    ]>;

Deletes a listing.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteListingRequest

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.dataexchange.v1beta1.IDeleteListingRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Resource name of the listing to delete.
   *  e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
   */
  // const name = 'abc123'

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

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

    // Run request
    const response = await dataexchangeClient.deleteListing(request);
    console.log(response);
  }

  callDeleteListing();

deleteListing(request, options, callback)

deleteListing(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteListingRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteListingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteListingRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteListingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteListing(request, callback)

deleteListing(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteListingRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteListingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteListingRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.dataexchange.v1beta1.IDeleteListingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDataExchange(request, options)

getDataExchange(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest, options?: CallOptions): Promise<[
        protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange,
        (protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest | undefined),
        {} | undefined
    ]>;

Gets the details of a data exchange.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, (protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 resource name of the data exchange.
   *  e.g. `projects/myproject/locations/US/dataExchanges/123`.
   */
  // const name = 'abc123'

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

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

    // Run request
    const response = await dataexchangeClient.getDataExchange(request);
    console.log(response);
  }

  callGetDataExchange();

getDataExchange(request, options, callback)

getDataExchange(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDataExchange(request, callback)

getDataExchange(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.IGetDataExchangeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, options)

getIamPolicy(request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.IPolicy,
        protos.google.iam.v1.IGetIamPolicyRequest | undefined,
        {} | undefined
    ]>;

Gets the IAM policy.

Parameters
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 resource for which the policy is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  OPTIONAL: A `GetPolicyOptions` object for specifying options to
   *  `GetIamPolicy`.
   */
  // const options = {}

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

  async function callGetIamPolicy() {
    // Construct request
    const request = {
      resource,
    };

    // Run request
    const response = await dataexchangeClient.getIamPolicy(request);
    console.log(response);
  }

  callGetIamPolicy();

getIamPolicy(request, options, callback)

getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, callback)

getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.IGetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getListing(request, options)

getListing(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest, options?: CallOptions): Promise<[
        protos.google.cloud.bigquery.dataexchange.v1beta1.IListing,
        (protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest | undefined),
        {} | undefined
    ]>;

Gets the details of a listing.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, (protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 resource name of the listing.
   *  e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
   */
  // const name = 'abc123'

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

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

    // Run request
    const response = await dataexchangeClient.getListing(request);
    console.log(response);
  }

  callGetListing();

getListing(request, options, callback)

getListing(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getListing(request, callback)

getListing(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.IGetListingRequest | 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 gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

callback Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
Promise<LocationProtos.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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

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.

listDataExchanges(request, options)

listDataExchanges(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange[],
        protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest | null,
        protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesResponse
    ]>;

Lists all data exchanges in a given project and location.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange[], protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest | null, protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesResponse ]>

{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 listDataExchangesAsync() 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.

listDataExchanges(request, options, callback)

listDataExchanges(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>
Returns
TypeDescription
void

listDataExchanges(request, callback)

listDataExchanges(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest, callback: PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest
callback PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>
Returns
TypeDescription
void

listDataExchangesAsync(request, options)

listDataExchangesAsync(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>;

Equivalent to listDataExchanges, 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.dataexchange.v1beta1.IListDataExchangesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>

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

  /**
   * 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 parent resource path of the data exchanges.
   *  e.g. `projects/myproject/locations/US`.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of results to return in a single response page. Leverage
   *  the page tokens to iterate through the entire collection.
   */
  // const pageSize = 1234
  /**
   *  Page token, returned by a previous call, to request the next page of
   *  results.
   */
  // const pageToken = 'abc123'

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

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

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

  callListDataExchanges();

listDataExchangesStream(request, options)

listDataExchangesStream(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest

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 listDataExchangesAsync() 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.

listingPath(project, location, dataExchange, listing)

listingPath(project: string, location: string, dataExchange: string, listing: string): string;

Return a fully-qualified listing resource name string.

Parameters
NameDescription
project string
location string
dataExchange string
listing string
Returns
TypeDescription
string

{string} Resource name string.

listListings(request, options)

listListings(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.bigquery.dataexchange.v1beta1.IListing[],
        protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest | null,
        protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsResponse
    ]>;

Lists all listings in a given project and location.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.bigquery.dataexchange.v1beta1.IListing[], protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest | null, protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsResponse ]>

{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 listListingsAsync() 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.

listListings(request, options, callback)

listListings(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IListing>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IListing>
Returns
TypeDescription
void

listListings(request, callback)

listListings(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest, callback: PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IListing>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest
callback PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IListing>
Returns
TypeDescription
void

listListingsAsync(request, options)

listListingsAsync(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing>;

Equivalent to listListings, 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.dataexchange.v1beta1.IListListingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing>

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

  /**
   * 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 parent resource path of the listing.
   *  e.g. `projects/myproject/locations/US/dataExchanges/123`.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of results to return in a single response page. Leverage
   *  the page tokens to iterate through the entire collection.
   */
  // const pageSize = 1234
  /**
   *  Page token, returned by a previous call, to request the next page of
   *  results.
   */
  // const pageToken = 'abc123'

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

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

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

  callListListings();

listListingsStream(request, options)

listListingsStream(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest

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 listListingsAsync() 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.

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<LocationProtos.google.cloud.location.ILocation>

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

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

listOrgDataExchanges(request, options)

listOrgDataExchanges(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange[],
        protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest | null,
        protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesResponse
    ]>;

Lists all data exchanges from projects in a given organization and location.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange[], protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest | null, protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesResponse ]>

{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 listOrgDataExchangesAsync() 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.

listOrgDataExchanges(request, options, callback)

listOrgDataExchanges(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>
Returns
TypeDescription
void

listOrgDataExchanges(request, callback)

listOrgDataExchanges(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest, callback: PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest
callback PaginationCallback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest, protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>
Returns
TypeDescription
void

listOrgDataExchangesAsync(request, options)

listOrgDataExchangesAsync(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>;

Equivalent to listOrgDataExchanges, 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.dataexchange.v1beta1.IListOrgDataExchangesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange>

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

  /**
   * 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 organization resource path of the projects containing DataExchanges.
   *  e.g. `organizations/myorg/locations/US`.
   */
  // const organization = 'abc123'
  /**
   *  The maximum number of results to return in a single response page. Leverage
   *  the page tokens to iterate through the entire collection.
   */
  // const pageSize = 1234
  /**
   *  Page token, returned by a previous call, to request the next page of
   *  results.
   */
  // const pageToken = 'abc123'

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

  async function callListOrgDataExchanges() {
    // Construct request
    const request = {
      organization,
    };

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

  callListOrgDataExchanges();

listOrgDataExchangesStream(request, options)

listOrgDataExchangesStream(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest

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 listOrgDataExchangesAsync() 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.

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

matchDataExchangeFromDataExchangeName(dataExchangeName)

matchDataExchangeFromDataExchangeName(dataExchangeName: string): string | number;

Parse the data_exchange from DataExchange resource.

Parameter
NameDescription
dataExchangeName string

A fully-qualified path representing DataExchange resource.

Returns
TypeDescription
string | number

{string} A string representing the data_exchange.

matchDataExchangeFromListingName(listingName)

matchDataExchangeFromListingName(listingName: string): string | number;

Parse the data_exchange from Listing resource.

Parameter
NameDescription
listingName string

A fully-qualified path representing Listing resource.

Returns
TypeDescription
string | number

{string} A string representing the data_exchange.

matchListingFromListingName(listingName)

matchListingFromListingName(listingName: string): string | number;

Parse the listing from Listing resource.

Parameter
NameDescription
listingName string

A fully-qualified path representing Listing resource.

Returns
TypeDescription
string | number

{string} A string representing the listing.

matchLocationFromDataExchangeName(dataExchangeName)

matchLocationFromDataExchangeName(dataExchangeName: string): string | number;

Parse the location from DataExchange resource.

Parameter
NameDescription
dataExchangeName string

A fully-qualified path representing DataExchange resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromListingName(listingName)

matchLocationFromListingName(listingName: string): string | number;

Parse the location from Listing resource.

Parameter
NameDescription
listingName string

A fully-qualified path representing Listing resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromDataExchangeName(dataExchangeName)

matchProjectFromDataExchangeName(dataExchangeName: string): string | number;

Parse the project from DataExchange resource.

Parameter
NameDescription
dataExchangeName string

A fully-qualified path representing DataExchange resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromListingName(listingName)

matchProjectFromListingName(listingName: string): string | number;

Parse the project from Listing resource.

Parameter
NameDescription
listingName string

A fully-qualified path representing Listing resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

setIamPolicy(request, options)

setIamPolicy(request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.IPolicy,
        protos.google.iam.v1.ISetIamPolicyRequest | undefined,
        {} | undefined
    ]>;

Sets the IAM policy.

Parameters
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 resource for which the policy is being specified.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  REQUIRED: The complete policy to be applied to the `resource`. The size of
   *  the policy is limited to a few 10s of KB. An empty policy is a
   *  valid policy but certain Cloud Platform services (such as Projects)
   *  might reject them.
   */
  // const policy = {}
  /**
   *  OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
   *  the fields in the mask will be modified. If no mask is provided, the
   *  following default mask is used:
   *  `paths: "bindings, etag"`
   */
  // const updateMask = {}

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

  async function callSetIamPolicy() {
    // Construct request
    const request = {
      resource,
      policy,
    };

    // Run request
    const response = await dataexchangeClient.setIamPolicy(request);
    console.log(response);
  }

  callSetIamPolicy();

setIamPolicy(request, options, callback)

setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setIamPolicy(request, callback)

setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ISetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

subscribeListing(request, options)

subscribeListing(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest, options?: CallOptions): Promise<[
        protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingResponse,
        (protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest | undefined),
        {} | undefined
    ]>;

Subscribes to a listing.

Currently, with Analytics Hub, you can create listings that reference only BigQuery datasets. Upon subscription to a listing for a BigQuery dataset, Analytics Hub creates a linked dataset in the subscriber's project.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingResponse, (protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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.
   */
  /**
   *  BigQuery destination dataset to create for the subscriber.
   */
  // const destinationDataset = {}
  /**
   *  Required. Resource name of the listing that you want to subscribe to.
   *  e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
   */
  // const name = 'abc123'

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

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

    // Run request
    const response = await dataexchangeClient.subscribeListing(request);
    console.log(response);
  }

  callSubscribeListing();

subscribeListing(request, options, callback)

subscribeListing(request: protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingResponse, protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingResponse, protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

subscribeListing(request, callback)

subscribeListing(request: protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingResponse, protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingResponse, protos.google.cloud.bigquery.dataexchange.v1beta1.ISubscribeListingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

testIamPermissions(request, options)

testIamPermissions(request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.ITestIamPermissionsResponse,
        protos.google.iam.v1.ITestIamPermissionsRequest | undefined,
        {} | undefined
    ]>;

Returns the permissions that a caller has.

Parameters
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 resource for which the policy detail is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  The set of permissions to check for the `resource`. Permissions with
   *  wildcards (such as '*' or 'storage.*') are not allowed. For more
   *  information see
   *  IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
   */
  // const permissions = 'abc123'

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

  async function callTestIamPermissions() {
    // Construct request
    const request = {
      resource,
      permissions,
    };

    // Run request
    const response = await dataexchangeClient.testIamPermissions(request);
    console.log(response);
  }

  callTestIamPermissions();

testIamPermissions(request, options, callback)

testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest
options CallOptions
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

testIamPermissions(request, callback)

testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.iam.v1.ITestIamPermissionsRequest
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateDataExchange(request, options)

updateDataExchange(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest, options?: CallOptions): Promise<[
        protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange,
        (protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest | undefined),
        {} | undefined
    ]>;

Updates an existing data exchange.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, (protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Field mask specifies the fields to update in the data exchange
   *  resource. The fields specified in the
   *  `updateMask` are relative to the resource and are not a full request.
   */
  // const updateMask = {}
  /**
   *  Required. The data exchange to update.
   */
  // const dataExchange = {}

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

  async function callUpdateDataExchange() {
    // Construct request
    const request = {
      updateMask,
      dataExchange,
    };

    // Run request
    const response = await dataexchangeClient.updateDataExchange(request);
    console.log(response);
  }

  callUpdateDataExchange();

updateDataExchange(request, options, callback)

updateDataExchange(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateDataExchange(request, callback)

updateDataExchange(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IDataExchange, protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateDataExchangeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateListing(request, options)

updateListing(request?: protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest, options?: CallOptions): Promise<[
        protos.google.cloud.bigquery.dataexchange.v1beta1.IListing,
        (protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest | undefined),
        {} | undefined
    ]>;

Updates an existing listing.

Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, (protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Field mask specifies the fields to update in the listing resource. The
   *  fields specified in the `updateMask` are relative to the resource and are
   *  not a full request.
   */
  // const updateMask = {}
  /**
   *  Required. The listing to update.
   */
  // const listing = {}

  // Imports the Dataexchange library
  const {AnalyticsHubServiceClient} = require('@google-cloud/bigquery-data-exchange').v1beta1;

  // Instantiates a client
  const dataexchangeClient = new AnalyticsHubServiceClient();

  async function callUpdateListing() {
    // Construct request
    const request = {
      updateMask,
      listing,
    };

    // Run request
    const response = await dataexchangeClient.updateListing(request);
    console.log(response);
  }

  callUpdateListing();

updateListing(request, options, callback)

updateListing(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest
options CallOptions
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateListing(request, callback)

updateListing(request: protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest, callback: Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest
callback Callback<protos.google.cloud.bigquery.dataexchange.v1beta1.IListing, protos.google.cloud.bigquery.dataexchange.v1beta1.IUpdateListingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void