@google-cloud/dms 1.0.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +17 -17
- package/build/protos/google/cloud/clouddms/v1/clouddms_resources.proto +1 -1
- package/build/protos/protos.d.ts +31 -24
- package/build/protos/protos.js +52 -23
- package/build/protos/protos.json +21 -1
- package/build/src/v1/data_migration_service_client.d.ts +566 -87
- package/build/src/v1/data_migration_service_client.js +43 -544
- package/build/src/v1/data_migration_service_client.js.map +1 -1
- package/build/src/v1/index.js +2 -1
- package/build/src/v1/index.js.map +1 -1
- package/package.json +9 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2022 Google LLC
|
|
3
3
|
//
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// you may not use this file except in compliance with the License.
|
|
@@ -98,6 +98,10 @@ class DataMigrationServiceClient {
|
|
|
98
98
|
this._opts = opts;
|
|
99
99
|
// Save the auth object to the client, for use by other methods.
|
|
100
100
|
this.auth = this._gaxGrpc.auth;
|
|
101
|
+
// Set useJWTAccessWithScope on the auth object.
|
|
102
|
+
this.auth.useJWTAccessWithScope = true;
|
|
103
|
+
// Set defaultServicePath on the auth object.
|
|
104
|
+
this.auth.defaultServicePath = staticMembers.servicePath;
|
|
101
105
|
// Set the default scopes in auth client if needed.
|
|
102
106
|
if (servicePath === staticMembers.servicePath) {
|
|
103
107
|
this.auth.defaultScopes = staticMembers.scopes;
|
|
@@ -296,23 +300,6 @@ class DataMigrationServiceClient {
|
|
|
296
300
|
}
|
|
297
301
|
return this.auth.getProjectId();
|
|
298
302
|
}
|
|
299
|
-
/**
|
|
300
|
-
* Gets details of a single migration job.
|
|
301
|
-
*
|
|
302
|
-
* @param {Object} request
|
|
303
|
-
* The request object that will be sent.
|
|
304
|
-
* @param {string} request.name
|
|
305
|
-
* Required. Name of the migration job resource to get.
|
|
306
|
-
* @param {object} [options]
|
|
307
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
308
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
309
|
-
* The first element of the array is an object representing [MigrationJob]{@link google.cloud.clouddms.v1.MigrationJob}.
|
|
310
|
-
* Please see the
|
|
311
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
312
|
-
* for more details and examples.
|
|
313
|
-
* @example
|
|
314
|
-
* const [response] = await client.getMigrationJob(request);
|
|
315
|
-
*/
|
|
316
303
|
getMigrationJob(request, optionsOrCallback, callback) {
|
|
317
304
|
request = request || {};
|
|
318
305
|
let options;
|
|
@@ -333,32 +320,6 @@ class DataMigrationServiceClient {
|
|
|
333
320
|
this.initialize();
|
|
334
321
|
return this.innerApiCalls.getMigrationJob(request, options, callback);
|
|
335
322
|
}
|
|
336
|
-
/**
|
|
337
|
-
* Generate a SSH configuration script to configure the reverse SSH
|
|
338
|
-
* connectivity.
|
|
339
|
-
*
|
|
340
|
-
* @param {Object} request
|
|
341
|
-
* The request object that will be sent.
|
|
342
|
-
* @param {string} request.migrationJob
|
|
343
|
-
* Name of the migration job resource to generate the SSH script.
|
|
344
|
-
* @param {string} request.vm
|
|
345
|
-
* Required. Bastion VM Instance name to use or to create.
|
|
346
|
-
* @param {google.cloud.clouddms.v1.VmCreationConfig} request.vmCreationConfig
|
|
347
|
-
* The VM creation configuration
|
|
348
|
-
* @param {google.cloud.clouddms.v1.VmSelectionConfig} request.vmSelectionConfig
|
|
349
|
-
* The VM selection configuration
|
|
350
|
-
* @param {number} request.vmPort
|
|
351
|
-
* The port that will be open on the bastion host
|
|
352
|
-
* @param {object} [options]
|
|
353
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
354
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
355
|
-
* The first element of the array is an object representing [SshScript]{@link google.cloud.clouddms.v1.SshScript}.
|
|
356
|
-
* Please see the
|
|
357
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
358
|
-
* for more details and examples.
|
|
359
|
-
* @example
|
|
360
|
-
* const [response] = await client.generateSshScript(request);
|
|
361
|
-
*/
|
|
362
323
|
generateSshScript(request, optionsOrCallback, callback) {
|
|
363
324
|
request = request || {};
|
|
364
325
|
let options;
|
|
@@ -379,23 +340,6 @@ class DataMigrationServiceClient {
|
|
|
379
340
|
this.initialize();
|
|
380
341
|
return this.innerApiCalls.generateSshScript(request, options, callback);
|
|
381
342
|
}
|
|
382
|
-
/**
|
|
383
|
-
* Gets details of a single connection profile.
|
|
384
|
-
*
|
|
385
|
-
* @param {Object} request
|
|
386
|
-
* The request object that will be sent.
|
|
387
|
-
* @param {string} request.name
|
|
388
|
-
* Required. Name of the connection profile resource to get.
|
|
389
|
-
* @param {object} [options]
|
|
390
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
391
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
392
|
-
* The first element of the array is an object representing [ConnectionProfile]{@link google.cloud.clouddms.v1.ConnectionProfile}.
|
|
393
|
-
* Please see the
|
|
394
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
395
|
-
* for more details and examples.
|
|
396
|
-
* @example
|
|
397
|
-
* const [response] = await client.getConnectionProfile(request);
|
|
398
|
-
*/
|
|
399
343
|
getConnectionProfile(request, optionsOrCallback, callback) {
|
|
400
344
|
request = request || {};
|
|
401
345
|
let options;
|
|
@@ -416,40 +360,6 @@ class DataMigrationServiceClient {
|
|
|
416
360
|
this.initialize();
|
|
417
361
|
return this.innerApiCalls.getConnectionProfile(request, options, callback);
|
|
418
362
|
}
|
|
419
|
-
/**
|
|
420
|
-
* Creates a new migration job in a given project and location.
|
|
421
|
-
*
|
|
422
|
-
* @param {Object} request
|
|
423
|
-
* The request object that will be sent.
|
|
424
|
-
* @param {string} request.parent
|
|
425
|
-
* Required. The parent, which owns this collection of migration jobs.
|
|
426
|
-
* @param {string} request.migrationJobId
|
|
427
|
-
* Required. The ID of the instance to create.
|
|
428
|
-
* @param {google.cloud.clouddms.v1.MigrationJob} request.migrationJob
|
|
429
|
-
* Required. Represents a [migration
|
|
430
|
-
* job](https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs)
|
|
431
|
-
* object.
|
|
432
|
-
* @param {string} request.requestId
|
|
433
|
-
* A unique id used to identify the request. If the server receives two
|
|
434
|
-
* requests with the same id, then the second request will be ignored.
|
|
435
|
-
*
|
|
436
|
-
* It is recommended to always set this value to a UUID.
|
|
437
|
-
*
|
|
438
|
-
* The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
|
439
|
-
* (_), and hyphens (-). The maximum length is 40 characters.
|
|
440
|
-
* @param {object} [options]
|
|
441
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
442
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
443
|
-
* The first element of the array is an object representing
|
|
444
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
445
|
-
* you can `await` for.
|
|
446
|
-
* Please see the
|
|
447
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
448
|
-
* for more details and examples.
|
|
449
|
-
* @example
|
|
450
|
-
* const [operation] = await client.createMigrationJob(request);
|
|
451
|
-
* const [response] = await operation.promise();
|
|
452
|
-
*/
|
|
453
363
|
createMigrationJob(request, optionsOrCallback, callback) {
|
|
454
364
|
request = request || {};
|
|
455
365
|
let options;
|
|
@@ -479,11 +389,8 @@ class DataMigrationServiceClient {
|
|
|
479
389
|
* Please see the
|
|
480
390
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
481
391
|
* for more details and examples.
|
|
482
|
-
* @example
|
|
483
|
-
*
|
|
484
|
-
* console.log(decodedOperation.result);
|
|
485
|
-
* console.log(decodedOperation.done);
|
|
486
|
-
* console.log(decodedOperation.metadata);
|
|
392
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.create_migration_job.js</caption>
|
|
393
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_CreateMigrationJob_async
|
|
487
394
|
*/
|
|
488
395
|
async checkCreateMigrationJobProgress(name) {
|
|
489
396
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -491,37 +398,6 @@ class DataMigrationServiceClient {
|
|
|
491
398
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.createMigrationJob, gax.createDefaultBackoffSettings());
|
|
492
399
|
return decodeOperation;
|
|
493
400
|
}
|
|
494
|
-
/**
|
|
495
|
-
* Updates the parameters of a single migration job.
|
|
496
|
-
*
|
|
497
|
-
* @param {Object} request
|
|
498
|
-
* The request object that will be sent.
|
|
499
|
-
* @param {google.protobuf.FieldMask} request.updateMask
|
|
500
|
-
* Required. Field mask is used to specify the fields to be overwritten in the
|
|
501
|
-
* migration job resource by the update.
|
|
502
|
-
* @param {google.cloud.clouddms.v1.MigrationJob} request.migrationJob
|
|
503
|
-
* Required. The migration job parameters to update.
|
|
504
|
-
* @param {string} request.requestId
|
|
505
|
-
* A unique id used to identify the request. If the server receives two
|
|
506
|
-
* requests with the same id, then the second request will be ignored.
|
|
507
|
-
*
|
|
508
|
-
* It is recommended to always set this value to a UUID.
|
|
509
|
-
*
|
|
510
|
-
* The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
|
511
|
-
* (_), and hyphens (-). The maximum length is 40 characters.
|
|
512
|
-
* @param {object} [options]
|
|
513
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
514
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
515
|
-
* The first element of the array is an object representing
|
|
516
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
517
|
-
* you can `await` for.
|
|
518
|
-
* Please see the
|
|
519
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
520
|
-
* for more details and examples.
|
|
521
|
-
* @example
|
|
522
|
-
* const [operation] = await client.updateMigrationJob(request);
|
|
523
|
-
* const [response] = await operation.promise();
|
|
524
|
-
*/
|
|
525
401
|
updateMigrationJob(request, optionsOrCallback, callback) {
|
|
526
402
|
request = request || {};
|
|
527
403
|
let options;
|
|
@@ -551,11 +427,8 @@ class DataMigrationServiceClient {
|
|
|
551
427
|
* Please see the
|
|
552
428
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
553
429
|
* for more details and examples.
|
|
554
|
-
* @example
|
|
555
|
-
*
|
|
556
|
-
* console.log(decodedOperation.result);
|
|
557
|
-
* console.log(decodedOperation.done);
|
|
558
|
-
* console.log(decodedOperation.metadata);
|
|
430
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.update_migration_job.js</caption>
|
|
431
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_async
|
|
559
432
|
*/
|
|
560
433
|
async checkUpdateMigrationJobProgress(name) {
|
|
561
434
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -563,38 +436,6 @@ class DataMigrationServiceClient {
|
|
|
563
436
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.updateMigrationJob, gax.createDefaultBackoffSettings());
|
|
564
437
|
return decodeOperation;
|
|
565
438
|
}
|
|
566
|
-
/**
|
|
567
|
-
* Deletes a single migration job.
|
|
568
|
-
*
|
|
569
|
-
* @param {Object} request
|
|
570
|
-
* The request object that will be sent.
|
|
571
|
-
* @param {string} request.name
|
|
572
|
-
* Required. Name of the migration job resource to delete.
|
|
573
|
-
* @param {string} request.requestId
|
|
574
|
-
* A unique id used to identify the request. If the server receives two
|
|
575
|
-
* requests with the same id, then the second request will be ignored.
|
|
576
|
-
*
|
|
577
|
-
* It is recommended to always set this value to a UUID.
|
|
578
|
-
*
|
|
579
|
-
* The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
|
580
|
-
* (_), and hyphens (-). The maximum length is 40 characters.
|
|
581
|
-
* @param {boolean} request.force
|
|
582
|
-
* The destination CloudSQL connection profile is always deleted with the
|
|
583
|
-
* migration job. In case of force delete, the destination CloudSQL replica
|
|
584
|
-
* database is also deleted.
|
|
585
|
-
* @param {object} [options]
|
|
586
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
587
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
588
|
-
* The first element of the array is an object representing
|
|
589
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
590
|
-
* you can `await` for.
|
|
591
|
-
* Please see the
|
|
592
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
593
|
-
* for more details and examples.
|
|
594
|
-
* @example
|
|
595
|
-
* const [operation] = await client.deleteMigrationJob(request);
|
|
596
|
-
* const [response] = await operation.promise();
|
|
597
|
-
*/
|
|
598
439
|
deleteMigrationJob(request, optionsOrCallback, callback) {
|
|
599
440
|
request = request || {};
|
|
600
441
|
let options;
|
|
@@ -624,11 +465,8 @@ class DataMigrationServiceClient {
|
|
|
624
465
|
* Please see the
|
|
625
466
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
626
467
|
* for more details and examples.
|
|
627
|
-
* @example
|
|
628
|
-
*
|
|
629
|
-
* console.log(decodedOperation.result);
|
|
630
|
-
* console.log(decodedOperation.done);
|
|
631
|
-
* console.log(decodedOperation.metadata);
|
|
468
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.delete_migration_job.js</caption>
|
|
469
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_async
|
|
632
470
|
*/
|
|
633
471
|
async checkDeleteMigrationJobProgress(name) {
|
|
634
472
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -636,26 +474,6 @@ class DataMigrationServiceClient {
|
|
|
636
474
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.deleteMigrationJob, gax.createDefaultBackoffSettings());
|
|
637
475
|
return decodeOperation;
|
|
638
476
|
}
|
|
639
|
-
/**
|
|
640
|
-
* Start an already created migration job.
|
|
641
|
-
*
|
|
642
|
-
* @param {Object} request
|
|
643
|
-
* The request object that will be sent.
|
|
644
|
-
* @param {string} request.name
|
|
645
|
-
* Name of the migration job resource to start.
|
|
646
|
-
* @param {object} [options]
|
|
647
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
648
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
649
|
-
* The first element of the array is an object representing
|
|
650
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
651
|
-
* you can `await` for.
|
|
652
|
-
* Please see the
|
|
653
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
654
|
-
* for more details and examples.
|
|
655
|
-
* @example
|
|
656
|
-
* const [operation] = await client.startMigrationJob(request);
|
|
657
|
-
* const [response] = await operation.promise();
|
|
658
|
-
*/
|
|
659
477
|
startMigrationJob(request, optionsOrCallback, callback) {
|
|
660
478
|
request = request || {};
|
|
661
479
|
let options;
|
|
@@ -685,11 +503,8 @@ class DataMigrationServiceClient {
|
|
|
685
503
|
* Please see the
|
|
686
504
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
687
505
|
* for more details and examples.
|
|
688
|
-
* @example
|
|
689
|
-
*
|
|
690
|
-
* console.log(decodedOperation.result);
|
|
691
|
-
* console.log(decodedOperation.done);
|
|
692
|
-
* console.log(decodedOperation.metadata);
|
|
506
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.start_migration_job.js</caption>
|
|
507
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_StartMigrationJob_async
|
|
693
508
|
*/
|
|
694
509
|
async checkStartMigrationJobProgress(name) {
|
|
695
510
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -697,26 +512,6 @@ class DataMigrationServiceClient {
|
|
|
697
512
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.startMigrationJob, gax.createDefaultBackoffSettings());
|
|
698
513
|
return decodeOperation;
|
|
699
514
|
}
|
|
700
|
-
/**
|
|
701
|
-
* Stops a running migration job.
|
|
702
|
-
*
|
|
703
|
-
* @param {Object} request
|
|
704
|
-
* The request object that will be sent.
|
|
705
|
-
* @param {string} request.name
|
|
706
|
-
* Name of the migration job resource to stop.
|
|
707
|
-
* @param {object} [options]
|
|
708
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
709
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
710
|
-
* The first element of the array is an object representing
|
|
711
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
712
|
-
* you can `await` for.
|
|
713
|
-
* Please see the
|
|
714
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
715
|
-
* for more details and examples.
|
|
716
|
-
* @example
|
|
717
|
-
* const [operation] = await client.stopMigrationJob(request);
|
|
718
|
-
* const [response] = await operation.promise();
|
|
719
|
-
*/
|
|
720
515
|
stopMigrationJob(request, optionsOrCallback, callback) {
|
|
721
516
|
request = request || {};
|
|
722
517
|
let options;
|
|
@@ -746,11 +541,8 @@ class DataMigrationServiceClient {
|
|
|
746
541
|
* Please see the
|
|
747
542
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
748
543
|
* for more details and examples.
|
|
749
|
-
* @example
|
|
750
|
-
*
|
|
751
|
-
* console.log(decodedOperation.result);
|
|
752
|
-
* console.log(decodedOperation.done);
|
|
753
|
-
* console.log(decodedOperation.metadata);
|
|
544
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.stop_migration_job.js</caption>
|
|
545
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_StopMigrationJob_async
|
|
754
546
|
*/
|
|
755
547
|
async checkStopMigrationJobProgress(name) {
|
|
756
548
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -758,27 +550,6 @@ class DataMigrationServiceClient {
|
|
|
758
550
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.stopMigrationJob, gax.createDefaultBackoffSettings());
|
|
759
551
|
return decodeOperation;
|
|
760
552
|
}
|
|
761
|
-
/**
|
|
762
|
-
* Resume a migration job that is currently stopped and is resumable (was
|
|
763
|
-
* stopped during CDC phase).
|
|
764
|
-
*
|
|
765
|
-
* @param {Object} request
|
|
766
|
-
* The request object that will be sent.
|
|
767
|
-
* @param {string} request.name
|
|
768
|
-
* Name of the migration job resource to resume.
|
|
769
|
-
* @param {object} [options]
|
|
770
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
771
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
772
|
-
* The first element of the array is an object representing
|
|
773
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
774
|
-
* you can `await` for.
|
|
775
|
-
* Please see the
|
|
776
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
777
|
-
* for more details and examples.
|
|
778
|
-
* @example
|
|
779
|
-
* const [operation] = await client.resumeMigrationJob(request);
|
|
780
|
-
* const [response] = await operation.promise();
|
|
781
|
-
*/
|
|
782
553
|
resumeMigrationJob(request, optionsOrCallback, callback) {
|
|
783
554
|
request = request || {};
|
|
784
555
|
let options;
|
|
@@ -808,11 +579,8 @@ class DataMigrationServiceClient {
|
|
|
808
579
|
* Please see the
|
|
809
580
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
810
581
|
* for more details and examples.
|
|
811
|
-
* @example
|
|
812
|
-
*
|
|
813
|
-
* console.log(decodedOperation.result);
|
|
814
|
-
* console.log(decodedOperation.done);
|
|
815
|
-
* console.log(decodedOperation.metadata);
|
|
582
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.resume_migration_job.js</caption>
|
|
583
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_async
|
|
816
584
|
*/
|
|
817
585
|
async checkResumeMigrationJobProgress(name) {
|
|
818
586
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -820,27 +588,6 @@ class DataMigrationServiceClient {
|
|
|
820
588
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.resumeMigrationJob, gax.createDefaultBackoffSettings());
|
|
821
589
|
return decodeOperation;
|
|
822
590
|
}
|
|
823
|
-
/**
|
|
824
|
-
* Promote a migration job, stopping replication to the destination and
|
|
825
|
-
* promoting the destination to be a standalone database.
|
|
826
|
-
*
|
|
827
|
-
* @param {Object} request
|
|
828
|
-
* The request object that will be sent.
|
|
829
|
-
* @param {string} request.name
|
|
830
|
-
* Name of the migration job resource to promote.
|
|
831
|
-
* @param {object} [options]
|
|
832
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
833
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
834
|
-
* The first element of the array is an object representing
|
|
835
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
836
|
-
* you can `await` for.
|
|
837
|
-
* Please see the
|
|
838
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
839
|
-
* for more details and examples.
|
|
840
|
-
* @example
|
|
841
|
-
* const [operation] = await client.promoteMigrationJob(request);
|
|
842
|
-
* const [response] = await operation.promise();
|
|
843
|
-
*/
|
|
844
591
|
promoteMigrationJob(request, optionsOrCallback, callback) {
|
|
845
592
|
request = request || {};
|
|
846
593
|
let options;
|
|
@@ -870,11 +617,8 @@ class DataMigrationServiceClient {
|
|
|
870
617
|
* Please see the
|
|
871
618
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
872
619
|
* for more details and examples.
|
|
873
|
-
* @example
|
|
874
|
-
*
|
|
875
|
-
* console.log(decodedOperation.result);
|
|
876
|
-
* console.log(decodedOperation.done);
|
|
877
|
-
* console.log(decodedOperation.metadata);
|
|
620
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.promote_migration_job.js</caption>
|
|
621
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_async
|
|
878
622
|
*/
|
|
879
623
|
async checkPromoteMigrationJobProgress(name) {
|
|
880
624
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -882,27 +626,6 @@ class DataMigrationServiceClient {
|
|
|
882
626
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.promoteMigrationJob, gax.createDefaultBackoffSettings());
|
|
883
627
|
return decodeOperation;
|
|
884
628
|
}
|
|
885
|
-
/**
|
|
886
|
-
* Verify a migration job, making sure the destination can reach the source
|
|
887
|
-
* and that all configuration and prerequisites are met.
|
|
888
|
-
*
|
|
889
|
-
* @param {Object} request
|
|
890
|
-
* The request object that will be sent.
|
|
891
|
-
* @param {string} request.name
|
|
892
|
-
* Name of the migration job resource to verify.
|
|
893
|
-
* @param {object} [options]
|
|
894
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
895
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
896
|
-
* The first element of the array is an object representing
|
|
897
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
898
|
-
* you can `await` for.
|
|
899
|
-
* Please see the
|
|
900
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
901
|
-
* for more details and examples.
|
|
902
|
-
* @example
|
|
903
|
-
* const [operation] = await client.verifyMigrationJob(request);
|
|
904
|
-
* const [response] = await operation.promise();
|
|
905
|
-
*/
|
|
906
629
|
verifyMigrationJob(request, optionsOrCallback, callback) {
|
|
907
630
|
request = request || {};
|
|
908
631
|
let options;
|
|
@@ -932,11 +655,8 @@ class DataMigrationServiceClient {
|
|
|
932
655
|
* Please see the
|
|
933
656
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
934
657
|
* for more details and examples.
|
|
935
|
-
* @example
|
|
936
|
-
*
|
|
937
|
-
* console.log(decodedOperation.result);
|
|
938
|
-
* console.log(decodedOperation.done);
|
|
939
|
-
* console.log(decodedOperation.metadata);
|
|
658
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.verify_migration_job.js</caption>
|
|
659
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_async
|
|
940
660
|
*/
|
|
941
661
|
async checkVerifyMigrationJobProgress(name) {
|
|
942
662
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -944,28 +664,6 @@ class DataMigrationServiceClient {
|
|
|
944
664
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.verifyMigrationJob, gax.createDefaultBackoffSettings());
|
|
945
665
|
return decodeOperation;
|
|
946
666
|
}
|
|
947
|
-
/**
|
|
948
|
-
* Restart a stopped or failed migration job, resetting the destination
|
|
949
|
-
* instance to its original state and starting the migration process from
|
|
950
|
-
* scratch.
|
|
951
|
-
*
|
|
952
|
-
* @param {Object} request
|
|
953
|
-
* The request object that will be sent.
|
|
954
|
-
* @param {string} request.name
|
|
955
|
-
* Name of the migration job resource to restart.
|
|
956
|
-
* @param {object} [options]
|
|
957
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
958
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
959
|
-
* The first element of the array is an object representing
|
|
960
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
961
|
-
* you can `await` for.
|
|
962
|
-
* Please see the
|
|
963
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
964
|
-
* for more details and examples.
|
|
965
|
-
* @example
|
|
966
|
-
* const [operation] = await client.restartMigrationJob(request);
|
|
967
|
-
* const [response] = await operation.promise();
|
|
968
|
-
*/
|
|
969
667
|
restartMigrationJob(request, optionsOrCallback, callback) {
|
|
970
668
|
request = request || {};
|
|
971
669
|
let options;
|
|
@@ -995,11 +693,8 @@ class DataMigrationServiceClient {
|
|
|
995
693
|
* Please see the
|
|
996
694
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
997
695
|
* for more details and examples.
|
|
998
|
-
* @example
|
|
999
|
-
*
|
|
1000
|
-
* console.log(decodedOperation.result);
|
|
1001
|
-
* console.log(decodedOperation.done);
|
|
1002
|
-
* console.log(decodedOperation.metadata);
|
|
696
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.restart_migration_job.js</caption>
|
|
697
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_RestartMigrationJob_async
|
|
1003
698
|
*/
|
|
1004
699
|
async checkRestartMigrationJobProgress(name) {
|
|
1005
700
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -1007,38 +702,6 @@ class DataMigrationServiceClient {
|
|
|
1007
702
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.restartMigrationJob, gax.createDefaultBackoffSettings());
|
|
1008
703
|
return decodeOperation;
|
|
1009
704
|
}
|
|
1010
|
-
/**
|
|
1011
|
-
* Creates a new connection profile in a given project and location.
|
|
1012
|
-
*
|
|
1013
|
-
* @param {Object} request
|
|
1014
|
-
* The request object that will be sent.
|
|
1015
|
-
* @param {string} request.parent
|
|
1016
|
-
* Required. The parent, which owns this collection of connection profiles.
|
|
1017
|
-
* @param {string} request.connectionProfileId
|
|
1018
|
-
* Required. The connection profile identifier.
|
|
1019
|
-
* @param {google.cloud.clouddms.v1.ConnectionProfile} request.connectionProfile
|
|
1020
|
-
* Required. The create request body including the connection profile data
|
|
1021
|
-
* @param {string} request.requestId
|
|
1022
|
-
* A unique id used to identify the request. If the server receives two
|
|
1023
|
-
* requests with the same id, then the second request will be ignored.
|
|
1024
|
-
*
|
|
1025
|
-
* It is recommended to always set this value to a UUID.
|
|
1026
|
-
*
|
|
1027
|
-
* The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
|
1028
|
-
* (_), and hyphens (-). The maximum length is 40 characters.
|
|
1029
|
-
* @param {object} [options]
|
|
1030
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1031
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
1032
|
-
* The first element of the array is an object representing
|
|
1033
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
1034
|
-
* you can `await` for.
|
|
1035
|
-
* Please see the
|
|
1036
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
1037
|
-
* for more details and examples.
|
|
1038
|
-
* @example
|
|
1039
|
-
* const [operation] = await client.createConnectionProfile(request);
|
|
1040
|
-
* const [response] = await operation.promise();
|
|
1041
|
-
*/
|
|
1042
705
|
createConnectionProfile(request, optionsOrCallback, callback) {
|
|
1043
706
|
request = request || {};
|
|
1044
707
|
let options;
|
|
@@ -1068,11 +731,8 @@ class DataMigrationServiceClient {
|
|
|
1068
731
|
* Please see the
|
|
1069
732
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
1070
733
|
* for more details and examples.
|
|
1071
|
-
* @example
|
|
1072
|
-
*
|
|
1073
|
-
* console.log(decodedOperation.result);
|
|
1074
|
-
* console.log(decodedOperation.done);
|
|
1075
|
-
* console.log(decodedOperation.metadata);
|
|
734
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.create_connection_profile.js</caption>
|
|
735
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_async
|
|
1076
736
|
*/
|
|
1077
737
|
async checkCreateConnectionProfileProgress(name) {
|
|
1078
738
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -1080,37 +740,6 @@ class DataMigrationServiceClient {
|
|
|
1080
740
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.createConnectionProfile, gax.createDefaultBackoffSettings());
|
|
1081
741
|
return decodeOperation;
|
|
1082
742
|
}
|
|
1083
|
-
/**
|
|
1084
|
-
* Update the configuration of a single connection profile.
|
|
1085
|
-
*
|
|
1086
|
-
* @param {Object} request
|
|
1087
|
-
* The request object that will be sent.
|
|
1088
|
-
* @param {google.protobuf.FieldMask} request.updateMask
|
|
1089
|
-
* Required. Field mask is used to specify the fields to be overwritten in the
|
|
1090
|
-
* connection profile resource by the update.
|
|
1091
|
-
* @param {google.cloud.clouddms.v1.ConnectionProfile} request.connectionProfile
|
|
1092
|
-
* Required. The connection profile parameters to update.
|
|
1093
|
-
* @param {string} request.requestId
|
|
1094
|
-
* A unique id used to identify the request. If the server receives two
|
|
1095
|
-
* requests with the same id, then the second request will be ignored.
|
|
1096
|
-
*
|
|
1097
|
-
* It is recommended to always set this value to a UUID.
|
|
1098
|
-
*
|
|
1099
|
-
* The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
|
1100
|
-
* (_), and hyphens (-). The maximum length is 40 characters.
|
|
1101
|
-
* @param {object} [options]
|
|
1102
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1103
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
1104
|
-
* The first element of the array is an object representing
|
|
1105
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
1106
|
-
* you can `await` for.
|
|
1107
|
-
* Please see the
|
|
1108
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
1109
|
-
* for more details and examples.
|
|
1110
|
-
* @example
|
|
1111
|
-
* const [operation] = await client.updateConnectionProfile(request);
|
|
1112
|
-
* const [response] = await operation.promise();
|
|
1113
|
-
*/
|
|
1114
743
|
updateConnectionProfile(request, optionsOrCallback, callback) {
|
|
1115
744
|
request = request || {};
|
|
1116
745
|
let options;
|
|
@@ -1140,11 +769,8 @@ class DataMigrationServiceClient {
|
|
|
1140
769
|
* Please see the
|
|
1141
770
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
1142
771
|
* for more details and examples.
|
|
1143
|
-
* @example
|
|
1144
|
-
*
|
|
1145
|
-
* console.log(decodedOperation.result);
|
|
1146
|
-
* console.log(decodedOperation.done);
|
|
1147
|
-
* console.log(decodedOperation.metadata);
|
|
772
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.update_connection_profile.js</caption>
|
|
773
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_async
|
|
1148
774
|
*/
|
|
1149
775
|
async checkUpdateConnectionProfileProgress(name) {
|
|
1150
776
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -1152,39 +778,6 @@ class DataMigrationServiceClient {
|
|
|
1152
778
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.updateConnectionProfile, gax.createDefaultBackoffSettings());
|
|
1153
779
|
return decodeOperation;
|
|
1154
780
|
}
|
|
1155
|
-
/**
|
|
1156
|
-
* Deletes a single Database Migration Service connection profile.
|
|
1157
|
-
* A connection profile can only be deleted if it is not in use by any
|
|
1158
|
-
* active migration jobs.
|
|
1159
|
-
*
|
|
1160
|
-
* @param {Object} request
|
|
1161
|
-
* The request object that will be sent.
|
|
1162
|
-
* @param {string} request.name
|
|
1163
|
-
* Required. Name of the connection profile resource to delete.
|
|
1164
|
-
* @param {string} request.requestId
|
|
1165
|
-
* A unique id used to identify the request. If the server receives two
|
|
1166
|
-
* requests with the same id, then the second request will be ignored.
|
|
1167
|
-
*
|
|
1168
|
-
* It is recommended to always set this value to a UUID.
|
|
1169
|
-
*
|
|
1170
|
-
* The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
|
1171
|
-
* (_), and hyphens (-). The maximum length is 40 characters.
|
|
1172
|
-
* @param {boolean} request.force
|
|
1173
|
-
* In case of force delete, the CloudSQL replica database is also deleted
|
|
1174
|
-
* (only for CloudSQL connection profile).
|
|
1175
|
-
* @param {object} [options]
|
|
1176
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1177
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
1178
|
-
* The first element of the array is an object representing
|
|
1179
|
-
* a long running operation. Its `promise()` method returns a promise
|
|
1180
|
-
* you can `await` for.
|
|
1181
|
-
* Please see the
|
|
1182
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
1183
|
-
* for more details and examples.
|
|
1184
|
-
* @example
|
|
1185
|
-
* const [operation] = await client.deleteConnectionProfile(request);
|
|
1186
|
-
* const [response] = await operation.promise();
|
|
1187
|
-
*/
|
|
1188
781
|
deleteConnectionProfile(request, optionsOrCallback, callback) {
|
|
1189
782
|
request = request || {};
|
|
1190
783
|
let options;
|
|
@@ -1214,11 +807,8 @@ class DataMigrationServiceClient {
|
|
|
1214
807
|
* Please see the
|
|
1215
808
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
1216
809
|
* for more details and examples.
|
|
1217
|
-
* @example
|
|
1218
|
-
*
|
|
1219
|
-
* console.log(decodedOperation.result);
|
|
1220
|
-
* console.log(decodedOperation.done);
|
|
1221
|
-
* console.log(decodedOperation.metadata);
|
|
810
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.delete_connection_profile.js</caption>
|
|
811
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_async
|
|
1222
812
|
*/
|
|
1223
813
|
async checkDeleteConnectionProfileProgress(name) {
|
|
1224
814
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -1226,50 +816,6 @@ class DataMigrationServiceClient {
|
|
|
1226
816
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.deleteConnectionProfile, gax.createDefaultBackoffSettings());
|
|
1227
817
|
return decodeOperation;
|
|
1228
818
|
}
|
|
1229
|
-
/**
|
|
1230
|
-
* Lists migration jobs in a given project and location.
|
|
1231
|
-
*
|
|
1232
|
-
* @param {Object} request
|
|
1233
|
-
* The request object that will be sent.
|
|
1234
|
-
* @param {string} request.parent
|
|
1235
|
-
* Required. The parent, which owns this collection of migrationJobs.
|
|
1236
|
-
* @param {number} request.pageSize
|
|
1237
|
-
* The maximum number of migration jobs to return. The service may return
|
|
1238
|
-
* fewer than this value. If unspecified, at most 50 migration jobs will be
|
|
1239
|
-
* returned. The maximum value is 1000; values above 1000 will be coerced to
|
|
1240
|
-
* 1000.
|
|
1241
|
-
* @param {string} request.pageToken
|
|
1242
|
-
* The nextPageToken value received in the previous call to
|
|
1243
|
-
* migrationJobs.list, used in the subsequent request to retrieve the next
|
|
1244
|
-
* page of results. On first call this should be left blank. When paginating,
|
|
1245
|
-
* all other parameters provided to migrationJobs.list must match the call
|
|
1246
|
-
* that provided the page token.
|
|
1247
|
-
* @param {string} request.filter
|
|
1248
|
-
* A filter expression that filters migration jobs listed in the response.
|
|
1249
|
-
* The expression must specify the field name, a comparison operator, and the
|
|
1250
|
-
* value that you want to use for filtering. The value must be a string,
|
|
1251
|
-
* a number, or a boolean. The comparison operator must be
|
|
1252
|
-
* either =, !=, >, or <. For example, list migration jobs created this year
|
|
1253
|
-
* by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
|
|
1254
|
-
* You can also filter nested fields. For example, you could specify
|
|
1255
|
-
* **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
|
|
1256
|
-
* jobs connecting through the specific SSH tunnel bastion.
|
|
1257
|
-
* @param {string} request.orderBy
|
|
1258
|
-
* Sort the results based on the migration job name.
|
|
1259
|
-
* Valid values are: "name", "name asc", and "name desc".
|
|
1260
|
-
* @param {object} [options]
|
|
1261
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1262
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
1263
|
-
* The first element of the array is Array of [MigrationJob]{@link google.cloud.clouddms.v1.MigrationJob}.
|
|
1264
|
-
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1265
|
-
* times as needed and will merge results from all the pages into this array.
|
|
1266
|
-
* Note that it can affect your quota.
|
|
1267
|
-
* We recommend using `listMigrationJobsAsync()`
|
|
1268
|
-
* method described below for async iteration which you can stop as needed.
|
|
1269
|
-
* Please see the
|
|
1270
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1271
|
-
* for more details and examples.
|
|
1272
|
-
*/
|
|
1273
819
|
listMigrationJobs(request, optionsOrCallback, callback) {
|
|
1274
820
|
request = request || {};
|
|
1275
821
|
let options;
|
|
@@ -1341,7 +887,8 @@ class DataMigrationServiceClient {
|
|
|
1341
887
|
gax.routingHeader.fromParams({
|
|
1342
888
|
parent: request.parent || '',
|
|
1343
889
|
});
|
|
1344
|
-
const
|
|
890
|
+
const defaultCallSettings = this._defaults['listMigrationJobs'];
|
|
891
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1345
892
|
this.initialize();
|
|
1346
893
|
return this.descriptors.page.listMigrationJobs.createStream(this.innerApiCalls.listMigrationJobs, request, callSettings);
|
|
1347
894
|
}
|
|
@@ -1387,11 +934,8 @@ class DataMigrationServiceClient {
|
|
|
1387
934
|
* Please see the
|
|
1388
935
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1389
936
|
* for more details and examples.
|
|
1390
|
-
* @example
|
|
1391
|
-
*
|
|
1392
|
-
* for await (const response of iterable) {
|
|
1393
|
-
* // process response
|
|
1394
|
-
* }
|
|
937
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.list_migration_jobs.js</caption>
|
|
938
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_ListMigrationJobs_async
|
|
1395
939
|
*/
|
|
1396
940
|
listMigrationJobsAsync(request, options) {
|
|
1397
941
|
request = request || {};
|
|
@@ -1402,54 +946,11 @@ class DataMigrationServiceClient {
|
|
|
1402
946
|
gax.routingHeader.fromParams({
|
|
1403
947
|
parent: request.parent || '',
|
|
1404
948
|
});
|
|
1405
|
-
|
|
1406
|
-
const callSettings =
|
|
949
|
+
const defaultCallSettings = this._defaults['listMigrationJobs'];
|
|
950
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1407
951
|
this.initialize();
|
|
1408
952
|
return this.descriptors.page.listMigrationJobs.asyncIterate(this.innerApiCalls['listMigrationJobs'], request, callSettings);
|
|
1409
953
|
}
|
|
1410
|
-
/**
|
|
1411
|
-
* Retrieve a list of all connection profiles in a given project and location.
|
|
1412
|
-
*
|
|
1413
|
-
* @param {Object} request
|
|
1414
|
-
* The request object that will be sent.
|
|
1415
|
-
* @param {string} request.parent
|
|
1416
|
-
* Required. The parent, which owns this collection of connection profiles.
|
|
1417
|
-
* @param {number} request.pageSize
|
|
1418
|
-
* The maximum number of connection profiles to return. The service may return
|
|
1419
|
-
* fewer than this value. If unspecified, at most 50 connection profiles will
|
|
1420
|
-
* be returned. The maximum value is 1000; values above 1000 will be coerced
|
|
1421
|
-
* to 1000.
|
|
1422
|
-
* @param {string} request.pageToken
|
|
1423
|
-
* A page token, received from a previous `ListConnectionProfiles` call.
|
|
1424
|
-
* Provide this to retrieve the subsequent page.
|
|
1425
|
-
*
|
|
1426
|
-
* When paginating, all other parameters provided to `ListConnectionProfiles`
|
|
1427
|
-
* must match the call that provided the page token.
|
|
1428
|
-
* @param {string} request.filter
|
|
1429
|
-
* A filter expression that filters connection profiles listed in the
|
|
1430
|
-
* response. The expression must specify the field name, a comparison
|
|
1431
|
-
* operator, and the value that you want to use for filtering. The value must
|
|
1432
|
-
* be a string, a number, or a boolean. The comparison operator must be either
|
|
1433
|
-
* =, !=, >, or <. For example, list connection profiles created this year by
|
|
1434
|
-
* specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
|
|
1435
|
-
* also filter nested fields. For example, you could specify **mySql.username
|
|
1436
|
-
* = %lt;my_username%gt;** to list all connection profiles configured to
|
|
1437
|
-
* connect with a specific username.
|
|
1438
|
-
* @param {string} request.orderBy
|
|
1439
|
-
* the order by fields for the result.
|
|
1440
|
-
* @param {object} [options]
|
|
1441
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1442
|
-
* @returns {Promise} - The promise which resolves to an array.
|
|
1443
|
-
* The first element of the array is Array of [ConnectionProfile]{@link google.cloud.clouddms.v1.ConnectionProfile}.
|
|
1444
|
-
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1445
|
-
* times as needed and will merge results from all the pages into this array.
|
|
1446
|
-
* Note that it can affect your quota.
|
|
1447
|
-
* We recommend using `listConnectionProfilesAsync()`
|
|
1448
|
-
* method described below for async iteration which you can stop as needed.
|
|
1449
|
-
* Please see the
|
|
1450
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1451
|
-
* for more details and examples.
|
|
1452
|
-
*/
|
|
1453
954
|
listConnectionProfiles(request, optionsOrCallback, callback) {
|
|
1454
955
|
request = request || {};
|
|
1455
956
|
let options;
|
|
@@ -1520,7 +1021,8 @@ class DataMigrationServiceClient {
|
|
|
1520
1021
|
gax.routingHeader.fromParams({
|
|
1521
1022
|
parent: request.parent || '',
|
|
1522
1023
|
});
|
|
1523
|
-
const
|
|
1024
|
+
const defaultCallSettings = this._defaults['listConnectionProfiles'];
|
|
1025
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1524
1026
|
this.initialize();
|
|
1525
1027
|
return this.descriptors.page.listConnectionProfiles.createStream(this.innerApiCalls.listConnectionProfiles, request, callSettings);
|
|
1526
1028
|
}
|
|
@@ -1565,11 +1067,8 @@ class DataMigrationServiceClient {
|
|
|
1565
1067
|
* Please see the
|
|
1566
1068
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1567
1069
|
* for more details and examples.
|
|
1568
|
-
* @example
|
|
1569
|
-
*
|
|
1570
|
-
* for await (const response of iterable) {
|
|
1571
|
-
* // process response
|
|
1572
|
-
* }
|
|
1070
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.list_connection_profiles.js</caption>
|
|
1071
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_async
|
|
1573
1072
|
*/
|
|
1574
1073
|
listConnectionProfilesAsync(request, options) {
|
|
1575
1074
|
request = request || {};
|
|
@@ -1580,8 +1079,8 @@ class DataMigrationServiceClient {
|
|
|
1580
1079
|
gax.routingHeader.fromParams({
|
|
1581
1080
|
parent: request.parent || '',
|
|
1582
1081
|
});
|
|
1583
|
-
|
|
1584
|
-
const callSettings =
|
|
1082
|
+
const defaultCallSettings = this._defaults['listConnectionProfiles'];
|
|
1083
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1585
1084
|
this.initialize();
|
|
1586
1085
|
return this.descriptors.page.listConnectionProfiles.asyncIterate(this.innerApiCalls['listConnectionProfiles'], request, callSettings);
|
|
1587
1086
|
}
|
|
@@ -1742,11 +1241,11 @@ class DataMigrationServiceClient {
|
|
|
1742
1241
|
* @returns {Promise} A promise that resolves when the client is closed.
|
|
1743
1242
|
*/
|
|
1744
1243
|
close() {
|
|
1745
|
-
this.
|
|
1746
|
-
if (!this._terminated) {
|
|
1244
|
+
if (this.dataMigrationServiceStub && !this._terminated) {
|
|
1747
1245
|
return this.dataMigrationServiceStub.then(stub => {
|
|
1748
1246
|
this._terminated = true;
|
|
1749
1247
|
stub.close();
|
|
1248
|
+
this.operationsClient.close();
|
|
1750
1249
|
});
|
|
1751
1250
|
}
|
|
1752
1251
|
return Promise.resolve();
|