Class v2.BareMetalSolutionClient (0.3.2)

Performs management operations on Bare Metal Solution servers.

The baremetalsolution.googleapis.com service provides management capabilities for Bare Metal Solution servers. To access the API methods, you must assign Bare Metal Solution IAM roles containing the desired permissions to your staff in your Google Cloud project. You must also enable the Bare Metal Solution API. Once enabled, the methods act upon specific servers in your Bare Metal Solution environment. v2

Package

@google-cloud/bare-metal-solution

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of BareMetalSolutionClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.fallback

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

Properties

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

bareMetalSolutionStub

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

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

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

locationsClient

locationsClient: LocationsClient;

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

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

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

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

Methods

cancelOperation(request, options, callback)

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

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

Parameters
NameDescription
request protos.google.longrunning.CancelOperationRequest

The request object that will be sent.

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

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

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

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

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

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

checkDetachLunProgress(name)

checkDetachLunProgress(name: string): Promise<LROperation<protos.google.cloud.baremetalsolution.v2.Instance, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.Instance, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the instance.
   */
  // const instance = 'abc123'
  /**
   *  Required. Name of the Lun to detach.
   */
  // const lun = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callDetachLun() {
    // Construct request
    const request = {
      instance,
      lun,
    };

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

  callDetachLun();

checkResetInstanceProgress(name)

checkResetInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.baremetalsolution.v2.ResetInstanceResponse, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.ResetInstanceResponse, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

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

  callResetInstance();

checkResizeVolumeProgress(name)

