@google-cloud/dms 1.0.5 → 2.1.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 +571 -93
- package/build/src/v1/data_migration_service_client.js +113 -553
- 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 +12 -12
|
@@ -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.
|
|
@@ -40,7 +40,7 @@ class DataMigrationServiceClient {
|
|
|
40
40
|
*
|
|
41
41
|
* @param {object} [options] - The configuration object.
|
|
42
42
|
* The options accepted by the constructor are described in detail
|
|
43
|
-
* in [this document](https://github.com/googleapis/gax-nodejs/blob/
|
|
43
|
+
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
|
|
44
44
|
* The common options are:
|
|
45
45
|
* @param {object} [options.credentials] - Credentials object.
|
|
46
46
|
* @param {string} [options.credentials.client_email]
|
|
@@ -63,11 +63,10 @@ class DataMigrationServiceClient {
|
|
|
63
63
|
* API remote host.
|
|
64
64
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
65
65
|
* Follows the structure of {@link gapicConfig}.
|
|
66
|
-
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* if you need to override this behavior.
|
|
66
|
+
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
|
|
67
|
+
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
|
68
|
+
* For more information, please check the
|
|
69
|
+
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
71
70
|
*/
|
|
72
71
|
constructor(opts) {
|
|
73
72
|
var _a, _b;
|
|
@@ -98,6 +97,10 @@ class DataMigrationServiceClient {
|
|
|
98
97
|
this._opts = opts;
|
|
99
98
|
// Save the auth object to the client, for use by other methods.
|
|
100
99
|
this.auth = this._gaxGrpc.auth;
|
|
100
|
+
// Set useJWTAccessWithScope on the auth object.
|
|
101
|
+
this.auth.useJWTAccessWithScope = true;
|
|
102
|
+
// Set defaultServicePath on the auth object.
|
|
103
|
+
this.auth.defaultServicePath = staticMembers.servicePath;
|
|
101
104
|
// Set the default scopes in auth client if needed.
|
|
102
105
|
if (servicePath === staticMembers.servicePath) {
|
|
103
106
|
this.auth.defaultScopes = staticMembers.scopes;
|
|
@@ -141,11 +144,73 @@ class DataMigrationServiceClient {
|
|
|
141
144
|
// This API contains "long-running operations", which return a
|
|
142
145
|
// an Operation object that allows for tracking of the operation,
|
|
143
146
|
// rather than holding a request open.
|
|
144
|
-
|
|
145
|
-
.lro({
|
|
147
|
+
const lroOptions = {
|
|
146
148
|
auth: this.auth,
|
|
147
149
|
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
|
|
148
|
-
}
|
|
150
|
+
};
|
|
151
|
+
if (opts.fallback === 'rest') {
|
|
152
|
+
lroOptions.protoJson = protoFilesRoot;
|
|
153
|
+
lroOptions.httpRules = [
|
|
154
|
+
{
|
|
155
|
+
selector: 'google.cloud.location.Locations.GetLocation',
|
|
156
|
+
get: '/v1/{name=projects/*/locations/*}',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
selector: 'google.cloud.location.Locations.ListLocations',
|
|
160
|
+
get: '/v1/{name=projects/*}/locations',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',
|
|
164
|
+
get: '/v1/{resource=projects/*/locations/*/connectionProfiles/*}:getIamPolicy',
|
|
165
|
+
additional_bindings: [
|
|
166
|
+
{
|
|
167
|
+
get: '/v1/{resource=projects/*/locations/*/migrationJobs/*}:getIamPolicy',
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',
|
|
173
|
+
post: '/v1/{resource=projects/*/locations/*/connectionProfiles/*}:setIamPolicy',
|
|
174
|
+
body: '*',
|
|
175
|
+
additional_bindings: [
|
|
176
|
+
{
|
|
177
|
+
post: '/v1/{resource=projects/*/locations/*/migrationJobs/*}:setIamPolicy',
|
|
178
|
+
body: '*',
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',
|
|
184
|
+
post: '/v1/{resource=projects/*/locations/*/migrationJobs/*}:testIamPermissions',
|
|
185
|
+
body: '*',
|
|
186
|
+
additional_bindings: [
|
|
187
|
+
{
|
|
188
|
+
post: '/v1/{resource=projects/*/locations/*/connectionProfiles/*}:testIamPermissions',
|
|
189
|
+
body: '*',
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
selector: 'google.longrunning.Operations.CancelOperation',
|
|
195
|
+
post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',
|
|
196
|
+
body: '*',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
selector: 'google.longrunning.Operations.DeleteOperation',
|
|
200
|
+
delete: '/v1/{name=projects/*/locations/*/operations/*}',
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
selector: 'google.longrunning.Operations.GetOperation',
|
|
204
|
+
get: '/v1/{name=projects/*/locations/*/operations/*}',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
selector: 'google.longrunning.Operations.ListOperations',
|
|
208
|
+
get: '/v1/{name=projects/*/locations/*}/operations',
|
|
209
|
+
},
|
|
210
|
+
];
|
|
211
|
+
}
|
|
212
|
+
this.operationsClient = this._gaxModule
|
|
213
|
+
.lro(lroOptions)
|
|
149
214
|
.operationsClient(opts);
|
|
150
215
|
const createMigrationJobResponse = protoFilesRoot.lookup('.google.cloud.clouddms.v1.MigrationJob');
|
|
151
216
|
const createMigrationJobMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
|
|
@@ -296,23 +361,6 @@ class DataMigrationServiceClient {
|
|
|
296
361
|
}
|
|
297
362
|
return this.auth.getProjectId();
|
|
298
363
|
}
|
|
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
364
|
getMigrationJob(request, optionsOrCallback, callback) {
|
|
317
365
|
request = request || {};
|
|
318
366
|
let options;
|
|
@@ -333,32 +381,6 @@ class DataMigrationServiceClient {
|
|
|
333
381
|
this.initialize();
|
|
334
382
|
return this.innerApiCalls.getMigrationJob(request, options, callback);
|
|
335
383
|
}
|
|
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
384
|
generateSshScript(request, optionsOrCallback, callback) {
|
|
363
385
|
request = request || {};
|
|
364
386
|
let options;
|
|
@@ -379,23 +401,6 @@ class DataMigrationServiceClient {
|
|
|
379
401
|
this.initialize();
|
|
380
402
|
return this.innerApiCalls.generateSshScript(request, options, callback);
|
|
381
403
|
}
|
|
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
404
|
getConnectionProfile(request, optionsOrCallback, callback) {
|
|
400
405
|
request = request || {};
|
|
401
406
|
let options;
|
|
@@ -416,40 +421,6 @@ class DataMigrationServiceClient {
|
|
|
416
421
|
this.initialize();
|
|
417
422
|
return this.innerApiCalls.getConnectionProfile(request, options, callback);
|
|
418
423
|
}
|
|
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
424
|
createMigrationJob(request, optionsOrCallback, callback) {
|
|
454
425
|
request = request || {};
|
|
455
426
|
let options;
|
|
@@ -479,11 +450,8 @@ class DataMigrationServiceClient {
|
|
|
479
450
|
* Please see the
|
|
480
451
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
481
452
|
* for more details and examples.
|
|
482
|
-
* @example
|
|
483
|
-
*
|
|
484
|
-
* console.log(decodedOperation.result);
|
|
485
|
-
* console.log(decodedOperation.done);
|
|
486
|
-
* console.log(decodedOperation.metadata);
|
|
453
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.create_migration_job.js</caption>
|
|
454
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_CreateMigrationJob_async
|
|
487
455
|
*/
|
|
488
456
|
async checkCreateMigrationJobProgress(name) {
|
|
489
457
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -491,37 +459,6 @@ class DataMigrationServiceClient {
|
|
|
491
459
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.createMigrationJob, gax.createDefaultBackoffSettings());
|
|
492
460
|
return decodeOperation;
|
|
493
461
|
}
|
|
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
462
|
updateMigrationJob(request, optionsOrCallback, callback) {
|
|
526
463
|
request = request || {};
|
|
527
464
|
let options;
|
|
@@ -551,11 +488,8 @@ class DataMigrationServiceClient {
|
|
|
551
488
|
* Please see the
|
|
552
489
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
553
490
|
* for more details and examples.
|
|
554
|
-
* @example
|
|
555
|
-
*
|
|
556
|
-
* console.log(decodedOperation.result);
|
|
557
|
-
* console.log(decodedOperation.done);
|
|
558
|
-
* console.log(decodedOperation.metadata);
|
|
491
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.update_migration_job.js</caption>
|
|
492
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_async
|
|
559
493
|
*/
|
|
560
494
|
async checkUpdateMigrationJobProgress(name) {
|
|
561
495
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -563,38 +497,6 @@ class DataMigrationServiceClient {
|
|
|
563
497
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.updateMigrationJob, gax.createDefaultBackoffSettings());
|
|
564
498
|
return decodeOperation;
|
|
565
499
|
}
|
|
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
500
|
deleteMigrationJob(request, optionsOrCallback, callback) {
|
|
599
501
|
request = request || {};
|
|
600
502
|
let options;
|
|
@@ -624,11 +526,8 @@ class DataMigrationServiceClient {
|
|
|
624
526
|
* Please see the
|
|
625
527
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
626
528
|
* for more details and examples.
|
|
627
|
-
* @example
|
|
628
|
-
*
|
|
629
|
-
* console.log(decodedOperation.result);
|
|
630
|
-
* console.log(decodedOperation.done);
|
|
631
|
-
* console.log(decodedOperation.metadata);
|
|
529
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.delete_migration_job.js</caption>
|
|
530
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_async
|
|
632
531
|
*/
|
|
633
532
|
async checkDeleteMigrationJobProgress(name) {
|
|
634
533
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -636,26 +535,6 @@ class DataMigrationServiceClient {
|
|
|
636
535
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.deleteMigrationJob, gax.createDefaultBackoffSettings());
|
|
637
536
|
return decodeOperation;
|
|
638
537
|
}
|
|
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
538
|
startMigrationJob(request, optionsOrCallback, callback) {
|
|
660
539
|
request = request || {};
|
|
661
540
|
let options;
|
|
@@ -685,11 +564,8 @@ class DataMigrationServiceClient {
|
|
|
685
564
|
* Please see the
|
|
686
565
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
687
566
|
* for more details and examples.
|
|
688
|
-
* @example
|
|
689
|
-
*
|
|
690
|
-
* console.log(decodedOperation.result);
|
|
691
|
-
* console.log(decodedOperation.done);
|
|
692
|
-
* console.log(decodedOperation.metadata);
|
|
567
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.start_migration_job.js</caption>
|
|
568
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_StartMigrationJob_async
|
|
693
569
|
*/
|
|
694
570
|
async checkStartMigrationJobProgress(name) {
|
|
695
571
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -697,26 +573,6 @@ class DataMigrationServiceClient {
|
|
|
697
573
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.startMigrationJob, gax.createDefaultBackoffSettings());
|
|
698
574
|
return decodeOperation;
|
|
699
575
|
}
|
|
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
576
|
stopMigrationJob(request, optionsOrCallback, callback) {
|
|
721
577
|
request = request || {};
|
|
722
578
|
let options;
|
|
@@ -746,11 +602,8 @@ class DataMigrationServiceClient {
|
|
|
746
602
|
* Please see the
|
|
747
603
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
748
604
|
* for more details and examples.
|
|
749
|
-
* @example
|
|
750
|
-
*
|
|
751
|
-
* console.log(decodedOperation.result);
|
|
752
|
-
* console.log(decodedOperation.done);
|
|
753
|
-
* console.log(decodedOperation.metadata);
|
|
605
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.stop_migration_job.js</caption>
|
|
606
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_StopMigrationJob_async
|
|
754
607
|
*/
|
|
755
608
|
async checkStopMigrationJobProgress(name) {
|
|
756
609
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -758,27 +611,6 @@ class DataMigrationServiceClient {
|
|
|
758
611
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.stopMigrationJob, gax.createDefaultBackoffSettings());
|
|
759
612
|
return decodeOperation;
|
|
760
613
|
}
|
|
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
614
|
resumeMigrationJob(request, optionsOrCallback, callback) {
|
|
783
615
|
request = request || {};
|
|
784
616
|
let options;
|
|
@@ -808,11 +640,8 @@ class DataMigrationServiceClient {
|
|
|
808
640
|
* Please see the
|
|
809
641
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
810
642
|
* for more details and examples.
|
|
811
|
-
* @example
|
|
812
|
-
*
|
|
813
|
-
* console.log(decodedOperation.result);
|
|
814
|
-
* console.log(decodedOperation.done);
|
|
815
|
-
* console.log(decodedOperation.metadata);
|
|
643
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.resume_migration_job.js</caption>
|
|
644
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_async
|
|
816
645
|
*/
|
|
817
646
|
async checkResumeMigrationJobProgress(name) {
|
|
818
647
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -820,27 +649,6 @@ class DataMigrationServiceClient {
|
|
|
820
649
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.resumeMigrationJob, gax.createDefaultBackoffSettings());
|
|
821
650
|
return decodeOperation;
|
|
822
651
|
}
|
|
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
652
|
promoteMigrationJob(request, optionsOrCallback, callback) {
|
|
845
653
|
request = request || {};
|
|
846
654
|
let options;
|
|
@@ -870,11 +678,8 @@ class DataMigrationServiceClient {
|
|
|
870
678
|
* Please see the
|
|
871
679
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
872
680
|
* for more details and examples.
|
|
873
|
-
* @example
|
|
874
|
-
*
|
|
875
|
-
* console.log(decodedOperation.result);
|
|
876
|
-
* console.log(decodedOperation.done);
|
|
877
|
-
* console.log(decodedOperation.metadata);
|
|
681
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.promote_migration_job.js</caption>
|
|
682
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_async
|
|
878
683
|
*/
|
|
879
684
|
async checkPromoteMigrationJobProgress(name) {
|
|
880
685
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -882,27 +687,6 @@ class DataMigrationServiceClient {
|
|
|
882
687
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.promoteMigrationJob, gax.createDefaultBackoffSettings());
|
|
883
688
|
return decodeOperation;
|
|
884
689
|
}
|
|
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
690
|
verifyMigrationJob(request, optionsOrCallback, callback) {
|
|
907
691
|
request = request || {};
|
|
908
692
|
let options;
|
|
@@ -932,11 +716,8 @@ class DataMigrationServiceClient {
|
|
|
932
716
|
* Please see the
|
|
933
717
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
934
718
|
* for more details and examples.
|
|
935
|
-
* @example
|
|
936
|
-
*
|
|
937
|
-
* console.log(decodedOperation.result);
|
|
938
|
-
* console.log(decodedOperation.done);
|
|
939
|
-
* console.log(decodedOperation.metadata);
|
|
719
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.verify_migration_job.js</caption>
|
|
720
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_async
|
|
940
721
|
*/
|
|
941
722
|
async checkVerifyMigrationJobProgress(name) {
|
|
942
723
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -944,28 +725,6 @@ class DataMigrationServiceClient {
|
|
|
944
725
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.verifyMigrationJob, gax.createDefaultBackoffSettings());
|
|
945
726
|
return decodeOperation;
|
|
946
727
|
}
|
|
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
728
|
restartMigrationJob(request, optionsOrCallback, callback) {
|
|
970
729
|
request = request || {};
|
|
971
730
|
let options;
|
|
@@ -995,11 +754,8 @@ class DataMigrationServiceClient {
|
|
|
995
754
|
* Please see the
|
|
996
755
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
997
756
|
* for more details and examples.
|
|
998
|
-
* @example
|
|
999
|
-
*
|
|
1000
|
-
* console.log(decodedOperation.result);
|
|
1001
|
-
* console.log(decodedOperation.done);
|
|
1002
|
-
* console.log(decodedOperation.metadata);
|
|
757
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.restart_migration_job.js</caption>
|
|
758
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_RestartMigrationJob_async
|
|
1003
759
|
*/
|
|
1004
760
|
async checkRestartMigrationJobProgress(name) {
|
|
1005
761
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -1007,38 +763,6 @@ class DataMigrationServiceClient {
|
|
|
1007
763
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.restartMigrationJob, gax.createDefaultBackoffSettings());
|
|
1008
764
|
return decodeOperation;
|
|
1009
765
|
}
|
|
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
766
|
createConnectionProfile(request, optionsOrCallback, callback) {
|
|
1043
767
|
request = request || {};
|
|
1044
768
|
let options;
|
|
@@ -1068,11 +792,8 @@ class DataMigrationServiceClient {
|
|
|
1068
792
|
* Please see the
|
|
1069
793
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
1070
794
|
* for more details and examples.
|
|
1071
|
-
* @example
|
|
1072
|
-
*
|
|
1073
|
-
* console.log(decodedOperation.result);
|
|
1074
|
-
* console.log(decodedOperation.done);
|
|
1075
|
-
* console.log(decodedOperation.metadata);
|
|
795
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.create_connection_profile.js</caption>
|
|
796
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_async
|
|
1076
797
|
*/
|
|
1077
798
|
async checkCreateConnectionProfileProgress(name) {
|
|
1078
799
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -1080,37 +801,6 @@ class DataMigrationServiceClient {
|
|
|
1080
801
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.createConnectionProfile, gax.createDefaultBackoffSettings());
|
|
1081
802
|
return decodeOperation;
|
|
1082
803
|
}
|
|
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
804
|
updateConnectionProfile(request, optionsOrCallback, callback) {
|
|
1115
805
|
request = request || {};
|
|
1116
806
|
let options;
|
|
@@ -1140,11 +830,8 @@ class DataMigrationServiceClient {
|
|
|
1140
830
|
* Please see the
|
|
1141
831
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
1142
832
|
* for more details and examples.
|
|
1143
|
-
* @example
|
|
1144
|
-
*
|
|
1145
|
-
* console.log(decodedOperation.result);
|
|
1146
|
-
* console.log(decodedOperation.done);
|
|
1147
|
-
* console.log(decodedOperation.metadata);
|
|
833
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.update_connection_profile.js</caption>
|
|
834
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_async
|
|
1148
835
|
*/
|
|
1149
836
|
async checkUpdateConnectionProfileProgress(name) {
|
|
1150
837
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -1152,39 +839,6 @@ class DataMigrationServiceClient {
|
|
|
1152
839
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.updateConnectionProfile, gax.createDefaultBackoffSettings());
|
|
1153
840
|
return decodeOperation;
|
|
1154
841
|
}
|
|
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
842
|
deleteConnectionProfile(request, optionsOrCallback, callback) {
|
|
1189
843
|
request = request || {};
|
|
1190
844
|
let options;
|
|
@@ -1214,11 +868,8 @@ class DataMigrationServiceClient {
|
|
|
1214
868
|
* Please see the
|
|
1215
869
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
1216
870
|
* for more details and examples.
|
|
1217
|
-
* @example
|
|
1218
|
-
*
|
|
1219
|
-
* console.log(decodedOperation.result);
|
|
1220
|
-
* console.log(decodedOperation.done);
|
|
1221
|
-
* console.log(decodedOperation.metadata);
|
|
871
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.delete_connection_profile.js</caption>
|
|
872
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_async
|
|
1222
873
|
*/
|
|
1223
874
|
async checkDeleteConnectionProfileProgress(name) {
|
|
1224
875
|
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
@@ -1226,50 +877,6 @@ class DataMigrationServiceClient {
|
|
|
1226
877
|
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.deleteConnectionProfile, gax.createDefaultBackoffSettings());
|
|
1227
878
|
return decodeOperation;
|
|
1228
879
|
}
|
|
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
880
|
listMigrationJobs(request, optionsOrCallback, callback) {
|
|
1274
881
|
request = request || {};
|
|
1275
882
|
let options;
|
|
@@ -1341,7 +948,8 @@ class DataMigrationServiceClient {
|
|
|
1341
948
|
gax.routingHeader.fromParams({
|
|
1342
949
|
parent: request.parent || '',
|
|
1343
950
|
});
|
|
1344
|
-
const
|
|
951
|
+
const defaultCallSettings = this._defaults['listMigrationJobs'];
|
|
952
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1345
953
|
this.initialize();
|
|
1346
954
|
return this.descriptors.page.listMigrationJobs.createStream(this.innerApiCalls.listMigrationJobs, request, callSettings);
|
|
1347
955
|
}
|
|
@@ -1387,11 +995,8 @@ class DataMigrationServiceClient {
|
|
|
1387
995
|
* Please see the
|
|
1388
996
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1389
997
|
* for more details and examples.
|
|
1390
|
-
* @example
|
|
1391
|
-
*
|
|
1392
|
-
* for await (const response of iterable) {
|
|
1393
|
-
* // process response
|
|
1394
|
-
* }
|
|
998
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.list_migration_jobs.js</caption>
|
|
999
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_ListMigrationJobs_async
|
|
1395
1000
|
*/
|
|
1396
1001
|
listMigrationJobsAsync(request, options) {
|
|
1397
1002
|
request = request || {};
|
|
@@ -1402,54 +1007,11 @@ class DataMigrationServiceClient {
|
|
|
1402
1007
|
gax.routingHeader.fromParams({
|
|
1403
1008
|
parent: request.parent || '',
|
|
1404
1009
|
});
|
|
1405
|
-
|
|
1406
|
-
const callSettings =
|
|
1010
|
+
const defaultCallSettings = this._defaults['listMigrationJobs'];
|
|
1011
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1407
1012
|
this.initialize();
|
|
1408
1013
|
return this.descriptors.page.listMigrationJobs.asyncIterate(this.innerApiCalls['listMigrationJobs'], request, callSettings);
|
|
1409
1014
|
}
|
|
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
1015
|
listConnectionProfiles(request, optionsOrCallback, callback) {
|
|
1454
1016
|
request = request || {};
|
|
1455
1017
|
let options;
|
|
@@ -1520,7 +1082,8 @@ class DataMigrationServiceClient {
|
|
|
1520
1082
|
gax.routingHeader.fromParams({
|
|
1521
1083
|
parent: request.parent || '',
|
|
1522
1084
|
});
|
|
1523
|
-
const
|
|
1085
|
+
const defaultCallSettings = this._defaults['listConnectionProfiles'];
|
|
1086
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1524
1087
|
this.initialize();
|
|
1525
1088
|
return this.descriptors.page.listConnectionProfiles.createStream(this.innerApiCalls.listConnectionProfiles, request, callSettings);
|
|
1526
1089
|
}
|
|
@@ -1565,11 +1128,8 @@ class DataMigrationServiceClient {
|
|
|
1565
1128
|
* Please see the
|
|
1566
1129
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
1567
1130
|
* for more details and examples.
|
|
1568
|
-
* @example
|
|
1569
|
-
*
|
|
1570
|
-
* for await (const response of iterable) {
|
|
1571
|
-
* // process response
|
|
1572
|
-
* }
|
|
1131
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.list_connection_profiles.js</caption>
|
|
1132
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_async
|
|
1573
1133
|
*/
|
|
1574
1134
|
listConnectionProfilesAsync(request, options) {
|
|
1575
1135
|
request = request || {};
|
|
@@ -1580,8 +1140,8 @@ class DataMigrationServiceClient {
|
|
|
1580
1140
|
gax.routingHeader.fromParams({
|
|
1581
1141
|
parent: request.parent || '',
|
|
1582
1142
|
});
|
|
1583
|
-
|
|
1584
|
-
const callSettings =
|
|
1143
|
+
const defaultCallSettings = this._defaults['listConnectionProfiles'];
|
|
1144
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
1585
1145
|
this.initialize();
|
|
1586
1146
|
return this.descriptors.page.listConnectionProfiles.asyncIterate(this.innerApiCalls['listConnectionProfiles'], request, callSettings);
|
|
1587
1147
|
}
|
|
@@ -1742,11 +1302,11 @@ class DataMigrationServiceClient {
|
|
|
1742
1302
|
* @returns {Promise} A promise that resolves when the client is closed.
|
|
1743
1303
|
*/
|
|
1744
1304
|
close() {
|
|
1745
|
-
this.
|
|
1746
|
-
if (!this._terminated) {
|
|
1305
|
+
if (this.dataMigrationServiceStub && !this._terminated) {
|
|
1747
1306
|
return this.dataMigrationServiceStub.then(stub => {
|
|
1748
1307
|
this._terminated = true;
|
|
1749
1308
|
stub.close();
|
|
1309
|
+
this.operationsClient.close();
|
|
1750
1310
|
});
|
|
1751
1311
|
}
|
|
1752
1312
|
return Promise.resolve();
|