Class v1.VmMigrationClient (4.1.0)

VM Migration Service v1

Package

@google-cloud/vmmigration

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of VmMigrationClient.

Parameters
Name Description
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 VmMigrationClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

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.

universeDomain

get universeDomain(): string;

vmMigrationStub

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

warn

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

Methods

addGroupMigration(request, options)

addGroupMigration(request?: protos.google.cloud.vmmigration.v1.IAddGroupMigrationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Adds a MigratingVm to a Group.

Parameters
Name Description
request IAddGroupMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.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 full path name of the Group to add to.
   */
  // const group = 'abc123'
  /**
   *  The full path name of the MigratingVm to add.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callAddGroupMigration() {
    // Construct request
    const request = {
      group,
    };

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

  callAddGroupMigration();

addGroupMigration(request, options, callback)

addGroupMigration(request: protos.google.cloud.vmmigration.v1.IAddGroupMigrationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IAddGroupMigrationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

addGroupMigration(request, callback)

addGroupMigration(request: protos.google.cloud.vmmigration.v1.IAddGroupMigrationRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IAddGroupMigrationRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IAddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

cancelCloneJob(request, options)

cancelCloneJob(request?: protos.google.cloud.vmmigration.v1.ICancelCloneJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Initiates the cancellation of a running clone job.

Parameters
Name Description
request ICancelCloneJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.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 clone job id
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callCancelCloneJob();

cancelCloneJob(request, options, callback)

cancelCloneJob(request: protos.google.cloud.vmmigration.v1.ICancelCloneJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICancelCloneJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

cancelCloneJob(request, callback)

cancelCloneJob(request: protos.google.cloud.vmmigration.v1.ICancelCloneJobRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICancelCloneJobRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCloneJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

cancelCutoverJob(request, options)

cancelCutoverJob(request?: protos.google.cloud.vmmigration.v1.ICancelCutoverJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Initiates the cancellation of a running cutover job.

Parameters
Name Description
request ICancelCutoverJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.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 cutover job id
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callCancelCutoverJob();

cancelCutoverJob(request, options, callback)

cancelCutoverJob(request: protos.google.cloud.vmmigration.v1.ICancelCutoverJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICancelCutoverJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

cancelCutoverJob(request, callback)

cancelCutoverJob(request: protos.google.cloud.vmmigration.v1.ICancelCutoverJobRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICancelCutoverJobRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ICancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

cancelOperation(request, optionsOrCallback, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | 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
Name Description
request CancelOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
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
Type Description
Promise<protos.google.protobuf.Empty>
Example

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

checkAddGroupMigrationProgress(name)

checkAddGroupMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.AddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.AddGroupMigrationResponse, protos.google.cloud.vmmigration.v1.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 full path name of the Group to add to.
   */
  // const group = 'abc123'
  /**
   *  The full path name of the MigratingVm to add.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callAddGroupMigration() {
    // Construct request
    const request = {
      group,
    };

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

  callAddGroupMigration();

checkCancelCloneJobProgress(name)

checkCancelCloneJobProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.CancelCloneJobResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.CancelCloneJobResponse, protos.google.cloud.vmmigration.v1.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 clone job id
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callCancelCloneJob();

checkCancelCutoverJobProgress(name)

checkCancelCutoverJobProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.CancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.CancelCutoverJobResponse, protos.google.cloud.vmmigration.v1.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 cutover job id
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callCancelCutoverJob();

checkCreateCloneJobProgress(name)

checkCreateCloneJobProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.CloneJob, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.CloneJob, protos.google.cloud.vmmigration.v1.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 Clone's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The clone job identifier.
   */
  // const cloneJobId = 'abc123'
  /**
   *  Required. The clone request body.
   */
  // const cloneJob = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateCloneJob() {
    // Construct request
    const request = {
      parent,
      cloneJobId,
      cloneJob,
    };

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

  callCreateCloneJob();

checkCreateCutoverJobProgress(name)

checkCreateCutoverJobProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.CutoverJob, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.CutoverJob, protos.google.cloud.vmmigration.v1.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 Cutover's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The cutover job identifier.
   */
  // const cutoverJobId = 'abc123'
  /**
   *  Required. The cutover request body.
   */
  // const cutoverJob = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateCutoverJob() {
    // Construct request
    const request = {
      parent,
      cutoverJobId,
      cutoverJob,
    };

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

  callCreateCutoverJob();

checkCreateDatacenterConnectorProgress(name)

checkCreateDatacenterConnectorProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.DatacenterConnector, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.DatacenterConnector, protos.google.cloud.vmmigration.v1.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 DatacenterConnector's parent.
   *  Required. The Source in where the new DatacenterConnector will be created.
   *  For example:
   *  `projects/my-project/locations/us-central1/sources/my-source`
   */
  // const parent = 'abc123'
  /**
   *  Required. The datacenterConnector identifier.
   */
  // const datacenterConnectorId = 'abc123'
  /**
   *  Required. The create request body.
   */
  // const datacenterConnector = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateDatacenterConnector() {
    // Construct request
    const request = {
      parent,
      datacenterConnectorId,
      datacenterConnector,
    };

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

  callCreateDatacenterConnector();

checkCreateGroupProgress(name)

checkCreateGroupProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.Group, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.Group, protos.google.cloud.vmmigration.v1.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 Group's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The group identifier.
   */
  // const groupId = 'abc123'
  /**
   *  Required. The create request body.
   */
  // const group = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateGroup() {
    // Construct request
    const request = {
      parent,
      groupId,
      group,
    };

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

  callCreateGroup();

checkCreateMigratingVmProgress(name)

checkCreateMigratingVmProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.MigratingVm, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.MigratingVm, protos.google.cloud.vmmigration.v1.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 MigratingVm's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The migratingVm identifier.
   */
  // const migratingVmId = 'abc123'
  /**
   *  Required. The create request body.
   */
  // const migratingVm = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateMigratingVm() {
    // Construct request
    const request = {
      parent,
      migratingVmId,
      migratingVm,
    };

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

  callCreateMigratingVm();

checkCreateSourceProgress(name)

checkCreateSourceProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.Source, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.Source, protos.google.cloud.vmmigration.v1.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 Source's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The source identifier.
   */
  // const sourceId = 'abc123'
  /**
   *  Required. The create request body.
   */
  // const source = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateSource() {
    // Construct request
    const request = {
      parent,
      sourceId,
      source,
    };

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

  callCreateSource();

checkCreateTargetProjectProgress(name)

checkCreateTargetProjectProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.TargetProject, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.TargetProject, protos.google.cloud.vmmigration.v1.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 TargetProject's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The target_project identifier.
   */
  // const targetProjectId = 'abc123'
  /**
   *  Required. The create request body.
   */
  // const targetProject = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateTargetProject() {
    // Construct request
    const request = {
      parent,
      targetProjectId,
      targetProject,
    };

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

  callCreateTargetProject();

checkCreateUtilizationReportProgress(name)

checkCreateUtilizationReportProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.UtilizationReport, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.UtilizationReport, protos.google.cloud.vmmigration.v1.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 Utilization Report's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The report to create.
   */
  // const utilizationReport = {}
  /**
   *  Required. The ID to use for the report, which will become the final
   *  component of the reports's resource name.
   *  This value maximum length is 63 characters, and valid characters
   *  are /[a-z][0-9]-/. It must start with an english letter and must not
   *  end with a hyphen.
   */
  // const utilizationReportId = 'abc123'
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateUtilizationReport() {
    // Construct request
    const request = {
      parent,
      utilizationReport,
      utilizationReportId,
    };

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

  callCreateUtilizationReport();

checkDeleteDatacenterConnectorProgress(name)

checkDeleteDatacenterConnectorProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.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 DatacenterConnector name.
   */
  // const name = 'abc123'
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteDatacenterConnector();

checkDeleteGroupProgress(name)

checkDeleteGroupProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.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 Group name.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteGroup();

checkDeleteMigratingVmProgress(name)

checkDeleteMigratingVmProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.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 MigratingVm.
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteMigratingVm();

checkDeleteSourceProgress(name)

checkDeleteSourceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.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 Source name.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteSource();

checkDeleteTargetProjectProgress(name)

checkDeleteTargetProjectProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.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 TargetProject name.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteTargetProject();

checkDeleteUtilizationReportProgress(name)

checkDeleteUtilizationReportProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.vmmigration.v1.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 Utilization Report name.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteUtilizationReport();

checkFinalizeMigrationProgress(name)

checkFinalizeMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.FinalizeMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.FinalizeMigrationResponse, protos.google.cloud.vmmigration.v1.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 MigratingVm.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callFinalizeMigration() {
    // Construct request
    const request = {
      migratingVm,
    };

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

  callFinalizeMigration();

checkPauseMigrationProgress(name)

checkPauseMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.PauseMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.PauseMigrationResponse, protos.google.cloud.vmmigration.v1.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 MigratingVm.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callPauseMigration() {
    // Construct request
    const request = {
      migratingVm,
    };

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

  callPauseMigration();

checkRemoveGroupMigrationProgress(name)

checkRemoveGroupMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.RemoveGroupMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.RemoveGroupMigrationResponse, protos.google.cloud.vmmigration.v1.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 Group.
   */
  // const group = 'abc123'
  /**
   *  The MigratingVm to remove.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callRemoveGroupMigration() {
    // Construct request
    const request = {
      group,
    };

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

  callRemoveGroupMigration();

checkResumeMigrationProgress(name)

checkResumeMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.ResumeMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.ResumeMigrationResponse, protos.google.cloud.vmmigration.v1.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 MigratingVm.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callResumeMigration() {
    // Construct request
    const request = {
      migratingVm,
    };

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

  callResumeMigration();

checkStartMigrationProgress(name)

checkStartMigrationProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.StartMigrationResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.StartMigrationResponse, protos.google.cloud.vmmigration.v1.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 MigratingVm.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callStartMigration() {
    // Construct request
    const request = {
      migratingVm,
    };

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

  callStartMigration();

checkUpdateGroupProgress(name)

checkUpdateGroupProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.Group, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.Group, protos.google.cloud.vmmigration.v1.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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  Group resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The update request body.
   */
  // const group = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callUpdateGroup() {
    // Construct request
    const request = {
      group,
    };

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

  callUpdateGroup();

checkUpdateMigratingVmProgress(name)

checkUpdateMigratingVmProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.MigratingVm, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.MigratingVm, protos.google.cloud.vmmigration.v1.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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  MigratingVm resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The update request body.
   */
  // const migratingVm = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callUpdateMigratingVm() {
    // Construct request
    const request = {
      migratingVm,
    };

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

  callUpdateMigratingVm();

checkUpdateSourceProgress(name)

checkUpdateSourceProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.Source, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.Source, protos.google.cloud.vmmigration.v1.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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  Source resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The update request body.
   */
  // const source = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callUpdateSource() {
    // Construct request
    const request = {
      source,
    };

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

  callUpdateSource();

checkUpdateTargetProjectProgress(name)

checkUpdateTargetProjectProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.TargetProject, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.TargetProject, protos.google.cloud.vmmigration.v1.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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  TargetProject resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The update request body.
   */
  // const targetProject = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callUpdateTargetProject() {
    // Construct request
    const request = {
      targetProject,
    };

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

  callUpdateTargetProject();

checkUpgradeApplianceProgress(name)

checkUpgradeApplianceProgress(name: string): Promise<LROperation<protos.google.cloud.vmmigration.v1.UpgradeApplianceResponse, protos.google.cloud.vmmigration.v1.OperationMetadata>>;

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

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.vmmigration.v1.UpgradeApplianceResponse, protos.google.cloud.vmmigration.v1.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 DatacenterConnector name.
   */
  // const datacenterConnector = 'abc123'
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callUpgradeAppliance() {
    // Construct request
    const request = {
      datacenterConnector,
    };

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

  callUpgradeAppliance();

cloneJobPath(project, location, source, migratingVm, cloneJob)

cloneJobPath(project: string, location: string, source: string, migratingVm: string, cloneJob: string): string;

Return a fully-qualified cloneJob resource name string.

Parameters
Name Description
project string
location string
source string
migratingVm string
cloneJob string
Returns
Type Description
string

{string} Resource name string.

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
Type Description
Promise<void>

{Promise} A promise that resolves when the client is closed.

createCloneJob(request, options)

createCloneJob(request?: protos.google.cloud.vmmigration.v1.ICreateCloneJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Initiates a Clone of a specific migrating VM.

Parameters
Name Description
request ICreateCloneJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.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 Clone's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The clone job identifier.
   */
  // const cloneJobId = 'abc123'
  /**
   *  Required. The clone request body.
   */
  // const cloneJob = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateCloneJob() {
    // Construct request
    const request = {
      parent,
      cloneJobId,
      cloneJob,
    };

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

  callCreateCloneJob();

createCloneJob(request, options, callback)

createCloneJob(request: protos.google.cloud.vmmigration.v1.ICreateCloneJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateCloneJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createCloneJob(request, callback)

createCloneJob(request: protos.google.cloud.vmmigration.v1.ICreateCloneJobRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateCloneJobRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createCutoverJob(request, options)

createCutoverJob(request?: protos.google.cloud.vmmigration.v1.ICreateCutoverJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.

Parameters
Name Description
request ICreateCutoverJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.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 Cutover's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The cutover job identifier.
   */
  // const cutoverJobId = 'abc123'
  /**
   *  Required. The cutover request body.
   */
  // const cutoverJob = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateCutoverJob() {
    // Construct request
    const request = {
      parent,
      cutoverJobId,
      cutoverJob,
    };

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

  callCreateCutoverJob();

createCutoverJob(request, options, callback)

createCutoverJob(request: protos.google.cloud.vmmigration.v1.ICreateCutoverJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateCutoverJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createCutoverJob(request, callback)

createCutoverJob(request: protos.google.cloud.vmmigration.v1.ICreateCutoverJobRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateCutoverJobRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createDatacenterConnector(request, options)

createDatacenterConnector(request?: protos.google.cloud.vmmigration.v1.ICreateDatacenterConnectorRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new DatacenterConnector in a given Source.

Parameters
Name Description
request ICreateDatacenterConnectorRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.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 DatacenterConnector's parent.
   *  Required. The Source in where the new DatacenterConnector will be created.
   *  For example:
   *  `projects/my-project/locations/us-central1/sources/my-source`
   */
  // const parent = 'abc123'
  /**
   *  Required. The datacenterConnector identifier.
   */
  // const datacenterConnectorId = 'abc123'
  /**
   *  Required. The create request body.
   */
  // const datacenterConnector = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateDatacenterConnector() {
    // Construct request
    const request = {
      parent,
      datacenterConnectorId,
      datacenterConnector,
    };

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

  callCreateDatacenterConnector();

createDatacenterConnector(request, options, callback)

createDatacenterConnector(request: protos.google.cloud.vmmigration.v1.ICreateDatacenterConnectorRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateDatacenterConnectorRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createDatacenterConnector(request, callback)

createDatacenterConnector(request: protos.google.cloud.vmmigration.v1.ICreateDatacenterConnectorRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateDatacenterConnectorRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createGroup(request, options)

createGroup(request?: protos.google.cloud.vmmigration.v1.ICreateGroupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Group in a given project and location.

Parameters
Name Description
request ICreateGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.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 Group's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The group identifier.
   */
  // const groupId = 'abc123'
  /**
   *  Required. The create request body.
   */
  // const group = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateGroup() {
    // Construct request
    const request = {
      parent,
      groupId,
      group,
    };

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

  callCreateGroup();

createGroup(request, options, callback)

createGroup(request: protos.google.cloud.vmmigration.v1.ICreateGroupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateGroupRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createGroup(request, callback)

createGroup(request: protos.google.cloud.vmmigration.v1.ICreateGroupRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateGroupRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createMigratingVm(request, options)

createMigratingVm(request?: protos.google.cloud.vmmigration.v1.ICreateMigratingVmRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new MigratingVm in a given Source.

Parameters
Name Description
request ICreateMigratingVmRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.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 MigratingVm's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The migratingVm identifier.
   */
  // const migratingVmId = 'abc123'
  /**
   *  Required. The create request body.
   */
  // const migratingVm = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateMigratingVm() {
    // Construct request
    const request = {
      parent,
      migratingVmId,
      migratingVm,
    };

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

  callCreateMigratingVm();

createMigratingVm(request, options, callback)

createMigratingVm(request: protos.google.cloud.vmmigration.v1.ICreateMigratingVmRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateMigratingVmRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createMigratingVm(request, callback)

createMigratingVm(request: protos.google.cloud.vmmigration.v1.ICreateMigratingVmRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateMigratingVmRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createSource(request, options)

createSource(request?: protos.google.cloud.vmmigration.v1.ICreateSourceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new Source in a given project and location.

Parameters
Name Description
request ICreateSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.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 Source's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The source identifier.
   */
  // const sourceId = 'abc123'
  /**
   *  Required. The create request body.
   */
  // const source = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateSource() {
    // Construct request
    const request = {
      parent,
      sourceId,
      source,
    };

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

  callCreateSource();

createSource(request, options, callback)

createSource(request: protos.google.cloud.vmmigration.v1.ICreateSourceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateSourceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createSource(request, callback)

createSource(request: protos.google.cloud.vmmigration.v1.ICreateSourceRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateSourceRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createTargetProject(request, options)

createTargetProject(request?: protos.google.cloud.vmmigration.v1.ICreateTargetProjectRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new TargetProject in a given project.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

Parameters
Name Description
request ICreateTargetProjectRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.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 TargetProject's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The target_project identifier.
   */
  // const targetProjectId = 'abc123'
  /**
   *  Required. The create request body.
   */
  // const targetProject = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateTargetProject() {
    // Construct request
    const request = {
      parent,
      targetProjectId,
      targetProject,
    };

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

  callCreateTargetProject();

createTargetProject(request, options, callback)

createTargetProject(request: protos.google.cloud.vmmigration.v1.ICreateTargetProjectRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateTargetProjectRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createTargetProject(request, callback)

createTargetProject(request: protos.google.cloud.vmmigration.v1.ICreateTargetProjectRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateTargetProjectRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createUtilizationReport(request, options)

createUtilizationReport(request?: protos.google.cloud.vmmigration.v1.ICreateUtilizationReportRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new UtilizationReport.

Parameters
Name Description
request ICreateUtilizationReportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.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 Utilization Report's parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. The report to create.
   */
  // const utilizationReport = {}
  /**
   *  Required. The ID to use for the report, which will become the final
   *  component of the reports's resource name.
   *  This value maximum length is 63 characters, and valid characters
   *  are /[a-z][0-9]-/. It must start with an english letter and must not
   *  end with a hyphen.
   */
  // const utilizationReportId = 'abc123'
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callCreateUtilizationReport() {
    // Construct request
    const request = {
      parent,
      utilizationReport,
      utilizationReportId,
    };

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

  callCreateUtilizationReport();

createUtilizationReport(request, options, callback)

createUtilizationReport(request: protos.google.cloud.vmmigration.v1.ICreateUtilizationReportRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateUtilizationReportRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createUtilizationReport(request, callback)

createUtilizationReport(request: protos.google.cloud.vmmigration.v1.ICreateUtilizationReportRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateUtilizationReportRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

cutoverJobPath(project, location, source, migratingVm, cutoverJob)

cutoverJobPath(project: string, location: string, source: string, migratingVm: string, cutoverJob: string): string;

Return a fully-qualified cutoverJob resource name string.

Parameters
Name Description
project string
location string
source string
migratingVm string
cutoverJob string
Returns
Type Description
string

{string} Resource name string.

datacenterConnectorPath(project, location, source, datacenterConnector)

datacenterConnectorPath(project: string, location: string, source: string, datacenterConnector: string): string;

Return a fully-qualified datacenterConnector resource name string.

Parameters
Name Description
project string
location string
source string
datacenterConnector string
Returns
Type Description
string

{string} Resource name string.

deleteDatacenterConnector(request, options)

deleteDatacenterConnector(request?: protos.google.cloud.vmmigration.v1.IDeleteDatacenterConnectorRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single DatacenterConnector.

Parameters
Name Description
request IDeleteDatacenterConnectorRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.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 DatacenterConnector name.
   */
  // const name = 'abc123'
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteDatacenterConnector();

deleteDatacenterConnector(request, options, callback)

deleteDatacenterConnector(request: protos.google.cloud.vmmigration.v1.IDeleteDatacenterConnectorRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteDatacenterConnectorRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteDatacenterConnector(request, callback)

deleteDatacenterConnector(request: protos.google.cloud.vmmigration.v1.IDeleteDatacenterConnectorRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteDatacenterConnectorRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteGroup(request, options)

deleteGroup(request?: protos.google.cloud.vmmigration.v1.IDeleteGroupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single Group.

Parameters
Name Description
request IDeleteGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.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 Group name.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteGroup();

deleteGroup(request, options, callback)

deleteGroup(request: protos.google.cloud.vmmigration.v1.IDeleteGroupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteGroupRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteGroup(request, callback)

deleteGroup(request: protos.google.cloud.vmmigration.v1.IDeleteGroupRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteGroupRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteMigratingVm(request, options)

deleteMigratingVm(request?: protos.google.cloud.vmmigration.v1.IDeleteMigratingVmRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single MigratingVm.

Parameters
Name Description
request IDeleteMigratingVmRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.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 MigratingVm.
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteMigratingVm();

deleteMigratingVm(request, options, callback)

deleteMigratingVm(request: protos.google.cloud.vmmigration.v1.IDeleteMigratingVmRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteMigratingVmRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteMigratingVm(request, callback)

deleteMigratingVm(request: protos.google.cloud.vmmigration.v1.IDeleteMigratingVmRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteMigratingVmRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteOperation(request, optionsOrCallback, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: 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
Name Description
request DeleteOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
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
Type Description
Promise<protos.google.protobuf.Empty>
Example

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

deleteSource(request, options)

deleteSource(request?: protos.google.cloud.vmmigration.v1.IDeleteSourceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single Source.

Parameters
Name Description
request IDeleteSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.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 Source name.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteSource();

deleteSource(request, options, callback)

deleteSource(request: protos.google.cloud.vmmigration.v1.IDeleteSourceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSourceRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteSource(request, callback)

deleteSource(request: protos.google.cloud.vmmigration.v1.IDeleteSourceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSourceRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteTargetProject(request, options)

deleteTargetProject(request?: protos.google.cloud.vmmigration.v1.IDeleteTargetProjectRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single TargetProject.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

Parameters
Name Description
request IDeleteTargetProjectRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.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 TargetProject name.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteTargetProject();

deleteTargetProject(request, options, callback)

deleteTargetProject(request: protos.google.cloud.vmmigration.v1.IDeleteTargetProjectRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteTargetProjectRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteTargetProject(request, callback)

deleteTargetProject(request: protos.google.cloud.vmmigration.v1.IDeleteTargetProjectRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteTargetProjectRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteUtilizationReport(request, options)

deleteUtilizationReport(request?: protos.google.cloud.vmmigration.v1.IDeleteUtilizationReportRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single Utilization Report.

Parameters
Name Description
request IDeleteUtilizationReportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.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 Utilization Report name.
   */
  // const name = 'abc123'
  /**
   *  Optional. A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callDeleteUtilizationReport();

deleteUtilizationReport(request, options, callback)

deleteUtilizationReport(request: protos.google.cloud.vmmigration.v1.IDeleteUtilizationReportRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteUtilizationReportRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteUtilizationReport(request, callback)

deleteUtilizationReport(request: protos.google.cloud.vmmigration.v1.IDeleteUtilizationReportRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteUtilizationReportRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

fetchInventory(request, options)

fetchInventory(request?: protos.google.cloud.vmmigration.v1.IFetchInventoryRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.IFetchInventoryResponse,
        protos.google.cloud.vmmigration.v1.IFetchInventoryRequest | undefined,
        {} | undefined
    ]>;

List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the sense it's not in Compute Engine). The inventory describes the list of existing VMs in that source. Note that this operation lists the VMs on the remote source, as opposed to listing the MigratingVms resources in the vmmigration service.

Parameters
Name Description
request IFetchInventoryRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.IFetchInventoryResponse, protos.google.cloud.vmmigration.v1.IFetchInventoryRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing FetchInventoryResponse. 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 Source.
   */
  // const source = 'abc123'
  /**
   *  If this flag is set to true, the source will be queried instead of using
   *  cached results. Using this flag will make the call slower.
   */
  // const forceRefresh = true

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callFetchInventory() {
    // Construct request
    const request = {
      source,
    };

    // Run request
    const response = await vmmigrationClient.fetchInventory(request);
    console.log(response);
  }

  callFetchInventory();

fetchInventory(request, options, callback)

fetchInventory(request: protos.google.cloud.vmmigration.v1.IFetchInventoryRequest, options: CallOptions, callback: Callback<protos.google.cloud.vmmigration.v1.IFetchInventoryResponse, protos.google.cloud.vmmigration.v1.IFetchInventoryRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IFetchInventoryRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IFetchInventoryResponse, protos.google.cloud.vmmigration.v1.IFetchInventoryRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

fetchInventory(request, callback)

fetchInventory(request: protos.google.cloud.vmmigration.v1.IFetchInventoryRequest, callback: Callback<protos.google.cloud.vmmigration.v1.IFetchInventoryResponse, protos.google.cloud.vmmigration.v1.IFetchInventoryRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IFetchInventoryRequest
callback Callback<protos.google.cloud.vmmigration.v1.IFetchInventoryResponse, protos.google.cloud.vmmigration.v1.IFetchInventoryRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

finalizeMigration(request, options)

finalizeMigration(request?: protos.google.cloud.vmmigration.v1.IFinalizeMigrationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IFinalizeMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.

Parameters
Name Description
request IFinalizeMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IFinalizeMigrationResponse, protos.google.cloud.vmmigration.v1.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 MigratingVm.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callFinalizeMigration() {
    // Construct request
    const request = {
      migratingVm,
    };

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

  callFinalizeMigration();

finalizeMigration(request, options, callback)

finalizeMigration(request: protos.google.cloud.vmmigration.v1.IFinalizeMigrationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IFinalizeMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IFinalizeMigrationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IFinalizeMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

finalizeMigration(request, callback)

finalizeMigration(request: protos.google.cloud.vmmigration.v1.IFinalizeMigrationRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IFinalizeMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IFinalizeMigrationRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IFinalizeMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

getCloneJob(request, options)

getCloneJob(request?: protos.google.cloud.vmmigration.v1.IGetCloneJobRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.ICloneJob,
        protos.google.cloud.vmmigration.v1.IGetCloneJobRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single CloneJob.

Parameters
Name Description
request IGetCloneJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IGetCloneJobRequest | 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 CloneJob.
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

    // Run request
    const response = await vmmigrationClient.getCloneJob(request);
    console.log(response);
  }

  callGetCloneJob();

getCloneJob(request, options, callback)

getCloneJob(request: protos.google.cloud.vmmigration.v1.IGetCloneJobRequest, options: CallOptions, callback: Callback<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IGetCloneJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetCloneJobRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IGetCloneJobRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getCloneJob(request, callback)

getCloneJob(request: protos.google.cloud.vmmigration.v1.IGetCloneJobRequest, callback: Callback<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IGetCloneJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetCloneJobRequest
callback Callback<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IGetCloneJobRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getCutoverJob(request, options)

getCutoverJob(request?: protos.google.cloud.vmmigration.v1.IGetCutoverJobRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.ICutoverJob,
        protos.google.cloud.vmmigration.v1.IGetCutoverJobRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single CutoverJob.

Parameters
Name Description
request IGetCutoverJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IGetCutoverJobRequest | 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 CutoverJob.
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

    // Run request
    const response = await vmmigrationClient.getCutoverJob(request);
    console.log(response);
  }

  callGetCutoverJob();

getCutoverJob(request, options, callback)

getCutoverJob(request: protos.google.cloud.vmmigration.v1.IGetCutoverJobRequest, options: CallOptions, callback: Callback<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IGetCutoverJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetCutoverJobRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IGetCutoverJobRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getCutoverJob(request, callback)

getCutoverJob(request: protos.google.cloud.vmmigration.v1.IGetCutoverJobRequest, callback: Callback<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IGetCutoverJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetCutoverJobRequest
callback Callback<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IGetCutoverJobRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getDatacenterConnector(request, options)

getDatacenterConnector(request?: protos.google.cloud.vmmigration.v1.IGetDatacenterConnectorRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.IDatacenterConnector,
        (protos.google.cloud.vmmigration.v1.IGetDatacenterConnectorRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single DatacenterConnector.

Parameters
Name Description
request IGetDatacenterConnectorRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.IDatacenterConnector, (protos.google.cloud.vmmigration.v1.IGetDatacenterConnectorRequest | 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 DatacenterConnector.
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

    // Run request
    const response = await vmmigrationClient.getDatacenterConnector(request);
    console.log(response);
  }

  callGetDatacenterConnector();

getDatacenterConnector(request, options, callback)

getDatacenterConnector(request: protos.google.cloud.vmmigration.v1.IGetDatacenterConnectorRequest, options: CallOptions, callback: Callback<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IGetDatacenterConnectorRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetDatacenterConnectorRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IGetDatacenterConnectorRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getDatacenterConnector(request, callback)

getDatacenterConnector(request: protos.google.cloud.vmmigration.v1.IGetDatacenterConnectorRequest, callback: Callback<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IGetDatacenterConnectorRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetDatacenterConnectorRequest
callback Callback<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IGetDatacenterConnectorRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getGroup(request, options)

getGroup(request?: protos.google.cloud.vmmigration.v1.IGetGroupRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.IGroup,
        protos.google.cloud.vmmigration.v1.IGetGroupRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Group.

Parameters
Name Description
request IGetGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IGetGroupRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Group. 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 group name.
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

    // Run request
    const response = await vmmigrationClient.getGroup(request);
    console.log(response);
  }

  callGetGroup();

getGroup(request, options, callback)

getGroup(request: protos.google.cloud.vmmigration.v1.IGetGroupRequest, options: CallOptions, callback: Callback<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IGetGroupRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetGroupRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IGetGroupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getGroup(request, callback)

getGroup(request: protos.google.cloud.vmmigration.v1.IGetGroupRequest, callback: Callback<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IGetGroupRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetGroupRequest
callback Callback<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IGetGroupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
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
Name Description
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
Type Description
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.

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
Name Description
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
Type Description
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);

getMigratingVm(request, options)

getMigratingVm(request?: protos.google.cloud.vmmigration.v1.IGetMigratingVmRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.IMigratingVm,
        protos.google.cloud.vmmigration.v1.IGetMigratingVmRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single MigratingVm.

Parameters
Name Description
request IGetMigratingVmRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IGetMigratingVmRequest | 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 MigratingVm.
   */
  // const name = 'abc123'
  /**
   *  Optional. The level of details of the migrating VM.
   */
  // const view = {}

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

    // Run request
    const response = await vmmigrationClient.getMigratingVm(request);
    console.log(response);
  }

  callGetMigratingVm();

getMigratingVm(request, options, callback)

getMigratingVm(request: protos.google.cloud.vmmigration.v1.IGetMigratingVmRequest, options: CallOptions, callback: Callback<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IGetMigratingVmRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetMigratingVmRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IGetMigratingVmRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getMigratingVm(request, callback)

getMigratingVm(request: protos.google.cloud.vmmigration.v1.IGetMigratingVmRequest, callback: Callback<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IGetMigratingVmRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetMigratingVmRequest
callback Callback<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IGetMigratingVmRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getOperation(request, optionsOrCallback, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: 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
Name Description
request GetOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
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
Type Description
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
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

getReplicationCycle(request, options)

getReplicationCycle(request?: protos.google.cloud.vmmigration.v1.IGetReplicationCycleRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.IReplicationCycle,
        (protos.google.cloud.vmmigration.v1.IGetReplicationCycleRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single ReplicationCycle.

Parameters
Name Description
request IGetReplicationCycleRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.IReplicationCycle, (protos.google.cloud.vmmigration.v1.IGetReplicationCycleRequest | 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 ReplicationCycle.
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

    // Run request
    const response = await vmmigrationClient.getReplicationCycle(request);
    console.log(response);
  }

  callGetReplicationCycle();

getReplicationCycle(request, options, callback)

getReplicationCycle(request: protos.google.cloud.vmmigration.v1.IGetReplicationCycleRequest, options: CallOptions, callback: Callback<protos.google.cloud.vmmigration.v1.IReplicationCycle, protos.google.cloud.vmmigration.v1.IGetReplicationCycleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetReplicationCycleRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IReplicationCycle, protos.google.cloud.vmmigration.v1.IGetReplicationCycleRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getReplicationCycle(request, callback)

getReplicationCycle(request: protos.google.cloud.vmmigration.v1.IGetReplicationCycleRequest, callback: Callback<protos.google.cloud.vmmigration.v1.IReplicationCycle, protos.google.cloud.vmmigration.v1.IGetReplicationCycleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetReplicationCycleRequest
callback Callback<protos.google.cloud.vmmigration.v1.IReplicationCycle, protos.google.cloud.vmmigration.v1.IGetReplicationCycleRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getSource(request, options)

getSource(request?: protos.google.cloud.vmmigration.v1.IGetSourceRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.ISource,
        protos.google.cloud.vmmigration.v1.IGetSourceRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Source.

Parameters
Name Description
request IGetSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IGetSourceRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Source. 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 Source name.
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

    // Run request
    const response = await vmmigrationClient.getSource(request);
    console.log(response);
  }

  callGetSource();

getSource(request, options, callback)

getSource(request: protos.google.cloud.vmmigration.v1.IGetSourceRequest, options: CallOptions, callback: Callback<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IGetSourceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetSourceRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IGetSourceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getSource(request, callback)

getSource(request: protos.google.cloud.vmmigration.v1.IGetSourceRequest, callback: Callback<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IGetSourceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetSourceRequest
callback Callback<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IGetSourceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getTargetProject(request, options)

getTargetProject(request?: protos.google.cloud.vmmigration.v1.IGetTargetProjectRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.ITargetProject,
        protos.google.cloud.vmmigration.v1.IGetTargetProjectRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single TargetProject.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

Parameters
Name Description
request IGetTargetProjectRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IGetTargetProjectRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing TargetProject. 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 TargetProject name.
   */
  // const name = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

    // Run request
    const response = await vmmigrationClient.getTargetProject(request);
    console.log(response);
  }

  callGetTargetProject();

getTargetProject(request, options, callback)

getTargetProject(request: protos.google.cloud.vmmigration.v1.IGetTargetProjectRequest, options: CallOptions, callback: Callback<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IGetTargetProjectRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetTargetProjectRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IGetTargetProjectRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getTargetProject(request, callback)

getTargetProject(request: protos.google.cloud.vmmigration.v1.IGetTargetProjectRequest, callback: Callback<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IGetTargetProjectRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetTargetProjectRequest
callback Callback<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IGetTargetProjectRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getUtilizationReport(request, options)

getUtilizationReport(request?: protos.google.cloud.vmmigration.v1.IGetUtilizationReportRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.IUtilizationReport,
        (protos.google.cloud.vmmigration.v1.IGetUtilizationReportRequest | undefined),
        {} | undefined
    ]>;

Gets a single Utilization Report.

Parameters
Name Description
request IGetUtilizationReportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.IUtilizationReport, (protos.google.cloud.vmmigration.v1.IGetUtilizationReportRequest | 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 Utilization Report name.
   */
  // const name = 'abc123'
  /**
   *  Optional. The level of details of the report.
   *  Defaults to FULL
   */
  // const view = {}

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

    // Run request
    const response = await vmmigrationClient.getUtilizationReport(request);
    console.log(response);
  }

  callGetUtilizationReport();

getUtilizationReport(request, options, callback)

getUtilizationReport(request: protos.google.cloud.vmmigration.v1.IGetUtilizationReportRequest, options: CallOptions, callback: Callback<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IGetUtilizationReportRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetUtilizationReportRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IGetUtilizationReportRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getUtilizationReport(request, callback)

getUtilizationReport(request: protos.google.cloud.vmmigration.v1.IGetUtilizationReportRequest, callback: Callback<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IGetUtilizationReportRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetUtilizationReportRequest
callback Callback<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IGetUtilizationReportRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

groupPath(project, location, group)

groupPath(project: string, location: string, group: string): string;

Return a fully-qualified group resource name string.

Parameters
Name Description
project string
location string
group string
Returns
Type Description
string

{string} Resource name string.

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
Type Description
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listCloneJobs(request, options)

listCloneJobs(request?: protos.google.cloud.vmmigration.v1.IListCloneJobsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.ICloneJob[],
        protos.google.cloud.vmmigration.v1.IListCloneJobsRequest | null,
        protos.google.cloud.vmmigration.v1.IListCloneJobsResponse
    ]>;

Lists CloneJobs of a given migrating VM.

Parameters
Name Description
request IListCloneJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.ICloneJob[], protos.google.cloud.vmmigration.v1.IListCloneJobsRequest | null, protos.google.cloud.vmmigration.v1.IListCloneJobsResponse ]>

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

listCloneJobs(request, options, callback)

listCloneJobs(request: protos.google.cloud.vmmigration.v1.IListCloneJobsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListCloneJobsRequest, protos.google.cloud.vmmigration.v1.IListCloneJobsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ICloneJob>): void;
Parameters
Name Description
request IListCloneJobsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListCloneJobsRequest, protos.google.cloud.vmmigration.v1.IListCloneJobsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ICloneJob>
Returns
Type Description
void

listCloneJobs(request, callback)

listCloneJobs(request: protos.google.cloud.vmmigration.v1.IListCloneJobsRequest, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListCloneJobsRequest, protos.google.cloud.vmmigration.v1.IListCloneJobsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ICloneJob>): void;
Parameters
Name Description
request IListCloneJobsRequest
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListCloneJobsRequest, protos.google.cloud.vmmigration.v1.IListCloneJobsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ICloneJob>
Returns
Type Description
void

listCloneJobsAsync(request, options)

listCloneJobsAsync(request?: protos.google.cloud.vmmigration.v1.IListCloneJobsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.vmmigration.v1.ICloneJob>;

Equivalent to listCloneJobs, but returns an iterable object.

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

Parameters
Name Description
request IListCloneJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.vmmigration.v1.ICloneJob>

{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. The parent, which owns this collection of source VMs.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of clone jobs to return. The service may
   *  return fewer than this value. If unspecified, at most 500 clone jobs will
   *  be returned. The maximum value is 1000; values above 1000 will be coerced
   *  to 1000.
   */
  // const pageSize = 1234
  /**
   *  Required. A page token, received from a previous `ListCloneJobs` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListCloneJobs` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter request.
   */
  // const filter = 'abc123'
  /**
   *  Optional. the order by fields for the result.
   */
  // const orderBy = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callListCloneJobs();

listCloneJobsStream(request, options)

listCloneJobsStream(request?: protos.google.cloud.vmmigration.v1.IListCloneJobsRequest, options?: CallOptions): Transform;

Equivalent to listCloneJobs, but returns a NodeJS Stream object.

Parameters
Name Description
request IListCloneJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

listCutoverJobs(request, options)

listCutoverJobs(request?: protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.ICutoverJob[],
        protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest | null,
        protos.google.cloud.vmmigration.v1.IListCutoverJobsResponse
    ]>;

Lists CutoverJobs of a given migrating VM.

Parameters
Name Description
request IListCutoverJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.ICutoverJob[], protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest | null, protos.google.cloud.vmmigration.v1.IListCutoverJobsResponse ]>

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

listCutoverJobs(request, options, callback)

listCutoverJobs(request: protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest, protos.google.cloud.vmmigration.v1.IListCutoverJobsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ICutoverJob>): void;
Parameters
Name Description
request IListCutoverJobsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest, protos.google.cloud.vmmigration.v1.IListCutoverJobsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ICutoverJob>
Returns
Type Description
void

listCutoverJobs(request, callback)

listCutoverJobs(request: protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest, protos.google.cloud.vmmigration.v1.IListCutoverJobsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ICutoverJob>): void;
Parameters
Name Description
request IListCutoverJobsRequest
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest, protos.google.cloud.vmmigration.v1.IListCutoverJobsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ICutoverJob>
Returns
Type Description
void

listCutoverJobsAsync(request, options)

listCutoverJobsAsync(request?: protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.vmmigration.v1.ICutoverJob>;

Equivalent to listCutoverJobs, but returns an iterable object.

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

Parameters
Name Description
request IListCutoverJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.vmmigration.v1.ICutoverJob>

{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. The parent, which owns this collection of migrating VMs.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of cutover jobs to return. The service may
   *  return fewer than this value. If unspecified, at most 500 cutover jobs will
   *  be returned. The maximum value is 1000; values above 1000 will be coerced
   *  to 1000.
   */
  // const pageSize = 1234
  /**
   *  Required. A page token, received from a previous `ListCutoverJobs` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListCutoverJobs` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter request.
   */
  // const filter = 'abc123'
  /**
   *  Optional. the order by fields for the result.
   */
  // const orderBy = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callListCutoverJobs();

listCutoverJobsStream(request, options)

listCutoverJobsStream(request?: protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest, options?: CallOptions): Transform;

Equivalent to listCutoverJobs, but returns a NodeJS Stream object.

Parameters
Name Description
request IListCutoverJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

listDatacenterConnectors(request, options)

listDatacenterConnectors(request?: protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.IDatacenterConnector[],
        protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest | null,
        protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsResponse
    ]>;

Lists DatacenterConnectors in a given Source.

Parameters
Name Description
request IListDatacenterConnectorsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.IDatacenterConnector[], protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest | null, protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsResponse ]>

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

listDatacenterConnectors(request, options, callback)

listDatacenterConnectors(request: protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest, protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IDatacenterConnector>): void;
Parameters
Name Description
request IListDatacenterConnectorsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest, protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IDatacenterConnector>
Returns
Type Description
void

listDatacenterConnectors(request, callback)

listDatacenterConnectors(request: protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest, protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IDatacenterConnector>): void;
Parameters
Name Description
request IListDatacenterConnectorsRequest
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest, protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IDatacenterConnector>
Returns
Type Description
void

listDatacenterConnectorsAsync(request, options)

listDatacenterConnectorsAsync(request?: protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.vmmigration.v1.IDatacenterConnector>;

Equivalent to listDatacenterConnectors, but returns an iterable object.

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

Parameters
Name Description
request IListDatacenterConnectorsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.vmmigration.v1.IDatacenterConnector>

{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. The parent, which owns this collection of connectors.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of connectors to return. The service may
   *  return fewer than this value. If unspecified, at most 500 sources will be
   *  returned. The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  Required. A page token, received from a previous `ListDatacenterConnectors`
   *  call. Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to
   *  `ListDatacenterConnectors` must match the call that provided the page
   *  token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter request.
   */
  // const filter = 'abc123'
  /**
   *  Optional. the order by fields for the result.
   */
  // const orderBy = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callListDatacenterConnectors();

listDatacenterConnectorsStream(request, options)

listDatacenterConnectorsStream(request?: protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest, options?: CallOptions): Transform;

Equivalent to listDatacenterConnectors, but returns a NodeJS Stream object.

Parameters
Name Description
request IListDatacenterConnectorsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

listGroups(request, options)

listGroups(request?: protos.google.cloud.vmmigration.v1.IListGroupsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.IGroup[],
        protos.google.cloud.vmmigration.v1.IListGroupsRequest | null,
        protos.google.cloud.vmmigration.v1.IListGroupsResponse
    ]>;

Lists Groups in a given project and location.

Parameters
Name Description
request IListGroupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.IGroup[], protos.google.cloud.vmmigration.v1.IListGroupsRequest | null, protos.google.cloud.vmmigration.v1.IListGroupsResponse ]>

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

listGroups(request, options, callback)

listGroups(request: protos.google.cloud.vmmigration.v1.IListGroupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListGroupsRequest, protos.google.cloud.vmmigration.v1.IListGroupsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IGroup>): void;
Parameters
Name Description
request IListGroupsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListGroupsRequest, protos.google.cloud.vmmigration.v1.IListGroupsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IGroup>
Returns
Type Description
void

listGroups(request, callback)

listGroups(request: protos.google.cloud.vmmigration.v1.IListGroupsRequest, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListGroupsRequest, protos.google.cloud.vmmigration.v1.IListGroupsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IGroup>): void;
Parameters
Name Description
request IListGroupsRequest
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListGroupsRequest, protos.google.cloud.vmmigration.v1.IListGroupsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IGroup>
Returns
Type Description
void

listGroupsAsync(request, options)

listGroupsAsync(request?: protos.google.cloud.vmmigration.v1.IListGroupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.vmmigration.v1.IGroup>;

Equivalent to listGroups, but returns an iterable object.

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

Parameters
Name Description
request IListGroupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.vmmigration.v1.IGroup>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Group. 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, which owns this collection of groups.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of groups to return. The service may return
   *  fewer than this value. If unspecified, at most 500 groups will be
   *  returned. The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  Required. A page token, received from a previous `ListGroups` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListGroups` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter request.
   */
  // const filter = 'abc123'
  /**
   *  Optional. the order by fields for the result.
   */
  // const orderBy = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callListGroups();

listGroupsStream(request, options)

listGroupsStream(request?: protos.google.cloud.vmmigration.v1.IListGroupsRequest, options?: CallOptions): Transform;

Equivalent to listGroups, but returns a NodeJS Stream object.

Parameters
Name Description
request IListGroupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing Group 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 listGroupsAsync() 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
Name Description
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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
}

listMigratingVms(request, options)

listMigratingVms(request?: protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.IMigratingVm[],
        protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest | null,
        protos.google.cloud.vmmigration.v1.IListMigratingVmsResponse
    ]>;

Lists MigratingVms in a given Source.

Parameters
Name Description
request IListMigratingVmsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.IMigratingVm[], protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest | null, protos.google.cloud.vmmigration.v1.IListMigratingVmsResponse ]>

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

listMigratingVms(request, options, callback)

listMigratingVms(request: protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest, protos.google.cloud.vmmigration.v1.IListMigratingVmsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IMigratingVm>): void;
Parameters
Name Description
request IListMigratingVmsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest, protos.google.cloud.vmmigration.v1.IListMigratingVmsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IMigratingVm>
Returns
Type Description
void

listMigratingVms(request, callback)

listMigratingVms(request: protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest, protos.google.cloud.vmmigration.v1.IListMigratingVmsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IMigratingVm>): void;
Parameters
Name Description
request IListMigratingVmsRequest
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest, protos.google.cloud.vmmigration.v1.IListMigratingVmsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IMigratingVm>
Returns
Type Description
void

listMigratingVmsAsync(request, options)

listMigratingVmsAsync(request?: protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.vmmigration.v1.IMigratingVm>;

Equivalent to listMigratingVms, but returns an iterable object.

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

Parameters
Name Description
request IListMigratingVmsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.vmmigration.v1.IMigratingVm>

{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. The parent, which owns this collection of MigratingVms.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of migrating VMs to return. The service may
   *  return fewer than this value. If unspecified, at most 500 migrating VMs
   *  will be returned. The maximum value is 1000; values above 1000 will be
   *  coerced to 1000.
   */
  // const pageSize = 1234
  /**
   *  Required. A page token, received from a previous `ListMigratingVms` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListMigratingVms`
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter request.
   */
  // const filter = 'abc123'
  /**
   *  Optional. the order by fields for the result.
   */
  // const orderBy = 'abc123'
  /**
   *  Optional. The level of details of each migrating VM.
   */
  // const view = {}

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callListMigratingVms();

listMigratingVmsStream(request, options)

listMigratingVmsStream(request?: protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest, options?: CallOptions): Transform;

Equivalent to listMigratingVms, but returns a NodeJS Stream object.

Parameters
Name Description
request IListMigratingVmsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
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 listMigratingVmsAsync() 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.IOperation>;

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
Name Description
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
Type Description
AsyncIterable<protos.google.longrunning.IOperation>

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

Example

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

listReplicationCycles(request, options)

listReplicationCycles(request?: protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.IReplicationCycle[],
        protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest | null,
        protos.google.cloud.vmmigration.v1.IListReplicationCyclesResponse
    ]>;

Lists ReplicationCycles in a given MigratingVM.

Parameters
Name Description
request IListReplicationCyclesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.IReplicationCycle[], protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest | null, protos.google.cloud.vmmigration.v1.IListReplicationCyclesResponse ]>

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

listReplicationCycles(request, options, callback)

listReplicationCycles(request: protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest, protos.google.cloud.vmmigration.v1.IListReplicationCyclesResponse | null | undefined, protos.google.cloud.vmmigration.v1.IReplicationCycle>): void;
Parameters
Name Description
request IListReplicationCyclesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest, protos.google.cloud.vmmigration.v1.IListReplicationCyclesResponse | null | undefined, protos.google.cloud.vmmigration.v1.IReplicationCycle>
Returns
Type Description
void

listReplicationCycles(request, callback)

listReplicationCycles(request: protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest, protos.google.cloud.vmmigration.v1.IListReplicationCyclesResponse | null | undefined, protos.google.cloud.vmmigration.v1.IReplicationCycle>): void;
Parameters
Name Description
request IListReplicationCyclesRequest
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest, protos.google.cloud.vmmigration.v1.IListReplicationCyclesResponse | null | undefined, protos.google.cloud.vmmigration.v1.IReplicationCycle>
Returns
Type Description
void

listReplicationCyclesAsync(request, options)

listReplicationCyclesAsync(request?: protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.vmmigration.v1.IReplicationCycle>;

Equivalent to listReplicationCycles, but returns an iterable object.

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

Parameters
Name Description
request IListReplicationCyclesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.vmmigration.v1.IReplicationCycle>

{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. The parent, which owns this collection of ReplicationCycles.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of replication cycles to return. The service
   *  may return fewer than this value. If unspecified, at most 100 migrating VMs
   *  will be returned. The maximum value is 100; values above 100 will be
   *  coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Required. A page token, received from a previous `ListReplicationCycles`
   *  call. Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListReplicationCycles`
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter request.
   */
  // const filter = 'abc123'
  /**
   *  Optional. the order by fields for the result.
   */
  // const orderBy = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callListReplicationCycles();

listReplicationCyclesStream(request, options)

listReplicationCyclesStream(request?: protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest, options?: CallOptions): Transform;

Equivalent to listReplicationCycles, but returns a NodeJS Stream object.

Parameters
Name Description
request IListReplicationCyclesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

listSources(request, options)

listSources(request?: protos.google.cloud.vmmigration.v1.IListSourcesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.ISource[],
        protos.google.cloud.vmmigration.v1.IListSourcesRequest | null,
        protos.google.cloud.vmmigration.v1.IListSourcesResponse
    ]>;

Lists Sources in a given project and location.

Parameters
Name Description
request IListSourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.ISource[], protos.google.cloud.vmmigration.v1.IListSourcesRequest | null, protos.google.cloud.vmmigration.v1.IListSourcesResponse ]>

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

listSources(request, options, callback)

listSources(request: protos.google.cloud.vmmigration.v1.IListSourcesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListSourcesRequest, protos.google.cloud.vmmigration.v1.IListSourcesResponse | null | undefined, protos.google.cloud.vmmigration.v1.ISource>): void;
Parameters
Name Description
request IListSourcesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListSourcesRequest, protos.google.cloud.vmmigration.v1.IListSourcesResponse | null | undefined, protos.google.cloud.vmmigration.v1.ISource>
Returns
Type Description
void

listSources(request, callback)

listSources(request: protos.google.cloud.vmmigration.v1.IListSourcesRequest, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListSourcesRequest, protos.google.cloud.vmmigration.v1.IListSourcesResponse | null | undefined, protos.google.cloud.vmmigration.v1.ISource>): void;
Parameters
Name Description
request IListSourcesRequest
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListSourcesRequest, protos.google.cloud.vmmigration.v1.IListSourcesResponse | null | undefined, protos.google.cloud.vmmigration.v1.ISource>
Returns
Type Description
void

listSourcesAsync(request, options)

listSourcesAsync(request?: protos.google.cloud.vmmigration.v1.IListSourcesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.vmmigration.v1.ISource>;

Equivalent to listSources, but returns an iterable object.

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

Parameters
Name Description
request IListSourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.vmmigration.v1.ISource>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Source. 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, which owns this collection of sources.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of sources to return. The service may return
   *  fewer than this value. If unspecified, at most 500 sources will be
   *  returned. The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  Required. A page token, received from a previous `ListSources` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListSources` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter request.
   */
  // const filter = 'abc123'
  /**
   *  Optional. the order by fields for the result.
   */
  // const orderBy = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callListSources();

listSourcesStream(request, options)

listSourcesStream(request?: protos.google.cloud.vmmigration.v1.IListSourcesRequest, options?: CallOptions): Transform;

Equivalent to listSources, but returns a NodeJS Stream object.

Parameters
Name Description
request IListSourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing Source 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 listSourcesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTargetProjects(request, options)

listTargetProjects(request?: protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.ITargetProject[],
        protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest | null,
        protos.google.cloud.vmmigration.v1.IListTargetProjectsResponse
    ]>;

Lists TargetProjects in a given project.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

Parameters
Name Description
request IListTargetProjectsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.ITargetProject[], protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest | null, protos.google.cloud.vmmigration.v1.IListTargetProjectsResponse ]>

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

listTargetProjects(request, options, callback)

listTargetProjects(request: protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest, protos.google.cloud.vmmigration.v1.IListTargetProjectsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ITargetProject>): void;
Parameters
Name Description
request IListTargetProjectsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest, protos.google.cloud.vmmigration.v1.IListTargetProjectsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ITargetProject>
Returns
Type Description
void

listTargetProjects(request, callback)

listTargetProjects(request: protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest, protos.google.cloud.vmmigration.v1.IListTargetProjectsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ITargetProject>): void;
Parameters
Name Description
request IListTargetProjectsRequest
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest, protos.google.cloud.vmmigration.v1.IListTargetProjectsResponse | null | undefined, protos.google.cloud.vmmigration.v1.ITargetProject>
Returns
Type Description
void

listTargetProjectsAsync(request, options)

listTargetProjectsAsync(request?: protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.vmmigration.v1.ITargetProject>;

Equivalent to listTargetProjects, but returns an iterable object.

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

Parameters
Name Description
request IListTargetProjectsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.vmmigration.v1.ITargetProject>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing TargetProject. 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, which owns this collection of targets.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of targets to return. The service may return
   *  fewer than this value. If unspecified, at most 500 targets will be
   *  returned. The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  Required. A page token, received from a previous `ListTargets` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListTargets` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter request.
   */
  // const filter = 'abc123'
  /**
   *  Optional. the order by fields for the result.
   */
  // const orderBy = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callListTargetProjects();

listTargetProjectsStream(request, options)

listTargetProjectsStream(request?: protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest, options?: CallOptions): Transform;

Equivalent to listTargetProjects, but returns a NodeJS Stream object.

Parameters
Name Description
request IListTargetProjectsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing TargetProject 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 listTargetProjectsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listUtilizationReports(request, options)

listUtilizationReports(request?: protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.vmmigration.v1.IUtilizationReport[],
        protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest | null,
        protos.google.cloud.vmmigration.v1.IListUtilizationReportsResponse
    ]>;

Lists Utilization Reports of the given Source.

Parameters
Name Description
request IListUtilizationReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.vmmigration.v1.IUtilizationReport[], protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest | null, protos.google.cloud.vmmigration.v1.IListUtilizationReportsResponse ]>

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

listUtilizationReports(request, options, callback)

listUtilizationReports(request: protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest, protos.google.cloud.vmmigration.v1.IListUtilizationReportsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IUtilizationReport>): void;
Parameters
Name Description
request IListUtilizationReportsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest, protos.google.cloud.vmmigration.v1.IListUtilizationReportsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IUtilizationReport>
Returns
Type Description
void

listUtilizationReports(request, callback)

listUtilizationReports(request: protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest, callback: PaginationCallback<protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest, protos.google.cloud.vmmigration.v1.IListUtilizationReportsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IUtilizationReport>): void;
Parameters
Name Description
request IListUtilizationReportsRequest
callback PaginationCallback<protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest, protos.google.cloud.vmmigration.v1.IListUtilizationReportsResponse | null | undefined, protos.google.cloud.vmmigration.v1.IUtilizationReport>
Returns
Type Description
void

listUtilizationReportsAsync(request, options)

listUtilizationReportsAsync(request?: protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.vmmigration.v1.IUtilizationReport>;

Equivalent to listUtilizationReports, but returns an iterable object.

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

Parameters
Name Description
request IListUtilizationReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.vmmigration.v1.IUtilizationReport>

{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. The Utilization Reports parent.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The level of details of each report.
   *  Defaults to BASIC.
   */
  // const view = {}
  /**
   *  Optional. The maximum number of reports to return. The service may return
   *  fewer than this value. If unspecified, at most 500 reports will be
   *  returned. The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  Required. A page token, received from a previous `ListUtilizationReports`
   *  call. Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListUtilizationReports`
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter request.
   */
  // const filter = 'abc123'
  /**
   *  Optional. the order by fields for the result.
   */
  // const orderBy = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

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

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

  callListUtilizationReports();

listUtilizationReportsStream(request, options)

listUtilizationReportsStream(request?: protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest, options?: CallOptions): Transform;

Equivalent to listUtilizationReports, but returns a NodeJS Stream object.

Parameters
Name Description
request IListUtilizationReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

matchCloneJobFromCloneJobName(cloneJobName)

matchCloneJobFromCloneJobName(cloneJobName: string): string | number;

Parse the clone_job from CloneJob resource.

Parameter
Name Description
cloneJobName string

A fully-qualified path representing CloneJob resource.

Returns
Type Description
string | number

{string} A string representing the clone_job.

matchCutoverJobFromCutoverJobName(cutoverJobName)

matchCutoverJobFromCutoverJobName(cutoverJobName: string): string | number;

Parse the cutover_job from CutoverJob resource.

Parameter
Name Description
cutoverJobName string

A fully-qualified path representing CutoverJob resource.

Returns
Type Description
string | number

{string} A string representing the cutover_job.

matchDatacenterConnectorFromDatacenterConnectorName(datacenterConnectorName)

matchDatacenterConnectorFromDatacenterConnectorName(datacenterConnectorName: string): string | number;

Parse the datacenter_connector from DatacenterConnector resource.

Parameter
Name Description
datacenterConnectorName string

A fully-qualified path representing DatacenterConnector resource.

Returns
Type Description
string | number

{string} A string representing the datacenter_connector.

matchGroupFromGroupName(groupName)

matchGroupFromGroupName(groupName: string): string | number;

Parse the group from Group resource.

Parameter
Name Description
groupName string

A fully-qualified path representing Group resource.

Returns
Type Description
string | number

{string} A string representing the group.

matchLocationFromCloneJobName(cloneJobName)

matchLocationFromCloneJobName(cloneJobName: string): string | number;

Parse the location from CloneJob resource.

Parameter
Name Description
cloneJobName string

A fully-qualified path representing CloneJob resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromCutoverJobName(cutoverJobName)

matchLocationFromCutoverJobName(cutoverJobName: string): string | number;

Parse the location from CutoverJob resource.

Parameter
Name Description
cutoverJobName string

A fully-qualified path representing CutoverJob resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromDatacenterConnectorName(datacenterConnectorName)

matchLocationFromDatacenterConnectorName(datacenterConnectorName: string): string | number;

Parse the location from DatacenterConnector resource.

Parameter
Name Description
datacenterConnectorName string

A fully-qualified path representing DatacenterConnector resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromGroupName(groupName)

matchLocationFromGroupName(groupName: string): string | number;

Parse the location from Group resource.

Parameter
Name Description
groupName string

A fully-qualified path representing Group resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromMigratingVmName(migratingVmName)

matchLocationFromMigratingVmName(migratingVmName: string): string | number;

Parse the location from MigratingVm resource.

Parameter
Name Description
migratingVmName string

A fully-qualified path representing MigratingVm resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromReplicationCycleName(replicationCycleName)

matchLocationFromReplicationCycleName(replicationCycleName: string): string | number;

Parse the location from ReplicationCycle resource.

Parameter
Name Description
replicationCycleName string

A fully-qualified path representing ReplicationCycle resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromSourceName(sourceName)

matchLocationFromSourceName(sourceName: string): string | number;

Parse the location from Source resource.

Parameter
Name Description
sourceName string

A fully-qualified path representing Source resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromTargetProjectName(targetProjectName)

matchLocationFromTargetProjectName(targetProjectName: string): string | number;

Parse the location from TargetProject resource.

Parameter
Name Description
targetProjectName string

A fully-qualified path representing TargetProject resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromUtilizationReportName(utilizationReportName)

matchLocationFromUtilizationReportName(utilizationReportName: string): string | number;

Parse the location from UtilizationReport resource.

Parameter
Name Description
utilizationReportName string

A fully-qualified path representing UtilizationReport resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchMigratingVmFromCloneJobName(cloneJobName)

matchMigratingVmFromCloneJobName(cloneJobName: string): string | number;

Parse the migrating_vm from CloneJob resource.

Parameter
Name Description
cloneJobName string

A fully-qualified path representing CloneJob resource.

Returns
Type Description
string | number

{string} A string representing the migrating_vm.

matchMigratingVmFromCutoverJobName(cutoverJobName)

matchMigratingVmFromCutoverJobName(cutoverJobName: string): string | number;

Parse the migrating_vm from CutoverJob resource.

Parameter
Name Description
cutoverJobName string

A fully-qualified path representing CutoverJob resource.

Returns
Type Description
string | number

{string} A string representing the migrating_vm.

matchMigratingVmFromMigratingVmName(migratingVmName)

matchMigratingVmFromMigratingVmName(migratingVmName: string): string | number;

Parse the migrating_vm from MigratingVm resource.

Parameter
Name Description
migratingVmName string

A fully-qualified path representing MigratingVm resource.

Returns
Type Description
string | number

{string} A string representing the migrating_vm.

matchMigratingVmFromReplicationCycleName(replicationCycleName)

matchMigratingVmFromReplicationCycleName(replicationCycleName: string): string | number;

Parse the migrating_vm from ReplicationCycle resource.

Parameter
Name Description
replicationCycleName string

A fully-qualified path representing ReplicationCycle resource.

Returns
Type Description
string | number

{string} A string representing the migrating_vm.

matchProjectFromCloneJobName(cloneJobName)

matchProjectFromCloneJobName(cloneJobName: string): string | number;

Parse the project from CloneJob resource.

Parameter
Name Description
cloneJobName string

A fully-qualified path representing CloneJob resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromCutoverJobName(cutoverJobName)

matchProjectFromCutoverJobName(cutoverJobName: string): string | number;

Parse the project from CutoverJob resource.

Parameter
Name Description
cutoverJobName string

A fully-qualified path representing CutoverJob resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromDatacenterConnectorName(datacenterConnectorName)

matchProjectFromDatacenterConnectorName(datacenterConnectorName: string): string | number;

Parse the project from DatacenterConnector resource.

Parameter
Name Description
datacenterConnectorName string

A fully-qualified path representing DatacenterConnector resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromGroupName(groupName)

matchProjectFromGroupName(groupName: string): string | number;

Parse the project from Group resource.

Parameter
Name Description
groupName string

A fully-qualified path representing Group resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromMigratingVmName(migratingVmName)

matchProjectFromMigratingVmName(migratingVmName: string): string | number;

Parse the project from MigratingVm resource.

Parameter
Name Description
migratingVmName string

A fully-qualified path representing MigratingVm resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
Name Description
projectName string

A fully-qualified path representing Project resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromReplicationCycleName(replicationCycleName)

matchProjectFromReplicationCycleName(replicationCycleName: string): string | number;

Parse the project from ReplicationCycle resource.

Parameter
Name Description
replicationCycleName string

A fully-qualified path representing ReplicationCycle resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromSourceName(sourceName)

matchProjectFromSourceName(sourceName: string): string | number;

Parse the project from Source resource.

Parameter
Name Description
sourceName string

A fully-qualified path representing Source resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromTargetProjectName(targetProjectName)

matchProjectFromTargetProjectName(targetProjectName: string): string | number;

Parse the project from TargetProject resource.

Parameter
Name Description
targetProjectName string

A fully-qualified path representing TargetProject resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromUtilizationReportName(utilizationReportName)

matchProjectFromUtilizationReportName(utilizationReportName: string): string | number;

Parse the project from UtilizationReport resource.

Parameter
Name Description
utilizationReportName string

A fully-qualified path representing UtilizationReport resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchReplicationCycleFromReplicationCycleName(replicationCycleName)

matchReplicationCycleFromReplicationCycleName(replicationCycleName: string): string | number;

Parse the replication_cycle from ReplicationCycle resource.

Parameter
Name Description
replicationCycleName string

A fully-qualified path representing ReplicationCycle resource.

Returns
Type Description
string | number

{string} A string representing the replication_cycle.

matchSourceFromCloneJobName(cloneJobName)

matchSourceFromCloneJobName(cloneJobName: string): string | number;

Parse the source from CloneJob resource.

Parameter
Name Description
cloneJobName string

A fully-qualified path representing CloneJob resource.

Returns
Type Description
string | number

{string} A string representing the source.

matchSourceFromCutoverJobName(cutoverJobName)

matchSourceFromCutoverJobName(cutoverJobName: string): string | number;

Parse the source from CutoverJob resource.

Parameter
Name Description
cutoverJobName string

A fully-qualified path representing CutoverJob resource.

Returns
Type Description
string | number

{string} A string representing the source.

matchSourceFromDatacenterConnectorName(datacenterConnectorName)

matchSourceFromDatacenterConnectorName(datacenterConnectorName: string): string | number;

Parse the source from DatacenterConnector resource.

Parameter
Name Description
datacenterConnectorName string

A fully-qualified path representing DatacenterConnector resource.

Returns
Type Description
string | number

{string} A string representing the source.

matchSourceFromMigratingVmName(migratingVmName)

matchSourceFromMigratingVmName(migratingVmName: string): string | number;

Parse the source from MigratingVm resource.

Parameter
Name Description
migratingVmName string

A fully-qualified path representing MigratingVm resource.

Returns
Type Description
string | number

{string} A string representing the source.

matchSourceFromReplicationCycleName(replicationCycleName)

matchSourceFromReplicationCycleName(replicationCycleName: string): string | number;

Parse the source from ReplicationCycle resource.

Parameter
Name Description
replicationCycleName string

A fully-qualified path representing ReplicationCycle resource.

Returns
Type Description
string | number

{string} A string representing the source.

matchSourceFromSourceName(sourceName)

matchSourceFromSourceName(sourceName: string): string | number;

Parse the source from Source resource.

Parameter
Name Description
sourceName string

A fully-qualified path representing Source resource.

Returns
Type Description
string | number

{string} A string representing the source.

matchSourceFromUtilizationReportName(utilizationReportName)

matchSourceFromUtilizationReportName(utilizationReportName: string): string | number;

Parse the source from UtilizationReport resource.

Parameter
Name Description
utilizationReportName string

A fully-qualified path representing UtilizationReport resource.

Returns
Type Description
string | number

{string} A string representing the source.

matchTargetProjectFromTargetProjectName(targetProjectName)

matchTargetProjectFromTargetProjectName(targetProjectName: string): string | number;

Parse the target_project from TargetProject resource.

Parameter
Name Description
targetProjectName string

A fully-qualified path representing TargetProject resource.

Returns
Type Description
string | number

{string} A string representing the target_project.

matchUtilizationReportFromUtilizationReportName(utilizationReportName)

matchUtilizationReportFromUtilizationReportName(utilizationReportName: string): string | number;

Parse the utilization_report from UtilizationReport resource.

Parameter
Name Description
utilizationReportName string

A fully-qualified path representing UtilizationReport resource.

Returns
Type Description
string | number

{string} A string representing the utilization_report.

migratingVmPath(project, location, source, migratingVm)

migratingVmPath(project: string, location: string, source: string, migratingVm: string): string;

Return a fully-qualified migratingVm resource name string.

Parameters
Name Description
project string
location string
source string
migratingVm string
Returns
Type Description
string

{string} Resource name string.

pauseMigration(request, options)

pauseMigration(request?: protos.google.cloud.vmmigration.v1.IPauseMigrationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IPauseMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Pauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving source task data. Further replication cycles will not be triggered while the VM is paused.

Parameters
Name Description
request IPauseMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IPauseMigrationResponse, protos.google.cloud.vmmigration.v1.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 MigratingVm.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callPauseMigration() {
    // Construct request
    const request = {
      migratingVm,
    };

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

  callPauseMigration();

pauseMigration(request, options, callback)

pauseMigration(request: protos.google.cloud.vmmigration.v1.IPauseMigrationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IPauseMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IPauseMigrationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IPauseMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

pauseMigration(request, callback)

pauseMigration(request: protos.google.cloud.vmmigration.v1.IPauseMigrationRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IPauseMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IPauseMigrationRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IPauseMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

removeGroupMigration(request, options)

removeGroupMigration(request?: protos.google.cloud.vmmigration.v1.IRemoveGroupMigrationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IRemoveGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Removes a MigratingVm from a Group.

Parameters
Name Description
request IRemoveGroupMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IRemoveGroupMigrationResponse, protos.google.cloud.vmmigration.v1.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 Group.
   */
  // const group = 'abc123'
  /**
   *  The MigratingVm to remove.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callRemoveGroupMigration() {
    // Construct request
    const request = {
      group,
    };

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

  callRemoveGroupMigration();

removeGroupMigration(request, options, callback)

removeGroupMigration(request: protos.google.cloud.vmmigration.v1.IRemoveGroupMigrationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IRemoveGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IRemoveGroupMigrationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IRemoveGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

removeGroupMigration(request, callback)

removeGroupMigration(request: protos.google.cloud.vmmigration.v1.IRemoveGroupMigrationRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IRemoveGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IRemoveGroupMigrationRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IRemoveGroupMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

replicationCyclePath(project, location, source, migratingVm, replicationCycle)

replicationCyclePath(project: string, location: string, source: string, migratingVm: string, replicationCycle: string): string;

Return a fully-qualified replicationCycle resource name string.

Parameters
Name Description
project string
location string
source string
migratingVm string
replicationCycle string
Returns
Type Description
string

{string} Resource name string.

resumeMigration(request, options)

resumeMigration(request?: protos.google.cloud.vmmigration.v1.IResumeMigrationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IResumeMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Resumes a migration for a VM. When called on a paused migration, will start the process of uploading data and creating snapshots; when called on a completed cut-over migration, will update the migration to active state and start the process of uploading data and creating snapshots.

Parameters
Name Description
request IResumeMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IResumeMigrationResponse, protos.google.cloud.vmmigration.v1.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 MigratingVm.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callResumeMigration() {
    // Construct request
    const request = {
      migratingVm,
    };

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

  callResumeMigration();

resumeMigration(request, options, callback)

resumeMigration(request: protos.google.cloud.vmmigration.v1.IResumeMigrationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IResumeMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IResumeMigrationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IResumeMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

resumeMigration(request, callback)

resumeMigration(request: protos.google.cloud.vmmigration.v1.IResumeMigrationRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IResumeMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IResumeMigrationRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IResumeMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

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
Name Description
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
Type Description
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.

sourcePath(project, location, source)

sourcePath(project: string, location: string, source: string): string;

Return a fully-qualified source resource name string.

Parameters
Name Description
project string
location string
source string
Returns
Type Description
string

{string} Resource name string.

startMigration(request, options)

startMigration(request?: protos.google.cloud.vmmigration.v1.IStartMigrationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IStartMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Starts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy.

Parameters
Name Description
request IStartMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IStartMigrationResponse, protos.google.cloud.vmmigration.v1.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 MigratingVm.
   */
  // const migratingVm = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callStartMigration() {
    // Construct request
    const request = {
      migratingVm,
    };

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

  callStartMigration();

startMigration(request, options, callback)

startMigration(request: protos.google.cloud.vmmigration.v1.IStartMigrationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IStartMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IStartMigrationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IStartMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

startMigration(request, callback)

startMigration(request: protos.google.cloud.vmmigration.v1.IStartMigrationRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IStartMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IStartMigrationRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IStartMigrationResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

targetProjectPath(project, location, targetProject)

targetProjectPath(project: string, location: string, targetProject: string): string;

Return a fully-qualified targetProject resource name string.

Parameters
Name Description
project string
location string
targetProject string
Returns
Type Description
string

{string} Resource name string.

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
Name Description
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
Type Description
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.

updateGroup(request, options)

updateGroup(request?: protos.google.cloud.vmmigration.v1.IUpdateGroupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single Group.

Parameters
Name Description
request IUpdateGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  Group resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The update request body.
   */
  // const group = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callUpdateGroup() {
    // Construct request
    const request = {
      group,
    };

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

  callUpdateGroup();

updateGroup(request, options, callback)

updateGroup(request: protos.google.cloud.vmmigration.v1.IUpdateGroupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateGroupRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateGroup(request, callback)

updateGroup(request: protos.google.cloud.vmmigration.v1.IUpdateGroupRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateGroupRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateMigratingVm(request, options)

updateMigratingVm(request?: protos.google.cloud.vmmigration.v1.IUpdateMigratingVmRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single MigratingVm.

Parameters
Name Description
request IUpdateMigratingVmRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  MigratingVm resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The update request body.
   */
  // const migratingVm = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callUpdateMigratingVm() {
    // Construct request
    const request = {
      migratingVm,
    };

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

  callUpdateMigratingVm();

updateMigratingVm(request, options, callback)

updateMigratingVm(request: protos.google.cloud.vmmigration.v1.IUpdateMigratingVmRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateMigratingVmRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateMigratingVm(request, callback)

updateMigratingVm(request: protos.google.cloud.vmmigration.v1.IUpdateMigratingVmRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateMigratingVmRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateSource(request, options)

updateSource(request?: protos.google.cloud.vmmigration.v1.IUpdateSourceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single Source.

Parameters
Name Description
request IUpdateSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  Source resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The update request body.
   */
  // const source = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callUpdateSource() {
    // Construct request
    const request = {
      source,
    };

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

  callUpdateSource();

updateSource(request, options, callback)

updateSource(request: protos.google.cloud.vmmigration.v1.IUpdateSourceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateSourceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateSource(request, callback)

updateSource(request: protos.google.cloud.vmmigration.v1.IUpdateSourceRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateSourceRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateTargetProject(request, options)

updateTargetProject(request?: protos.google.cloud.vmmigration.v1.IUpdateTargetProjectRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single TargetProject.

NOTE: TargetProject is a global resource; hence the only supported value for location is global.

Parameters
Name Description
request IUpdateTargetProjectRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the
   *  TargetProject resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The update request body.
   */
  // const targetProject = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callUpdateTargetProject() {
    // Construct request
    const request = {
      targetProject,
    };

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

  callUpdateTargetProject();

updateTargetProject(request, options, callback)

updateTargetProject(request: protos.google.cloud.vmmigration.v1.IUpdateTargetProjectRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateTargetProjectRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateTargetProject(request, callback)

updateTargetProject(request: protos.google.cloud.vmmigration.v1.IUpdateTargetProjectRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateTargetProjectRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

upgradeAppliance(request, options)

upgradeAppliance(request?: protos.google.cloud.vmmigration.v1.IUpgradeApplianceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.vmmigration.v1.IUpgradeApplianceResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version.

Parameters
Name Description
request IUpgradeApplianceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.vmmigration.v1.IUpgradeApplianceResponse, protos.google.cloud.vmmigration.v1.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 DatacenterConnector name.
   */
  // const datacenterConnector = 'abc123'
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and t
   *  he request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Vmmigration library
  const {VmMigrationClient} = require('@google-cloud/vmmigration').v1;

  // Instantiates a client
  const vmmigrationClient = new VmMigrationClient();

  async function callUpgradeAppliance() {
    // Construct request
    const request = {
      datacenterConnector,
    };

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

  callUpgradeAppliance();

upgradeAppliance(request, options, callback)

upgradeAppliance(request: protos.google.cloud.vmmigration.v1.IUpgradeApplianceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IUpgradeApplianceResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpgradeApplianceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IUpgradeApplianceResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

upgradeAppliance(request, callback)

upgradeAppliance(request: protos.google.cloud.vmmigration.v1.IUpgradeApplianceRequest, callback: Callback<LROperation<protos.google.cloud.vmmigration.v1.IUpgradeApplianceResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpgradeApplianceRequest
callback Callback<LROperation<protos.google.cloud.vmmigration.v1.IUpgradeApplianceResponse, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

utilizationReportPath(project, location, source, utilizationReport)

utilizationReportPath(project: string, location: string, source: string, utilizationReport: string): string;

Return a fully-qualified utilizationReport resource name string.

Parameters
Name Description
project string
location string
source string
utilizationReport string
Returns
Type Description
string

{string} Resource name string.