Class v1.VmMigrationClient (3.0.2)

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
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof fallback

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

Properties

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

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.

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
NameDescription
request IAddGroupMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request ICancelCloneJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request ICancelCutoverJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
void

cancelOperation(request, options, callback)

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

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

Parameters
NameDescription
request CancelOperationRequest

The request object that will be sent.

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

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

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

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

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

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

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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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
NameDescription
project string
location string
source string
migratingVm string
cloneJob string
Returns
TypeDescription
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
TypeDescription
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
NameDescription
request ICreateCloneJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request ICreateCutoverJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request ICreateDatacenterConnectorRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request ICreateGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request ICreateMigratingVmRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request ICreateSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request ICreateTargetProjectRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request ICreateUtilizationReportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
project string
location string
source string
migratingVm string
cutoverJob string
Returns
TypeDescription
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
NameDescription
project string
location string
source string
datacenterConnector string
Returns
TypeDescription
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
NameDescription
request IDeleteDatacenterConnectorRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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
NameDescription
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
TypeDescription
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
NameDescription
request IDeleteDatacenterConnectorRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IDeleteGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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
NameDescription
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
TypeDescription
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
NameDescription
request IDeleteGroupRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IDeleteMigratingVmRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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
NameDescription
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
TypeDescription
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
NameDescription
request IDeleteMigratingVmRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteOperation(request, options, callback)

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

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

Parameters
NameDescription
request DeleteOperationRequest

The request object that will be sent.

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

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

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

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

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

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

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
NameDescription
request IDeleteSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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
NameDescription
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
TypeDescription
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
NameDescription
request IDeleteSourceRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IDeleteTargetProjectRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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
NameDescription
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
TypeDescription
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
NameDescription
request IDeleteTargetProjectRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IDeleteUtilizationReportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.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
NameDescription
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
TypeDescription
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
NameDescription
request IDeleteUtilizationReportRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.vmmigration.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IFetchInventoryRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request IFetchInventoryRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IFetchInventoryResponse, protos.google.cloud.vmmigration.v1.IFetchInventoryRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IFetchInventoryRequest
callback Callback<protos.google.cloud.vmmigration.v1.IFetchInventoryResponse, protos.google.cloud.vmmigration.v1.IFetchInventoryRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IFinalizeMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IGetCloneJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request IGetCloneJobRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IGetCloneJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetCloneJobRequest
callback Callback<protos.google.cloud.vmmigration.v1.ICloneJob, protos.google.cloud.vmmigration.v1.IGetCloneJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetCutoverJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request IGetCutoverJobRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IGetCutoverJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetCutoverJobRequest
callback Callback<protos.google.cloud.vmmigration.v1.ICutoverJob, protos.google.cloud.vmmigration.v1.IGetCutoverJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetDatacenterConnectorRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request IGetDatacenterConnectorRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IGetDatacenterConnectorRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetDatacenterConnectorRequest
callback Callback<protos.google.cloud.vmmigration.v1.IDatacenterConnector, protos.google.cloud.vmmigration.v1.IGetDatacenterConnectorRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request IGetGroupRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IGetGroupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetGroupRequest
callback Callback<protos.google.cloud.vmmigration.v1.IGroup, protos.google.cloud.vmmigration.v1.IGetGroupRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, options, callback)

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

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

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

The request object that will be sent.

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

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

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

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

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<[google.iam.v1.Policy]>

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

getLocation(request, options, callback)

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

Gets information about a location.

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

The request object that will be sent.

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

Call options. See CallOptions for more details.

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

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

Example

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

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
NameDescription
request IGetMigratingVmRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request IGetMigratingVmRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IGetMigratingVmRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetMigratingVmRequest
callback Callback<protos.google.cloud.vmmigration.v1.IMigratingVm, protos.google.cloud.vmmigration.v1.IGetMigratingVmRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getOperation(request, options, callback)

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

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

Parameters
NameDescription
request GetOperationRequest

The request object that will be sent.

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

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

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

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

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

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

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

getProjectId()

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

