@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
package/build/protos/protos.json
CHANGED
|
@@ -1667,6 +1667,20 @@
|
|
|
1667
1667
|
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1668
1668
|
}
|
|
1669
1669
|
},
|
|
1670
|
+
"freeableSizeBytes": {
|
|
1671
|
+
"type": "int64",
|
|
1672
|
+
"id": 15,
|
|
1673
|
+
"options": {
|
|
1674
|
+
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1675
|
+
}
|
|
1676
|
+
},
|
|
1677
|
+
"exclusiveSizeBytes": {
|
|
1678
|
+
"type": "int64",
|
|
1679
|
+
"id": 16,
|
|
1680
|
+
"options": {
|
|
1681
|
+
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1682
|
+
}
|
|
1683
|
+
},
|
|
1670
1684
|
"state": {
|
|
1671
1685
|
"type": "State",
|
|
1672
1686
|
"id": 6,
|
|
@@ -1725,6 +1739,21 @@
|
|
|
1725
1739
|
"rule": "repeated",
|
|
1726
1740
|
"type": "string",
|
|
1727
1741
|
"id": 14,
|
|
1742
|
+
"options": {
|
|
1743
|
+
"(google.api.field_behavior)": "OUTPUT_ONLY",
|
|
1744
|
+
"(google.api.resource_reference).type": "spanner.googleapis.com/BackupSchedule"
|
|
1745
|
+
}
|
|
1746
|
+
},
|
|
1747
|
+
"incrementalBackupChainId": {
|
|
1748
|
+
"type": "string",
|
|
1749
|
+
"id": 17,
|
|
1750
|
+
"options": {
|
|
1751
|
+
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1752
|
+
}
|
|
1753
|
+
},
|
|
1754
|
+
"oldestVersionTime": {
|
|
1755
|
+
"type": "google.protobuf.Timestamp",
|
|
1756
|
+
"id": 18,
|
|
1728
1757
|
"options": {
|
|
1729
1758
|
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1730
1759
|
}
|
|
@@ -2087,6 +2116,9 @@
|
|
|
2087
2116
|
"FullBackupSpec": {
|
|
2088
2117
|
"fields": {}
|
|
2089
2118
|
},
|
|
2119
|
+
"IncrementalBackupSpec": {
|
|
2120
|
+
"fields": {}
|
|
2121
|
+
},
|
|
2090
2122
|
"OperationProgress": {
|
|
2091
2123
|
"fields": {
|
|
2092
2124
|
"progressPercent": {
|
|
@@ -2189,7 +2221,8 @@
|
|
|
2189
2221
|
"oneofs": {
|
|
2190
2222
|
"backupTypeSpec": {
|
|
2191
2223
|
"oneof": [
|
|
2192
|
-
"fullBackupSpec"
|
|
2224
|
+
"fullBackupSpec",
|
|
2225
|
+
"incrementalBackupSpec"
|
|
2193
2226
|
]
|
|
2194
2227
|
}
|
|
2195
2228
|
},
|
|
@@ -2226,6 +2259,10 @@
|
|
|
2226
2259
|
"type": "FullBackupSpec",
|
|
2227
2260
|
"id": 7
|
|
2228
2261
|
},
|
|
2262
|
+
"incrementalBackupSpec": {
|
|
2263
|
+
"type": "IncrementalBackupSpec",
|
|
2264
|
+
"id": 8
|
|
2265
|
+
},
|
|
2229
2266
|
"updateTime": {
|
|
2230
2267
|
"type": "google.protobuf.Timestamp",
|
|
2231
2268
|
"id": 9,
|
|
@@ -4010,6 +4047,30 @@
|
|
|
4010
4047
|
"(google.api.method_signature)": "parent"
|
|
4011
4048
|
}
|
|
4012
4049
|
]
|
|
4050
|
+
},
|
|
4051
|
+
"MoveInstance": {
|
|
4052
|
+
"requestType": "MoveInstanceRequest",
|
|
4053
|
+
"responseType": "google.longrunning.Operation",
|
|
4054
|
+
"options": {
|
|
4055
|
+
"(google.api.http).post": "/v1/{name=projects/*/instances/*}:move",
|
|
4056
|
+
"(google.api.http).body": "*",
|
|
4057
|
+
"(google.longrunning.operation_info).response_type": "google.spanner.admin.instance.v1.MoveInstanceResponse",
|
|
4058
|
+
"(google.longrunning.operation_info).metadata_type": "google.spanner.admin.instance.v1.MoveInstanceMetadata"
|
|
4059
|
+
},
|
|
4060
|
+
"parsedOptions": [
|
|
4061
|
+
{
|
|
4062
|
+
"(google.api.http)": {
|
|
4063
|
+
"post": "/v1/{name=projects/*/instances/*}:move",
|
|
4064
|
+
"body": "*"
|
|
4065
|
+
}
|
|
4066
|
+
},
|
|
4067
|
+
{
|
|
4068
|
+
"(google.longrunning.operation_info)": {
|
|
4069
|
+
"response_type": "google.spanner.admin.instance.v1.MoveInstanceResponse",
|
|
4070
|
+
"metadata_type": "google.spanner.admin.instance.v1.MoveInstanceMetadata"
|
|
4071
|
+
}
|
|
4072
|
+
}
|
|
4073
|
+
]
|
|
4013
4074
|
}
|
|
4014
4075
|
}
|
|
4015
4076
|
},
|
|
@@ -4271,6 +4332,13 @@
|
|
|
4271
4332
|
"options": {
|
|
4272
4333
|
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
4273
4334
|
}
|
|
4335
|
+
},
|
|
4336
|
+
"edition": {
|
|
4337
|
+
"type": "Edition",
|
|
4338
|
+
"id": 20,
|
|
4339
|
+
"options": {
|
|
4340
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
4341
|
+
}
|
|
4274
4342
|
}
|
|
4275
4343
|
},
|
|
4276
4344
|
"nested": {
|
|
@@ -4280,6 +4348,14 @@
|
|
|
4280
4348
|
"CREATING": 1,
|
|
4281
4349
|
"READY": 2
|
|
4282
4350
|
}
|
|
4351
|
+
},
|
|
4352
|
+
"Edition": {
|
|
4353
|
+
"values": {
|
|
4354
|
+
"EDITION_UNSPECIFIED": 0,
|
|
4355
|
+
"STANDARD": 1,
|
|
4356
|
+
"ENTERPRISE": 2,
|
|
4357
|
+
"ENTERPRISE_PLUS": 3
|
|
4358
|
+
}
|
|
4283
4359
|
}
|
|
4284
4360
|
}
|
|
4285
4361
|
},
|
|
@@ -4945,6 +5021,45 @@
|
|
|
4945
5021
|
"id": 3
|
|
4946
5022
|
}
|
|
4947
5023
|
}
|
|
5024
|
+
},
|
|
5025
|
+
"MoveInstanceRequest": {
|
|
5026
|
+
"fields": {
|
|
5027
|
+
"name": {
|
|
5028
|
+
"type": "string",
|
|
5029
|
+
"id": 1,
|
|
5030
|
+
"options": {
|
|
5031
|
+
"(google.api.field_behavior)": "REQUIRED",
|
|
5032
|
+
"(google.api.resource_reference).type": "spanner.googleapis.com/Instance"
|
|
5033
|
+
}
|
|
5034
|
+
},
|
|
5035
|
+
"targetConfig": {
|
|
5036
|
+
"type": "string",
|
|
5037
|
+
"id": 2,
|
|
5038
|
+
"options": {
|
|
5039
|
+
"(google.api.field_behavior)": "REQUIRED",
|
|
5040
|
+
"(google.api.resource_reference).type": "spanner.googleapis.com/InstanceConfig"
|
|
5041
|
+
}
|
|
5042
|
+
}
|
|
5043
|
+
}
|
|
5044
|
+
},
|
|
5045
|
+
"MoveInstanceResponse": {
|
|
5046
|
+
"fields": {}
|
|
5047
|
+
},
|
|
5048
|
+
"MoveInstanceMetadata": {
|
|
5049
|
+
"fields": {
|
|
5050
|
+
"targetConfig": {
|
|
5051
|
+
"type": "string",
|
|
5052
|
+
"id": 1
|
|
5053
|
+
},
|
|
5054
|
+
"progress": {
|
|
5055
|
+
"type": "OperationProgress",
|
|
5056
|
+
"id": 2
|
|
5057
|
+
},
|
|
5058
|
+
"cancelTime": {
|
|
5059
|
+
"type": "google.protobuf.Timestamp",
|
|
5060
|
+
"id": 3
|
|
5061
|
+
}
|
|
5062
|
+
}
|
|
4948
5063
|
}
|
|
4949
5064
|
}
|
|
4950
5065
|
}
|
package/build/src/transaction.js
CHANGED
|
@@ -415,8 +415,12 @@ class Snapshot extends events_1.EventEmitter {
|
|
|
415
415
|
if (response.metadata && response.metadata.transaction && !this.id) {
|
|
416
416
|
this._update(response.metadata.transaction);
|
|
417
417
|
}
|
|
418
|
-
}).on('error',
|
|
419
|
-
|
|
418
|
+
}).on('error', err => {
|
|
419
|
+
const isServiceError = err && typeof err === 'object' && 'code' in err;
|
|
420
|
+
if (!this.id &&
|
|
421
|
+
this._useInRunner &&
|
|
422
|
+
!(isServiceError &&
|
|
423
|
+
err.code === google_gax_1.grpc.status.ABORTED)) {
|
|
420
424
|
this.begin();
|
|
421
425
|
}
|
|
422
426
|
});
|
|
@@ -685,8 +689,12 @@ class Snapshot extends events_1.EventEmitter {
|
|
|
685
689
|
this._update(response.metadata.transaction);
|
|
686
690
|
}
|
|
687
691
|
})
|
|
688
|
-
.on('error',
|
|
689
|
-
|
|
692
|
+
.on('error', err => {
|
|
693
|
+
const isServiceError = err && typeof err === 'object' && 'code' in err;
|
|
694
|
+
if (!this.id &&
|
|
695
|
+
this._useInRunner &&
|
|
696
|
+
!(isServiceError &&
|
|
697
|
+
err.code === google_gax_1.grpc.status.ABORTED)) {
|
|
690
698
|
this.begin();
|
|
691
699
|
}
|
|
692
700
|
});
|
|
@@ -846,6 +854,7 @@ class Snapshot extends events_1.EventEmitter {
|
|
|
846
854
|
this._waitingRequests.push(() => {
|
|
847
855
|
makeRequest(resumeToken)
|
|
848
856
|
.on('data', chunk => streamProxy.emit('data', chunk))
|
|
857
|
+
.on('error', err => streamProxy.emit('error', err))
|
|
849
858
|
.on('end', () => streamProxy.emit('end'));
|
|
850
859
|
});
|
|
851
860
|
return streamProxy;
|
|
@@ -1025,6 +1025,7 @@ export declare class DatabaseAdminClient {
|
|
|
1025
1025
|
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
|
1026
1026
|
* * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
|
1027
1027
|
* * `size_bytes`
|
|
1028
|
+
* * `backup_schedules`
|
|
1028
1029
|
*
|
|
1029
1030
|
* You can combine multiple expressions by enclosing each expression in
|
|
1030
1031
|
* parentheses. By default, expressions are combined with AND logic, but
|
|
@@ -1043,6 +1044,8 @@ export declare class DatabaseAdminClient {
|
|
|
1043
1044
|
* * `expire_time < \"2018-03-28T14:50:00Z\"`
|
|
1044
1045
|
* - The backup `expire_time` is before 2018-03-28T14:50:00Z.
|
|
1045
1046
|
* * `size_bytes > 10000000000` - The backup's size is greater than 10GB
|
|
1047
|
+
* * `backup_schedules:daily`
|
|
1048
|
+
* - The backup is created from a schedule with "daily" in its name.
|
|
1046
1049
|
* @param {number} request.pageSize
|
|
1047
1050
|
* Number of backups to be returned in the response. If 0 or
|
|
1048
1051
|
* less, defaults to the server's maximum allowed page size.
|
|
@@ -1098,6 +1101,7 @@ export declare class DatabaseAdminClient {
|
|
|
1098
1101
|
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
|
1099
1102
|
* * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
|
1100
1103
|
* * `size_bytes`
|
|
1104
|
+
* * `backup_schedules`
|
|
1101
1105
|
*
|
|
1102
1106
|
* You can combine multiple expressions by enclosing each expression in
|
|
1103
1107
|
* parentheses. By default, expressions are combined with AND logic, but
|
|
@@ -1116,6 +1120,8 @@ export declare class DatabaseAdminClient {
|
|
|
1116
1120
|
* * `expire_time < \"2018-03-28T14:50:00Z\"`
|
|
1117
1121
|
* - The backup `expire_time` is before 2018-03-28T14:50:00Z.
|
|
1118
1122
|
* * `size_bytes > 10000000000` - The backup's size is greater than 10GB
|
|
1123
|
+
* * `backup_schedules:daily`
|
|
1124
|
+
* - The backup is created from a schedule with "daily" in its name.
|
|
1119
1125
|
* @param {number} request.pageSize
|
|
1120
1126
|
* Number of backups to be returned in the response. If 0 or
|
|
1121
1127
|
* less, defaults to the server's maximum allowed page size.
|
|
@@ -1166,6 +1172,7 @@ export declare class DatabaseAdminClient {
|
|
|
1166
1172
|
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
|
1167
1173
|
* * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
|
1168
1174
|
* * `size_bytes`
|
|
1175
|
+
* * `backup_schedules`
|
|
1169
1176
|
*
|
|
1170
1177
|
* You can combine multiple expressions by enclosing each expression in
|
|
1171
1178
|
* parentheses. By default, expressions are combined with AND logic, but
|
|
@@ -1184,6 +1191,8 @@ export declare class DatabaseAdminClient {
|
|
|
1184
1191
|
* * `expire_time < \"2018-03-28T14:50:00Z\"`
|
|
1185
1192
|
* - The backup `expire_time` is before 2018-03-28T14:50:00Z.
|
|
1186
1193
|
* * `size_bytes > 10000000000` - The backup's size is greater than 10GB
|
|
1194
|
+
* * `backup_schedules:daily`
|
|
1195
|
+
* - The backup is created from a schedule with "daily" in its name.
|
|
1187
1196
|
* @param {number} request.pageSize
|
|
1188
1197
|
* Number of backups to be returned in the response. If 0 or
|
|
1189
1198
|
* less, defaults to the server's maximum allowed page size.
|
|
@@ -1032,6 +1032,7 @@ class DatabaseAdminClient {
|
|
|
1032
1032
|
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
|
1033
1033
|
* * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
|
1034
1034
|
* * `size_bytes`
|
|
1035
|
+
* * `backup_schedules`
|
|
1035
1036
|
*
|
|
1036
1037
|
* You can combine multiple expressions by enclosing each expression in
|
|
1037
1038
|
* parentheses. By default, expressions are combined with AND logic, but
|
|
@@ -1050,6 +1051,8 @@ class DatabaseAdminClient {
|
|
|
1050
1051
|
* * `expire_time < \"2018-03-28T14:50:00Z\"`
|
|
1051
1052
|
* - The backup `expire_time` is before 2018-03-28T14:50:00Z.
|
|
1052
1053
|
* * `size_bytes > 10000000000` - The backup's size is greater than 10GB
|
|
1054
|
+
* * `backup_schedules:daily`
|
|
1055
|
+
* - The backup is created from a schedule with "daily" in its name.
|
|
1053
1056
|
* @param {number} request.pageSize
|
|
1054
1057
|
* Number of backups to be returned in the response. If 0 or
|
|
1055
1058
|
* less, defaults to the server's maximum allowed page size.
|
|
@@ -1114,6 +1117,7 @@ class DatabaseAdminClient {
|
|
|
1114
1117
|
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
|
1115
1118
|
* * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
|
1116
1119
|
* * `size_bytes`
|
|
1120
|
+
* * `backup_schedules`
|
|
1117
1121
|
*
|
|
1118
1122
|
* You can combine multiple expressions by enclosing each expression in
|
|
1119
1123
|
* parentheses. By default, expressions are combined with AND logic, but
|
|
@@ -1132,6 +1136,8 @@ class DatabaseAdminClient {
|
|
|
1132
1136
|
* * `expire_time < \"2018-03-28T14:50:00Z\"`
|
|
1133
1137
|
* - The backup `expire_time` is before 2018-03-28T14:50:00Z.
|
|
1134
1138
|
* * `size_bytes > 10000000000` - The backup's size is greater than 10GB
|
|
1139
|
+
* * `backup_schedules:daily`
|
|
1140
|
+
* - The backup is created from a schedule with "daily" in its name.
|
|
1135
1141
|
* @param {number} request.pageSize
|
|
1136
1142
|
* Number of backups to be returned in the response. If 0 or
|
|
1137
1143
|
* less, defaults to the server's maximum allowed page size.
|
|
@@ -158,11 +158,11 @@ export declare class InstanceAdminClient {
|
|
|
158
158
|
getInstanceConfig(request: protos.google.spanner.admin.instance.v1.IGetInstanceConfigRequest, options: CallOptions, callback: Callback<protos.google.spanner.admin.instance.v1.IInstanceConfig, protos.google.spanner.admin.instance.v1.IGetInstanceConfigRequest | null | undefined, {} | null | undefined>): void;
|
|
159
159
|
getInstanceConfig(request: protos.google.spanner.admin.instance.v1.IGetInstanceConfigRequest, callback: Callback<protos.google.spanner.admin.instance.v1.IInstanceConfig, protos.google.spanner.admin.instance.v1.IGetInstanceConfigRequest | null | undefined, {} | null | undefined>): void;
|
|
160
160
|
/**
|
|
161
|
-
* Deletes the instance
|
|
161
|
+
* Deletes the instance configuration. Deletion is only allowed when no
|
|
162
162
|
* instances are using the configuration. If any instances are using
|
|
163
|
-
* the
|
|
163
|
+
* the configuration, returns `FAILED_PRECONDITION`.
|
|
164
164
|
*
|
|
165
|
-
* Only user
|
|
165
|
+
* Only user-managed configurations can be deleted.
|
|
166
166
|
*
|
|
167
167
|
* Authorization requires `spanner.instanceConfigs.delete` permission on
|
|
168
168
|
* the resource {@link protos.google.spanner.admin.instance.v1.InstanceConfig.name|name}.
|
|
@@ -175,12 +175,12 @@ export declare class InstanceAdminClient {
|
|
|
175
175
|
* `projects/<project>/instanceConfigs/<instance_config>`
|
|
176
176
|
* @param {string} request.etag
|
|
177
177
|
* Used for optimistic concurrency control as a way to help prevent
|
|
178
|
-
* simultaneous deletes of an instance
|
|
178
|
+
* simultaneous deletes of an instance configuration from overwriting each
|
|
179
179
|
* other. If not empty, the API
|
|
180
|
-
* only deletes the instance
|
|
181
|
-
* status of the requested instance
|
|
182
|
-
*
|
|
183
|
-
*
|
|
180
|
+
* only deletes the instance configuration when the etag provided matches the
|
|
181
|
+
* current status of the requested instance configuration. Otherwise, deletes
|
|
182
|
+
* the instance configuration without checking the current status of the
|
|
183
|
+
* requested instance configuration.
|
|
184
184
|
* @param {boolean} request.validateOnly
|
|
185
185
|
* An option to validate, but not actually execute, a request,
|
|
186
186
|
* and provide the same response.
|
|
@@ -413,38 +413,38 @@ export declare class InstanceAdminClient {
|
|
|
413
413
|
deleteInstancePartition(request: protos.google.spanner.admin.instance.v1.IDeleteInstancePartitionRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.instance.v1.IDeleteInstancePartitionRequest | null | undefined, {} | null | undefined>): void;
|
|
414
414
|
deleteInstancePartition(request: protos.google.spanner.admin.instance.v1.IDeleteInstancePartitionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.instance.v1.IDeleteInstancePartitionRequest | null | undefined, {} | null | undefined>): void;
|
|
415
415
|
/**
|
|
416
|
-
* Creates an instance
|
|
416
|
+
* Creates an instance configuration and begins preparing it to be used. The
|
|
417
417
|
* returned {@link protos.google.longrunning.Operation|long-running operation}
|
|
418
418
|
* can be used to track the progress of preparing the new
|
|
419
|
-
* instance
|
|
420
|
-
* named instance
|
|
421
|
-
* `ALREADY_EXISTS`.
|
|
419
|
+
* instance configuration. The instance configuration name is assigned by the
|
|
420
|
+
* caller. If the named instance configuration already exists,
|
|
421
|
+
* `CreateInstanceConfig` returns `ALREADY_EXISTS`.
|
|
422
422
|
*
|
|
423
423
|
* Immediately after the request returns:
|
|
424
424
|
*
|
|
425
|
-
* * The instance
|
|
426
|
-
* attributes. The instance
|
|
425
|
+
* * The instance configuration is readable via the API, with all requested
|
|
426
|
+
* attributes. The instance configuration's
|
|
427
427
|
* {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|reconciling}
|
|
428
428
|
* field is set to true. Its state is `CREATING`.
|
|
429
429
|
*
|
|
430
430
|
* While the operation is pending:
|
|
431
431
|
*
|
|
432
|
-
* * Cancelling the operation renders the instance
|
|
432
|
+
* * Cancelling the operation renders the instance configuration immediately
|
|
433
433
|
* unreadable via the API.
|
|
434
434
|
* * Except for deleting the creating resource, all other attempts to modify
|
|
435
|
-
* the instance
|
|
435
|
+
* the instance configuration are rejected.
|
|
436
436
|
*
|
|
437
437
|
* Upon completion of the returned operation:
|
|
438
438
|
*
|
|
439
439
|
* * Instances can be created using the instance configuration.
|
|
440
|
-
* * The instance
|
|
440
|
+
* * The instance configuration's
|
|
441
441
|
* {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|reconciling}
|
|
442
442
|
* field becomes false. Its state becomes `READY`.
|
|
443
443
|
*
|
|
444
444
|
* The returned {@link protos.google.longrunning.Operation|long-running operation} will
|
|
445
445
|
* have a name of the format
|
|
446
446
|
* `<instance_config_name>/operations/<operation_id>` and can be used to track
|
|
447
|
-
* creation of the instance
|
|
447
|
+
* creation of the instance configuration. The
|
|
448
448
|
* {@link protos.google.longrunning.Operation.metadata|metadata} field type is
|
|
449
449
|
* {@link protos.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata|CreateInstanceConfigMetadata}.
|
|
450
450
|
* The {@link protos.google.longrunning.Operation.response|response} field type is
|
|
@@ -458,13 +458,13 @@ export declare class InstanceAdminClient {
|
|
|
458
458
|
* @param {Object} request
|
|
459
459
|
* The request object that will be sent.
|
|
460
460
|
* @param {string} request.parent
|
|
461
|
-
* Required. The name of the project in which to create the instance
|
|
462
|
-
* Values are of the form `projects/<project>`.
|
|
461
|
+
* Required. The name of the project in which to create the instance
|
|
462
|
+
* configuration. Values are of the form `projects/<project>`.
|
|
463
463
|
* @param {string} request.instanceConfigId
|
|
464
|
-
* Required. The ID of the instance
|
|
465
|
-
* of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64
|
|
464
|
+
* Required. The ID of the instance configuration to create. Valid identifiers
|
|
465
|
+
* are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64
|
|
466
466
|
* characters in length. The `custom-` prefix is required to avoid name
|
|
467
|
-
* conflicts with Google
|
|
467
|
+
* conflicts with Google-managed configurations.
|
|
468
468
|
* @param {google.spanner.admin.instance.v1.InstanceConfig} request.instanceConfig
|
|
469
469
|
* Required. The InstanceConfig proto of the configuration to create.
|
|
470
470
|
* instance_config.name must be
|
|
@@ -501,16 +501,16 @@ export declare class InstanceAdminClient {
|
|
|
501
501
|
*/
|
|
502
502
|
checkCreateInstanceConfigProgress(name: string): Promise<LROperation<protos.google.spanner.admin.instance.v1.InstanceConfig, protos.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata>>;
|
|
503
503
|
/**
|
|
504
|
-
* Updates an instance
|
|
504
|
+
* Updates an instance configuration. The returned
|
|
505
505
|
* {@link protos.google.longrunning.Operation|long-running operation} can be used to track
|
|
506
|
-
* the progress of updating the instance. If the named instance
|
|
507
|
-
* not exist, returns `NOT_FOUND`.
|
|
506
|
+
* the progress of updating the instance. If the named instance configuration
|
|
507
|
+
* does not exist, returns `NOT_FOUND`.
|
|
508
508
|
*
|
|
509
|
-
* Only user
|
|
509
|
+
* Only user-managed configurations can be updated.
|
|
510
510
|
*
|
|
511
511
|
* Immediately after the request returns:
|
|
512
512
|
*
|
|
513
|
-
* * The instance
|
|
513
|
+
* * The instance configuration's
|
|
514
514
|
* {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|reconciling}
|
|
515
515
|
* field is set to true.
|
|
516
516
|
*
|
|
@@ -520,23 +520,23 @@ export declare class InstanceAdminClient {
|
|
|
520
520
|
* {@link protos.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time|cancel_time}.
|
|
521
521
|
* The operation is guaranteed to succeed at undoing all changes, after
|
|
522
522
|
* which point it terminates with a `CANCELLED` status.
|
|
523
|
-
* * All other attempts to modify the instance
|
|
524
|
-
* * Reading the instance
|
|
523
|
+
* * All other attempts to modify the instance configuration are rejected.
|
|
524
|
+
* * Reading the instance configuration via the API continues to give the
|
|
525
525
|
* pre-request values.
|
|
526
526
|
*
|
|
527
527
|
* Upon completion of the returned operation:
|
|
528
528
|
*
|
|
529
529
|
* * Creating instances using the instance configuration uses the new
|
|
530
530
|
* values.
|
|
531
|
-
* * The
|
|
532
|
-
* * The instance
|
|
531
|
+
* * The new values of the instance configuration are readable via the API.
|
|
532
|
+
* * The instance configuration's
|
|
533
533
|
* {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|reconciling}
|
|
534
534
|
* field becomes false.
|
|
535
535
|
*
|
|
536
536
|
* The returned {@link protos.google.longrunning.Operation|long-running operation} will
|
|
537
537
|
* have a name of the format
|
|
538
538
|
* `<instance_config_name>/operations/<operation_id>` and can be used to track
|
|
539
|
-
* the instance
|
|
539
|
+
* the instance configuration modification. The
|
|
540
540
|
* {@link protos.google.longrunning.Operation.metadata|metadata} field type is
|
|
541
541
|
* {@link protos.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata|UpdateInstanceConfigMetadata}.
|
|
542
542
|
* The {@link protos.google.longrunning.Operation.response|response} field type is
|
|
@@ -549,8 +549,9 @@ export declare class InstanceAdminClient {
|
|
|
549
549
|
* @param {Object} request
|
|
550
550
|
* The request object that will be sent.
|
|
551
551
|
* @param {google.spanner.admin.instance.v1.InstanceConfig} request.instanceConfig
|
|
552
|
-
* Required. The user instance
|
|
553
|
-
* instance
|
|
552
|
+
* Required. The user instance configuration to update, which must always
|
|
553
|
+
* include the instance configuration name. Otherwise, only fields mentioned
|
|
554
|
+
* in
|
|
554
555
|
* {@link protos.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest.update_mask|update_mask}
|
|
555
556
|
* need be included. To prevent conflicts of concurrent updates,
|
|
556
557
|
* {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|etag} can
|
|
@@ -911,6 +912,103 @@ export declare class InstanceAdminClient {
|
|
|
911
912
|
* for more details and examples.
|
|
912
913
|
*/
|
|
913
914
|
checkUpdateInstancePartitionProgress(name: string): Promise<LROperation<protos.google.spanner.admin.instance.v1.InstancePartition, protos.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata>>;
|
|
915
|
+
/**
|
|
916
|
+
* Moves an instance to the target instance configuration. You can use the
|
|
917
|
+
* returned {@link protos.google.longrunning.Operation|long-running operation} to track
|
|
918
|
+
* the progress of moving the instance.
|
|
919
|
+
*
|
|
920
|
+
* `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of
|
|
921
|
+
* the following criteria:
|
|
922
|
+
*
|
|
923
|
+
* * Is undergoing a move to a different instance configuration
|
|
924
|
+
* * Has backups
|
|
925
|
+
* * Has an ongoing update
|
|
926
|
+
* * Contains any CMEK-enabled databases
|
|
927
|
+
* * Is a free trial instance
|
|
928
|
+
*
|
|
929
|
+
* While the operation is pending:
|
|
930
|
+
*
|
|
931
|
+
* * All other attempts to modify the instance, including changes to its
|
|
932
|
+
* compute capacity, are rejected.
|
|
933
|
+
* * The following database and backup admin operations are rejected:
|
|
934
|
+
*
|
|
935
|
+
* * `DatabaseAdmin.CreateDatabase`
|
|
936
|
+
* * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is
|
|
937
|
+
* specified in the request.)
|
|
938
|
+
* * `DatabaseAdmin.RestoreDatabase`
|
|
939
|
+
* * `DatabaseAdmin.CreateBackup`
|
|
940
|
+
* * `DatabaseAdmin.CopyBackup`
|
|
941
|
+
*
|
|
942
|
+
* * Both the source and target instance configurations are subject to
|
|
943
|
+
* hourly compute and storage charges.
|
|
944
|
+
* * The instance might experience higher read-write latencies and a higher
|
|
945
|
+
* transaction abort rate. However, moving an instance doesn't cause any
|
|
946
|
+
* downtime.
|
|
947
|
+
*
|
|
948
|
+
* The returned {@link protos.google.longrunning.Operation|long-running operation} has
|
|
949
|
+
* a name of the format
|
|
950
|
+
* `<instance_name>/operations/<operation_id>` and can be used to track
|
|
951
|
+
* the move instance operation. The
|
|
952
|
+
* {@link protos.google.longrunning.Operation.metadata|metadata} field type is
|
|
953
|
+
* {@link protos.google.spanner.admin.instance.v1.MoveInstanceMetadata|MoveInstanceMetadata}.
|
|
954
|
+
* The {@link protos.google.longrunning.Operation.response|response} field type is
|
|
955
|
+
* {@link protos.google.spanner.admin.instance.v1.Instance|Instance},
|
|
956
|
+
* if successful.
|
|
957
|
+
* Cancelling the operation sets its metadata's
|
|
958
|
+
* {@link protos.google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time|cancel_time}.
|
|
959
|
+
* Cancellation is not immediate because it involves moving any data
|
|
960
|
+
* previously moved to the target instance configuration back to the original
|
|
961
|
+
* instance configuration. You can use this operation to track the progress of
|
|
962
|
+
* the cancellation. Upon successful completion of the cancellation, the
|
|
963
|
+
* operation terminates with `CANCELLED` status.
|
|
964
|
+
*
|
|
965
|
+
* If not cancelled, upon completion of the returned operation:
|
|
966
|
+
*
|
|
967
|
+
* * The instance successfully moves to the target instance
|
|
968
|
+
* configuration.
|
|
969
|
+
* * You are billed for compute and storage in target instance
|
|
970
|
+
* configuration.
|
|
971
|
+
*
|
|
972
|
+
* Authorization requires the `spanner.instances.update` permission on
|
|
973
|
+
* the resource {@link protos.google.spanner.admin.instance.v1.Instance|instance}.
|
|
974
|
+
*
|
|
975
|
+
* For more details, see
|
|
976
|
+
* [Move an instance](https://cloud.google.com/spanner/docs/move-instance).
|
|
977
|
+
*
|
|
978
|
+
* @param {Object} request
|
|
979
|
+
* The request object that will be sent.
|
|
980
|
+
* @param {string} request.name
|
|
981
|
+
* Required. The instance to move.
|
|
982
|
+
* Values are of the form `projects/<project>/instances/<instance>`.
|
|
983
|
+
* @param {string} request.targetConfig
|
|
984
|
+
* Required. The target instance configuration where to move the instance.
|
|
985
|
+
* Values are of the form `projects/<project>/instanceConfigs/<config>`.
|
|
986
|
+
* @param {object} [options]
|
|
987
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
988
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
989
|
+
* The first element of the array is an object representing
|
|
990
|
+
* a long running operation. Its `promise()` method returns a promise
|
|
991
|
+
* you can `await` for.
|
|
992
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
993
|
+
* for more details and examples.
|
|
994
|
+
*/
|
|
995
|
+
moveInstance(request?: protos.google.spanner.admin.instance.v1.IMoveInstanceRequest, options?: CallOptions): Promise<[
|
|
996
|
+
LROperation<protos.google.spanner.admin.instance.v1.IMoveInstanceResponse, protos.google.spanner.admin.instance.v1.IMoveInstanceMetadata>,
|
|
997
|
+
protos.google.longrunning.IOperation | undefined,
|
|
998
|
+
{} | undefined
|
|
999
|
+
]>;
|
|
1000
|
+
moveInstance(request: protos.google.spanner.admin.instance.v1.IMoveInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.spanner.admin.instance.v1.IMoveInstanceResponse, protos.google.spanner.admin.instance.v1.IMoveInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
1001
|
+
moveInstance(request: protos.google.spanner.admin.instance.v1.IMoveInstanceRequest, callback: Callback<LROperation<protos.google.spanner.admin.instance.v1.IMoveInstanceResponse, protos.google.spanner.admin.instance.v1.IMoveInstanceMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
1002
|
+
/**
|
|
1003
|
+
* Check the status of the long running operation returned by `moveInstance()`.
|
|
1004
|
+
* @param {String} name
|
|
1005
|
+
* The operation name that will be passed.
|
|
1006
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
1007
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
1008
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
1009
|
+
* for more details and examples.
|
|
1010
|
+
*/
|
|
1011
|
+
checkMoveInstanceProgress(name: string): Promise<LROperation<protos.google.spanner.admin.instance.v1.MoveInstanceResponse, protos.google.spanner.admin.instance.v1.MoveInstanceMetadata>>;
|
|
914
1012
|
/**
|
|
915
1013
|
* Lists the supported instance configurations for a given project.
|
|
916
1014
|
*
|
|
@@ -1005,9 +1103,9 @@ export declare class InstanceAdminClient {
|
|
|
1005
1103
|
*/
|
|
1006
1104
|
listInstanceConfigsAsync(request?: protos.google.spanner.admin.instance.v1.IListInstanceConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.spanner.admin.instance.v1.IInstanceConfig>;
|
|
1007
1105
|
/**
|
|
1008
|
-
* Lists the user-managed instance
|
|
1106
|
+
* Lists the user-managed instance configuration [long-running
|
|
1009
1107
|
* operations][google.longrunning.Operation] in the given project. An instance
|
|
1010
|
-
*
|
|
1108
|
+
* configuration operation has a name of the form
|
|
1011
1109
|
* `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
|
|
1012
1110
|
* The long-running operation
|
|
1013
1111
|
* {@link protos.google.longrunning.Operation.metadata|metadata} field type
|
|
@@ -1020,7 +1118,7 @@ export declare class InstanceAdminClient {
|
|
|
1020
1118
|
* @param {Object} request
|
|
1021
1119
|
* The request object that will be sent.
|
|
1022
1120
|
* @param {string} request.parent
|
|
1023
|
-
* Required. The project of the instance
|
|
1121
|
+
* Required. The project of the instance configuration operations.
|
|
1024
1122
|
* Values are of the form `projects/<project>`.
|
|
1025
1123
|
* @param {string} request.filter
|
|
1026
1124
|
* An expression that filters the list of returned operations.
|
|
@@ -1063,7 +1161,7 @@ export declare class InstanceAdminClient {
|
|
|
1063
1161
|
* `(error:*)` - Return operations where:
|
|
1064
1162
|
* * The operation's metadata type is
|
|
1065
1163
|
* {@link protos.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata|CreateInstanceConfigMetadata}.
|
|
1066
|
-
* * The instance
|
|
1164
|
+
* * The instance configuration name contains "custom-config".
|
|
1067
1165
|
* * The operation started before 2021-03-28T14:50:00Z.
|
|
1068
1166
|
* * The operation resulted in an error.
|
|
1069
1167
|
* @param {number} request.pageSize
|
|
@@ -1099,7 +1197,7 @@ export declare class InstanceAdminClient {
|
|
|
1099
1197
|
* @param {Object} request
|
|
1100
1198
|
* The request object that will be sent.
|
|
1101
1199
|
* @param {string} request.parent
|
|
1102
|
-
* Required. The project of the instance
|
|
1200
|
+
* Required. The project of the instance configuration operations.
|
|
1103
1201
|
* Values are of the form `projects/<project>`.
|
|
1104
1202
|
* @param {string} request.filter
|
|
1105
1203
|
* An expression that filters the list of returned operations.
|
|
@@ -1142,7 +1240,7 @@ export declare class InstanceAdminClient {
|
|
|
1142
1240
|
* `(error:*)` - Return operations where:
|
|
1143
1241
|
* * The operation's metadata type is
|
|
1144
1242
|
* {@link protos.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata|CreateInstanceConfigMetadata}.
|
|
1145
|
-
* * The instance
|
|
1243
|
+
* * The instance configuration name contains "custom-config".
|
|
1146
1244
|
* * The operation started before 2021-03-28T14:50:00Z.
|
|
1147
1245
|
* * The operation resulted in an error.
|
|
1148
1246
|
* @param {number} request.pageSize
|
|
@@ -1173,7 +1271,7 @@ export declare class InstanceAdminClient {
|
|
|
1173
1271
|
* @param {Object} request
|
|
1174
1272
|
* The request object that will be sent.
|
|
1175
1273
|
* @param {string} request.parent
|
|
1176
|
-
* Required. The project of the instance
|
|
1274
|
+
* Required. The project of the instance configuration operations.
|
|
1177
1275
|
* Values are of the form `projects/<project>`.
|
|
1178
1276
|
* @param {string} request.filter
|
|
1179
1277
|
* An expression that filters the list of returned operations.
|
|
@@ -1216,7 +1314,7 @@ export declare class InstanceAdminClient {
|
|
|
1216
1314
|
* `(error:*)` - Return operations where:
|
|
1217
1315
|
* * The operation's metadata type is
|
|
1218
1316
|
* {@link protos.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata|CreateInstanceConfigMetadata}.
|
|
1219
|
-
* * The instance
|
|
1317
|
+
* * The instance configuration name contains "custom-config".
|
|
1220
1318
|
* * The operation started before 2021-03-28T14:50:00Z.
|
|
1221
1319
|
* * The operation resulted in an error.
|
|
1222
1320
|
* @param {number} request.pageSize
|