Class v1.DataMigrationServiceClient (2.2.2)

Database Migration service v1

Package

@google-cloud/dms

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of DataMigrationServiceClient.

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

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

Properties

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

dataMigrationServiceStub

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

descriptors

descriptors: Descriptors;

innerApiCalls

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

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

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

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

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

Methods

checkCreateConnectionProfileProgress(name)

checkCreateConnectionProfileProgress(name: string): Promise<LROperation<protos.google.cloud.clouddms.v1.ConnectionProfile, protos.google.cloud.clouddms.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.clouddms.v1.ConnectionProfile, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent, which owns this collection of connection profiles.
   */
  // const parent = 'abc123'
  /**
   *  Required. The connection profile identifier.
   */
  // const connectionProfileId = 'abc123'
  /**
   *  Required. The create request body including the connection profile data
   */
  // const connectionProfile = {}
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callCreateConnectionProfile() {
    // Construct request
    const request = {
      parent,
      connectionProfileId,
      connectionProfile,
    };

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

  callCreateConnectionProfile();

checkCreateMigrationJobProgress(name)

checkCreateMigrationJobProgress(name: string): Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent, which owns this collection of migration jobs.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the instance to create.
   */
  // const migrationJobId = 'abc123'
  /**
   *  Required. Represents a migration
   *  job (https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs)
   *  object.
   */
  // const migrationJob = {}
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callCreateMigrationJob() {
    // Construct request
    const request = {
      parent,
      migrationJobId,
      migrationJob,
    };

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

  callCreateMigrationJob();

checkDeleteConnectionProfileProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the connection profile resource to delete.
   */
  // const name = 'abc123'
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'
  /**
   *  In case of force delete, the CloudSQL replica database is also deleted
   *  (only for CloudSQL connection profile).
   */
  // const force = true

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

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

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

  callDeleteConnectionProfile();

checkDeleteMigrationJobProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the migration job resource to delete.
   */
  // const name = 'abc123'
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'
  /**
   *  The destination CloudSQL connection profile is always deleted with the
   *  migration job. In case of force delete, the destination CloudSQL replica
   *  database is also deleted.
   */
  // const force = true

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

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

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

  callDeleteMigrationJob();

checkPromoteMigrationJobProgress(name)

checkPromoteMigrationJobProgress(name: string): Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callPromoteMigrationJob() {
    // Construct request
    const request = {
    };

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

  callPromoteMigrationJob();

checkRestartMigrationJobProgress(name)

checkRestartMigrationJobProgress(name: string): Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callRestartMigrationJob() {
    // Construct request
    const request = {
    };

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

  callRestartMigrationJob();

checkResumeMigrationJobProgress(name)

checkResumeMigrationJobProgress(name: string): Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callResumeMigrationJob() {
    // Construct request
    const request = {
    };

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

  callResumeMigrationJob();

checkStartMigrationJobProgress(name)

checkStartMigrationJobProgress(name: string): Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callStartMigrationJob() {
    // Construct request
    const request = {
    };

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

  callStartMigrationJob();

checkStopMigrationJobProgress(name)

checkStopMigrationJobProgress(name: string): Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callStopMigrationJob() {
    // Construct request
    const request = {
    };

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

  callStopMigrationJob();

checkUpdateConnectionProfileProgress(name)

checkUpdateConnectionProfileProgress(name: string): Promise<LROperation<protos.google.cloud.clouddms.v1.ConnectionProfile, protos.google.cloud.clouddms.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.clouddms.v1.ConnectionProfile, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Field mask is used to specify the fields to be overwritten in the
   *  connection profile resource by the update.
   */
  // const updateMask = {}
  /**
   *  Required. The connection profile parameters to update.
   */
  // const connectionProfile = {}
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callUpdateConnectionProfile() {
    // Construct request
    const request = {
      updateMask,
      connectionProfile,
    };

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

  callUpdateConnectionProfile();

checkUpdateMigrationJobProgress(name)

checkUpdateMigrationJobProgress(name: string): Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Field mask is used to specify the fields to be overwritten in the
   *  migration job resource by the update.
   */
  // const updateMask = {}
  /**
   *  Required. The migration job parameters to update.
   */
  // const migrationJob = {}
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callUpdateMigrationJob() {
    // Construct request
    const request = {
      updateMask,
      migrationJob,
    };

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

  callUpdateMigrationJob();

checkVerifyMigrationJobProgress(name)

checkVerifyMigrationJobProgress(name: string): Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callVerifyMigrationJob() {
    // Construct request
    const request = {
    };

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

  callVerifyMigrationJob();

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.

connectionProfilePath(project, location, connectionProfile)

connectionProfilePath(project: string, location: string, connectionProfile: string): string;

Return a fully-qualified connectionProfile resource name string.

Parameters
NameDescription
project string
location string
connectionProfile string
Returns
TypeDescription
string

{string} Resource name string.

createConnectionProfile(request, options)

createConnectionProfile(request?: protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new connection profile in a given project and location.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent, which owns this collection of connection profiles.
   */
  // const parent = 'abc123'
  /**
   *  Required. The connection profile identifier.
   */
  // const connectionProfileId = 'abc123'
  /**
   *  Required. The create request body including the connection profile data
   */
  // const connectionProfile = {}
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callCreateConnectionProfile() {
    // Construct request
    const request = {
      parent,
      connectionProfileId,
      connectionProfile,
    };

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

  callCreateConnectionProfile();

createConnectionProfile(request, options, callback)

createConnectionProfile(request: protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createConnectionProfile(request, callback)

createConnectionProfile(request: protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createMigrationJob(request, options)

createMigrationJob(request?: protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new migration job in a given project and location.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent, which owns this collection of migration jobs.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the instance to create.
   */
  // const migrationJobId = 'abc123'
  /**
   *  Required. Represents a migration
   *  job (https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs)
   *  object.
   */
  // const migrationJob = {}
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callCreateMigrationJob() {
    // Construct request
    const request = {
      parent,
      migrationJobId,
      migrationJob,
    };

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

  callCreateMigrationJob();

createMigrationJob(request, options, callback)

createMigrationJob(request: protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createMigrationJob(request, callback)

createMigrationJob(request: protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteConnectionProfile(request, options)

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

Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IDeleteConnectionProfileRequest

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.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the connection profile resource to delete.
   */
  // const name = 'abc123'
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'
  /**
   *  In case of force delete, the CloudSQL replica database is also deleted
   *  (only for CloudSQL connection profile).
   */
  // const force = true

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

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

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

  callDeleteConnectionProfile();

deleteConnectionProfile(request, options, callback)

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

deleteConnectionProfile(request, callback)

deleteConnectionProfile(request: protos.google.cloud.clouddms.v1.IDeleteConnectionProfileRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IDeleteConnectionProfileRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteMigrationJob(request, options)

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

Deletes a single migration job.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IDeleteMigrationJobRequest

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.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the migration job resource to delete.
   */
  // const name = 'abc123'
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'
  /**
   *  The destination CloudSQL connection profile is always deleted with the
   *  migration job. In case of force delete, the destination CloudSQL replica
   *  database is also deleted.
   */
  // const force = true

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

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

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

  callDeleteMigrationJob();

deleteMigrationJob(request, options, callback)

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

deleteMigrationJob(request, callback)

deleteMigrationJob(request: protos.google.cloud.clouddms.v1.IDeleteMigrationJobRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IDeleteMigrationJobRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

generateSshScript(request, options)

generateSshScript(request?: protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest, options?: CallOptions): Promise<[
        protos.google.cloud.clouddms.v1.ISshScript,
        protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest | undefined,
        {} | undefined
    ]>;

Generate a SSH configuration script to configure the reverse SSH connectivity.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.clouddms.v1.ISshScript, protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest | undefined, {} | undefined ]>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Name of the migration job resource to generate the SSH script.
   */
  // const migrationJob = 'abc123'
  /**
   *  Required. Bastion VM Instance name to use or to create.
   */
  // const vm = 'abc123'
  /**
   *  The VM creation configuration
   */
  // const vmCreationConfig = {}
  /**
   *  The VM selection configuration
   */
  // const vmSelectionConfig = {}
  /**
   *  The port that will be open on the bastion host
   */
  // const vmPort = 1234

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callGenerateSshScript() {
    // Construct request
    const request = {
      vm,
    };

    // Run request
    const response = await clouddmsClient.generateSshScript(request);
    console.log(response);
  }

  callGenerateSshScript();

generateSshScript(request, options, callback)

generateSshScript(request: protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest, options: CallOptions, callback: Callback<protos.google.cloud.clouddms.v1.ISshScript, protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest
options CallOptions
callback Callback<protos.google.cloud.clouddms.v1.ISshScript, protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

generateSshScript(request, callback)

generateSshScript(request: protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest, callback: Callback<protos.google.cloud.clouddms.v1.ISshScript, protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest
callback Callback<protos.google.cloud.clouddms.v1.ISshScript, protos.google.cloud.clouddms.v1.IGenerateSshScriptRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getConnectionProfile(request, options)

getConnectionProfile(request?: protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest, options?: CallOptions): Promise<[
        protos.google.cloud.clouddms.v1.IConnectionProfile,
        protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single connection profile.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest | undefined, {} | undefined ]>

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

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

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

    // Run request
    const response = await clouddmsClient.getConnectionProfile(request);
    console.log(response);
  }

  callGetConnectionProfile();

getConnectionProfile(request, options, callback)

getConnectionProfile(request: protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest, options: CallOptions, callback: Callback<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest
options CallOptions
callback Callback<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getConnectionProfile(request, callback)

getConnectionProfile(request: protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest, callback: Callback<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest
callback Callback<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IGetConnectionProfileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getMigrationJob(request, options)

getMigrationJob(request?: protos.google.cloud.clouddms.v1.IGetMigrationJobRequest, options?: CallOptions): Promise<[
        protos.google.cloud.clouddms.v1.IMigrationJob,
        protos.google.cloud.clouddms.v1.IGetMigrationJobRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single migration job.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IGetMigrationJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IGetMigrationJobRequest | undefined, {} | undefined ]>

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

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

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

    // Run request
    const response = await clouddmsClient.getMigrationJob(request);
    console.log(response);
  }

  callGetMigrationJob();

getMigrationJob(request, options, callback)

getMigrationJob(request: protos.google.cloud.clouddms.v1.IGetMigrationJobRequest, options: CallOptions, callback: Callback<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IGetMigrationJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IGetMigrationJobRequest
options CallOptions
callback Callback<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IGetMigrationJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getMigrationJob(request, callback)

getMigrationJob(request: protos.google.cloud.clouddms.v1.IGetMigrationJobRequest, callback: Callback<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IGetMigrationJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IGetMigrationJobRequest
callback Callback<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IGetMigrationJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

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

getProjectId(callback)

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

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.

listConnectionProfiles(request, options)

listConnectionProfiles(request?: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.clouddms.v1.IConnectionProfile[],
        protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest | null,
        protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse
    ]>;

Retrieve a list of all connection profiles in a given project and location.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.clouddms.v1.IConnectionProfile[], protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest | null, protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse ]>

{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 listConnectionProfilesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listConnectionProfiles(request, options, callback)

listConnectionProfiles(request: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse | null | undefined, protos.google.cloud.clouddms.v1.IConnectionProfile>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse | null | undefined, protos.google.cloud.clouddms.v1.IConnectionProfile>
Returns
TypeDescription
void

listConnectionProfiles(request, callback)

listConnectionProfiles(request: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, callback: PaginationCallback<protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse | null | undefined, protos.google.cloud.clouddms.v1.IConnectionProfile>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest
callback PaginationCallback<protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse | null | undefined, protos.google.cloud.clouddms.v1.IConnectionProfile>
Returns
TypeDescription
void

listConnectionProfilesAsync(request, options)

listConnectionProfilesAsync(request?: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.clouddms.v1.IConnectionProfile>;

Equivalent to listConnectionProfiles, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.clouddms.v1.IConnectionProfile>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent, which owns this collection of connection profiles.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of connection profiles to return. The service may return
   *  fewer than this value. If unspecified, at most 50 connection profiles will
   *  be returned. The maximum value is 1000; values above 1000 will be coerced
   *  to 1000.
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListConnectionProfiles` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListConnectionProfiles`
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter expression that filters connection profiles listed in the
   *  response. The expression must specify the field name, a comparison
   *  operator, and the value that you want to use for filtering. The value must
   *  be a string, a number, or a boolean. The comparison operator must be either
   *  =, !=, >, or <. for="" example,="" list="" connection="" profiles="" created="" this="" year="" by="" *="" specifying="" **createtime="" %gt;="" 2020-01-01t00:00:00.000000000z**.="" you="" can="" *="" also="" filter="" nested="" fields.="" for="" example,="" you="" could="" specify="" **mysql.username="" *="%lt;my_username%gt;**" to="" list="" all="" connection="" profiles="" configured="" to="" *="" connect="" with="" a="" specific="" username.="" */="" const="" filter='abc123' *="" *="" the="" order="" by="" fields="" for="" the="" result.="" */="" const="" orderby='abc123' imports="" the="" clouddms="" library="" const="" {datamigrationserviceclient}="require('@google-cloud/dms').v1;" instantiates="" a="" client="" const="" clouddmsclient="new" datamigrationserviceclient();="" async="" function="" calllistconnectionprofiles()="" {="" construct="" request="" const="" request="{" parent,="" };="" run="" request="" const="" iterable="await" clouddmsclient.listconnectionprofilesasync(request);="" for="" await="" (const="" response="" of="" iterable)="" {="" console.log(response);="" }="" }="" calllistconnectionprofiles();="">

listConnectionProfilesStream(request, options)

listConnectionProfilesStream(request?: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest

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 listConnectionProfilesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listMigrationJobs(request, options)

listMigrationJobs(request?: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.clouddms.v1.IMigrationJob[],
        protos.google.cloud.clouddms.v1.IListMigrationJobsRequest | null,
        protos.google.cloud.clouddms.v1.IListMigrationJobsResponse
    ]>;

Lists migration jobs in a given project and location.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IListMigrationJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.clouddms.v1.IMigrationJob[], protos.google.cloud.clouddms.v1.IListMigrationJobsRequest | null, protos.google.cloud.clouddms.v1.IListMigrationJobsResponse ]>

{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 listMigrationJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listMigrationJobs(request, options, callback)

listMigrationJobs(request: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, protos.google.cloud.clouddms.v1.IListMigrationJobsResponse | null | undefined, protos.google.cloud.clouddms.v1.IMigrationJob>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IListMigrationJobsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, protos.google.cloud.clouddms.v1.IListMigrationJobsResponse | null | undefined, protos.google.cloud.clouddms.v1.IMigrationJob>
Returns
TypeDescription
void

listMigrationJobs(request, callback)

listMigrationJobs(request: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, callback: PaginationCallback<protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, protos.google.cloud.clouddms.v1.IListMigrationJobsResponse | null | undefined, protos.google.cloud.clouddms.v1.IMigrationJob>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IListMigrationJobsRequest
callback PaginationCallback<protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, protos.google.cloud.clouddms.v1.IListMigrationJobsResponse | null | undefined, protos.google.cloud.clouddms.v1.IMigrationJob>
Returns
TypeDescription
void

listMigrationJobsAsync(request, options)

listMigrationJobsAsync(request?: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.clouddms.v1.IMigrationJob>;

Equivalent to listMigrationJobs, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IListMigrationJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.clouddms.v1.IMigrationJob>

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent, which owns this collection of migrationJobs.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of migration jobs to return. The service may return
   *  fewer than this value. If unspecified, at most 50 migration jobs will be
   *  returned. The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  The nextPageToken value received in the previous call to
   *  migrationJobs.list, used in the subsequent request to retrieve the next
   *  page of results. On first call this should be left blank. When paginating,
   *  all other parameters provided to migrationJobs.list must match the call
   *  that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter expression that filters migration jobs listed in the response.
   *  The expression must specify the field name, a comparison operator, and the
   *  value that you want to use for filtering. The value must be a string,
   *  a number, or a boolean. The comparison operator must be
   *  either =, !=, >, or <. for="" example,="" list="" migration="" jobs="" created="" this="" year="" *="" by="" specifying="" **createtime="" %gt;="" 2020-01-01t00:00:00.000000000z.**="" *="" you="" can="" also="" filter="" nested="" fields.="" for="" example,="" you="" could="" specify="" *="" **reversesshconnectivity.vmip="1.2.3.4" **="" to="" select="" all="" migration="" *="" jobs="" connecting="" through="" the="" specific="" ssh="" tunnel="" bastion.="" */="" const="" filter='abc123' *="" *="" sort="" the="" results="" based="" on="" the="" migration="" job="" name.="" *="" valid="" values="" are:="" "name",="" "name="" asc",="" and="" "name="" desc".="" */="" const="" orderby='abc123' imports="" the="" clouddms="" library="" const="" {datamigrationserviceclient}="require('@google-cloud/dms').v1;" instantiates="" a="" client="" const="" clouddmsclient="new" datamigrationserviceclient();="" async="" function="" calllistmigrationjobs()="" {="" construct="" request="" const="" request="{" parent,="" };="" run="" request="" const="" iterable="await" clouddmsclient.listmigrationjobsasync(request);="" for="" await="" (const="" response="" of="" iterable)="" {="" console.log(response);="" }="" }="" calllistmigrationjobs();="">

listMigrationJobsStream(request, options)

listMigrationJobsStream(request?: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IListMigrationJobsRequest

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 listMigrationJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

matchConnectionProfileFromConnectionProfileName(connectionProfileName)

matchConnectionProfileFromConnectionProfileName(connectionProfileName: string): string | number;

Parse the connection_profile from ConnectionProfile resource.

Parameter
NameDescription
connectionProfileName string

A fully-qualified path representing ConnectionProfile resource.

Returns
TypeDescription
string | number

{string} A string representing the connection_profile.

matchLocationFromConnectionProfileName(connectionProfileName)

matchLocationFromConnectionProfileName(connectionProfileName: string): string | number;

Parse the location from ConnectionProfile resource.

Parameter
NameDescription
connectionProfileName string

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

matchLocationFromMigrationJobName(migrationJobName)

matchLocationFromMigrationJobName(migrationJobName: string): string | number;

Parse the location from MigrationJob resource.

Parameter
NameDescription
migrationJobName string

A fully-qualified path representing MigrationJob resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchMigrationJobFromMigrationJobName(migrationJobName)

matchMigrationJobFromMigrationJobName(migrationJobName: string): string | number;

Parse the migration_job from MigrationJob resource.

Parameter
NameDescription
migrationJobName string

A fully-qualified path representing MigrationJob resource.

Returns
TypeDescription
string | number

{string} A string representing the migration_job.

matchProjectFromConnectionProfileName(connectionProfileName)

matchProjectFromConnectionProfileName(connectionProfileName: string): string | number;

Parse the project from ConnectionProfile resource.

Parameter
NameDescription
connectionProfileName string

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

matchProjectFromMigrationJobName(migrationJobName)

matchProjectFromMigrationJobName(migrationJobName: string): string | number;

Parse the project from MigrationJob resource.

Parameter
NameDescription
migrationJobName string

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

migrationJobPath(project, location, migrationJob)

migrationJobPath(project: string, location: string, migrationJob: string): string;

Return a fully-qualified migrationJob resource name string.

Parameters
NameDescription
project string
location string
migrationJob string
Returns
TypeDescription
string

{string} Resource name string.

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.

promoteMigrationJob(request, options)

promoteMigrationJob(request?: protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callPromoteMigrationJob() {
    // Construct request
    const request = {
    };

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

  callPromoteMigrationJob();

promoteMigrationJob(request, options, callback)

promoteMigrationJob(request: protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

promoteMigrationJob(request, callback)

promoteMigrationJob(request: protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

restartMigrationJob(request, options)

restartMigrationJob(request?: protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callRestartMigrationJob() {
    // Construct request
    const request = {
    };

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

  callRestartMigrationJob();

restartMigrationJob(request, options, callback)

restartMigrationJob(request: protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

restartMigrationJob(request, callback)

restartMigrationJob(request: protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

resumeMigrationJob(request, options)

resumeMigrationJob(request?: protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callResumeMigrationJob() {
    // Construct request
    const request = {
    };

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

  callResumeMigrationJob();

resumeMigrationJob(request, options, callback)

resumeMigrationJob(request: protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

resumeMigrationJob(request, callback)

resumeMigrationJob(request: protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

startMigrationJob(request, options)

startMigrationJob(request?: protos.google.cloud.clouddms.v1.IStartMigrationJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Start an already created migration job.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IStartMigrationJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callStartMigrationJob() {
    // Construct request
    const request = {
    };

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

  callStartMigrationJob();

startMigrationJob(request, options, callback)

startMigrationJob(request: protos.google.cloud.clouddms.v1.IStartMigrationJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IStartMigrationJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

startMigrationJob(request, callback)

startMigrationJob(request: protos.google.cloud.clouddms.v1.IStartMigrationJobRequest, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IStartMigrationJobRequest
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

stopMigrationJob(request, options)

stopMigrationJob(request?: protos.google.cloud.clouddms.v1.IStopMigrationJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Stops a running migration job.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IStopMigrationJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callStopMigrationJob() {
    // Construct request
    const request = {
    };

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

  callStopMigrationJob();

stopMigrationJob(request, options, callback)

stopMigrationJob(request: protos.google.cloud.clouddms.v1.IStopMigrationJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IStopMigrationJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

stopMigrationJob(request, callback)

stopMigrationJob(request: protos.google.cloud.clouddms.v1.IStopMigrationJobRequest, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IStopMigrationJobRequest
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateConnectionProfile(request, options)

updateConnectionProfile(request?: protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update the configuration of a single connection profile.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Field mask is used to specify the fields to be overwritten in the
   *  connection profile resource by the update.
   */
  // const updateMask = {}
  /**
   *  Required. The connection profile parameters to update.
   */
  // const connectionProfile = {}
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callUpdateConnectionProfile() {
    // Construct request
    const request = {
      updateMask,
      connectionProfile,
    };

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

  callUpdateConnectionProfile();

updateConnectionProfile(request, options, callback)

updateConnectionProfile(request: protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateConnectionProfile(request, callback)

updateConnectionProfile(request: protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateMigrationJob(request, options)

updateMigrationJob(request?: protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a single migration job.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Field mask is used to specify the fields to be overwritten in the
   *  migration job resource by the update.
   */
  // const updateMask = {}
  /**
   *  Required. The migration job parameters to update.
   */
  // const migrationJob = {}
  /**
   *  A unique id used to identify the request. If the server receives two
   *  requests with the same id, then the second request will be ignored.
   *  It is recommended to always set this value to a UUID.
   *  The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
   *  (_), and hyphens (-). The maximum length is 40 characters.
   */
  // const requestId = 'abc123'

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callUpdateMigrationJob() {
    // Construct request
    const request = {
      updateMask,
      migrationJob,
    };

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

  callUpdateMigrationJob();

updateMigrationJob(request, options, callback)

updateMigrationJob(request: protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateMigrationJob(request, callback)

updateMigrationJob(request: protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

verifyMigrationJob(request, options)

verifyMigrationJob(request?: protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.

Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

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

  // Imports the Clouddms library
  const {DataMigrationServiceClient} = require('@google-cloud/dms').v1;

  // Instantiates a client
  const clouddmsClient = new DataMigrationServiceClient();

  async function callVerifyMigrationJob() {
    // Construct request
    const request = {
    };

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

  callVerifyMigrationJob();

verifyMigrationJob(request, options, callback)

verifyMigrationJob(request: protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

verifyMigrationJob(request, callback)

verifyMigrationJob(request: protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest, callback: Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest
callback Callback<LROperation<protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void