getProjectId(callback)

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

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
NameDescription
request IGetReplicationCycleRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request IGetReplicationCycleRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IReplicationCycle, protos.google.cloud.vmmigration.v1.IGetReplicationCycleRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetReplicationCycleRequest
callback Callback<protos.google.cloud.vmmigration.v1.IReplicationCycle, protos.google.cloud.vmmigration.v1.IGetReplicationCycleRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request IGetSourceRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IGetSourceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetSourceRequest
callback Callback<protos.google.cloud.vmmigration.v1.ISource, protos.google.cloud.vmmigration.v1.IGetSourceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetTargetProjectRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request IGetTargetProjectRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IGetTargetProjectRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetTargetProjectRequest
callback Callback<protos.google.cloud.vmmigration.v1.ITargetProject, protos.google.cloud.vmmigration.v1.IGetTargetProjectRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetUtilizationReportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request IGetUtilizationReportRequest
options CallOptions
callback Callback<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IGetUtilizationReportRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IGetUtilizationReportRequest
callback Callback<protos.google.cloud.vmmigration.v1.IUtilizationReport, protos.google.cloud.vmmigration.v1.IGetUtilizationReportRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

groupPath(project, location, group)

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

Return a fully-qualified group resource name string.

Parameters
NameDescription
project string
location string
group string
Returns
TypeDescription
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
TypeDescription
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
NameDescription
request IListCloneJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListCloneJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 = await 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 method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListCloneJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListCutoverJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 = await 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 method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListCutoverJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListDatacenterConnectorsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 = await 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 method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListDatacenterConnectorsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListGroupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 = await 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 method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListGroupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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
NameDescription
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

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

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
NameDescription
request IListMigratingVmsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListMigratingVmsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 = await 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 method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListMigratingVmsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

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

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

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

Parameters
NameDescription
request ListOperationsRequest

The request object that will be sent.

options CallOptions

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

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

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

Example

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

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
NameDescription
request IListReplicationCyclesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListReplicationCyclesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 = await 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 method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListReplicationCyclesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

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

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListSourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 = await 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 method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListSourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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
NameDescription
request IListTargetProjectsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListTargetProjectsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 = await 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 method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListTargetProjectsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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
NameDescription
request IListUtilizationReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IListUtilizationReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 = await 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 method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListUtilizationReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

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

{string} Resource name string.

matchCloneJobFromCloneJobName(cloneJobName)

matchCloneJobFromCloneJobName(cloneJobName: string): string | number;

Parse the clone_job from CloneJob resource.

Parameter
NameDescription
cloneJobName string

A fully-qualified path representing CloneJob resource.

Returns
TypeDescription
string | number

{string} A string representing the clone_job.

matchCutoverJobFromCutoverJobName(cutoverJobName)

matchCutoverJobFromCutoverJobName(cutoverJobName: string): string | number;

Parse the cutover_job from CutoverJob resource.

Parameter
NameDescription
cutoverJobName string

A fully-qualified path representing CutoverJob resource.

Returns
TypeDescription
string | number

{string} A string representing the cutover_job.

matchDatacenterConnectorFromDatacenterConnectorName(datacenterConnectorName)

matchDatacenterConnectorFromDatacenterConnectorName(datacenterConnectorName: string): string | number;

Parse the datacenter_connector from DatacenterConnector resource.

Parameter
NameDescription
datacenterConnectorName string

A fully-qualified path representing DatacenterConnector resource.

Returns
TypeDescription
string | number

{string} A string representing the datacenter_connector.

matchGroupFromGroupName(groupName)

matchGroupFromGroupName(groupName: string): string | number;

Parse the group from Group resource.

Parameter
NameDescription
groupName string

A fully-qualified path representing Group resource.

Returns
TypeDescription
string | number

{string} A string representing the group.

matchLocationFromCloneJobName(cloneJobName)

matchLocationFromCloneJobName(cloneJobName: string): string | number;

Parse the location from CloneJob resource.

Parameter
NameDescription
cloneJobName string

A fully-qualified path representing CloneJob resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromCutoverJobName(cutoverJobName)

matchLocationFromCutoverJobName(cutoverJobName: string): string | number;

Parse the location from CutoverJob resource.

Parameter
NameDescription
cutoverJobName string

A fully-qualified path representing CutoverJob resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromDatacenterConnectorName(datacenterConnectorName)

matchLocationFromDatacenterConnectorName(datacenterConnectorName: string): string | number;

Parse the location from DatacenterConnector resource.

Parameter
NameDescription
datacenterConnectorName string

A fully-qualified path representing DatacenterConnector resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromGroupName(groupName)

matchLocationFromGroupName(groupName: string): string | number;

Parse the location from Group resource.

Parameter
NameDescription
groupName string

A fully-qualified path representing Group resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromMigratingVmName(migratingVmName)

matchLocationFromMigratingVmName(migratingVmName: string): string | number;

Parse the location from MigratingVm resource.

Parameter
NameDescription
migratingVmName string

A fully-qualified path representing MigratingVm resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromReplicationCycleName(replicationCycleName)

matchLocationFromReplicationCycleName(replicationCycleName: string): string | number;