checkResizeVolumeProgress(name: string): Promise<LROperation<protos.google.cloud.baremetalsolution.v2.Volume, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.Volume, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Volume to resize.
   */
  // const volume = 'abc123'
  /**
   *  New Volume size, in GiB.
   */
  // const sizeGib = 1234

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callResizeVolume() {
    // Construct request
    const request = {
      volume,
    };

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

  callResizeVolume();

checkStartInstanceProgress(name)

checkStartInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.baremetalsolution.v2.StartInstanceResponse, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.StartInstanceResponse, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

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

  callStartInstance();

checkStopInstanceProgress(name)

checkStopInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.baremetalsolution.v2.StopInstanceResponse, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.StopInstanceResponse, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

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

  callStopInstance();

checkUpdateInstanceProgress(name)

checkUpdateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.baremetalsolution.v2.Instance, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.Instance, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The server to update.
   *  The `name` field is used to identify the instance to update.
   *  Format: projects/{project}/locations/{location}/instances/{instance}
   */
  // const instance = {}
  /**
   *  The list of fields to update.
   *  The currently supported fields are:
   *    `labels`
   *    `hyperthreading_enabled`
   *    `os_image`
   */
  // const updateMask = {}

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callUpdateInstance() {
    // Construct request
    const request = {
      instance,
    };

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

  callUpdateInstance();

checkUpdateNetworkProgress(name)

checkUpdateNetworkProgress(name: string): Promise<LROperation<protos.google.cloud.baremetalsolution.v2.Network, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.Network, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The network to update.
   *  The `name` field is used to identify the instance to update.
   *  Format: projects/{project}/locations/{location}/networks/{network}
   */
  // const network = {}
  /**
   *  The list of fields to update.
   *  The only currently supported fields are:
   *    `labels`, `reservations`
   */
  // const updateMask = {}

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callUpdateNetwork() {
    // Construct request
    const request = {
      network,
    };

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

  callUpdateNetwork();

checkUpdateNfsShareProgress(name)

checkUpdateNfsShareProgress(name: string): Promise<LROperation<protos.google.cloud.baremetalsolution.v2.NfsShare, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.NfsShare, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The NFS share to update.
   *  The `name` field is used to identify the NFS share to update.
   *  Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
   */
  // const nfsShare = {}
  /**
   *  The list of fields to update.
   *  The only currently supported fields are:
   *    `labels`
   */
  // const updateMask = {}

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callUpdateNfsShare() {
    // Construct request
    const request = {
      nfsShare,
    };

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

  callUpdateNfsShare();

checkUpdateVolumeProgress(name)

checkUpdateVolumeProgress(name: string): Promise<LROperation<protos.google.cloud.baremetalsolution.v2.Volume, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.Volume, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The volume to update.
   *  The `name` field is used to identify the volume to update.
   *  Format: projects/{project}/locations/{location}/volumes/{volume}
   */
  // const volume = {}
  /**
   *  The list of fields to update.
   *  The only currently supported fields are:
   *    `snapshot_auto_delete_behavior`
   *    `snapshot_schedule_policy_name`
   *    'labels'
   *    'snapshot_enabled'
   *    'snapshot_reservation_detail.reserved_space_percent'
   */
  // const updateMask = {}

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callUpdateVolume() {
    // Construct request
    const request = {
      volume,
    };

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

  callUpdateVolume();

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.

deleteOperation(request, options, callback)

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

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

Parameters
NameDescription
request protos.google.longrunning.DeleteOperationRequest

The request object that will be sent.

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

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

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

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

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

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

detachLun(request, options)

detachLun(request?: protos.google.cloud.baremetalsolution.v2.IDetachLunRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Detach LUN from Instance.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IDetachLunRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the instance.
   */
  // const instance = 'abc123'
  /**
   *  Required. Name of the Lun to detach.
   */
  // const lun = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callDetachLun() {
    // Construct request
    const request = {
      instance,
      lun,
    };

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

  callDetachLun();

detachLun(request, options, callback)

detachLun(request: protos.google.cloud.baremetalsolution.v2.IDetachLunRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IDetachLunRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

detachLun(request, callback)

detachLun(request: protos.google.cloud.baremetalsolution.v2.IDetachLunRequest, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IDetachLunRequest
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, options, callback)

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

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

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

The request object that will be sent.

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

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

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

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

The second parameter to the callback is an object representing .

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

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

getInstance(request, options)

getInstance(request?: protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.IInstance,
        protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest | undefined,
        {} | undefined
    ]>;

Get details about a single server.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest | undefined, {} | undefined ]>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

    // Run request
    const response = await baremetalsolutionClient.getInstance(request);
    console.log(response);
  }

  callGetInstance();

getInstance(request, options, callback)

getInstance(request: protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest
options CallOptions
callback Callback<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getInstance(request, callback)

getInstance(request: protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest, callback: Callback<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest
callback Callback<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IGetInstanceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getLocation(request, options, callback)

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

Gets information about a location.

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

The request object that will be sent.

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

Call options. See CallOptions for more details.

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

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

Example

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

getLun(request, options)

getLun(request?: protos.google.cloud.baremetalsolution.v2.IGetLunRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.ILun,
        protos.google.cloud.baremetalsolution.v2.IGetLunRequest | undefined,
        {} | undefined
    ]>;

Get details of a single storage logical unit number(LUN).

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetLunRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.ILun, protos.google.cloud.baremetalsolution.v2.IGetLunRequest | undefined, {} | undefined ]>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

    // Run request
    const response = await baremetalsolutionClient.getLun(request);
    console.log(response);
  }

  callGetLun();

getLun(request, options, callback)

getLun(request: protos.google.cloud.baremetalsolution.v2.IGetLunRequest, options: CallOptions, callback: Callback<protos.google.cloud.baremetalsolution.v2.ILun, protos.google.cloud.baremetalsolution.v2.IGetLunRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetLunRequest
options CallOptions
callback Callback<protos.google.cloud.baremetalsolution.v2.ILun, protos.google.cloud.baremetalsolution.v2.IGetLunRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getLun(request, callback)

getLun(request: protos.google.cloud.baremetalsolution.v2.IGetLunRequest, callback: Callback<protos.google.cloud.baremetalsolution.v2.ILun, protos.google.cloud.baremetalsolution.v2.IGetLunRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetLunRequest
callback Callback<protos.google.cloud.baremetalsolution.v2.ILun, protos.google.cloud.baremetalsolution.v2.IGetLunRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getNetwork(request, options)

getNetwork(request?: protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.INetwork,
        protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest | undefined,
        {} | undefined
    ]>;

Get details of a single network.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.INetwork, protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest | undefined, {} | undefined ]>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

    // Run request
    const response = await baremetalsolutionClient.getNetwork(request);
    console.log(response);
  }

  callGetNetwork();

getNetwork(request, options, callback)

getNetwork(request: protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest, options: CallOptions, callback: Callback<protos.google.cloud.baremetalsolution.v2.INetwork, protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest
options CallOptions
callback Callback<protos.google.cloud.baremetalsolution.v2.INetwork, protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getNetwork(request, callback)

getNetwork(request: protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest, callback: Callback<protos.google.cloud.baremetalsolution.v2.INetwork, protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest
callback Callback<protos.google.cloud.baremetalsolution.v2.INetwork, protos.google.cloud.baremetalsolution.v2.IGetNetworkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getNfsShare(request, options)

getNfsShare(request?: protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.INfsShare,
        protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest | undefined,
        {} | undefined
    ]>;

Get details of a single NFS share.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.INfsShare, protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest | undefined, {} | undefined ]>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

    // Run request
    const response = await baremetalsolutionClient.getNfsShare(request);
    console.log(response);
  }

  callGetNfsShare();

getNfsShare(request, options, callback)

getNfsShare(request: protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest, options: CallOptions, callback: Callback<protos.google.cloud.baremetalsolution.v2.INfsShare, protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest
options CallOptions
callback Callback<protos.google.cloud.baremetalsolution.v2.INfsShare, protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getNfsShare(request, callback)

getNfsShare(request: protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest, callback: Callback<protos.google.cloud.baremetalsolution.v2.INfsShare, protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest
callback Callback<protos.google.cloud.baremetalsolution.v2.INfsShare, protos.google.cloud.baremetalsolution.v2.IGetNfsShareRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getOperation(request, options, callback)

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

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

Parameters
NameDescription
request protos.google.longrunning.GetOperationRequest

The request object that will be sent.

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

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

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

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

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

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

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

getProjectId()

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

getProjectId(callback)

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

getVolume(request, options)

getVolume(request?: protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.IVolume,
        protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest | undefined,
        {} | undefined
    ]>;

Get details of a single storage volume.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest | undefined, {} | undefined ]>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

    // Run request
    const response = await baremetalsolutionClient.getVolume(request);
    console.log(response);
  }

  callGetVolume();

getVolume(request, options, callback)

getVolume(request: protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest, options: CallOptions, callback: Callback<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest
options CallOptions
callback Callback<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getVolume(request, callback)

getVolume(request: protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest, callback: Callback<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest
callback Callback<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IGetVolumeRequest | 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.

instancePath(project, location, instance)

instancePath(project: string, location: string, instance: string): string;

Return a fully-qualified instance resource name string.

Parameters
NameDescription
project string
location string
instance string
Returns
TypeDescription
string

{string} Resource name string.

listInstances(request, options)

listInstances(request?: protos.google.cloud.baremetalsolution.v2.IListInstancesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.IInstance[],
        protos.google.cloud.baremetalsolution.v2.IListInstancesRequest | null,
        protos.google.cloud.baremetalsolution.v2.IListInstancesResponse
    ]>;

List servers in a given project and location.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListInstancesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.IInstance[], protos.google.cloud.baremetalsolution.v2.IListInstancesRequest | null, protos.google.cloud.baremetalsolution.v2.IListInstancesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listInstancesAsync() 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.

listInstances(request, options, callback)

listInstances(request: protos.google.cloud.baremetalsolution.v2.IListInstancesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListInstancesRequest, protos.google.cloud.baremetalsolution.v2.IListInstancesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IInstance>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListInstancesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListInstancesRequest, protos.google.cloud.baremetalsolution.v2.IListInstancesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IInstance>
Returns
TypeDescription
void

listInstances(request, callback)

listInstances(request: protos.google.cloud.baremetalsolution.v2.IListInstancesRequest, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListInstancesRequest, protos.google.cloud.baremetalsolution.v2.IListInstancesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IInstance>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListInstancesRequest
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListInstancesRequest, protos.google.cloud.baremetalsolution.v2.IListInstancesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IInstance>
Returns
TypeDescription
void

listInstancesAsync(request, options)

listInstancesAsync(request?: protos.google.cloud.baremetalsolution.v2.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.baremetalsolution.v2.IInstance>;

Equivalent to listInstances, 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.baremetalsolution.v2.IListInstancesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.baremetalsolution.v2.IInstance>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for ListInstancesRequest.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, the server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results from the server.
   */
  // const pageToken = 'abc123'
  /**
   *  List filter.
   */
  // const filter = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} =
    require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

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

  callListInstances();

listInstancesStream(request, options)

listInstancesStream(request?: protos.google.cloud.baremetalsolution.v2.IListInstancesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListInstancesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listInstancesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listLocationsAsync(request, options)

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

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

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

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

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

listLuns(request, options)

listLuns(request?: protos.google.cloud.baremetalsolution.v2.IListLunsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.ILun[],
        protos.google.cloud.baremetalsolution.v2.IListLunsRequest | null,
        protos.google.cloud.baremetalsolution.v2.IListLunsResponse
    ]>;

List storage volume luns for given storage volume.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListLunsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.ILun[], protos.google.cloud.baremetalsolution.v2.IListLunsRequest | null, protos.google.cloud.baremetalsolution.v2.IListLunsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listLunsAsync() 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.

listLuns(request, options, callback)

listLuns(request: protos.google.cloud.baremetalsolution.v2.IListLunsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListLunsRequest, protos.google.cloud.baremetalsolution.v2.IListLunsResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.ILun>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListLunsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListLunsRequest, protos.google.cloud.baremetalsolution.v2.IListLunsResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.ILun>
Returns
TypeDescription
void

listLuns(request, callback)

listLuns(request: protos.google.cloud.baremetalsolution.v2.IListLunsRequest, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListLunsRequest, protos.google.cloud.baremetalsolution.v2.IListLunsResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.ILun>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListLunsRequest
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListLunsRequest, protos.google.cloud.baremetalsolution.v2.IListLunsResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.ILun>
Returns
TypeDescription
void

listLunsAsync(request, options)

listLunsAsync(request?: protos.google.cloud.baremetalsolution.v2.IListLunsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.baremetalsolution.v2.ILun>;

Equivalent to listLuns, 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.baremetalsolution.v2.IListLunsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.baremetalsolution.v2.ILun>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for ListLunsRequest.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. The server might return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results from the server.
   */
  // const pageToken = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

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

  callListLuns();

listLunsStream(request, options)

listLunsStream(request?: protos.google.cloud.baremetalsolution.v2.IListLunsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListLunsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listLunsAsync() 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.

listNetworks(request, options)

listNetworks(request?: protos.google.cloud.baremetalsolution.v2.IListNetworksRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.INetwork[],
        protos.google.cloud.baremetalsolution.v2.IListNetworksRequest | null,
        protos.google.cloud.baremetalsolution.v2.IListNetworksResponse
    ]>;

List network in a given project and location.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListNetworksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.INetwork[], protos.google.cloud.baremetalsolution.v2.IListNetworksRequest | null, protos.google.cloud.baremetalsolution.v2.IListNetworksResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listNetworksAsync() 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.

listNetworks(request, options, callback)

listNetworks(request: protos.google.cloud.baremetalsolution.v2.IListNetworksRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListNetworksRequest, protos.google.cloud.baremetalsolution.v2.IListNetworksResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.INetwork>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListNetworksRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListNetworksRequest, protos.google.cloud.baremetalsolution.v2.IListNetworksResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.INetwork>
Returns
TypeDescription
void

listNetworks(request, callback)

listNetworks(request: protos.google.cloud.baremetalsolution.v2.IListNetworksRequest, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListNetworksRequest, protos.google.cloud.baremetalsolution.v2.IListNetworksResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.INetwork>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListNetworksRequest
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListNetworksRequest, protos.google.cloud.baremetalsolution.v2.IListNetworksResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.INetwork>
Returns
TypeDescription
void

listNetworksAsync(request, options)

listNetworksAsync(request?: protos.google.cloud.baremetalsolution.v2.IListNetworksRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.baremetalsolution.v2.INetwork>;

Equivalent to listNetworks, 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.baremetalsolution.v2.IListNetworksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.baremetalsolution.v2.INetwork>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for ListNetworksRequest.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. The server might return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results from the server.
   */
  // const pageToken = 'abc123'
  /**
   *  List filter.
   */
  // const filter = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

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

  callListNetworks();

listNetworksStream(request, options)

listNetworksStream(request?: protos.google.cloud.baremetalsolution.v2.IListNetworksRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListNetworksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listNetworksAsync() 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.

listNetworkUsage(request, options)

listNetworkUsage(request?: protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.IListNetworkUsageResponse,
        (protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest | undefined),
        {} | undefined
    ]>;

List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.IListNetworkUsageResponse, (protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest | undefined), {} | undefined ]>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value (project and location).
   */
  // const location = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callListNetworkUsage() {
    // Construct request
    const request = {
      location,
    };

    // Run request
    const response = await baremetalsolutionClient.listNetworkUsage(request);
    console.log(response);
  }

  callListNetworkUsage();

listNetworkUsage(request, options, callback)

listNetworkUsage(request: protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest, options: CallOptions, callback: Callback<protos.google.cloud.baremetalsolution.v2.IListNetworkUsageResponse, protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest
options CallOptions
callback Callback<protos.google.cloud.baremetalsolution.v2.IListNetworkUsageResponse, protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listNetworkUsage(request, callback)

listNetworkUsage(request: protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest, callback: Callback<protos.google.cloud.baremetalsolution.v2.IListNetworkUsageResponse, protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest
callback Callback<protos.google.cloud.baremetalsolution.v2.IListNetworkUsageResponse, protos.google.cloud.baremetalsolution.v2.IListNetworkUsageRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

listNfsShares(request, options)

listNfsShares(request?: protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.INfsShare[],
        protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest | null,
        protos.google.cloud.baremetalsolution.v2.IListNfsSharesResponse
    ]>;

List NFS shares.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.INfsShare[], protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest | null, protos.google.cloud.baremetalsolution.v2.IListNfsSharesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listNfsSharesAsync() 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.

listNfsShares(request, options, callback)

listNfsShares(request: protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest, protos.google.cloud.baremetalsolution.v2.IListNfsSharesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.INfsShare>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest, protos.google.cloud.baremetalsolution.v2.IListNfsSharesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.INfsShare>
Returns
TypeDescription
void

listNfsShares(request, callback)

listNfsShares(request: protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest, protos.google.cloud.baremetalsolution.v2.IListNfsSharesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.INfsShare>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest, protos.google.cloud.baremetalsolution.v2.IListNfsSharesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.INfsShare>
Returns
TypeDescription
void

listNfsSharesAsync(request, options)

listNfsSharesAsync(request?: protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.baremetalsolution.v2.INfsShare>;

Equivalent to listNfsShares, 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.baremetalsolution.v2.IListNfsSharesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.baremetalsolution.v2.INfsShare>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for ListNfsSharesRequest.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. The server might return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results from the server.
   */
  // const pageToken = 'abc123'
  /**
   *  List filter.
   */
  // const filter = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

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

  callListNfsShares();

listNfsSharesStream(request, options)

listNfsSharesStream(request?: protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listNfsSharesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listOperationsAsync(request, options)

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

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

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

Parameters
NameDescription
request protos.google.longrunning.ListOperationsRequest

The request object that will be sent.

options gax.CallOptions

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

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

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

Example

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

listVolumes(request, options)

listVolumes(request?: protos.google.cloud.baremetalsolution.v2.IListVolumesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.IVolume[],
        protos.google.cloud.baremetalsolution.v2.IListVolumesRequest | null,
        protos.google.cloud.baremetalsolution.v2.IListVolumesResponse
    ]>;

List storage volumes in a given project and location.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListVolumesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.IVolume[], protos.google.cloud.baremetalsolution.v2.IListVolumesRequest | null, protos.google.cloud.baremetalsolution.v2.IListVolumesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listVolumesAsync() 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.

listVolumes(request, options, callback)

listVolumes(request: protos.google.cloud.baremetalsolution.v2.IListVolumesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListVolumesRequest, protos.google.cloud.baremetalsolution.v2.IListVolumesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IVolume>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListVolumesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListVolumesRequest, protos.google.cloud.baremetalsolution.v2.IListVolumesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IVolume>
Returns
TypeDescription
void

listVolumes(request, callback)

listVolumes(request: protos.google.cloud.baremetalsolution.v2.IListVolumesRequest, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListVolumesRequest, protos.google.cloud.baremetalsolution.v2.IListVolumesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IVolume>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListVolumesRequest
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListVolumesRequest, protos.google.cloud.baremetalsolution.v2.IListVolumesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IVolume>
Returns
TypeDescription
void

listVolumesAsync(request, options)

listVolumesAsync(request?: protos.google.cloud.baremetalsolution.v2.IListVolumesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.baremetalsolution.v2.IVolume>;

Equivalent to listVolumes, 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.baremetalsolution.v2.IListVolumesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.baremetalsolution.v2.IVolume>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for ListVolumesRequest.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. The server might return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results from the server.
   */
  // const pageToken = 'abc123'
  /**
   *  List filter.
   */
  // const filter = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

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

  callListVolumes();

listVolumesStream(request, options)

listVolumesStream(request?: protos.google.cloud.baremetalsolution.v2.IListVolumesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IListVolumesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listVolumesAsync() 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.

lunPath(project, location, volume, lun)

lunPath(project: string, location: string, volume: string, lun: string): string;

Return a fully-qualified lun resource name string.

Parameters
NameDescription
project string
location string
volume string
lun string
Returns
TypeDescription
string

{string} Resource name string.

matchInstanceFromInstanceName(instanceName)

matchInstanceFromInstanceName(instanceName: string): string | number;

Parse the instance from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchLocationFromInstanceName(instanceName)

matchLocationFromInstanceName(instanceName: string): string | number;

Parse the location from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLunName(lunName)

matchLocationFromLunName(lunName: string): string | number;

Parse the location from Lun resource.

Parameter
NameDescription
lunName string

A fully-qualified path representing Lun resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromNetworkName(networkName)

matchLocationFromNetworkName(networkName: string): string | number;

Parse the location from Network resource.

Parameter
NameDescription
networkName string

A fully-qualified path representing Network resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromNFSShareName(nFSShareName)

matchLocationFromNFSShareName(nFSShareName: string): string | number;

Parse the location from NFSShare resource.

Parameter
NameDescription
nFSShareName string

A fully-qualified path representing NFSShare resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromServerNetworkTemplateName(serverNetworkTemplateName)

matchLocationFromServerNetworkTemplateName(serverNetworkTemplateName: string): string | number;

Parse the location from ServerNetworkTemplate resource.

Parameter
NameDescription
serverNetworkTemplateName string

A fully-qualified path representing ServerNetworkTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromVolumeName(volumeName)

matchLocationFromVolumeName(volumeName: string): string | number;

Parse the location from Volume resource.

Parameter
NameDescription
volumeName string

A fully-qualified path representing Volume resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLunFromLunName(lunName)

matchLunFromLunName(lunName: string): string | number;

Parse the lun from Lun resource.

Parameter
NameDescription
lunName string

A fully-qualified path representing Lun resource.

Returns
TypeDescription
string | number

{string} A string representing the lun.

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.

matchNfsShareFromNFSShareName(nFSShareName)

matchNfsShareFromNFSShareName(nFSShareName: string): string | number;

Parse the nfs_share from NFSShare resource.

Parameter
NameDescription
nFSShareName string

A fully-qualified path representing NFSShare resource.

Returns
TypeDescription
string | number

{string} A string representing the nfs_share.

matchProjectFromInstanceName(instanceName)

matchProjectFromInstanceName(instanceName: string): string | number;

Parse the project from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLunName(lunName)

matchProjectFromLunName(lunName: string): string | number;

Parse the project from Lun resource.

Parameter
NameDescription
lunName string

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

matchProjectFromNFSShareName(nFSShareName)

matchProjectFromNFSShareName(nFSShareName: string): string | number;

Parse the project from NFSShare resource.

Parameter
NameDescription
nFSShareName string

A fully-qualified path representing NFSShare resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromServerNetworkTemplateName(serverNetworkTemplateName)

matchProjectFromServerNetworkTemplateName(serverNetworkTemplateName: string): string | number;

Parse the project from ServerNetworkTemplate resource.

Parameter
NameDescription
serverNetworkTemplateName string

A fully-qualified path representing ServerNetworkTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromVolumeName(volumeName)

matchProjectFromVolumeName(volumeName: string): string | number;

Parse the project from Volume resource.

Parameter
NameDescription
volumeName string

A fully-qualified path representing Volume resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchServerNetworkTemplateFromServerNetworkTemplateName(serverNetworkTemplateName)

matchServerNetworkTemplateFromServerNetworkTemplateName(serverNetworkTemplateName: string): string | number;

Parse the server_network_template from ServerNetworkTemplate resource.

Parameter
NameDescription
serverNetworkTemplateName string

A fully-qualified path representing ServerNetworkTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the server_network_template.

matchVolumeFromLunName(lunName)

matchVolumeFromLunName(lunName: string): string | number;

Parse the volume from Lun resource.

Parameter
NameDescription
lunName string

A fully-qualified path representing Lun resource.

Returns
TypeDescription
string | number

{string} A string representing the volume.

matchVolumeFromVolumeName(volumeName)

matchVolumeFromVolumeName(volumeName: string): string | number;

Parse the volume from Volume resource.

Parameter
NameDescription
volumeName string

A fully-qualified path representing Volume resource.

Returns
TypeDescription
string | number

{string} A string representing the volume.

networkPath(project, location, network)

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

Return a fully-qualified network resource name string.

Parameters
NameDescription
project string
location string
network string
Returns
TypeDescription
string

{string} Resource name string.

nFSSharePath(project, location, nfsShare)

nFSSharePath(project: string, location: string, nfsShare: string): string;

Return a fully-qualified nFSShare resource name string.

Parameters
NameDescription
project string
location string
nfsShare string
Returns
TypeDescription
string

{string} Resource name string.

resetInstance(request, options)

resetInstance(request?: protos.google.cloud.baremetalsolution.v2.IResetInstanceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.baremetalsolution.v2.IResetInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IResetInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.baremetalsolution.v2.IResetInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

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

  callResetInstance();

resetInstance(request, options, callback)

resetInstance(request: protos.google.cloud.baremetalsolution.v2.IResetInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IResetInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IResetInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IResetInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

resetInstance(request, callback)

resetInstance(request: protos.google.cloud.baremetalsolution.v2.IResetInstanceRequest, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IResetInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IResetInstanceRequest
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IResetInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

resizeVolume(request, options)

resizeVolume(request?: protos.google.cloud.baremetalsolution.v2.IResizeVolumeRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Emergency Volume resize.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IResizeVolumeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Volume to resize.
   */
  // const volume = 'abc123'
  /**
   *  New Volume size, in GiB.
   */
  // const sizeGib = 1234

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callResizeVolume() {
    // Construct request
    const request = {
      volume,
    };

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

  callResizeVolume();

resizeVolume(request, options, callback)

resizeVolume(request: protos.google.cloud.baremetalsolution.v2.IResizeVolumeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IResizeVolumeRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

resizeVolume(request, callback)

resizeVolume(request: protos.google.cloud.baremetalsolution.v2.IResizeVolumeRequest, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IResizeVolumeRequest
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

serverNetworkTemplatePath(project, location, serverNetworkTemplate)

serverNetworkTemplatePath(project: string, location: string, serverNetworkTemplate: string): string;

Return a fully-qualified serverNetworkTemplate resource name string.

Parameters
NameDescription
project string
location string
serverNetworkTemplate string
Returns
TypeDescription
string

{string} Resource name string.

setIamPolicy(request, options, callback)

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

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

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

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

The request object that will be sent.

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

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

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

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

The second parameter to the callback is an object representing .

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

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

startInstance(request, options)

startInstance(request?: protos.google.cloud.baremetalsolution.v2.IStartInstanceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.baremetalsolution.v2.IStartInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Starts a server that was shutdown.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IStartInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.baremetalsolution.v2.IStartInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

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

  callStartInstance();

startInstance(request, options, callback)

startInstance(request: protos.google.cloud.baremetalsolution.v2.IStartInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IStartInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IStartInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IStartInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

startInstance(request, callback)

startInstance(request: protos.google.cloud.baremetalsolution.v2.IStartInstanceRequest, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IStartInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IStartInstanceRequest
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IStartInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

stopInstance(request, options)

stopInstance(request?: protos.google.cloud.baremetalsolution.v2.IStopInstanceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.baremetalsolution.v2.IStopInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Stop a running server.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IStopInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.baremetalsolution.v2.IStopInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

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

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

  callStopInstance();

stopInstance(request, options, callback)

stopInstance(request: protos.google.cloud.baremetalsolution.v2.IStopInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IStopInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IStopInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IStopInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

stopInstance(request, callback)

stopInstance(request: protos.google.cloud.baremetalsolution.v2.IStopInstanceRequest, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IStopInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IStopInstanceRequest
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IStopInstanceResponse, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

testIamPermissions(request, options, callback)

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

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

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

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

The request object that will be sent.

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

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

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

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

The second parameter to the callback is an object representing .

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

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

updateInstance(request, options)

updateInstance(request?: protos.google.cloud.baremetalsolution.v2.IUpdateInstanceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update details of a single server.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The server to update.
   *  The `name` field is used to identify the instance to update.
   *  Format: projects/{project}/locations/{location}/instances/{instance}
   */
  // const instance = {}
  /**
   *  The list of fields to update.
   *  The currently supported fields are:
   *    `labels`
   *    `hyperthreading_enabled`
   *    `os_image`
   */
  // const updateMask = {}

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callUpdateInstance() {
    // Construct request
    const request = {
      instance,
    };

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

  callUpdateInstance();

updateInstance(request, options, callback)

updateInstance(request: protos.google.cloud.baremetalsolution.v2.IUpdateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateInstance(request, callback)

updateInstance(request: protos.google.cloud.baremetalsolution.v2.IUpdateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateInstanceRequest
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IInstance, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateNetwork(request, options)

updateNetwork(request?: protos.google.cloud.baremetalsolution.v2.IUpdateNetworkRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.baremetalsolution.v2.INetwork, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update details of a single network.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateNetworkRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.baremetalsolution.v2.INetwork, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The network to update.
   *  The `name` field is used to identify the instance to update.
   *  Format: projects/{project}/locations/{location}/networks/{network}
   */
  // const network = {}
  /**
   *  The list of fields to update.
   *  The only currently supported fields are:
   *    `labels`, `reservations`
   */
  // const updateMask = {}

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callUpdateNetwork() {
    // Construct request
    const request = {
      network,
    };

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

  callUpdateNetwork();

updateNetwork(request, options, callback)

updateNetwork(request: protos.google.cloud.baremetalsolution.v2.IUpdateNetworkRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.INetwork, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateNetworkRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.INetwork, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateNetwork(request, callback)

updateNetwork(request: protos.google.cloud.baremetalsolution.v2.IUpdateNetworkRequest, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.INetwork, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateNetworkRequest
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.INetwork, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateNfsShare(request, options)

updateNfsShare(request?: protos.google.cloud.baremetalsolution.v2.IUpdateNfsShareRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.baremetalsolution.v2.INfsShare, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update details of a single NFS share.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateNfsShareRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.baremetalsolution.v2.INfsShare, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The NFS share to update.
   *  The `name` field is used to identify the NFS share to update.
   *  Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
   */
  // const nfsShare = {}
  /**
   *  The list of fields to update.
   *  The only currently supported fields are:
   *    `labels`
   */
  // const updateMask = {}

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callUpdateNfsShare() {
    // Construct request
    const request = {
      nfsShare,
    };

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

  callUpdateNfsShare();

updateNfsShare(request, options, callback)

updateNfsShare(request: protos.google.cloud.baremetalsolution.v2.IUpdateNfsShareRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.INfsShare, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateNfsShareRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.INfsShare, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateNfsShare(request, callback)

updateNfsShare(request: protos.google.cloud.baremetalsolution.v2.IUpdateNfsShareRequest, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.INfsShare, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateNfsShareRequest
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.INfsShare, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateVolume(request, options)

updateVolume(request?: protos.google.cloud.baremetalsolution.v2.IUpdateVolumeRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update details of a single storage volume.

Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateVolumeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The volume to update.
   *  The `name` field is used to identify the volume to update.
   *  Format: projects/{project}/locations/{location}/volumes/{volume}
   */
  // const volume = {}
  /**
   *  The list of fields to update.
   *  The only currently supported fields are:
   *    `snapshot_auto_delete_behavior`
   *    `snapshot_schedule_policy_name`
   *    'labels'
   *    'snapshot_enabled'
   *    'snapshot_reservation_detail.reserved_space_percent'
   */
  // const updateMask = {}

  // Imports the Baremetalsolution library
  const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution').v2;

  // Instantiates a client
  const baremetalsolutionClient = new BareMetalSolutionClient();

  async function callUpdateVolume() {
    // Construct request
    const request = {
      volume,
    };

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

  callUpdateVolume();

updateVolume(request, options, callback)

updateVolume(request: protos.google.cloud.baremetalsolution.v2.IUpdateVolumeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateVolumeRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateVolume(request, callback)

updateVolume(request: protos.google.cloud.baremetalsolution.v2.IUpdateVolumeRequest, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.baremetalsolution.v2.IUpdateVolumeRequest
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IVolume, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

volumePath(project, location, volume)

volumePath(project: string, location: string, volume: string): string;

Return a fully-qualified volume resource name string.

Parameters
NameDescription
project string
location string
volume string
Returns
TypeDescription
string

{string} Resource name string.