Class v1alpha.DataprocMetastoreClient (3.4.1)

Configures and manages metastore services. Metastore services are fully managed, highly available, autoscaled, autohealing, OSS-native deployments of technical metadata management software. Each metastore service exposes a network endpoint through which metadata queries are served. Metadata queries can originate from a variety of sources, including Apache Hive, Apache Presto, and Apache Spark.

The Dataproc Metastore API defines the following resource model:

* The service works with a collection of Google Cloud projects, named: /projects/* * Each project has a collection of available locations, named: /locations/* (a location must refer to a Google Cloud region) * Each location has a collection of services, named: /services/* * Dataproc Metastore services are resources with names of the form:

/projects/{project_number}/locations/{location_id}/services/{service_id}. v1alpha

Package

@google-cloud/dataproc-metastore

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of DataprocMetastoreClient.

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 DataprocMetastoreClient({fallback: 'rest'}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

dataprocMetastoreStub

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

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

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

locationsClient

locationsClient: LocationsClient;

operationsClient

operationsClient: gax.OperationsClient;

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

alterMetadataResourceLocation(request, options)

alterMetadataResourceLocation(request?: protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata resource and does not transfer any existing data to the new location.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the metastore service to mutate
   *  metadata, in the following format:
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
   */
  // const service = 'abc123'
  /**
   *  Required. The relative metadata resource name in the following format.
   *  `databases/{database_id}`
   *  or
   *  `databases/{database_id}/tables/{table_id}`
   *  or
   *  `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
   */
  // const resourceName = 'abc123'
  /**
   *  Required. The new location URI for the metadata resource.
   */
  // const locationUri = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callAlterMetadataResourceLocation() {
    // Construct request
    const request = {
      service,
      resourceName,
      locationUri,
    };

    // Run request
    const [operation] = await metastoreClient.alterMetadataResourceLocation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callAlterMetadataResourceLocation();

alterMetadataResourceLocation(request, options, callback)