Parse the location from ReplicationCycle resource.

Parameter
NameDescription
replicationCycleName string

A fully-qualified path representing ReplicationCycle resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromSourceName(sourceName)

matchLocationFromSourceName(sourceName: string): string | number;

Parse the location from Source resource.

Parameter
NameDescription
sourceName string

A fully-qualified path representing Source resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromTargetProjectName(targetProjectName)

matchLocationFromTargetProjectName(targetProjectName: string): string | number;

Parse the location from TargetProject resource.

Parameter
NameDescription
targetProjectName string

A fully-qualified path representing TargetProject resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromUtilizationReportName(utilizationReportName)

matchLocationFromUtilizationReportName(utilizationReportName: string): string | number;

Parse the location from UtilizationReport resource.

Parameter
NameDescription
utilizationReportName string

A fully-qualified path representing UtilizationReport resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchMigratingVmFromCloneJobName(cloneJobName)

matchMigratingVmFromCloneJobName(cloneJobName: string): string | number;

Parse the migrating_vm from CloneJob resource.

Parameter
NameDescription
cloneJobName string

A fully-qualified path representing CloneJob resource.

Returns
TypeDescription
string | number

{string} A string representing the migrating_vm.

matchMigratingVmFromCutoverJobName(cutoverJobName)

matchMigratingVmFromCutoverJobName(cutoverJobName: string): string | number;

Parse the migrating_vm from CutoverJob resource.

Parameter
NameDescription
cutoverJobName string

A fully-qualified path representing CutoverJob resource.

Returns
TypeDescription
string | number

{string} A string representing the migrating_vm.

matchMigratingVmFromMigratingVmName(migratingVmName)

matchMigratingVmFromMigratingVmName(migratingVmName: string): string | number;

Parse the migrating_vm from MigratingVm resource.

Parameter
NameDescription
migratingVmName string

A fully-qualified path representing MigratingVm resource.

Returns
TypeDescription
string | number

{string} A string representing the migrating_vm.

matchMigratingVmFromReplicationCycleName(replicationCycleName)

matchMigratingVmFromReplicationCycleName(replicationCycleName: string): string | number;

Parse the migrating_vm from ReplicationCycle resource.

Parameter
NameDescription
replicationCycleName string

A fully-qualified path representing ReplicationCycle resource.

Returns
TypeDescription
string | number

{string} A string representing the migrating_vm.

matchProjectFromCloneJobName(cloneJobName)

matchProjectFromCloneJobName(cloneJobName: string): string | number;

Parse the project from CloneJob resource.

Parameter
NameDescription
cloneJobName string

A fully-qualified path representing CloneJob resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromCutoverJobName(cutoverJobName)

matchProjectFromCutoverJobName(cutoverJobName: string): string | number;

Parse the project from CutoverJob resource.

Parameter
NameDescription
cutoverJobName string

A fully-qualified path representing CutoverJob resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromDatacenterConnectorName(datacenterConnectorName)

matchProjectFromDatacenterConnectorName(datacenterConnectorName: string): string | number;

Parse the project from DatacenterConnector resource.

Parameter
NameDescription
datacenterConnectorName string

A fully-qualified path representing DatacenterConnector resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromGroupName(groupName)

matchProjectFromGroupName(groupName: string): string | number;

Parse the project from Group resource.

Parameter
NameDescription
groupName string

A fully-qualified path representing Group resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromMigratingVmName(migratingVmName)

matchProjectFromMigratingVmName(migratingVmName: string): string | number;

Parse the project from MigratingVm resource.

Parameter
NameDescription
migratingVmName string

A fully-qualified path representing MigratingVm resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromReplicationCycleName(replicationCycleName)

matchProjectFromReplicationCycleName(replicationCycleName: string): string | number;

Parse the project from ReplicationCycle resource.

Parameter
NameDescription
replicationCycleName string

A fully-qualified path representing ReplicationCycle resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromSourceName(sourceName)

matchProjectFromSourceName(sourceName: string): string | number;

Parse the project from Source resource.

Parameter
NameDescription
sourceName string

A fully-qualified path representing Source resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTargetProjectName(targetProjectName)

matchProjectFromTargetProjectName(targetProjectName: string): string | number;

Parse the project from TargetProject resource.

Parameter
NameDescription
targetProjectName string

A fully-qualified path representing TargetProject resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromUtilizationReportName(utilizationReportName)

matchProjectFromUtilizationReportName(utilizationReportName: string): string | number;

Parse the project from UtilizationReport resource.

Parameter
NameDescription
utilizationReportName string

A fully-qualified path representing UtilizationReport resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchReplicationCycleFromReplicationCycleName(replicationCycleName)

