@google-cloud/spanner 7.12.0 → 7.14.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 +24 -0
- package/build/protos/google/spanner/admin/database/v1/backup.proto +51 -1
- package/build/protos/google/spanner/admin/database/v1/backup_schedule.proto +3 -0
- package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +203 -62
- package/build/protos/protos.d.ts +460 -1
- package/build/protos/protos.js +1102 -2
- package/build/protos/protos.json +116 -1
- package/build/src/transaction.js +13 -4
- package/build/src/v1/database_admin_client.d.ts +9 -0
- package/build/src/v1/database_admin_client.js +6 -0
- package/build/src/v1/instance_admin_client.d.ts +141 -43
- package/build/src/v1/instance_admin_client.js +44 -4
- package/build/src/v1/instance_admin_client_config.json +4 -0
- package/package.json +3 -3
|
@@ -239,6 +239,8 @@ class InstanceAdminClient {
|
|
|
239
239
|
const createInstancePartitionMetadata = protoFilesRoot.lookup('.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata');
|
|
240
240
|
const updateInstancePartitionResponse = protoFilesRoot.lookup('.google.spanner.admin.instance.v1.InstancePartition');
|
|
241
241
|
const updateInstancePartitionMetadata = protoFilesRoot.lookup('.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata');
|
|
242
|
+
const moveInstanceResponse = protoFilesRoot.lookup('.google.spanner.admin.instance.v1.MoveInstanceResponse');
|
|
243
|
+
const moveInstanceMetadata = protoFilesRoot.lookup('.google.spanner.admin.instance.v1.MoveInstanceMetadata');
|
|
242
244
|
this.descriptors.longrunning = {
|
|
243
245
|
createInstanceConfig: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createInstanceConfigResponse.decode.bind(createInstanceConfigResponse), createInstanceConfigMetadata.decode.bind(createInstanceConfigMetadata)),
|
|
244
246
|
updateInstanceConfig: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateInstanceConfigResponse.decode.bind(updateInstanceConfigResponse), updateInstanceConfigMetadata.decode.bind(updateInstanceConfigMetadata)),
|
|
@@ -246,6 +248,7 @@ class InstanceAdminClient {
|
|
|
246
248
|
updateInstance: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateInstanceResponse.decode.bind(updateInstanceResponse), updateInstanceMetadata.decode.bind(updateInstanceMetadata)),
|
|
247
249
|
createInstancePartition: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createInstancePartitionResponse.decode.bind(createInstancePartitionResponse), createInstancePartitionMetadata.decode.bind(createInstancePartitionMetadata)),
|
|
248
250
|
updateInstancePartition: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateInstancePartitionResponse.decode.bind(updateInstancePartitionResponse), updateInstancePartitionMetadata.decode.bind(updateInstancePartitionMetadata)),
|
|
251
|
+
moveInstance: new this._gaxModule.LongrunningDescriptor(this.operationsClient, moveInstanceResponse.decode.bind(moveInstanceResponse), moveInstanceMetadata.decode.bind(moveInstanceMetadata)),
|
|
249
252
|
};
|
|
250
253
|
// Put together the default options sent with requests.
|
|
251
254
|
this._defaults = this._gaxGrpc.constructSettings('google.spanner.admin.instance.v1.InstanceAdmin', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
|
@@ -301,6 +304,7 @@ class InstanceAdminClient {
|
|
|
301
304
|
'deleteInstancePartition',
|
|
302
305
|
'updateInstancePartition',
|
|
303
306
|
'listInstancePartitionOperations',
|
|
307
|
+
'moveInstance',
|
|
304
308
|
];
|
|
305
309
|
for (const methodName of instanceAdminStubMethods) {
|
|
306
310
|
const callPromise = this.instanceAdminStub.then(stub => (...args) => {
|
|
@@ -788,6 +792,42 @@ class InstanceAdminClient {
|
|
|
788
792
|
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateInstancePartition, this._gaxModule.createDefaultBackoffSettings());
|
|
789
793
|
return decodeOperation;
|
|
790
794
|
}
|
|
795
|
+
moveInstance(request, optionsOrCallback, callback) {
|
|
796
|
+
var _a;
|
|
797
|
+
request = request || {};
|
|
798
|
+
let options;
|
|
799
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
800
|
+
callback = optionsOrCallback;
|
|
801
|
+
options = {};
|
|
802
|
+
}
|
|
803
|
+
else {
|
|
804
|
+
options = optionsOrCallback;
|
|
805
|
+
}
|
|
806
|
+
options = options || {};
|
|
807
|
+
options.otherArgs = options.otherArgs || {};
|
|
808
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
809
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
810
|
+
this._gaxModule.routingHeader.fromParams({
|
|
811
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
812
|
+
});
|
|
813
|
+
this.initialize();
|
|
814
|
+
return this.innerApiCalls.moveInstance(request, options, callback);
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Check the status of the long running operation returned by `moveInstance()`.
|
|
818
|
+
* @param {String} name
|
|
819
|
+
* The operation name that will be passed.
|
|
820
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
821
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
822
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
823
|
+
* for more details and examples.
|
|
824
|
+
*/
|
|
825
|
+
async checkMoveInstanceProgress(name) {
|
|
826
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
827
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
|
828
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.moveInstance, this._gaxModule.createDefaultBackoffSettings());
|
|
829
|
+
return decodeOperation;
|
|
830
|
+
}
|
|
791
831
|
listInstanceConfigs(request, optionsOrCallback, callback) {
|
|
792
832
|
var _a;
|
|
793
833
|
request = request || {};
|
|
@@ -920,7 +960,7 @@ class InstanceAdminClient {
|
|
|
920
960
|
* @param {Object} request
|
|
921
961
|
* The request object that will be sent.
|
|
922
962
|
* @param {string} request.parent
|
|
923
|
-
* Required. The project of the instance
|
|
963
|
+
* Required. The project of the instance configuration operations.
|
|
924
964
|
* Values are of the form `projects/<project>`.
|
|
925
965
|
* @param {string} request.filter
|
|
926
966
|
* An expression that filters the list of returned operations.
|
|
@@ -963,7 +1003,7 @@ class InstanceAdminClient {
|
|
|
963
1003
|
* `(error:*)` - Return operations where:
|
|
964
1004
|
* * The operation's metadata type is
|
|
965
1005
|
* {@link protos.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata|CreateInstanceConfigMetadata}.
|
|
966
|
-
* * The instance
|
|
1006
|
+
* * The instance configuration name contains "custom-config".
|
|
967
1007
|
* * The operation started before 2021-03-28T14:50:00Z.
|
|
968
1008
|
* * The operation resulted in an error.
|
|
969
1009
|
* @param {number} request.pageSize
|
|
@@ -1008,7 +1048,7 @@ class InstanceAdminClient {
|
|
|
1008
1048
|
* @param {Object} request
|
|
1009
1049
|
* The request object that will be sent.
|
|
1010
1050
|
* @param {string} request.parent
|
|
1011
|
-
* Required. The project of the instance
|
|
1051
|
+
* Required. The project of the instance configuration operations.
|
|
1012
1052
|
* Values are of the form `projects/<project>`.
|
|
1013
1053
|
* @param {string} request.filter
|
|
1014
1054
|
* An expression that filters the list of returned operations.
|
|
@@ -1051,7 +1091,7 @@ class InstanceAdminClient {
|
|
|
1051
1091
|
* `(error:*)` - Return operations where:
|
|
1052
1092
|
* * The operation's metadata type is
|
|
1053
1093
|
* {@link protos.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata|CreateInstanceConfigMetadata}.
|
|
1054
|
-
* * The instance
|
|
1094
|
+
* * The instance configuration name contains "custom-config".
|
|
1055
1095
|
* * The operation started before 2021-03-28T14:50:00Z.
|
|
1056
1096
|
* * The operation resulted in an error.
|
|
1057
1097
|
* @param {number} request.pageSize
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google-cloud/spanner",
|
|
3
3
|
"description": "Cloud Spanner Client Library for Node.js",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.14.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Google Inc.",
|
|
7
7
|
"engines": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"events-intercept": "^2.0.0",
|
|
67
67
|
"extend": "^3.0.2",
|
|
68
68
|
"google-auth-library": "^9.0.0",
|
|
69
|
-
"google-gax": "4.3.
|
|
69
|
+
"google-gax": "4.3.9",
|
|
70
70
|
"grpc-gcp": "^1.0.0",
|
|
71
71
|
"is": "^3.2.1",
|
|
72
72
|
"lodash.snakecase": "^4.1.1",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"jsdoc": "^4.0.0",
|
|
106
106
|
"jsdoc-fresh": "^3.0.0",
|
|
107
107
|
"jsdoc-region-tag": "^3.0.0",
|
|
108
|
-
"linkinator": "^
|
|
108
|
+
"linkinator": "^3.0.0",
|
|
109
109
|
"lodash.random": "^3.2.0",
|
|
110
110
|
"mocha": "^9.2.2",
|
|
111
111
|
"mv": "^2.1.1",
|