Class v2.BareMetalSolutionClient (1.1.0)

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 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 CancelOperationRequest

The request object that will be sent.

options 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: ''});

checkCreateNfsShareProgress(name)

checkCreateNfsShareProgress(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 createNfsShare().

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

Example

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

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

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

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

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

  callCreateNfsShare();

checkDeleteNfsShareProgress(name)

checkDeleteNfsShareProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the NFS share to delete.
   */
  // 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 callDeleteNfsShare() {
    // Construct request
    const request = {
      name,
    };

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

  callDeleteNfsShare();

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 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'
  /**
   *  If true, performs lun unmapping without instance reboot.
   */
  // const skipReboot = true

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

checkDisableInteractiveSerialConsoleProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleResponse, 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 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 callDisableInteractiveSerialConsole() {
    // Construct request
    const request = {
      name,
    };

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

  callDisableInteractiveSerialConsole();

checkEnableInteractiveSerialConsoleProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleResponse, 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 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 callEnableInteractiveSerialConsole() {
    // Construct request
    const request = {
      name,
    };

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

  callEnableInteractiveSerialConsole();

checkEvictLunProgress(name)

checkEvictLunProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the lun.
   */
  // 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 callEvictLun() {
    // Construct request
    const request = {
      name,
    };

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

  callEvictLun();

checkEvictVolumeProgress(name)

checkEvictVolumeProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.baremetalsolution.v2.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, 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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the Volume.
   */
  // 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 callEvictVolume() {
    // Construct request
    const request = {
      name,
    };

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

  callEvictVolume();

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

checkRestoreVolumeSnapshotProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.baremetalsolution.v2.VolumeSnapshot, 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 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 snapshot which will be used to restore its parent
   *  volume.
   */
  // const volumeSnapshot = 'abc123'

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

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

  async function callRestoreVolumeSnapshot() {
    // Construct request
    const request = {
      volumeSnapshot,
    };

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

  callRestoreVolumeSnapshot();

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 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 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 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 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`, `vrf.vlan_attachments`
   */
  // 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 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`
   *    `allowed_clients`
   */
  // 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 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:
   *    '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 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.

createNfsShare(request, options)

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

Create an NFS share.

Parameters
NameDescription
request ICreateNfsShareRequest

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

Example

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

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

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

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

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

  callCreateNfsShare();

createNfsShare(request, options, callback)

createNfsShare(request: protos.google.cloud.baremetalsolution.v2.ICreateNfsShareRequest, 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 ICreateNfsShareRequest
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

createNfsShare(request, callback)

createNfsShare(request: protos.google.cloud.baremetalsolution.v2.ICreateNfsShareRequest, 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 ICreateNfsShareRequest
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

createProvisioningConfig(request, options)

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

Create new ProvisioningConfig.

Parameters
NameDescription
request ICreateProvisioningConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent project and location containing the
   *  ProvisioningConfig.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ProvisioningConfig to create.
   */
  // const provisioningConfig = {}
  /**
   *  Optional. Email provided to send a confirmation with provisioning config
   *  to.
   */
  // const email = 'abc123'

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

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

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

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

  callCreateProvisioningConfig();

createProvisioningConfig(request, options, callback)

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

createProvisioningConfig(request, callback)

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

createSSHKey(request, options)

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

Register a public SSH key in the specified project for use with the interactive serial console feature.

Parameters
NameDescription
request ICreateSSHKeyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent containing the SSH keys.
   */
  // const parent = 'abc123'
  /**
   *  Required. The SSH key to register.
   */
  // const sshKey = {}
  /**
   *  Required. The ID to use for the key, which will become the final component
   *  of the key's resource name.
   *  This value must match the regex:
   *    [a-zA-Z0-9@.\-_]{1,64}
   */
  // const sshKeyId = 'abc123'

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

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

  async function callCreateSSHKey() {
    // Construct request
    const request = {
      parent,
      sshKey,
      sshKeyId,
    };

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

  callCreateSSHKey();

createSSHKey(request, options, callback)

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

createSSHKey(request, callback)

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

createVolumeSnapshot(request, options)

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

Takes a snapshot of a boot volume. Returns INVALID_ARGUMENT if called for a non-boot volume.

Parameters
NameDescription
request ICreateVolumeSnapshotRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

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

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

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

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

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

  callCreateVolumeSnapshot();

createVolumeSnapshot(request, options, callback)

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

createVolumeSnapshot(request, callback)

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

deleteNfsShare(request, options)

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

Delete an NFS share. The underlying volume is automatically deleted.

Parameters
NameDescription
request IDeleteNfsShareRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the NFS share to delete.
   */
  // 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 callDeleteNfsShare() {
    // Construct request
    const request = {
      name,
    };

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

  callDeleteNfsShare();

deleteNfsShare(request, options, callback)

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

deleteNfsShare(request, callback)

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

deleteOperation(request, options, callback)

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

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

Parameters
NameDescription
request DeleteOperationRequest

The request object that will be sent.

options 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: ''});

deleteSSHKey(request, options)

deleteSSHKey(request?: protos.google.cloud.baremetalsolution.v2.IDeleteSSHKeyRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.baremetalsolution.v2.IDeleteSSHKeyRequest | undefined,
        {} | undefined
    ]>;

Deletes a public SSH key registered in the specified project.

Parameters
NameDescription
request IDeleteSSHKeyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.baremetalsolution.v2.IDeleteSSHKeyRequest | undefined, {} | undefined ]>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the SSH key to delete.
   *  Currently, the only valid value for the location is "global".
   */
  // 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 callDeleteSSHKey() {
    // Construct request
    const request = {
      name,
    };

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

  callDeleteSSHKey();

deleteSSHKey(request, options, callback)

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

deleteSSHKey(request, callback)

deleteSSHKey(request: protos.google.cloud.baremetalsolution.v2.IDeleteSSHKeyRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.baremetalsolution.v2.IDeleteSSHKeyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteSSHKeyRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.baremetalsolution.v2.IDeleteSSHKeyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteVolumeSnapshot(request, options)

deleteVolumeSnapshot(request?: protos.google.cloud.baremetalsolution.v2.IDeleteVolumeSnapshotRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.baremetalsolution.v2.IDeleteVolumeSnapshotRequest | undefined),
        {} | undefined
    ]>;

Deletes a volume snapshot. Returns INVALID_ARGUMENT if called for a non-boot volume.

Parameters
NameDescription
request IDeleteVolumeSnapshotRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the snapshot to delete.
   */
  // 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 callDeleteVolumeSnapshot() {
    // Construct request
    const request = {
      name,
    };

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

  callDeleteVolumeSnapshot();

deleteVolumeSnapshot(request, options, callback)

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

deleteVolumeSnapshot(request, callback)

deleteVolumeSnapshot(request: protos.google.cloud.baremetalsolution.v2.IDeleteVolumeSnapshotRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.baremetalsolution.v2.IDeleteVolumeSnapshotRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteVolumeSnapshotRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.baremetalsolution.v2.IDeleteVolumeSnapshotRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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 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 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'
  /**
   *  If true, performs lun unmapping without instance reboot.
   */
  // const skipReboot = true

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

disableInteractiveSerialConsole(request, options)

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

Disable the interactive serial console feature on an instance.

Parameters
NameDescription
request IDisableInteractiveSerialConsoleRequest

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.IDisableInteractiveSerialConsoleResponse, 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 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 callDisableInteractiveSerialConsole() {
    // Construct request
    const request = {
      name,
    };

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

  callDisableInteractiveSerialConsole();

disableInteractiveSerialConsole(request, options, callback)

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

disableInteractiveSerialConsole(request, callback)

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

enableInteractiveSerialConsole(request, options)

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

Enable the interactive serial console feature on an instance.

Parameters
NameDescription
request IEnableInteractiveSerialConsoleRequest

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.IEnableInteractiveSerialConsoleResponse, 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 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 callEnableInteractiveSerialConsole() {
    // Construct request
    const request = {
      name,
    };

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

  callEnableInteractiveSerialConsole();

enableInteractiveSerialConsole(request, options, callback)

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

enableInteractiveSerialConsole(request, callback)

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

evictLun(request, options)

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

Skips lun's cooloff and deletes it now. Lun must be in cooloff state.

Parameters
NameDescription
request IEvictLunRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the lun.
   */
  // 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 callEvictLun() {
    // Construct request
    const request = {
      name,
    };

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

  callEvictLun();

evictLun(request, options, callback)

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

evictLun(request, callback)

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

evictVolume(request, options)

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

Skips volume's cooloff and deletes it now. Volume must be in cooloff state.

Parameters
NameDescription
request IEvictVolumeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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 for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the Volume.
   */
  // 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 callEvictVolume() {
    // Construct request
    const request = {
      name,
    };

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

  callEvictVolume();

evictVolume(request, options, callback)

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

evictVolume(request, callback)

evictVolume(request: protos.google.cloud.baremetalsolution.v2.IEvictVolumeRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IEvictVolumeRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, 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 CallOptions | Callback<google.iam.v1.Policy, 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<google.iam.v1.Policy, 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<[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 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 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 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 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 CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

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

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

Example

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

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 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 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 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 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 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 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 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 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 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 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 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 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 GetOperationRequest

The request object that will be sent.

options 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

getProvisioningConfig(request, options)

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

Get ProvisioningConfig by name.

Parameters
NameDescription
request IGetProvisioningConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the ProvisioningConfig.
   */
  // 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 callGetProvisioningConfig() {
    // Construct request
    const request = {
      name,
    };

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

  callGetProvisioningConfig();

getProvisioningConfig(request, options, callback)

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

getProvisioningConfig(request, callback)

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

getVolumeSnapshot(request, options)

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

Returns the specified snapshot resource. Returns INVALID_ARGUMENT if called for a non-boot volume.

Parameters
NameDescription
request IGetVolumeSnapshotRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the snapshot.
   */
  // 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 callGetVolumeSnapshot() {
    // Construct request
    const request = {
      name,
    };

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

  callGetVolumeSnapshot();

getVolumeSnapshot(request, options, callback)

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

getVolumeSnapshot(request, callback)

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

instanceConfigPath(project, location, instanceConfig)

instanceConfigPath(project: string, location: string, instanceConfig: string): string;

Return a fully-qualified instanceConfig resource name string.

Parameters
NameDescription
project string
location string
instanceConfig string
Returns
TypeDescription
string

{string} Resource name string.

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.

instanceQuotaPath(project, location, instanceQuota)

instanceQuotaPath(project: string, location: string, instanceQuota: string): string;

Return a fully-qualified instanceQuota resource name string.

Parameters
NameDescription
project string
location string
instanceQuota 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 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 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 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 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 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. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

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

listLocationsAsync(request, options)

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

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

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

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

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

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 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 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 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 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 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. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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 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 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 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 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 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 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 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. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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 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 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 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 ListNetworkUsageResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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 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 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 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 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 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 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 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. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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 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 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 ListOperationsRequest

The request object that will be sent.

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

listOSImages(request, options)

listOSImages(request?: protos.google.cloud.baremetalsolution.v2.IListOSImagesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.IOSImage[],
        protos.google.cloud.baremetalsolution.v2.IListOSImagesRequest | null,
        protos.google.cloud.baremetalsolution.v2.IListOSImagesResponse
    ]>;

Retrieves the list of OS images which are currently approved.

Parameters
NameDescription
request IListOSImagesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.IOSImage[], protos.google.cloud.baremetalsolution.v2.IListOSImagesRequest | null, protos.google.cloud.baremetalsolution.v2.IListOSImagesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of OSImage. 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 listOSImagesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listOSImages(request, options, callback)

listOSImages(request: protos.google.cloud.baremetalsolution.v2.IListOSImagesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListOSImagesRequest, protos.google.cloud.baremetalsolution.v2.IListOSImagesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IOSImage>): void;
Parameters
NameDescription
request IListOSImagesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListOSImagesRequest, protos.google.cloud.baremetalsolution.v2.IListOSImagesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IOSImage>
Returns
TypeDescription
void

listOSImages(request, callback)

listOSImages(request: protos.google.cloud.baremetalsolution.v2.IListOSImagesRequest, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListOSImagesRequest, protos.google.cloud.baremetalsolution.v2.IListOSImagesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IOSImage>): void;
Parameters
NameDescription
request IListOSImagesRequest
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListOSImagesRequest, protos.google.cloud.baremetalsolution.v2.IListOSImagesResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IOSImage>
Returns
TypeDescription
void

listOSImagesAsync(request, options)

listOSImagesAsync(request?: protos.google.cloud.baremetalsolution.v2.IListOSImagesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.baremetalsolution.v2.IOSImage>;

Equivalent to listOSImages, but returns an iterable object.

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

Parameters
NameDescription
request IListOSImagesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing OSImage. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for ListProvisioningQuotasRequest.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. The server might return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   *  Notice that page_size field is not supported and won't be respected in
   *  the API request for now, will be updated when pagination is supported.
   */
  // 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 callListOSImages() {
    // Construct request
    const request = {
      parent,
    };

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

  callListOSImages();

listOSImagesStream(request, options)

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

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

Parameters
NameDescription
request IListOSImagesRequest

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 OSImage 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 listOSImagesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listProvisioningQuotas(request, options)

listProvisioningQuotas(request?: protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.IProvisioningQuota[],
        protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasRequest | null,
        protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasResponse
    ]>;

List the budget details to provision resources on a given project.

Parameters
NameDescription
request IListProvisioningQuotasRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.IProvisioningQuota[], protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasRequest | null, protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasResponse ]>

{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 listProvisioningQuotasAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listProvisioningQuotas(request, options, callback)

listProvisioningQuotas(request: protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasRequest, protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IProvisioningQuota>): void;
Parameters
NameDescription
request IListProvisioningQuotasRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasRequest, protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IProvisioningQuota>
Returns
TypeDescription
void

listProvisioningQuotas(request, callback)

listProvisioningQuotas(request: protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasRequest, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasRequest, protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IProvisioningQuota>): void;
Parameters
NameDescription
request IListProvisioningQuotasRequest
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasRequest, protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IProvisioningQuota>
Returns
TypeDescription
void

listProvisioningQuotasAsync(request, options)

listProvisioningQuotasAsync(request?: protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.baremetalsolution.v2.IProvisioningQuota>;

Equivalent to listProvisioningQuotas, but returns an iterable object.

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

Parameters
NameDescription
request IListProvisioningQuotasRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for ListProvisioningQuotasRequest.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. The server might return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   *  Notice that page_size field is not supported and won't be respected in
   *  the API request for now, will be updated when pagination is supported.
   */
  // 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 callListProvisioningQuotas() {
    // Construct request
    const request = {
      parent,
    };

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

  callListProvisioningQuotas();

listProvisioningQuotasStream(request, options)

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

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

Parameters
NameDescription
request IListProvisioningQuotasRequest

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 listProvisioningQuotasAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSSHKeys(request, options)

listSSHKeys(request?: protos.google.cloud.baremetalsolution.v2.IListSSHKeysRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.ISSHKey[],
        protos.google.cloud.baremetalsolution.v2.IListSSHKeysRequest | null,
        protos.google.cloud.baremetalsolution.v2.IListSSHKeysResponse
    ]>;

Lists the public SSH keys registered for the specified project. These SSH keys are used only for the interactive serial console feature.

Parameters
NameDescription
request IListSSHKeysRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.ISSHKey[], protos.google.cloud.baremetalsolution.v2.IListSSHKeysRequest | null, protos.google.cloud.baremetalsolution.v2.IListSSHKeysResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of SSHKey. 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 listSSHKeysAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSSHKeys(request, options, callback)

listSSHKeys(request: protos.google.cloud.baremetalsolution.v2.IListSSHKeysRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListSSHKeysRequest, protos.google.cloud.baremetalsolution.v2.IListSSHKeysResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.ISSHKey>): void;
Parameters
NameDescription
request IListSSHKeysRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListSSHKeysRequest, protos.google.cloud.baremetalsolution.v2.IListSSHKeysResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.ISSHKey>
Returns
TypeDescription
void

listSSHKeys(request, callback)

listSSHKeys(request: protos.google.cloud.baremetalsolution.v2.IListSSHKeysRequest, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListSSHKeysRequest, protos.google.cloud.baremetalsolution.v2.IListSSHKeysResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.ISSHKey>): void;
Parameters
NameDescription
request IListSSHKeysRequest
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListSSHKeysRequest, protos.google.cloud.baremetalsolution.v2.IListSSHKeysResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.ISSHKey>
Returns
TypeDescription
void

listSSHKeysAsync(request, options)

listSSHKeysAsync(request?: protos.google.cloud.baremetalsolution.v2.IListSSHKeysRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.baremetalsolution.v2.ISSHKey>;

Equivalent to listSSHKeys, but returns an iterable object.

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

Parameters
NameDescription
request IListSSHKeysRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing SSHKey. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent containing the SSH keys.
   *  Currently, the only valid value for the location is "global".
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of items to return.
   */
  // const pageSize = 1234
  /**
   *  The next_page_token value returned from a previous List request, if any.
   */
  // 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 callListSSHKeys() {
    // Construct request
    const request = {
      parent,
    };

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

  callListSSHKeys();

listSSHKeysStream(request, options)

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

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

Parameters
NameDescription
request IListSSHKeysRequest

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 SSHKey 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 listSSHKeysAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

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 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 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 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 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 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. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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();

listVolumeSnapshots(request, options)

listVolumeSnapshots(request?: protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.baremetalsolution.v2.IVolumeSnapshot[],
        protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsRequest | null,
        protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsResponse
    ]>;

Retrieves the list of snapshots for the specified volume. Returns a response with an empty list of snapshots if called for a non-boot volume.

Parameters
NameDescription
request IListVolumeSnapshotsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.baremetalsolution.v2.IVolumeSnapshot[], protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsRequest | null, protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsResponse ]>

{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 listVolumeSnapshotsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listVolumeSnapshots(request, options, callback)

listVolumeSnapshots(request: protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsRequest, protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IVolumeSnapshot>): void;
Parameters
NameDescription
request IListVolumeSnapshotsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsRequest, protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IVolumeSnapshot>
Returns
TypeDescription
void

listVolumeSnapshots(request, callback)

listVolumeSnapshots(request: protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsRequest, callback: PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsRequest, protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IVolumeSnapshot>): void;
Parameters
NameDescription
request IListVolumeSnapshotsRequest
callback PaginationCallback<protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsRequest, protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsResponse | null | undefined, protos.google.cloud.baremetalsolution.v2.IVolumeSnapshot>
Returns
TypeDescription
void

listVolumeSnapshotsAsync(request, options)

listVolumeSnapshotsAsync(request?: protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.baremetalsolution.v2.IVolumeSnapshot>;

Equivalent to listVolumeSnapshots, but returns an iterable object.

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

Parameters
NameDescription
request IListVolumeSnapshotsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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'

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

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

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

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

  callListVolumeSnapshots();

listVolumeSnapshotsStream(request, options)

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

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

Parameters
NameDescription
request IListVolumeSnapshotsRequest

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 listVolumeSnapshotsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

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

matchInstanceConfigFromInstanceConfigName(instanceConfigName)

matchInstanceConfigFromInstanceConfigName(instanceConfigName: string): string | number;

Parse the instance_config from InstanceConfig resource.

Parameter
NameDescription
instanceConfigName string

A fully-qualified path representing InstanceConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the instance_config.

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.

matchInstanceQuotaFromInstanceQuotaName(instanceQuotaName)

matchInstanceQuotaFromInstanceQuotaName(instanceQuotaName: string): string | number;

Parse the instance_quota from InstanceQuota resource.

Parameter
NameDescription
instanceQuotaName string

A fully-qualified path representing InstanceQuota resource.

Returns
TypeDescription
string | number

{string} A string representing the instance_quota.

matchLocationFromInstanceConfigName(instanceConfigName)

matchLocationFromInstanceConfigName(instanceConfigName: string): string | number;

Parse the location from InstanceConfig resource.

Parameter
NameDescription
instanceConfigName string

A fully-qualified path representing InstanceConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

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.

matchLocationFromInstanceQuotaName(instanceQuotaName)

matchLocationFromInstanceQuotaName(instanceQuotaName: string): string | number;

Parse the location from InstanceQuota resource.

Parameter
NameDescription
instanceQuotaName string

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

matchLocationFromNetworkConfigName(networkConfigName)

matchLocationFromNetworkConfigName(networkConfigName: string): string | number;

Parse the location from NetworkConfig resource.

Parameter
NameDescription
networkConfigName string

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

matchLocationFromOsImageName(osImageName)

matchLocationFromOsImageName(osImageName: string): string | number;

Parse the location from OsImage resource.

Parameter
NameDescription
osImageName string

A fully-qualified path representing OsImage resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProvisioningConfigName(provisioningConfigName)

matchLocationFromProvisioningConfigName(provisioningConfigName: string): string | number;

Parse the location from ProvisioningConfig resource.

Parameter
NameDescription
provisioningConfigName string

A fully-qualified path representing ProvisioningConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromProvisioningQuotaName(provisioningQuotaName)

matchLocationFromProvisioningQuotaName(provisioningQuotaName: string): string | number;

Parse the location from ProvisioningQuota resource.

Parameter
NameDescription
provisioningQuotaName string

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

matchLocationFromSshKeyName(sshKeyName)

matchLocationFromSshKeyName(sshKeyName: string): string | number;

Parse the location from SshKey resource.

Parameter
NameDescription
sshKeyName string

A fully-qualified path representing SshKey resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromVolumeConfigName(volumeConfigName)

matchLocationFromVolumeConfigName(volumeConfigName: string): string | number;

Parse the location from VolumeConfig resource.

Parameter
NameDescription
volumeConfigName string

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

matchLocationFromVolumeSnapshotName(volumeSnapshotName)

matchLocationFromVolumeSnapshotName(volumeSnapshotName: string): string | number;

Parse the location from VolumeSnapshot resource.

Parameter
NameDescription
volumeSnapshotName string

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

matchNetworkConfigFromNetworkConfigName(networkConfigName)

matchNetworkConfigFromNetworkConfigName(networkConfigName: string): string | number;

Parse the network_config from NetworkConfig resource.

Parameter
NameDescription
networkConfigName string

A fully-qualified path representing NetworkConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the network_config.

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.

matchOsImageFromOsImageName(osImageName)

matchOsImageFromOsImageName(osImageName: string): string | number;

Parse the os_image from OsImage resource.

Parameter
NameDescription
osImageName string

A fully-qualified path representing OsImage resource.

Returns
TypeDescription
string | number

{string} A string representing the os_image.

matchProjectFromInstanceConfigName(instanceConfigName)

matchProjectFromInstanceConfigName(instanceConfigName: string): string | number;

Parse the project from InstanceConfig resource.

Parameter
NameDescription
instanceConfigName string

A fully-qualified path representing InstanceConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

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.

matchProjectFromInstanceQuotaName(instanceQuotaName)

matchProjectFromInstanceQuotaName(instanceQuotaName: string): string | number;

Parse the project from InstanceQuota resource.

Parameter
NameDescription
instanceQuotaName string

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

matchProjectFromNetworkConfigName(networkConfigName)

matchProjectFromNetworkConfigName(networkConfigName: string): string | number;

Parse the project from NetworkConfig resource.

Parameter
NameDescription
networkConfigName string

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

matchProjectFromOsImageName(osImageName)

matchProjectFromOsImageName(osImageName: string): string | number;

Parse the project from OsImage resource.

Parameter
NameDescription
osImageName string

A fully-qualified path representing OsImage resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProvisioningConfigName(provisioningConfigName)

matchProjectFromProvisioningConfigName(provisioningConfigName: string): string | number;

Parse the project from ProvisioningConfig resource.

Parameter
NameDescription
provisioningConfigName string

A fully-qualified path representing ProvisioningConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProvisioningQuotaName(provisioningQuotaName)

matchProjectFromProvisioningQuotaName(provisioningQuotaName: string): string | number;

Parse the project from ProvisioningQuota resource.

Parameter
NameDescription
provisioningQuotaName string

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

matchProjectFromSshKeyName(sshKeyName)

matchProjectFromSshKeyName(sshKeyName: string): string | number;

Parse the project from SshKey resource.

Parameter
NameDescription
sshKeyName string

A fully-qualified path representing SshKey resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromVolumeConfigName(volumeConfigName)

matchProjectFromVolumeConfigName(volumeConfigName: string): string | number;

Parse the project from VolumeConfig resource.

Parameter
NameDescription
volumeConfigName string

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

matchProjectFromVolumeSnapshotName(volumeSnapshotName)

matchProjectFromVolumeSnapshotName(volumeSnapshotName: string): string | number;

Parse the project from VolumeSnapshot resource.

Parameter
NameDescription
volumeSnapshotName string

A fully-qualified path representing VolumeSnapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProvisioningConfigFromProvisioningConfigName(provisioningConfigName)

matchProvisioningConfigFromProvisioningConfigName(provisioningConfigName: string): string | number;

Parse the provisioning_config from ProvisioningConfig resource.

Parameter
NameDescription
provisioningConfigName string

A fully-qualified path representing ProvisioningConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the provisioning_config.

matchProvisioningQuotaFromProvisioningQuotaName(provisioningQuotaName)

matchProvisioningQuotaFromProvisioningQuotaName(provisioningQuotaName: string): string | number;

Parse the provisioning_quota from ProvisioningQuota resource.

Parameter
NameDescription
provisioningQuotaName string

A fully-qualified path representing ProvisioningQuota resource.

Returns
TypeDescription
string | number

{string} A string representing the provisioning_quota.

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.

matchSnapshotFromVolumeSnapshotName(volumeSnapshotName)

matchSnapshotFromVolumeSnapshotName(volumeSnapshotName: string): string | number;

Parse the snapshot from VolumeSnapshot resource.

Parameter
NameDescription
volumeSnapshotName string

A fully-qualified path representing VolumeSnapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the snapshot.

matchSshKeyFromSshKeyName(sshKeyName)

matchSshKeyFromSshKeyName(sshKeyName: string): string | number;

Parse the ssh_key from SshKey resource.

Parameter
NameDescription
sshKeyName string

A fully-qualified path representing SshKey resource.

Returns
TypeDescription
string | number

{string} A string representing the ssh_key.

matchVolumeConfigFromVolumeConfigName(volumeConfigName)

matchVolumeConfigFromVolumeConfigName(volumeConfigName: string): string | number;

Parse the volume_config from VolumeConfig resource.

Parameter
NameDescription
volumeConfigName string

A fully-qualified path representing VolumeConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the volume_config.

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.

matchVolumeFromVolumeSnapshotName(volumeSnapshotName)

matchVolumeFromVolumeSnapshotName(volumeSnapshotName: string): string | number;

Parse the volume from VolumeSnapshot resource.

Parameter
NameDescription
volumeSnapshotName string

A fully-qualified path representing VolumeSnapshot resource.

Returns
TypeDescription
string | number

{string} A string representing the volume.

networkConfigPath(project, location, networkConfig)

networkConfigPath(project: string, location: string, networkConfig: string): string;

Return a fully-qualified networkConfig resource name string.

Parameters
NameDescription
project string
location string
networkConfig string
Returns
TypeDescription
string

{string} Resource name string.

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.

osImagePath(project, location, osImage)

osImagePath(project: string, location: string, osImage: string): string;

Return a fully-qualified osImage resource name string.

Parameters
NameDescription
project string
location string
osImage string
Returns
TypeDescription
string

{string} Resource name string.

provisioningConfigPath(project, location, provisioningConfig)

provisioningConfigPath(project: string, location: string, provisioningConfig: string): string;

Return a fully-qualified provisioningConfig resource name string.

Parameters
NameDescription
project string
location string
provisioningConfig string
Returns
TypeDescription
string

{string} Resource name string.

provisioningQuotaPath(project, location, provisioningQuota)

provisioningQuotaPath(project: string, location: string, provisioningQuota: string): string;

Return a fully-qualified provisioningQuota resource name string.

Parameters
NameDescription
project string
location string
provisioningQuota string
Returns
TypeDescription
string

{string} Resource name string.

renameInstance(request, options)

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

RenameInstance sets a new name for an instance. Use with caution, previous names become immediately invalidated.

Parameters
NameDescription
request IRenameInstanceRequest

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.IRenameInstanceRequest | undefined), {} | undefined ]>

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

Example

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

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

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

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

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

  callRenameInstance();

renameInstance(request, options, callback)

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

renameInstance(request, callback)

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

renameNetwork(request, options)

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

RenameNetwork sets a new name for a network. Use with caution, previous names become immediately invalidated.

Parameters
NameDescription
request IRenameNetworkRequest

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.IRenameNetworkRequest | undefined), {} | undefined ]>

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

Example

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

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

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

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

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

  callRenameNetwork();

renameNetwork(request, options, callback)

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

renameNetwork(request, callback)

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

renameNfsShare(request, options)

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

RenameNfsShare sets a new name for an nfsshare. Use with caution, previous names become immediately invalidated.

Parameters
NameDescription
request IRenameNfsShareRequest

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.IRenameNfsShareRequest | undefined), {} | undefined ]>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The `name` field is used to identify the nfsshare.
   *  Format: projects/{project}/locations/{location}/nfsshares/{nfsshare}
   */
  // const name = 'abc123'
  /**
   *  Required. The new `id` of the nfsshare.
   */
  // const newNfsshareId = 'abc123'

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

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

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

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

  callRenameNfsShare();

renameNfsShare(request, options, callback)

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

renameNfsShare(request, callback)

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

renameVolume(request, options)

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

RenameVolume sets a new name for a volume. Use with caution, previous names become immediately invalidated.

Parameters
NameDescription
request IRenameVolumeRequest

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.IRenameVolumeRequest | undefined, {} | undefined ]>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The `name` field is used to identify the volume.
   *  Format: projects/{project}/locations/{location}/volumes/{volume}
   */
  // const name = 'abc123'
  /**
   *  Required. The new `id` of the volume.
   */
  // const newVolumeId = 'abc123'

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

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

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

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

  callRenameVolume();

renameVolume(request, options, callback)

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

renameVolume(request, callback)

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

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

restoreVolumeSnapshot(request, options)

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

Uses the specified snapshot to restore its parent volume. Returns INVALID_ARGUMENT if called for a non-boot volume.

Parameters
NameDescription
request IRestoreVolumeSnapshotRequest

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.IVolumeSnapshot, 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 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 snapshot which will be used to restore its parent
   *  volume.
   */
  // const volumeSnapshot = 'abc123'

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

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

  async function callRestoreVolumeSnapshot() {
    // Construct request
    const request = {
      volumeSnapshot,
    };

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

  callRestoreVolumeSnapshot();

restoreVolumeSnapshot(request, options, callback)

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

restoreVolumeSnapshot(request, callback)

restoreVolumeSnapshot(request: protos.google.cloud.baremetalsolution.v2.IRestoreVolumeSnapshotRequest, callback: Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IVolumeSnapshot, protos.google.cloud.baremetalsolution.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IRestoreVolumeSnapshotRequest
callback Callback<LROperation<protos.google.cloud.baremetalsolution.v2.IVolumeSnapshot, 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 CallOptions | Callback<google.iam.v1.Policy, 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<google.iam.v1.Policy, 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<[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.

sshKeyPath(project, location, sshKey)

sshKeyPath(project: string, location: string, sshKey: string): string;

Return a fully-qualified sshKey resource name string.

Parameters
NameDescription
project string
location string
sshKey string
Returns
TypeDescription
string

{string} Resource name string.

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

submitProvisioningConfig(request, options)

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

Submit a provisiong configuration for a given project.

Parameters
NameDescription
request ISubmitProvisioningConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent project and location containing the
   *  ProvisioningConfig.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ProvisioningConfig to create.
   */
  // const provisioningConfig = {}
  /**
   *  Optional. Email provided to send a confirmation with provisioning config
   *  to.
   */
  // const email = 'abc123'

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

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

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

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

  callSubmitProvisioningConfig();

submitProvisioningConfig(request, options, callback)

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

submitProvisioningConfig(request, callback)

submitProvisioningConfig(request: protos.google.cloud.baremetalsolution.v2.ISubmitProvisioningConfigRequest, callback: Callback<protos.google.cloud.baremetalsolution.v2.ISubmitProvisioningConfigResponse, protos.google.cloud.baremetalsolution.v2.ISubmitProvisioningConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISubmitProvisioningConfigRequest
callback Callback<protos.google.cloud.baremetalsolution.v2.ISubmitProvisioningConfigResponse, protos.google.cloud.baremetalsolution.v2.ISubmitProvisioningConfigRequest | 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 CallOptions | Callback<google.iam.v1.TestIamPermissionsResponse, 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<google.iam.v1.TestIamPermissionsResponse, 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<[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 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 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 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 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 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 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`, `vrf.vlan_attachments`
   */
  // 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 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 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 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 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`
   *    `allowed_clients`
   */
  // 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 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 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

updateProvisioningConfig(request, options)

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

Update existing ProvisioningConfig.

Parameters
NameDescription
request IUpdateProvisioningConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The ProvisioningConfig to update.
   */
  // const provisioningConfig = {}
  /**
   *  Required. The list of fields to update.
   */
  // const updateMask = {}
  /**
   *  Optional. Email provided to send a confirmation with provisioning config
   *  to.
   */
  // const email = 'abc123'

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

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

  async function callUpdateProvisioningConfig() {
    // Construct request
    const request = {
      provisioningConfig,
      updateMask,
    };

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

  callUpdateProvisioningConfig();

updateProvisioningConfig(request, options, callback)

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

updateProvisioningConfig(request, callback)

updateProvisioningConfig(request: protos.google.cloud.baremetalsolution.v2.IUpdateProvisioningConfigRequest, callback: Callback<protos.google.cloud.baremetalsolution.v2.IProvisioningConfig, protos.google.cloud.baremetalsolution.v2.IUpdateProvisioningConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateProvisioningConfigRequest
callback Callback<protos.google.cloud.baremetalsolution.v2.IProvisioningConfig, protos.google.cloud.baremetalsolution.v2.IUpdateProvisioningConfigRequest | 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 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 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:
   *    '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 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 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 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

volumeConfigPath(project, location, volumeConfig)

volumeConfigPath(project: string, location: string, volumeConfig: string): string;

Return a fully-qualified volumeConfig resource name string.

Parameters
NameDescription
project string
location string
volumeConfig string
Returns
TypeDescription
string

{string} Resource name string.

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.

volumeSnapshotPath(project, location, volume, snapshot)

volumeSnapshotPath(project: string, location: string, volume: string, snapshot: string): string;

Return a fully-qualified volumeSnapshot resource name string.

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

{string} Resource name string.