matchReplicationCycleFromReplicationCycleName(replicationCycleName: string): string | number;

Parse the replication_cycle from ReplicationCycle resource.

Parameter
NameDescription
replicationCycleName string

A fully-qualified path representing ReplicationCycle resource.

Returns
TypeDescription
string | number

{string} A string representing the replication_cycle.

matchSourceFromCloneJobName(cloneJobName)

matchSourceFromCloneJobName(cloneJobName: string): string | number;

Parse the source from CloneJob resource.

Parameter
NameDescription
cloneJobName string

A fully-qualified path representing CloneJob resource.

Returns
TypeDescription
string | number

{string} A string representing the source.

matchSourceFromCutoverJobName(cutoverJobName)

matchSourceFromCutoverJobName(cutoverJobName: string): string | number;

Parse the source from CutoverJob resource.

Parameter
NameDescription
cutoverJobName string

A fully-qualified path representing CutoverJob resource.

Returns
TypeDescription
string | number

{string} A string representing the source.

matchSourceFromDatacenterConnectorName(datacenterConnectorName)

matchSourceFromDatacenterConnectorName(datacenterConnectorName: string): string | number;

Parse the source from DatacenterConnector resource.

Parameter
NameDescription
datacenterConnectorName string

A fully-qualified path representing DatacenterConnector resource.

Returns
TypeDescription
string | number

{string} A string representing the source.

matchSourceFromMigratingVmName(migratingVmName)

matchSourceFromMigratingVmName(migratingVmName: string): string | number;

Parse the source from MigratingVm resource.

Parameter
NameDescription
migratingVmName string

A fully-qualified path representing MigratingVm resource.

Returns
TypeDescription
string | number

{string} A string representing the source.

matchSourceFromReplicationCycleName(replicationCycleName)

matchSourceFromReplicationCycleName(replicationCycleName: string): string | number;

Parse the source from ReplicationCycle resource.

Parameter
NameDescription
replicationCycleName string

A fully-qualified path representing ReplicationCycle resource.

Returns
TypeDescription
string | number

{string} A string representing the source.

matchSourceFromSourceName(sourceName)

matchSourceFromSourceName(sourceName: string): string | number;

Parse the source from Source resource.

Parameter
NameDescription
sourceName string

A fully-qualified path representing Source resource.

Returns
TypeDescription
string | number

{string} A string representing the source.

matchSourceFromUtilizationReportName(utilizationReportName)

matchSourceFromUtilizationReportName(utilizationReportName: string): string | number;

Parse the source from UtilizationReport resource.

Parameter
NameDescription
utilizationReportName string

A fully-qualified path representing UtilizationReport resource.

Returns
TypeDescription
string | number

{string} A string representing the source.

matchTargetProjectFromTargetProjectName(targetProjectName)

matchTargetProjectFromTargetProjectName(targetProjectName: string): string | number;

Parse the target_project from TargetProject resource.

Parameter
NameDescription
targetProjectName string

A fully-qualified path representing TargetProject resource.

Returns
TypeDescription
string | number

{string} A string representing the target_project.

matchUtilizationReportFromUtilizationReportName(utilizationReportName)

matchUtilizationReportFromUtilizationReportName(utilizationReportName: string): string | number;

Parse the utilization_report from UtilizationReport resource.

Parameter
NameDescription
utilizationReportName string

A fully-qualified path representing UtilizationReport resource.

Returns
TypeDescription
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
NameDescription
project string
location string
source string
migratingVm string
Returns
TypeDescription
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
NameDescription
request IPauseMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
void

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

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
NameDescription
request IRemoveGroupMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
project string
location string
source string
migratingVm string
replicationCycle string
Returns
TypeDescription
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
NameDescription
request IResumeMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

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

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

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

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

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<[google.iam.v1.Policy]>

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

sourcePath(project, location, source)

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

Return a fully-qualified source resource name string.

Parameters
NameDescription
project string
location string
source string
Returns
TypeDescription
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
NameDescription
request IStartMigrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
void

targetProjectPath(project, location, targetProject)

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

Return a fully-qualified targetProject resource name string.

Parameters
NameDescription
project string
location string
targetProject string
Returns
TypeDescription
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
NameDescription
request IamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

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

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

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

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

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<[google.iam.v1.TestIamPermissionsResponse]>

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

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
NameDescription
request IUpdateGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IUpdateMigratingVmRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IUpdateSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IUpdateTargetProjectRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request IUpgradeApplianceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
project string
location string
source string
utilizationReport string
Returns
TypeDescription
string

{string} Resource name string.