Class v1beta.DataprocMetastoreClient (2.1.0)

Configures and manages metastore services. Metastore services are fully managed, highly available, auto-scaled, auto-healing, 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}. v1beta

Package

@google-cloud/dataproc-metastore

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of DataprocMetastoreClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

dataprocMetastoreStub

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

descriptors

descriptors: Descriptors;

innerApiCalls

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

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

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.

checkCreateBackupProgress(name)

checkCreateBackupProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1beta.Backup, protos.google.cloud.metastore.v1beta.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.v1beta.Backup, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.MetadataImport, protos.google.cloud.metastore.v1beta.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.v1beta.MetadataImport, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.Service, protos.google.cloud.metastore.v1beta.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.v1beta.Service, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.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.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.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.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.MetadataExport, protos.google.cloud.metastore.v1beta.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.v1beta.MetadataExport, protos.google.cloud.metastore.v1beta.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

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  A Cloud Storage URI of a folder, in the format
   *  `gs://

checkRestoreServiceProgress(name)

checkRestoreServiceProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1beta.Restore, protos.google.cloud.metastore.v1beta.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.v1beta.Restore, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.MetadataImport, protos.google.cloud.metastore.v1beta.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.v1beta.MetadataImport, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.Service, protos.google.cloud.metastore.v1beta.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.v1beta.Service, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.ICreateBackupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1beta.IBackup, protos.google.cloud.metastore.v1beta.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Backup in a given project and location.

Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.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.v1beta.IBackup, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.ICreateBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IBackup, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.ICreateBackupRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1beta.IBackup, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createBackup(request, callback)

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

createMetadataImport(request, options)

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

Creates a new MetadataImport in a given project and location.

Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.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.v1beta.IMetadataImport, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.ICreateMetadataImportRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IMetadataImport, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.ICreateMetadataImportRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1beta.IMetadataImport, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createMetadataImport(request, callback)

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

createService(request, options)

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

Creates a metastore service in a project and location.

Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.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.v1beta.IService, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.ICreateServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IService, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.ICreateServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1beta.IService, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createService(request, callback)

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

deleteBackup(request, options)

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

Deletes a single backup.

Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.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.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.IDeleteBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IDeleteBackupRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteBackup(request, callback)

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

deleteService(request, options)

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

Deletes a single service.

Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.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.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.IDeleteServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IDeleteServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteService(request, callback)

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

exportMetadata(request, options)

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

Exports metadata from a service.

Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.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.v1beta.IMetadataExport, protos.google.cloud.metastore.v1beta.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

  /**
   * 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.v1beta.IExportMetadataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IMetadataExport, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IExportMetadataRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1beta.IMetadataExport, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportMetadata(request, callback)

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

getBackup(request, options)

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

Gets details of a single backup.

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.metastore.v1beta.IBackup, protos.google.cloud.metastore.v1beta.IGetBackupRequest | undefined, {} | undefined ]>

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

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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').v1beta;

  // 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.v1beta.IGetBackupRequest, options: CallOptions, callback: Callback<protos.google.cloud.metastore.v1beta.IBackup, protos.google.cloud.metastore.v1beta.IGetBackupRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IGetBackupRequest
options CallOptions
callback Callback<protos.google.cloud.metastore.v1beta.IBackup, protos.google.cloud.metastore.v1beta.IGetBackupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getBackup(request, callback)

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

getMetadataImport(request, options)

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

Gets details of a single import.

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.metastore.v1beta.IMetadataImport, (protos.google.cloud.metastore.v1beta.IGetMetadataImportRequest | undefined), {} | undefined ]>

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

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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').v1beta;

  // 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.v1beta.IGetMetadataImportRequest, options: CallOptions, callback: Callback<protos.google.cloud.metastore.v1beta.IMetadataImport, protos.google.cloud.metastore.v1beta.IGetMetadataImportRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IGetMetadataImportRequest
options CallOptions
callback Callback<protos.google.cloud.metastore.v1beta.IMetadataImport, protos.google.cloud.metastore.v1beta.IGetMetadataImportRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getMetadataImport(request, callback)

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

getProjectId()

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

getProjectId(callback)

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

getService(request, options)

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

Gets the details of a single service.

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.metastore.v1beta.IService, protos.google.cloud.metastore.v1beta.IGetServiceRequest | undefined, {} | undefined ]>

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

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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').v1beta;

  // 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.v1beta.IGetServiceRequest, options: CallOptions, callback: Callback<protos.google.cloud.metastore.v1beta.IService, protos.google.cloud.metastore.v1beta.IGetServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IGetServiceRequest
options CallOptions
callback Callback<protos.google.cloud.metastore.v1beta.IService, protos.google.cloud.metastore.v1beta.IGetServiceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getService(request, callback)

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

listBackups(request, options)

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

Lists backups in a service.

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Backup]. 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.v1beta.IListBackupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.metastore.v1beta.IListBackupsRequest, protos.google.cloud.metastore.v1beta.IListBackupsResponse | null | undefined, protos.google.cloud.metastore.v1beta.IBackup>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IListBackupsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.metastore.v1beta.IListBackupsRequest, protos.google.cloud.metastore.v1beta.IListBackupsResponse | null | undefined, protos.google.cloud.metastore.v1beta.IBackup>
Returns
TypeDescription
void

listBackups(request, callback)

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

listBackupsAsync(request, options)

listBackupsAsync(request?: protos.google.cloud.metastore.v1beta.IListBackupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.metastore.v1beta.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.v1beta.IListBackupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.metastore.v1beta.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 [Backup]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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.v1beta.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.v1beta.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').v1beta;

  // 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.v1beta.IListBackupsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.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 [Backup] 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.

listMetadataImports(request, options)

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

Lists imports in a service.

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is Array of [MetadataImport]. 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.v1beta.IListMetadataImportsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.metastore.v1beta.IListMetadataImportsRequest, protos.google.cloud.metastore.v1beta.IListMetadataImportsResponse | null | undefined, protos.google.cloud.metastore.v1beta.IMetadataImport>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IListMetadataImportsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.metastore.v1beta.IListMetadataImportsRequest, protos.google.cloud.metastore.v1beta.IListMetadataImportsResponse | null | undefined, protos.google.cloud.metastore.v1beta.IMetadataImport>
Returns
TypeDescription
void

listMetadataImports(request, callback)

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

listMetadataImportsAsync(request, options)

listMetadataImportsAsync(request?: protos.google.cloud.metastore.v1beta.IListMetadataImportsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.metastore.v1beta.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.v1beta.IListMetadataImportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.metastore.v1beta.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 [MetadataImport]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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.v1beta.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.v1beta.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').v1beta;

  // 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.v1beta.IListMetadataImportsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.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 [MetadataImport] 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.

listServices(request, options)

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

Lists services in a project and location.

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Service]. 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.v1beta.IListServicesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.metastore.v1beta.IListServicesRequest, protos.google.cloud.metastore.v1beta.IListServicesResponse | null | undefined, protos.google.cloud.metastore.v1beta.IService>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IListServicesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.metastore.v1beta.IListServicesRequest, protos.google.cloud.metastore.v1beta.IListServicesResponse | null | undefined, protos.google.cloud.metastore.v1beta.IService>
Returns
TypeDescription
void

listServices(request, callback)

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

listServicesAsync(request, options)

listServicesAsync(request?: protos.google.cloud.metastore.v1beta.IListServicesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.metastore.v1beta.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.v1beta.IListServicesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.metastore.v1beta.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 [Service]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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.v1beta.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.v1beta.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').v1beta;

  // 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.v1beta.IListServicesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.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 [Service] 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.

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.

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.

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.

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.

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.

restoreService(request, options)

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

Restores a service from a backup.

Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.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.v1beta.IRestore, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.IRestoreServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IRestore, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IRestoreServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1beta.IRestore, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

restoreService(request, callback)

restoreService(request: protos.google.cloud.metastore.v1beta.IRestoreServiceRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IRestore, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IRestoreServiceRequest
callback Callback<LROperation<protos.google.cloud.metastore.v1beta.IRestore, protos.google.cloud.metastore.v1beta.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.

updateMetadataImport(request, options)

updateMetadataImport(request?: protos.google.cloud.metastore.v1beta.IUpdateMetadataImportRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.metastore.v1beta.IMetadataImport, protos.google.cloud.metastore.v1beta.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.v1beta.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.v1beta.IMetadataImport, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.IUpdateMetadataImportRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IMetadataImport, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IUpdateMetadataImportRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1beta.IMetadataImport, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateMetadataImport(request, callback)

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

updateService(request, options)

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

Updates the parameters of a single service.

Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.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.v1beta.IService, protos.google.cloud.metastore.v1beta.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

  /**
   * 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').v1beta;

  // 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.v1beta.IUpdateServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IService, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.metastore.v1beta.IUpdateServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.metastore.v1beta.IService, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateService(request, callback)

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