@google-cloud/dms 3.0.0 → 3.2.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 +19 -0
- package/README.md +6 -1
- package/build/protos/google/cloud/clouddms/v1/clouddms.proto +285 -44
- package/build/protos/google/cloud/clouddms/v1/clouddms_resources.proto +63 -2
- package/build/protos/google/cloud/clouddms/v1/conversionworkspace_resources.proto +791 -31
- package/build/protos/protos.d.ts +4613 -215
- package/build/protos/protos.js +24184 -12469
- package/build/protos/protos.json +1587 -128
- package/build/src/index.js +1 -1
- package/build/src/v1/data_migration_service_client.d.ts +383 -63
- package/build/src/v1/data_migration_service_client.js +335 -41
- package/build/src/v1/data_migration_service_client_config.json +37 -0
- package/build/src/v1/index.js +1 -1
- package/package.json +8 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 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.
|
|
@@ -60,8 +60,7 @@ class DataMigrationServiceClient {
|
|
|
60
60
|
* API remote host.
|
|
61
61
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
62
62
|
* Follows the structure of {@link gapicConfig}.
|
|
63
|
-
* @param {boolean
|
|
64
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
|
63
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
|
65
64
|
* For more information, please check the
|
|
66
65
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
67
66
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
|
@@ -69,11 +68,11 @@ class DataMigrationServiceClient {
|
|
|
69
68
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
|
70
69
|
* ```
|
|
71
70
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
|
72
|
-
* const client = new DataMigrationServiceClient({fallback:
|
|
71
|
+
* const client = new DataMigrationServiceClient({fallback: true}, gax);
|
|
73
72
|
* ```
|
|
74
73
|
*/
|
|
75
74
|
constructor(opts, gaxInstance) {
|
|
76
|
-
var _a, _b;
|
|
75
|
+
var _a, _b, _c, _d;
|
|
77
76
|
this._terminated = false;
|
|
78
77
|
this.descriptors = {
|
|
79
78
|
page: {},
|
|
@@ -83,16 +82,24 @@ class DataMigrationServiceClient {
|
|
|
83
82
|
};
|
|
84
83
|
// Ensure that options include all the required fields.
|
|
85
84
|
const staticMembers = this.constructor;
|
|
86
|
-
|
|
85
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
|
|
86
|
+
(opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
|
|
87
|
+
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
|
88
|
+
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
89
|
+
}
|
|
90
|
+
this._universeDomain =
|
|
91
|
+
(_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
|
|
92
|
+
this._servicePath = 'datamigration.' + this._universeDomain;
|
|
93
|
+
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
|
87
94
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
|
88
95
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
|
89
|
-
const clientConfig = (
|
|
90
|
-
const fallback = (
|
|
96
|
+
const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
|
|
97
|
+
const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
|
|
91
98
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
92
99
|
// Request numeric enum values if REST transport is used.
|
|
93
100
|
opts.numericEnums = true;
|
|
94
101
|
// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
|
|
95
|
-
if (servicePath !==
|
|
102
|
+
if (servicePath !== this._servicePath && !('scopes' in opts)) {
|
|
96
103
|
opts['scopes'] = staticMembers.scopes;
|
|
97
104
|
}
|
|
98
105
|
// Load google-gax module synchronously if needed
|
|
@@ -110,9 +117,9 @@ class DataMigrationServiceClient {
|
|
|
110
117
|
// Set useJWTAccessWithScope on the auth object.
|
|
111
118
|
this.auth.useJWTAccessWithScope = true;
|
|
112
119
|
// Set defaultServicePath on the auth object.
|
|
113
|
-
this.auth.defaultServicePath =
|
|
120
|
+
this.auth.defaultServicePath = this._servicePath;
|
|
114
121
|
// Set the default scopes in auth client if needed.
|
|
115
|
-
if (servicePath ===
|
|
122
|
+
if (servicePath === this._servicePath) {
|
|
116
123
|
this.auth.defaultScopes = staticMembers.scopes;
|
|
117
124
|
}
|
|
118
125
|
this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts);
|
|
@@ -128,7 +135,7 @@ class DataMigrationServiceClient {
|
|
|
128
135
|
if (!opts.fallback) {
|
|
129
136
|
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
|
|
130
137
|
}
|
|
131
|
-
else
|
|
138
|
+
else {
|
|
132
139
|
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
|
|
133
140
|
}
|
|
134
141
|
if (opts.libName && opts.libVersion) {
|
|
@@ -143,6 +150,7 @@ class DataMigrationServiceClient {
|
|
|
143
150
|
connectionProfilePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/connectionProfiles/{connection_profile}'),
|
|
144
151
|
conversionWorkspacePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}'),
|
|
145
152
|
locationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}'),
|
|
153
|
+
mappingRulePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}/mappingRules/{mapping_rule}'),
|
|
146
154
|
migrationJobPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/migrationJobs/{migration_job}'),
|
|
147
155
|
privateConnectionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/privateConnections/{private_connection}'),
|
|
148
156
|
projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
|
|
@@ -155,6 +163,7 @@ class DataMigrationServiceClient {
|
|
|
155
163
|
listConnectionProfiles: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'connectionProfiles'),
|
|
156
164
|
listPrivateConnections: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'privateConnections'),
|
|
157
165
|
listConversionWorkspaces: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'conversionWorkspaces'),
|
|
166
|
+
listMappingRules: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'mappingRules'),
|
|
158
167
|
describeDatabaseEntities: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'databaseEntities'),
|
|
159
168
|
fetchStaticIps: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'staticIps'),
|
|
160
169
|
};
|
|
@@ -166,7 +175,7 @@ class DataMigrationServiceClient {
|
|
|
166
175
|
auth: this.auth,
|
|
167
176
|
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
|
|
168
177
|
};
|
|
169
|
-
if (opts.fallback
|
|
178
|
+
if (opts.fallback) {
|
|
170
179
|
lroOptions.protoJson = protoFilesRoot;
|
|
171
180
|
lroOptions.httpRules = [
|
|
172
181
|
{
|
|
@@ -369,6 +378,7 @@ class DataMigrationServiceClient {
|
|
|
369
378
|
'verifyMigrationJob',
|
|
370
379
|
'restartMigrationJob',
|
|
371
380
|
'generateSshScript',
|
|
381
|
+
'generateTcpProxyScript',
|
|
372
382
|
'listConnectionProfiles',
|
|
373
383
|
'getConnectionProfile',
|
|
374
384
|
'createConnectionProfile',
|
|
@@ -383,6 +393,10 @@ class DataMigrationServiceClient {
|
|
|
383
393
|
'createConversionWorkspace',
|
|
384
394
|
'updateConversionWorkspace',
|
|
385
395
|
'deleteConversionWorkspace',
|
|
396
|
+
'createMappingRule',
|
|
397
|
+
'deleteMappingRule',
|
|
398
|
+
'listMappingRules',
|
|
399
|
+
'getMappingRule',
|
|
386
400
|
'seedConversionWorkspace',
|
|
387
401
|
'importMappingRules',
|
|
388
402
|
'convertConversionWorkspace',
|
|
@@ -414,19 +428,38 @@ class DataMigrationServiceClient {
|
|
|
414
428
|
}
|
|
415
429
|
/**
|
|
416
430
|
* The DNS address for this API service.
|
|
431
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
417
432
|
* @returns {string} The DNS address for this service.
|
|
418
433
|
*/
|
|
419
434
|
static get servicePath() {
|
|
435
|
+
if (typeof process !== undefined &&
|
|
436
|
+
typeof process.emitWarning === 'function') {
|
|
437
|
+
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
438
|
+
}
|
|
420
439
|
return 'datamigration.googleapis.com';
|
|
421
440
|
}
|
|
422
441
|
/**
|
|
423
|
-
* The DNS address for this API service - same as servicePath
|
|
424
|
-
*
|
|
442
|
+
* The DNS address for this API service - same as servicePath.
|
|
443
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
425
444
|
* @returns {string} The DNS address for this service.
|
|
426
445
|
*/
|
|
427
446
|
static get apiEndpoint() {
|
|
447
|
+
if (typeof process !== undefined &&
|
|
448
|
+
typeof process.emitWarning === 'function') {
|
|
449
|
+
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
450
|
+
}
|
|
428
451
|
return 'datamigration.googleapis.com';
|
|
429
452
|
}
|
|
453
|
+
/**
|
|
454
|
+
* The DNS address for this API service.
|
|
455
|
+
* @returns {string} The DNS address for this service.
|
|
456
|
+
*/
|
|
457
|
+
get apiEndpoint() {
|
|
458
|
+
return this._servicePath;
|
|
459
|
+
}
|
|
460
|
+
get universeDomain() {
|
|
461
|
+
return this._universeDomain;
|
|
462
|
+
}
|
|
430
463
|
/**
|
|
431
464
|
* The port for this API service.
|
|
432
465
|
* @returns {number} The default port for this service.
|
|
@@ -495,6 +528,27 @@ class DataMigrationServiceClient {
|
|
|
495
528
|
this.initialize();
|
|
496
529
|
return this.innerApiCalls.generateSshScript(request, options, callback);
|
|
497
530
|
}
|
|
531
|
+
generateTcpProxyScript(request, optionsOrCallback, callback) {
|
|
532
|
+
var _a;
|
|
533
|
+
request = request || {};
|
|
534
|
+
let options;
|
|
535
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
536
|
+
callback = optionsOrCallback;
|
|
537
|
+
options = {};
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
options = optionsOrCallback;
|
|
541
|
+
}
|
|
542
|
+
options = options || {};
|
|
543
|
+
options.otherArgs = options.otherArgs || {};
|
|
544
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
545
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
546
|
+
this._gaxModule.routingHeader.fromParams({
|
|
547
|
+
migration_job: (_a = request.migrationJob) !== null && _a !== void 0 ? _a : '',
|
|
548
|
+
});
|
|
549
|
+
this.initialize();
|
|
550
|
+
return this.innerApiCalls.generateTcpProxyScript(request, options, callback);
|
|
551
|
+
}
|
|
498
552
|
getConnectionProfile(request, optionsOrCallback, callback) {
|
|
499
553
|
var _a;
|
|
500
554
|
request = request || {};
|
|
@@ -558,6 +612,69 @@ class DataMigrationServiceClient {
|
|
|
558
612
|
this.initialize();
|
|
559
613
|
return this.innerApiCalls.getConversionWorkspace(request, options, callback);
|
|
560
614
|
}
|
|
615
|
+
createMappingRule(request, optionsOrCallback, callback) {
|
|
616
|
+
var _a;
|
|
617
|
+
request = request || {};
|
|
618
|
+
let options;
|
|
619
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
620
|
+
callback = optionsOrCallback;
|
|
621
|
+
options = {};
|
|
622
|
+
}
|
|
623
|
+
else {
|
|
624
|
+
options = optionsOrCallback;
|
|
625
|
+
}
|
|
626
|
+
options = options || {};
|
|
627
|
+
options.otherArgs = options.otherArgs || {};
|
|
628
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
629
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
630
|
+
this._gaxModule.routingHeader.fromParams({
|
|
631
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
632
|
+
});
|
|
633
|
+
this.initialize();
|
|
634
|
+
return this.innerApiCalls.createMappingRule(request, options, callback);
|
|
635
|
+
}
|
|
636
|
+
deleteMappingRule(request, optionsOrCallback, callback) {
|
|
637
|
+
var _a;
|
|
638
|
+
request = request || {};
|
|
639
|
+
let options;
|
|
640
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
641
|
+
callback = optionsOrCallback;
|
|
642
|
+
options = {};
|
|
643
|
+
}
|
|
644
|
+
else {
|
|
645
|
+
options = optionsOrCallback;
|
|
646
|
+
}
|
|
647
|
+
options = options || {};
|
|
648
|
+
options.otherArgs = options.otherArgs || {};
|
|
649
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
650
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
651
|
+
this._gaxModule.routingHeader.fromParams({
|
|
652
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
653
|
+
});
|
|
654
|
+
this.initialize();
|
|
655
|
+
return this.innerApiCalls.deleteMappingRule(request, options, callback);
|
|
656
|
+
}
|
|
657
|
+
getMappingRule(request, optionsOrCallback, callback) {
|
|
658
|
+
var _a;
|
|
659
|
+
request = request || {};
|
|
660
|
+
let options;
|
|
661
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
662
|
+
callback = optionsOrCallback;
|
|
663
|
+
options = {};
|
|
664
|
+
}
|
|
665
|
+
else {
|
|
666
|
+
options = optionsOrCallback;
|
|
667
|
+
}
|
|
668
|
+
options = options || {};
|
|
669
|
+
options.otherArgs = options.otherArgs || {};
|
|
670
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
671
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
672
|
+
this._gaxModule.routingHeader.fromParams({
|
|
673
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
674
|
+
});
|
|
675
|
+
this.initialize();
|
|
676
|
+
return this.innerApiCalls.getMappingRule(request, options, callback);
|
|
677
|
+
}
|
|
561
678
|
searchBackgroundJobs(request, optionsOrCallback, callback) {
|
|
562
679
|
var _a;
|
|
563
680
|
request = request || {};
|
|
@@ -1998,6 +2115,116 @@ class DataMigrationServiceClient {
|
|
|
1998
2115
|
this.initialize();
|
|
1999
2116
|
return this.descriptors.page.listConversionWorkspaces.asyncIterate(this.innerApiCalls['listConversionWorkspaces'], request, callSettings);
|
|
2000
2117
|
}
|
|
2118
|
+
listMappingRules(request, optionsOrCallback, callback) {
|
|
2119
|
+
var _a;
|
|
2120
|
+
request = request || {};
|
|
2121
|
+
let options;
|
|
2122
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2123
|
+
callback = optionsOrCallback;
|
|
2124
|
+
options = {};
|
|
2125
|
+
}
|
|
2126
|
+
else {
|
|
2127
|
+
options = optionsOrCallback;
|
|
2128
|
+
}
|
|
2129
|
+
options = options || {};
|
|
2130
|
+
options.otherArgs = options.otherArgs || {};
|
|
2131
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2132
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2133
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2134
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
2135
|
+
});
|
|
2136
|
+
this.initialize();
|
|
2137
|
+
return this.innerApiCalls.listMappingRules(request, options, callback);
|
|
2138
|
+
}
|
|
2139
|
+
/**
|
|
2140
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
2141
|
+
* @param {Object} request
|
|
2142
|
+
* The request object that will be sent.
|
|
2143
|
+
* @param {string} request.parent
|
|
2144
|
+
* Required. Name of the conversion workspace resource whose mapping rules are
|
|
2145
|
+
* listed in the form of:
|
|
2146
|
+
* projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
|
|
2147
|
+
* @param {number} request.pageSize
|
|
2148
|
+
* The maximum number of rules to return. The service may return
|
|
2149
|
+
* fewer than this value.
|
|
2150
|
+
* @param {string} request.pageToken
|
|
2151
|
+
* The nextPageToken value received in the previous call to
|
|
2152
|
+
* mappingRules.list, used in the subsequent request to retrieve the next
|
|
2153
|
+
* page of results. On first call this should be left blank. When paginating,
|
|
2154
|
+
* all other parameters provided to mappingRules.list must match the call
|
|
2155
|
+
* that provided the page token.
|
|
2156
|
+
* @param {object} [options]
|
|
2157
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2158
|
+
* @returns {Stream}
|
|
2159
|
+
* An object stream which emits an object representing {@link protos.google.cloud.clouddms.v1.MappingRule|MappingRule} on 'data' event.
|
|
2160
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2161
|
+
* times as needed. Note that it can affect your quota.
|
|
2162
|
+
* We recommend using `listMappingRulesAsync()`
|
|
2163
|
+
* method described below for async iteration which you can stop as needed.
|
|
2164
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2165
|
+
* for more details and examples.
|
|
2166
|
+
*/
|
|
2167
|
+
listMappingRulesStream(request, options) {
|
|
2168
|
+
var _a;
|
|
2169
|
+
request = request || {};
|
|
2170
|
+
options = options || {};
|
|
2171
|
+
options.otherArgs = options.otherArgs || {};
|
|
2172
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2173
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2174
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2175
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
2176
|
+
});
|
|
2177
|
+
const defaultCallSettings = this._defaults['listMappingRules'];
|
|
2178
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
2179
|
+
this.initialize();
|
|
2180
|
+
return this.descriptors.page.listMappingRules.createStream(this.innerApiCalls.listMappingRules, request, callSettings);
|
|
2181
|
+
}
|
|
2182
|
+
/**
|
|
2183
|
+
* Equivalent to `listMappingRules`, but returns an iterable object.
|
|
2184
|
+
*
|
|
2185
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
2186
|
+
* @param {Object} request
|
|
2187
|
+
* The request object that will be sent.
|
|
2188
|
+
* @param {string} request.parent
|
|
2189
|
+
* Required. Name of the conversion workspace resource whose mapping rules are
|
|
2190
|
+
* listed in the form of:
|
|
2191
|
+
* projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
|
|
2192
|
+
* @param {number} request.pageSize
|
|
2193
|
+
* The maximum number of rules to return. The service may return
|
|
2194
|
+
* fewer than this value.
|
|
2195
|
+
* @param {string} request.pageToken
|
|
2196
|
+
* The nextPageToken value received in the previous call to
|
|
2197
|
+
* mappingRules.list, used in the subsequent request to retrieve the next
|
|
2198
|
+
* page of results. On first call this should be left blank. When paginating,
|
|
2199
|
+
* all other parameters provided to mappingRules.list must match the call
|
|
2200
|
+
* that provided the page token.
|
|
2201
|
+
* @param {object} [options]
|
|
2202
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2203
|
+
* @returns {Object}
|
|
2204
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
2205
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
2206
|
+
* {@link protos.google.cloud.clouddms.v1.MappingRule|MappingRule}. The API will be called under the hood as needed, once per the page,
|
|
2207
|
+
* so you can stop the iteration when you don't need more results.
|
|
2208
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2209
|
+
* for more details and examples.
|
|
2210
|
+
* @example <caption>include:samples/generated/v1/data_migration_service.list_mapping_rules.js</caption>
|
|
2211
|
+
* region_tag:datamigration_v1_generated_DataMigrationService_ListMappingRules_async
|
|
2212
|
+
*/
|
|
2213
|
+
listMappingRulesAsync(request, options) {
|
|
2214
|
+
var _a;
|
|
2215
|
+
request = request || {};
|
|
2216
|
+
options = options || {};
|
|
2217
|
+
options.otherArgs = options.otherArgs || {};
|
|
2218
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2219
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2220
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2221
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
|
2222
|
+
});
|
|
2223
|
+
const defaultCallSettings = this._defaults['listMappingRules'];
|
|
2224
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
2225
|
+
this.initialize();
|
|
2226
|
+
return this.descriptors.page.listMappingRules.asyncIterate(this.innerApiCalls['listMappingRules'], request, callSettings);
|
|
2227
|
+
}
|
|
2001
2228
|
describeDatabaseEntities(request, optionsOrCallback, callback) {
|
|
2002
2229
|
var _a;
|
|
2003
2230
|
request = request || {};
|
|
@@ -2027,26 +2254,29 @@ class DataMigrationServiceClient {
|
|
|
2027
2254
|
* Required. Name of the conversion workspace resource whose database entities
|
|
2028
2255
|
* are described. Must be in the form of:
|
|
2029
2256
|
* projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
|
|
2030
|
-
* @param {number} request.pageSize
|
|
2031
|
-
* The maximum number of entities to return. The service may return
|
|
2257
|
+
* @param {number} [request.pageSize]
|
|
2258
|
+
* Optional. The maximum number of entities to return. The service may return
|
|
2032
2259
|
* fewer entities than the value specifies.
|
|
2033
|
-
* @param {string} request.pageToken
|
|
2034
|
-
* The nextPageToken value received in the previous call to
|
|
2260
|
+
* @param {string} [request.pageToken]
|
|
2261
|
+
* Optional. The nextPageToken value received in the previous call to
|
|
2035
2262
|
* conversionWorkspace.describeDatabaseEntities, used in the subsequent
|
|
2036
2263
|
* request to retrieve the next page of results. On first call this should be
|
|
2037
2264
|
* left blank. When paginating, all other parameters provided to
|
|
2038
2265
|
* conversionWorkspace.describeDatabaseEntities must match the call that
|
|
2039
2266
|
* provided the page token.
|
|
2040
2267
|
* @param {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType} request.tree
|
|
2041
|
-
* The tree to fetch.
|
|
2042
|
-
* @param {boolean} request.uncommitted
|
|
2043
|
-
* Whether to retrieve the latest committed version of the entities
|
|
2044
|
-
* latest version. This field is ignored if a specific commit_id is
|
|
2045
|
-
*
|
|
2046
|
-
*
|
|
2047
|
-
*
|
|
2048
|
-
*
|
|
2049
|
-
*
|
|
2268
|
+
* Required. The tree to fetch.
|
|
2269
|
+
* @param {boolean} [request.uncommitted]
|
|
2270
|
+
* Optional. Whether to retrieve the latest committed version of the entities
|
|
2271
|
+
* or the latest version. This field is ignored if a specific commit_id is
|
|
2272
|
+
* specified.
|
|
2273
|
+
* @param {string} [request.commitId]
|
|
2274
|
+
* Optional. Request a specific commit ID. If not specified, the entities from
|
|
2275
|
+
* the latest commit are returned.
|
|
2276
|
+
* @param {string} [request.filter]
|
|
2277
|
+
* Optional. Filter the returned entities based on AIP-160 standard.
|
|
2278
|
+
* @param {google.cloud.clouddms.v1.DatabaseEntityView} [request.view]
|
|
2279
|
+
* Optional. Results view based on AIP-157
|
|
2050
2280
|
* @param {object} [options]
|
|
2051
2281
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2052
2282
|
* @returns {Stream}
|
|
@@ -2083,26 +2313,29 @@ class DataMigrationServiceClient {
|
|
|
2083
2313
|
* Required. Name of the conversion workspace resource whose database entities
|
|
2084
2314
|
* are described. Must be in the form of:
|
|
2085
2315
|
* projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
|
|
2086
|
-
* @param {number} request.pageSize
|
|
2087
|
-
* The maximum number of entities to return. The service may return
|
|
2316
|
+
* @param {number} [request.pageSize]
|
|
2317
|
+
* Optional. The maximum number of entities to return. The service may return
|
|
2088
2318
|
* fewer entities than the value specifies.
|
|
2089
|
-
* @param {string} request.pageToken
|
|
2090
|
-
* The nextPageToken value received in the previous call to
|
|
2319
|
+
* @param {string} [request.pageToken]
|
|
2320
|
+
* Optional. The nextPageToken value received in the previous call to
|
|
2091
2321
|
* conversionWorkspace.describeDatabaseEntities, used in the subsequent
|
|
2092
2322
|
* request to retrieve the next page of results. On first call this should be
|
|
2093
2323
|
* left blank. When paginating, all other parameters provided to
|
|
2094
2324
|
* conversionWorkspace.describeDatabaseEntities must match the call that
|
|
2095
2325
|
* provided the page token.
|
|
2096
2326
|
* @param {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType} request.tree
|
|
2097
|
-
* The tree to fetch.
|
|
2098
|
-
* @param {boolean} request.uncommitted
|
|
2099
|
-
* Whether to retrieve the latest committed version of the entities
|
|
2100
|
-
* latest version. This field is ignored if a specific commit_id is
|
|
2101
|
-
*
|
|
2102
|
-
*
|
|
2103
|
-
*
|
|
2104
|
-
*
|
|
2105
|
-
*
|
|
2327
|
+
* Required. The tree to fetch.
|
|
2328
|
+
* @param {boolean} [request.uncommitted]
|
|
2329
|
+
* Optional. Whether to retrieve the latest committed version of the entities
|
|
2330
|
+
* or the latest version. This field is ignored if a specific commit_id is
|
|
2331
|
+
* specified.
|
|
2332
|
+
* @param {string} [request.commitId]
|
|
2333
|
+
* Optional. Request a specific commit ID. If not specified, the entities from
|
|
2334
|
+
* the latest commit are returned.
|
|
2335
|
+
* @param {string} [request.filter]
|
|
2336
|
+
* Optional. Filter the returned entities based on AIP-160 standard.
|
|
2337
|
+
* @param {google.cloud.clouddms.v1.DatabaseEntityView} [request.view]
|
|
2338
|
+
* Optional. Results view based on AIP-157
|
|
2106
2339
|
* @param {object} [options]
|
|
2107
2340
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2108
2341
|
* @returns {Object}
|
|
@@ -2630,6 +2863,67 @@ class DataMigrationServiceClient {
|
|
|
2630
2863
|
matchLocationFromLocationName(locationName) {
|
|
2631
2864
|
return this.pathTemplates.locationPathTemplate.match(locationName).location;
|
|
2632
2865
|
}
|
|
2866
|
+
/**
|
|
2867
|
+
* Return a fully-qualified mappingRule resource name string.
|
|
2868
|
+
*
|
|
2869
|
+
* @param {string} project
|
|
2870
|
+
* @param {string} location
|
|
2871
|
+
* @param {string} conversion_workspace
|
|
2872
|
+
* @param {string} mapping_rule
|
|
2873
|
+
* @returns {string} Resource name string.
|
|
2874
|
+
*/
|
|
2875
|
+
mappingRulePath(project, location, conversionWorkspace, mappingRule) {
|
|
2876
|
+
return this.pathTemplates.mappingRulePathTemplate.render({
|
|
2877
|
+
project: project,
|
|
2878
|
+
location: location,
|
|
2879
|
+
conversion_workspace: conversionWorkspace,
|
|
2880
|
+
mapping_rule: mappingRule,
|
|
2881
|
+
});
|
|
2882
|
+
}
|
|
2883
|
+
/**
|
|
2884
|
+
* Parse the project from MappingRule resource.
|
|
2885
|
+
*
|
|
2886
|
+
* @param {string} mappingRuleName
|
|
2887
|
+
* A fully-qualified path representing MappingRule resource.
|
|
2888
|
+
* @returns {string} A string representing the project.
|
|
2889
|
+
*/
|
|
2890
|
+
matchProjectFromMappingRuleName(mappingRuleName) {
|
|
2891
|
+
return this.pathTemplates.mappingRulePathTemplate.match(mappingRuleName)
|
|
2892
|
+
.project;
|
|
2893
|
+
}
|
|
2894
|
+
/**
|
|
2895
|
+
* Parse the location from MappingRule resource.
|
|
2896
|
+
*
|
|
2897
|
+
* @param {string} mappingRuleName
|
|
2898
|
+
* A fully-qualified path representing MappingRule resource.
|
|
2899
|
+
* @returns {string} A string representing the location.
|
|
2900
|
+
*/
|
|
2901
|
+
matchLocationFromMappingRuleName(mappingRuleName) {
|
|
2902
|
+
return this.pathTemplates.mappingRulePathTemplate.match(mappingRuleName)
|
|
2903
|
+
.location;
|
|
2904
|
+
}
|
|
2905
|
+
/**
|
|
2906
|
+
* Parse the conversion_workspace from MappingRule resource.
|
|
2907
|
+
*
|
|
2908
|
+
* @param {string} mappingRuleName
|
|
2909
|
+
* A fully-qualified path representing MappingRule resource.
|
|
2910
|
+
* @returns {string} A string representing the conversion_workspace.
|
|
2911
|
+
*/
|
|
2912
|
+
matchConversionWorkspaceFromMappingRuleName(mappingRuleName) {
|
|
2913
|
+
return this.pathTemplates.mappingRulePathTemplate.match(mappingRuleName)
|
|
2914
|
+
.conversion_workspace;
|
|
2915
|
+
}
|
|
2916
|
+
/**
|
|
2917
|
+
* Parse the mapping_rule from MappingRule resource.
|
|
2918
|
+
*
|
|
2919
|
+
* @param {string} mappingRuleName
|
|
2920
|
+
* A fully-qualified path representing MappingRule resource.
|
|
2921
|
+
* @returns {string} A string representing the mapping_rule.
|
|
2922
|
+
*/
|
|
2923
|
+
matchMappingRuleFromMappingRuleName(mappingRuleName) {
|
|
2924
|
+
return this.pathTemplates.mappingRulePathTemplate.match(mappingRuleName)
|
|
2925
|
+
.mapping_rule;
|
|
2926
|
+
}
|
|
2633
2927
|
/**
|
|
2634
2928
|
* Return a fully-qualified migrationJob resource name string.
|
|
2635
2929
|
*
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
"idempotent": [
|
|
7
7
|
"DEADLINE_EXCEEDED",
|
|
8
8
|
"UNAVAILABLE"
|
|
9
|
+
],
|
|
10
|
+
"unavailable": [
|
|
11
|
+
"UNAVAILABLE"
|
|
9
12
|
]
|
|
10
13
|
},
|
|
11
14
|
"retry_params": {
|
|
@@ -17,6 +20,15 @@
|
|
|
17
20
|
"rpc_timeout_multiplier": 1,
|
|
18
21
|
"max_rpc_timeout_millis": 60000,
|
|
19
22
|
"total_timeout_millis": 600000
|
|
23
|
+
},
|
|
24
|
+
"ce5b960a6ed052e690863808e4f0deff3dc7d49f": {
|
|
25
|
+
"initial_retry_delay_millis": 1000,
|
|
26
|
+
"retry_delay_multiplier": 1.3,
|
|
27
|
+
"max_retry_delay_millis": 10000,
|
|
28
|
+
"initial_rpc_timeout_millis": 60000,
|
|
29
|
+
"rpc_timeout_multiplier": 1,
|
|
30
|
+
"max_rpc_timeout_millis": 60000,
|
|
31
|
+
"total_timeout_millis": 600000
|
|
20
32
|
}
|
|
21
33
|
},
|
|
22
34
|
"methods": {
|
|
@@ -80,6 +92,11 @@
|
|
|
80
92
|
"retry_codes_name": "non_idempotent",
|
|
81
93
|
"retry_params_name": "default"
|
|
82
94
|
},
|
|
95
|
+
"GenerateTcpProxyScript": {
|
|
96
|
+
"timeout_millis": 60000,
|
|
97
|
+
"retry_codes_name": "unavailable",
|
|
98
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
|
99
|
+
},
|
|
83
100
|
"ListConnectionProfiles": {
|
|
84
101
|
"timeout_millis": 60000,
|
|
85
102
|
"retry_codes_name": "non_idempotent",
|
|
@@ -150,6 +167,26 @@
|
|
|
150
167
|
"retry_codes_name": "non_idempotent",
|
|
151
168
|
"retry_params_name": "default"
|
|
152
169
|
},
|
|
170
|
+
"CreateMappingRule": {
|
|
171
|
+
"timeout_millis": 60000,
|
|
172
|
+
"retry_codes_name": "unavailable",
|
|
173
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
|
174
|
+
},
|
|
175
|
+
"DeleteMappingRule": {
|
|
176
|
+
"timeout_millis": 60000,
|
|
177
|
+
"retry_codes_name": "unavailable",
|
|
178
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
|
179
|
+
},
|
|
180
|
+
"ListMappingRules": {
|
|
181
|
+
"timeout_millis": 60000,
|
|
182
|
+
"retry_codes_name": "unavailable",
|
|
183
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
|
184
|
+
},
|
|
185
|
+
"GetMappingRule": {
|
|
186
|
+
"timeout_millis": 60000,
|
|
187
|
+
"retry_codes_name": "unavailable",
|
|
188
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
|
189
|
+
},
|
|
153
190
|
"SeedConversionWorkspace": {
|
|
154
191
|
"timeout_millis": 60000,
|
|
155
192
|
"retry_codes_name": "non_idempotent",
|
package/build/src/v1/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google-cloud/dms",
|
|
3
3
|
"description": "Cloud Database Migration API client for Node.js",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Google LLC",
|
|
7
7
|
"engines": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"docs-test": "linkinator docs",
|
|
39
39
|
"fix": "gts fix",
|
|
40
40
|
"lint": "gts check",
|
|
41
|
-
"prepare": "npm run compile
|
|
41
|
+
"prepare": "npm run compile",
|
|
42
42
|
"prelint": "cd samples; npm link ../; npm i",
|
|
43
43
|
"postpack": "minifyProtoJson",
|
|
44
44
|
"samples-test": "cd samples/ && npm link ../ && npm i && npm test",
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/mocha": "^9.0.0",
|
|
53
53
|
"@types/node": "^20.4.5",
|
|
54
|
-
"@types/sinon": "^
|
|
54
|
+
"@types/sinon": "^17.0.0",
|
|
55
55
|
"c8": "^8.0.1",
|
|
56
56
|
"codecov": "^3.6.5",
|
|
57
|
-
"gapic-tools": "^0.
|
|
57
|
+
"gapic-tools": "^0.3.0",
|
|
58
58
|
"gts": "^5.0.0",
|
|
59
59
|
"jsdoc": "^4.0.0",
|
|
60
|
-
"jsdoc-fresh": "^
|
|
61
|
-
"jsdoc-region-tag": "^
|
|
60
|
+
"jsdoc-fresh": "^3.0.0",
|
|
61
|
+
"jsdoc-region-tag": "^3.0.0",
|
|
62
62
|
"linkinator": "4.1.2",
|
|
63
63
|
"long": "^5.2.3",
|
|
64
64
|
"mocha": "^9.2.2",
|
|
65
|
-
"pack-n-play": "^
|
|
66
|
-
"sinon": "^
|
|
65
|
+
"pack-n-play": "^2.0.0",
|
|
66
|
+
"sinon": "^17.0.0",
|
|
67
67
|
"typescript": "^5.1.6"
|
|
68
68
|
},
|
|
69
69
|
"homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-clouddms"
|