alterMetadataResourceLocation(request: protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

alterMetadataResourceLocation(request, callback)

alterMetadataResourceLocation(request: protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationRequest
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IAlterMetadataResourceLocationResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

backupPath(project, location, service, backup)

backupPath(project: string, location: string, service: string, backup: string): string;

Return a fully-qualified backup resource name string.

Parameters
NameDescription
project string
location string
service string
backup string
Returns
TypeDescription
string

{string} Resource name string.

cancelOperation(request, options, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.

Parameters
NameDescription
request protos.google.longrunning.CancelOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

checkAlterMetadataResourceLocationProgress(name)

checkAlterMetadataResourceLocationProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by alterMetadataResourceLocation().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the metastore service to mutate
   *  metadata, in the following format:
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
   */
  // const service = 'abc123'
  /**
   *  Required. The relative metadata resource name in the following format.
   *  `databases/{database_id}`
   *  or
   *  `databases/{database_id}/tables/{table_id}`
   *  or
   *  `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
   */
  // const resourceName = 'abc123'
  /**
   *  Required. The new location URI for the metadata resource.
   */
  // const locationUri = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callAlterMetadataResourceLocation() {
    // Construct request
    const request = {
      service,
      resourceName,
      locationUri,
    };

    // Run request
    const [operation] = await metastoreClient.alterMetadataResourceLocation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callAlterMetadataResourceLocation();

checkCreateBackupProgress(name)

checkCreateBackupProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1alpha.Backup, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by createBackup().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.metastore.v1alpha.Backup, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the service in which to create a
   *  backup of the following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the backup, which is used as the final component of the
   *  backup's name.
   *  This value must be between 1 and 64 characters long, begin with a letter,
   *  end with a letter or number, and consist of alpha-numeric ASCII characters
   *  or hyphens.
   */
  // const backupId = 'abc123'
  /**
   *  Required. The backup to create. The `name` field is ignored. The ID of the
   *  created backup must be provided in the request's `backup_id` field.
   */
  // const backup = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callCreateBackup() {
    // Construct request
    const request = {
      parent,
      backupId,
      backup,
    };

    // Run request
    const [operation] = await metastoreClient.createBackup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateBackup();

checkCreateMetadataImportProgress(name)

checkCreateMetadataImportProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1alpha.MetadataImport, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by createMetadataImport().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.metastore.v1alpha.MetadataImport, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the service in which to create a
   *  metastore import, in the following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the metadata import, which is used as the final
   *  component of the metadata import's name.
   *  This value must be between 1 and 64 characters long, begin with a letter,
   *  end with a letter or number, and consist of alpha-numeric ASCII characters
   *  or hyphens.
   */
  // const metadataImportId = 'abc123'
  /**
   *  Required. The metadata import to create. The `name` field is ignored. The
   *  ID of the created metadata import must be provided in the request's
   *  `metadata_import_id` field.
   */
  // const metadataImport = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callCreateMetadataImport() {
    // Construct request
    const request = {
      parent,
      metadataImportId,
      metadataImport,
    };

    // Run request
    const [operation] = await metastoreClient.createMetadataImport(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateMetadataImport();

checkCreateServiceProgress(name)

checkCreateServiceProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1alpha.Service, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by createService().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.metastore.v1alpha.Service, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the location in which to create a
   *  metastore service, in the following form:
   *  `projects/{project_number}/locations/{location_id}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the metastore service, which is used as the final
   *  component of the metastore service's name.
   *  This value must be between 2 and 63 characters long inclusive, begin with a
   *  letter, end with a letter or number, and consist of alpha-numeric
   *  ASCII characters or hyphens.
   */
  // const serviceId = 'abc123'
  /**
   *  Required. The Metastore service to create. The `name` field is
   *  ignored. The ID of the created metastore service must be provided in
   *  the request's `service_id` field.
   */
  // const service = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callCreateService() {
    // Construct request
    const request = {
      parent,
      serviceId,
      service,
    };

    // Run request
    const [operation] = await metastoreClient.createService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateService();

checkDeleteBackupProgress(name)

checkDeleteBackupProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by deleteBackup().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the backup to delete, in the
   *  following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

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

    // Run request
    const [operation] = await metastoreClient.deleteBackup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteBackup();

checkDeleteServiceProgress(name)

checkDeleteServiceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by deleteService().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the metastore service to delete, in
   *  the following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

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

    // Run request
    const [operation] = await metastoreClient.deleteService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteService();

checkExportMetadataProgress(name)

checkExportMetadataProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1alpha.MetadataExport, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by exportMetadata().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.metastore.v1alpha.MetadataExport, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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.
   */
  /**
   *  A Cloud Storage URI of a folder, in the format
   *  `gs://

checkMoveTableToDatabaseProgress(name)

checkMoveTableToDatabaseProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by moveTableToDatabase().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the metastore service to mutate
   *  metadata, in the following format:
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
   */
  // const service = 'abc123'
  /**
   *  Required. The name of the table to be moved.
   */
  // const tableName = 'abc123'
  /**
   *  Required. The name of the database where the table resides.
   */
  // const dbName = 'abc123'
  /**
   *  Required. The name of the database where the table should be moved.
   */
  // const destinationDbName = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callMoveTableToDatabase() {
    // Construct request
    const request = {
      service,
      tableName,
      dbName,
      destinationDbName,
    };

    // Run request
    const [operation] = await metastoreClient.moveTableToDatabase(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callMoveTableToDatabase();

checkQueryMetadataProgress(name)

checkQueryMetadataProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1alpha.QueryMetadataResponse, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by queryMetadata().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.metastore.v1alpha.QueryMetadataResponse, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the metastore service to query
   *  metadata, in the following format:
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
   */
  // const service = 'abc123'
  /**
   *  Required. A read-only SQL query to execute against the metadata database.
   *  The query cannot change or mutate the data.
   */
  // const query = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callQueryMetadata() {
    // Construct request
    const request = {
      service,
      query,
    };

    // Run request
    const [operation] = await metastoreClient.queryMetadata(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callQueryMetadata();

checkRestoreServiceProgress(name)

checkRestoreServiceProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1alpha.Restore, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by restoreService().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.metastore.v1alpha.Restore, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the metastore service to run
   *  restore, in the following form:
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
   */
  // const service = 'abc123'
  /**
   *  Required. The relative resource name of the metastore service backup to
   *  restore from, in the following form:
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
   */
  // const backup = 'abc123'
  /**
   *  Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
   */
  // const restoreType = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callRestoreService() {
    // Construct request
    const request = {
      service,
      backup,
    };

    // Run request
    const [operation] = await metastoreClient.restoreService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRestoreService();

checkUpdateMetadataImportProgress(name)

checkUpdateMetadataImportProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1alpha.MetadataImport, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by updateMetadataImport().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.metastore.v1alpha.MetadataImport, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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. A field mask used to specify the fields to be overwritten in the
   *  metadata import resource by the update.
   *  Fields specified in the `update_mask` are relative to the resource (not
   *  to the full request). A field is overwritten if it is in the mask.
   */
  // const updateMask = {}
  /**
   *  Required. The metadata import to update. The server only merges fields
   *  in the import if they are specified in `update_mask`.
   *  The metadata import's `name` field is used to identify the metastore
   *  import to be updated.
   */
  // const metadataImport = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callUpdateMetadataImport() {
    // Construct request
    const request = {
      updateMask,
      metadataImport,
    };

    // Run request
    const [operation] = await metastoreClient.updateMetadataImport(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateMetadataImport();

checkUpdateServiceProgress(name)

checkUpdateServiceProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1alpha.Service, protos.google.cloud.metastore.v1alpha.OperationMetadata>>;

Check the status of the long running operation returned by updateService().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.metastore.v1alpha.Service, protos.google.cloud.metastore.v1alpha.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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. A field mask used to specify the fields to be overwritten in the
   *  metastore service resource by the update.
   *  Fields specified in the `update_mask` are relative to the resource (not
   *  to the full request). A field is overwritten if it is in the mask.
   */
  // const updateMask = {}
  /**
   *  Required. The metastore service to update. The server only merges fields
   *  in the service if they are specified in `update_mask`.
   *  The metastore service's `name` field is used to identify the metastore
   *  service to be updated.
   */
  // const service = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callUpdateService() {
    // Construct request
    const request = {
      updateMask,
      service,
    };

    // Run request
    const [operation] = await metastoreClient.updateService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateService();

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.

createBackup(request, options)

createBackup(request?: protos.google.cloud.metastore.v1alpha.ICreateBackupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1alpha.IBackup, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new backup in a given project and location.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.ICreateBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.metastore.v1alpha.IBackup, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the service in which to create a
   *  backup of the following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the backup, which is used as the final component of the
   *  backup's name.
   *  This value must be between 1 and 64 characters long, begin with a letter,
   *  end with a letter or number, and consist of alpha-numeric ASCII characters
   *  or hyphens.
   */
  // const backupId = 'abc123'
  /**
   *  Required. The backup to create. The `name` field is ignored. The ID of the
   *  created backup must be provided in the request's `backup_id` field.
   */
  // const backup = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callCreateBackup() {
    // Construct request
    const request = {
      parent,
      backupId,
      backup,
    };

    // Run request
    const [operation] = await metastoreClient.createBackup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateBackup();

createBackup(request, options, callback)

createBackup(request: protos.google.cloud.metastore.v1alpha.ICreateBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IBackup, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.ICreateBackupRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IBackup, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createBackup(request, callback)

createBackup(request: protos.google.cloud.metastore.v1alpha.ICreateBackupRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IBackup, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.ICreateBackupRequest
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IBackup, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createMetadataImport(request, options)

createMetadataImport(request?: protos.google.cloud.metastore.v1alpha.ICreateMetadataImportRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new MetadataImport in a given project and location.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.ICreateMetadataImportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the service in which to create a
   *  metastore import, in the following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the metadata import, which is used as the final
   *  component of the metadata import's name.
   *  This value must be between 1 and 64 characters long, begin with a letter,
   *  end with a letter or number, and consist of alpha-numeric ASCII characters
   *  or hyphens.
   */
  // const metadataImportId = 'abc123'
  /**
   *  Required. The metadata import to create. The `name` field is ignored. The
   *  ID of the created metadata import must be provided in the request's
   *  `metadata_import_id` field.
   */
  // const metadataImport = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callCreateMetadataImport() {
    // Construct request
    const request = {
      parent,
      metadataImportId,
      metadataImport,
    };

    // Run request
    const [operation] = await metastoreClient.createMetadataImport(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateMetadataImport();

createMetadataImport(request, options, callback)

createMetadataImport(request: protos.google.cloud.metastore.v1alpha.ICreateMetadataImportRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.ICreateMetadataImportRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createMetadataImport(request, callback)

createMetadataImport(request: protos.google.cloud.metastore.v1alpha.ICreateMetadataImportRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.ICreateMetadataImportRequest
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createService(request, options)

createService(request?: protos.google.cloud.metastore.v1alpha.ICreateServiceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a metastore service in a project and location.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.ICreateServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the location in which to create a
   *  metastore service, in the following form:
   *  `projects/{project_number}/locations/{location_id}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the metastore service, which is used as the final
   *  component of the metastore service's name.
   *  This value must be between 2 and 63 characters long inclusive, begin with a
   *  letter, end with a letter or number, and consist of alpha-numeric
   *  ASCII characters or hyphens.
   */
  // const serviceId = 'abc123'
  /**
   *  Required. The Metastore service to create. The `name` field is
   *  ignored. The ID of the created metastore service must be provided in
   *  the request's `service_id` field.
   */
  // const service = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callCreateService() {
    // Construct request
    const request = {
      parent,
      serviceId,
      service,
    };

    // Run request
    const [operation] = await metastoreClient.createService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateService();

createService(request, options, callback)

createService(request: protos.google.cloud.metastore.v1alpha.ICreateServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.ICreateServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createService(request, callback)

createService(request: protos.google.cloud.metastore.v1alpha.ICreateServiceRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.ICreateServiceRequest
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteBackup(request, options)

deleteBackup(request?: protos.google.cloud.metastore.v1alpha.IDeleteBackupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single backup.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IDeleteBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the backup to delete, in the
   *  following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

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

    // Run request
    const [operation] = await metastoreClient.deleteBackup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteBackup();

deleteBackup(request, options, callback)

deleteBackup(request: protos.google.cloud.metastore.v1alpha.IDeleteBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IDeleteBackupRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteBackup(request, callback)

deleteBackup(request: protos.google.cloud.metastore.v1alpha.IDeleteBackupRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IDeleteBackupRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteOperation(request, options, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
NameDescription
request protos.google.longrunning.DeleteOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

deleteService(request, options)

deleteService(request?: protos.google.cloud.metastore.v1alpha.IDeleteServiceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single service.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IDeleteServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the metastore service to delete, in
   *  the following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

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

    // Run request
    const [operation] = await metastoreClient.deleteService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteService();

deleteService(request, options, callback)

deleteService(request: protos.google.cloud.metastore.v1alpha.IDeleteServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IDeleteServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteService(request, callback)

deleteService(request: protos.google.cloud.metastore.v1alpha.IDeleteServiceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IDeleteServiceRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportMetadata(request, options)

exportMetadata(request?: protos.google.cloud.metastore.v1alpha.IExportMetadataRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1alpha.IMetadataExport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Exports metadata from a service.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IExportMetadataRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.metastore.v1alpha.IMetadataExport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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.
   */
  /**
   *  A Cloud Storage URI of a folder, in the format
   *  `gs://

exportMetadata(request, options, callback)

exportMetadata(request: protos.google.cloud.metastore.v1alpha.IExportMetadataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataExport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IExportMetadataRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataExport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportMetadata(request, callback)

exportMetadata(request: protos.google.cloud.metastore.v1alpha.IExportMetadataRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataExport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IExportMetadataRequest
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataExport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

federationPath(project, location, federation)

federationPath(project: string, location: string, federation: string): string;

Return a fully-qualified federation resource name string.

Parameters
NameDescription
project string
location string
federation string
Returns
TypeDescription
string

{string} Resource name string.

getBackup(request, options)

getBackup(request?: protos.google.cloud.metastore.v1alpha.IGetBackupRequest, options?: CallOptions): Promise<[
        protos.google.cloud.metastore.v1alpha.IBackup,
        protos.google.cloud.metastore.v1alpha.IGetBackupRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single backup.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IGetBackupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.metastore.v1alpha.IBackup, protos.google.cloud.metastore.v1alpha.IGetBackupRequest | 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 relative resource name of the backup to retrieve, in the
   *  following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
   */
  // const name = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

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

    // Run request
    const response = await metastoreClient.getBackup(request);
    console.log(response);
  }

  callGetBackup();

getBackup(request, options, callback)

getBackup(request: protos.google.cloud.metastore.v1alpha.IGetBackupRequest, options: CallOptions, callback: Callback<protos.google.cloud.metastore.v1alpha.IBackup, protos.google.cloud.metastore.v1alpha.IGetBackupRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IGetBackupRequest
options CallOptions
callback Callback<protos.google.cloud.metastore.v1alpha.IBackup, protos.google.cloud.metastore.v1alpha.IGetBackupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getBackup(request, callback)

getBackup(request: protos.google.cloud.metastore.v1alpha.IGetBackupRequest, callback: Callback<protos.google.cloud.metastore.v1alpha.IBackup, protos.google.cloud.metastore.v1alpha.IGetBackupRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IGetBackupRequest
callback Callback<protos.google.cloud.metastore.v1alpha.IBackup, protos.google.cloud.metastore.v1alpha.IGetBackupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, options, callback)

getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.Policy>;

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
NameDescription
request IamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<IamProtos.google.iam.v1.Policy>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

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);

getMetadataImport(request, options)

getMetadataImport(request?: protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest, options?: CallOptions): Promise<[
        protos.google.cloud.metastore.v1alpha.IMetadataImport,
        (protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single import.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.metastore.v1alpha.IMetadataImport, (protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest | 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 relative resource name of the metadata import to retrieve, in
   *  the following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
   */
  // const name = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

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

    // Run request
    const response = await metastoreClient.getMetadataImport(request);
    console.log(response);
  }

  callGetMetadataImport();

getMetadataImport(request, options, callback)

getMetadataImport(request: protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest, options: CallOptions, callback: Callback<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest
options CallOptions
callback Callback<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getMetadataImport(request, callback)

getMetadataImport(request: protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest, callback: Callback<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest
callback Callback<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IGetMetadataImportRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getOperation(request, options, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
NameDescription
request protos.google.longrunning.GetOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

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

getService(request, options)

getService(request?: protos.google.cloud.metastore.v1alpha.IGetServiceRequest, options?: CallOptions): Promise<[
        protos.google.cloud.metastore.v1alpha.IService,
        protos.google.cloud.metastore.v1alpha.IGetServiceRequest | undefined,
        {} | undefined
    ]>;

Gets the details of a single service.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IGetServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IGetServiceRequest | 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 relative resource name of the metastore service to retrieve,
   *  in the following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}`.
   */
  // const name = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

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

    // Run request
    const response = await metastoreClient.getService(request);
    console.log(response);
  }

  callGetService();

getService(request, options, callback)

getService(request: protos.google.cloud.metastore.v1alpha.IGetServiceRequest, options: CallOptions, callback: Callback<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IGetServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IGetServiceRequest
options CallOptions
callback Callback<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IGetServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getService(request, callback)

getService(request: protos.google.cloud.metastore.v1alpha.IGetServiceRequest, callback: Callback<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IGetServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IGetServiceRequest
callback Callback<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IGetServiceRequest | 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.

lakePath(project, location, lake)

lakePath(project: string, location: string, lake: string): string;

Return a fully-qualified lake resource name string.

Parameters
NameDescription
project string
location string
lake string
Returns
TypeDescription
string

{string} Resource name string.

listBackups(request, options)

listBackups(request?: protos.google.cloud.metastore.v1alpha.IListBackupsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.metastore.v1alpha.IBackup[],
        protos.google.cloud.metastore.v1alpha.IListBackupsRequest | null,
        protos.google.cloud.metastore.v1alpha.IListBackupsResponse
    ]>;

Lists backups in a service.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.metastore.v1alpha.IBackup[], protos.google.cloud.metastore.v1alpha.IListBackupsRequest | null, protos.google.cloud.metastore.v1alpha.IListBackupsResponse ]>

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

listBackups(request, options, callback)

listBackups(request: protos.google.cloud.metastore.v1alpha.IListBackupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.metastore.v1alpha.IListBackupsRequest, protos.google.cloud.metastore.v1alpha.IListBackupsResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IBackup>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListBackupsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.metastore.v1alpha.IListBackupsRequest, protos.google.cloud.metastore.v1alpha.IListBackupsResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IBackup>
Returns
TypeDescription
void

listBackups(request, callback)

listBackups(request: protos.google.cloud.metastore.v1alpha.IListBackupsRequest, callback: PaginationCallback<protos.google.cloud.metastore.v1alpha.IListBackupsRequest, protos.google.cloud.metastore.v1alpha.IListBackupsResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IBackup>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListBackupsRequest
callback PaginationCallback<protos.google.cloud.metastore.v1alpha.IListBackupsRequest, protos.google.cloud.metastore.v1alpha.IListBackupsResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IBackup>
Returns
TypeDescription
void

listBackupsAsync(request, options)

listBackupsAsync(request?: protos.google.cloud.metastore.v1alpha.IListBackupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.metastore.v1alpha.IBackup>;

Equivalent to listBackups, 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.metastore.v1alpha.IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.metastore.v1alpha.IBackup>

{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 relative resource name of the service whose backups to
   *  list, in the following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of backups to return. The response may contain
   *  less than the maximum number. If unspecified, no more than 500 backups are
   *  returned. The maximum value is 1000; values above 1000 are changed to 1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A page token, received from a previous
   *  DataprocMetastore.ListBackups google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups 
   *  call. Provide this token to retrieve the subsequent page.
   *  To retrieve the first page, supply an empty page token.
   *  When paginating, other parameters provided to
   *  DataprocMetastore.ListBackups google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups 
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter to apply to list results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Specify the ordering of results as described in Sorting
   *  Order (https://cloud.google.com/apis/design/design_patterns#sorting_order).
   *  If not specified, the results will be sorted in the default order.
   */
  // const orderBy = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

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

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

  callListBackups();

listBackupsStream(request, options)

listBackupsStream(request?: protos.google.cloud.metastore.v1alpha.IListBackupsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListBackupsRequest

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 listBackupsAsync() 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
}

listMetadataImports(request, options)

listMetadataImports(request?: protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.metastore.v1alpha.IMetadataImport[],
        protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest | null,
        protos.google.cloud.metastore.v1alpha.IListMetadataImportsResponse
    ]>;

Lists imports in a service.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.metastore.v1alpha.IMetadataImport[], protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest | null, protos.google.cloud.metastore.v1alpha.IListMetadataImportsResponse ]>

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

listMetadataImports(request, options, callback)

listMetadataImports(request: protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest, protos.google.cloud.metastore.v1alpha.IListMetadataImportsResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IMetadataImport>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest, protos.google.cloud.metastore.v1alpha.IListMetadataImportsResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IMetadataImport>
Returns
TypeDescription
void

listMetadataImports(request, callback)

listMetadataImports(request: protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest, callback: PaginationCallback<protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest, protos.google.cloud.metastore.v1alpha.IListMetadataImportsResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IMetadataImport>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest
callback PaginationCallback<protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest, protos.google.cloud.metastore.v1alpha.IListMetadataImportsResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IMetadataImport>
Returns
TypeDescription
void

listMetadataImportsAsync(request, options)

listMetadataImportsAsync(request?: protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.metastore.v1alpha.IMetadataImport>;

Equivalent to listMetadataImports, 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.metastore.v1alpha.IListMetadataImportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.metastore.v1alpha.IMetadataImport>

{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 relative resource name of the service whose metadata imports
   *  to list, in the following form:
   *  `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of imports to return. The response may contain
   *  less than the maximum number. If unspecified, no more than 500 imports are
   *  returned. The maximum value is 1000; values above 1000 are changed to 1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A page token, received from a previous
   *  DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices 
   *  call. Provide this token to retrieve the subsequent page.
   *  To retrieve the first page, supply an empty page token.
   *  When paginating, other parameters provided to
   *  DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices 
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter to apply to list results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Specify the ordering of results as described in Sorting
   *  Order (https://cloud.google.com/apis/design/design_patterns#sorting_order).
   *  If not specified, the results will be sorted in the default order.
   */
  // const orderBy = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

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

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

  callListMetadataImports();

listMetadataImportsStream(request, options)

listMetadataImportsStream(request?: protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest

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

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
NameDescription
request protos.google.longrunning.ListOperationsRequest

The request object that will be sent.

options gax.CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
TypeDescription
AsyncIterable<protos.google.longrunning.ListOperationsResponse>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

listServices(request, options)

listServices(request?: protos.google.cloud.metastore.v1alpha.IListServicesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.metastore.v1alpha.IService[],
        protos.google.cloud.metastore.v1alpha.IListServicesRequest | null,
        protos.google.cloud.metastore.v1alpha.IListServicesResponse
    ]>;

Lists services in a project and location.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListServicesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.metastore.v1alpha.IService[], protos.google.cloud.metastore.v1alpha.IListServicesRequest | null, protos.google.cloud.metastore.v1alpha.IListServicesResponse ]>

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

listServices(request, options, callback)

listServices(request: protos.google.cloud.metastore.v1alpha.IListServicesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.metastore.v1alpha.IListServicesRequest, protos.google.cloud.metastore.v1alpha.IListServicesResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IService>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListServicesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.metastore.v1alpha.IListServicesRequest, protos.google.cloud.metastore.v1alpha.IListServicesResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IService>
Returns
TypeDescription
void

listServices(request, callback)

listServices(request: protos.google.cloud.metastore.v1alpha.IListServicesRequest, callback: PaginationCallback<protos.google.cloud.metastore.v1alpha.IListServicesRequest, protos.google.cloud.metastore.v1alpha.IListServicesResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IService>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListServicesRequest
callback PaginationCallback<protos.google.cloud.metastore.v1alpha.IListServicesRequest, protos.google.cloud.metastore.v1alpha.IListServicesResponse | null | undefined, protos.google.cloud.metastore.v1alpha.IService>
Returns
TypeDescription
void

listServicesAsync(request, options)

listServicesAsync(request?: protos.google.cloud.metastore.v1alpha.IListServicesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.metastore.v1alpha.IService>;

Equivalent to listServices, 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.metastore.v1alpha.IListServicesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.metastore.v1alpha.IService>

{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 relative resource name of the location of metastore services
   *  to list, in the following form:
   *  `projects/{project_number}/locations/{location_id}`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of services to return. The response may
   *  contain less than the maximum number. If unspecified, no more than 500
   *  services are returned. The maximum value is 1000; values above 1000 are
   *  changed to 1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A page token, received from a previous
   *  DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices 
   *  call. Provide this token to retrieve the subsequent page.
   *  To retrieve the first page, supply an empty page token.
   *  When paginating, other parameters provided to
   *  DataprocMetastore.ListServices google.cloud.metastore.v1alpha.DataprocMetastore.ListServices 
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter to apply to list results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Specify the ordering of results as described in Sorting
   *  Order (https://cloud.google.com/apis/design/design_patterns#sorting_order).
   *  If not specified, the results will be sorted in the default order.
   */
  // const orderBy = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

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

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

  callListServices();

listServicesStream(request, options)

listServicesStream(request?: protos.google.cloud.metastore.v1alpha.IListServicesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IListServicesRequest

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

matchBackupFromBackupName(backupName)

matchBackupFromBackupName(backupName: string): string | number;

Parse the backup from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the backup.

matchFederationFromFederationName(federationName)

matchFederationFromFederationName(federationName: string): string | number;

Parse the federation from Federation resource.

Parameter
NameDescription
federationName string

A fully-qualified path representing Federation resource.

Returns
TypeDescription
string | number

{string} A string representing the federation.

matchLakeFromLakeName(lakeName)

matchLakeFromLakeName(lakeName: string): string | number;

Parse the lake from Lake resource.

Parameter
NameDescription
lakeName string

A fully-qualified path representing Lake resource.

Returns
TypeDescription
string | number

{string} A string representing the lake.

matchLocationFromBackupName(backupName)

matchLocationFromBackupName(backupName: string): string | number;

Parse the location from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromFederationName(federationName)

matchLocationFromFederationName(federationName: string): string | number;

Parse the location from Federation resource.

Parameter
NameDescription
federationName string

A fully-qualified path representing Federation resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLakeName(lakeName)

matchLocationFromLakeName(lakeName: string): string | number;

Parse the location from Lake resource.

Parameter
NameDescription
lakeName string

A fully-qualified path representing Lake 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.

matchLocationFromMetadataImportName(metadataImportName)

matchLocationFromMetadataImportName(metadataImportName: string): string | number;

Parse the location from MetadataImport resource.

Parameter
NameDescription
metadataImportName string

A fully-qualified path representing MetadataImport resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromServiceName(serviceName)

matchLocationFromServiceName(serviceName: string): string | number;

Parse the location from Service resource.

Parameter
NameDescription
serviceName string

A fully-qualified path representing Service resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchMetadataImportFromMetadataImportName(metadataImportName)

matchMetadataImportFromMetadataImportName(metadataImportName: string): string | number;

Parse the metadata_import from MetadataImport resource.

Parameter
NameDescription
metadataImportName string

A fully-qualified path representing MetadataImport resource.

Returns
TypeDescription
string | number

{string} A string representing the metadata_import.

matchNetworkFromNetworkName(networkName)

matchNetworkFromNetworkName(networkName: string): string | number;

Parse the network from Network resource.

Parameter
NameDescription
networkName string

A fully-qualified path representing Network resource.

Returns
TypeDescription
string | number

{string} A string representing the network.

matchProjectFromBackupName(backupName)

matchProjectFromBackupName(backupName: string): string | number;

Parse the project from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromFederationName(federationName)

matchProjectFromFederationName(federationName: string): string | number;

Parse the project from Federation resource.

Parameter
NameDescription
federationName string

A fully-qualified path representing Federation resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLakeName(lakeName)

matchProjectFromLakeName(lakeName: string): string | number;

Parse the project from Lake resource.

Parameter
NameDescription
lakeName string

A fully-qualified path representing Lake 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.

matchProjectFromMetadataImportName(metadataImportName)

matchProjectFromMetadataImportName(metadataImportName: string): string | number;

Parse the project from MetadataImport resource.

Parameter
NameDescription
metadataImportName string

A fully-qualified path representing MetadataImport resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromNetworkName(networkName)

matchProjectFromNetworkName(networkName: string): string | number;

Parse the project from Network resource.

Parameter
NameDescription
networkName string

A fully-qualified path representing Network 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.

matchProjectFromServiceName(serviceName)

matchProjectFromServiceName(serviceName: string): string | number;

Parse the project from Service resource.

Parameter
NameDescription
serviceName string

A fully-qualified path representing Service resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchServiceFromBackupName(backupName)

matchServiceFromBackupName(backupName: string): string | number;

Parse the service from Backup resource.

Parameter
NameDescription
backupName string

A fully-qualified path representing Backup resource.

Returns
TypeDescription
string | number

{string} A string representing the service.

matchServiceFromMetadataImportName(metadataImportName)

matchServiceFromMetadataImportName(metadataImportName: string): string | number;

Parse the service from MetadataImport resource.

Parameter
NameDescription
metadataImportName string

A fully-qualified path representing MetadataImport resource.

Returns
TypeDescription
string | number

{string} A string representing the service.

matchServiceFromServiceName(serviceName)

matchServiceFromServiceName(serviceName: string): string | number;

Parse the service from Service resource.

Parameter
NameDescription
serviceName string

A fully-qualified path representing Service resource.

Returns
TypeDescription
string | number

{string} A string representing the service.

metadataImportPath(project, location, service, metadataImport)

metadataImportPath(project: string, location: string, service: string, metadataImport: string): string;

Return a fully-qualified metadataImport resource name string.

Parameters
NameDescription
project string
location string
service string
metadataImport string
Returns
TypeDescription
string

{string} Resource name string.

moveTableToDatabase(request, options)

moveTableToDatabase(request?: protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Move a table to another database.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the metastore service to mutate
   *  metadata, in the following format:
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
   */
  // const service = 'abc123'
  /**
   *  Required. The name of the table to be moved.
   */
  // const tableName = 'abc123'
  /**
   *  Required. The name of the database where the table resides.
   */
  // const dbName = 'abc123'
  /**
   *  Required. The name of the database where the table should be moved.
   */
  // const destinationDbName = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callMoveTableToDatabase() {
    // Construct request
    const request = {
      service,
      tableName,
      dbName,
      destinationDbName,
    };

    // Run request
    const [operation] = await metastoreClient.moveTableToDatabase(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callMoveTableToDatabase();

moveTableToDatabase(request, options, callback)

moveTableToDatabase(request: protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

moveTableToDatabase(request, callback)

moveTableToDatabase(request: protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseRequest
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMoveTableToDatabaseResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

networkPath(project, network)

networkPath(project: string, network: string): string;

Return a fully-qualified network resource name string.

Parameters
NameDescription
project string
network 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.

queryMetadata(request, options)

queryMetadata(request?: protos.google.cloud.metastore.v1alpha.IQueryMetadataRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1alpha.IQueryMetadataResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Query DPMS metadata.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IQueryMetadataRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.metastore.v1alpha.IQueryMetadataResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the metastore service to query
   *  metadata, in the following format:
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
   */
  // const service = 'abc123'
  /**
   *  Required. A read-only SQL query to execute against the metadata database.
   *  The query cannot change or mutate the data.
   */
  // const query = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callQueryMetadata() {
    // Construct request
    const request = {
      service,
      query,
    };

    // Run request
    const [operation] = await metastoreClient.queryMetadata(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callQueryMetadata();

queryMetadata(request, options, callback)

queryMetadata(request: protos.google.cloud.metastore.v1alpha.IQueryMetadataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IQueryMetadataResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IQueryMetadataRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IQueryMetadataResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

queryMetadata(request, callback)

queryMetadata(request: protos.google.cloud.metastore.v1alpha.IQueryMetadataRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IQueryMetadataResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IQueryMetadataRequest
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IQueryMetadataResponse, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

removeIamPolicy(request, options)

removeIamPolicy(request?: protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyResponse,
        protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest | undefined,
        {} | undefined
    ]>;

Removes the attached IAM policies for a resource

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyResponse, protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest | 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 relative resource name of the dataplane resource to remove
   *  IAM policy, in the following form:
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
   *  or
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
   */
  // const resource = 'abc123'
  /**
   *  Optional. Removes IAM policy attached to database or table asynchronously
   *  when it is set. The default is false.
   */
  // const asynchronous = true

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

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

    // Run request
    const response = await metastoreClient.removeIamPolicy(request);
    console.log(response);
  }

  callRemoveIamPolicy();

removeIamPolicy(request, options, callback)

removeIamPolicy(request: protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyResponse, protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest
options CallOptions
callback Callback<protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyResponse, protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

removeIamPolicy(request, callback)

removeIamPolicy(request: protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest, callback: Callback<protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyResponse, protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest
callback Callback<protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyResponse, protos.google.cloud.metastore.v1alpha.IRemoveIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

restoreService(request, options)

restoreService(request?: protos.google.cloud.metastore.v1alpha.IRestoreServiceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1alpha.IRestore, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Restores a service from a backup.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IRestoreServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.metastore.v1alpha.IRestore, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 relative resource name of the metastore service to run
   *  restore, in the following form:
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
   */
  // const service = 'abc123'
  /**
   *  Required. The relative resource name of the metastore service backup to
   *  restore from, in the following form:
   *  `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
   */
  // const backup = 'abc123'
  /**
   *  Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
   */
  // const restoreType = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callRestoreService() {
    // Construct request
    const request = {
      service,
      backup,
    };

    // Run request
    const [operation] = await metastoreClient.restoreService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRestoreService();

restoreService(request, options, callback)

restoreService(request: protos.google.cloud.metastore.v1alpha.IRestoreServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IRestore, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IRestoreServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IRestore, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

restoreService(request, callback)

restoreService(request: protos.google.cloud.metastore.v1alpha.IRestoreServiceRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IRestore, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IRestoreServiceRequest
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IRestore, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

servicePath(project, location, service)

servicePath(project: string, location: string, service: string): string;

Return a fully-qualified service resource name string.

Parameters
NameDescription
project string
location string
service string
Returns
TypeDescription
string

{string} Resource name string.

setIamPolicy(request, options, callback)

setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.Policy>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
request IamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<IamProtos.google.iam.v1.Policy>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

testIamPermissions(request, options, callback)

testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
request IamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

updateMetadataImport(request, options)

updateMetadataImport(request?: protos.google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates a single import. Only the description field of MetadataImport is supported to be updated.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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. A field mask used to specify the fields to be overwritten in the
   *  metadata import resource by the update.
   *  Fields specified in the `update_mask` are relative to the resource (not
   *  to the full request). A field is overwritten if it is in the mask.
   */
  // const updateMask = {}
  /**
   *  Required. The metadata import to update. The server only merges fields
   *  in the import if they are specified in `update_mask`.
   *  The metadata import's `name` field is used to identify the metastore
   *  import to be updated.
   */
  // const metadataImport = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callUpdateMetadataImport() {
    // Construct request
    const request = {
      updateMask,
      metadataImport,
    };

    // Run request
    const [operation] = await metastoreClient.updateMetadataImport(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateMetadataImport();

updateMetadataImport(request, options, callback)

updateMetadataImport(request: protos.google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateMetadataImport(request, callback)

updateMetadataImport(request: protos.google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IUpdateMetadataImportRequest
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IMetadataImport, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateService(request, options)

updateService(request?: protos.google.cloud.metastore.v1alpha.IUpdateServiceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single service.

Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IUpdateServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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. A field mask used to specify the fields to be overwritten in the
   *  metastore service resource by the update.
   *  Fields specified in the `update_mask` are relative to the resource (not
   *  to the full request). A field is overwritten if it is in the mask.
   */
  // const updateMask = {}
  /**
   *  Required. The metastore service to update. The server only merges fields
   *  in the service if they are specified in `update_mask`.
   *  The metastore service's `name` field is used to identify the metastore
   *  service to be updated.
   */
  // const service = {}
  /**
   *  Optional. A request ID. Specify a unique request ID to allow the server to
   *  ignore the request if it has completed. The server will ignore subsequent
   *  requests that provide a duplicate request ID for at least 60 minutes after
   *  the first request.
   *  For example, if an initial request times out, followed by another request
   *  with the same request ID, the server ignores the second request to prevent
   *  the creation of duplicate commitments.
   *  The request ID must be a valid
   *  UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
   *  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
   */
  // const requestId = 'abc123'

  // Imports the Metastore library
  const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore').v1alpha;

  // Instantiates a client
  const metastoreClient = new DataprocMetastoreClient();

  async function callUpdateService() {
    // Construct request
    const request = {
      updateMask,
      service,
    };

    // Run request
    const [operation] = await metastoreClient.updateService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateService();

updateService(request, options, callback)

updateService(request: protos.google.cloud.metastore.v1alpha.IUpdateServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IUpdateServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateService(request, callback)

updateService(request: protos.google.cloud.metastore.v1alpha.IUpdateServiceRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1alpha.IUpdateServiceRequest
callback Callback<LROperation<protos.google.cloud.metastore.v1alpha.IService, protos.google.cloud.metastore.v1alpha.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void