@google-cloud/spanner 5.17.0 → 5.18.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 +15 -0
- package/README.md +13 -0
- package/build/protos/google/spanner/admin/database/v1/backup.proto +174 -9
- package/build/protos/google/spanner/admin/database/v1/common.proto +1 -2
- package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +27 -2
- package/build/protos/google/spanner/v1/commit_response.proto +0 -2
- package/build/protos/google/spanner/v1/keys.proto +0 -1
- package/build/protos/google/spanner/v1/mutation.proto +0 -1
- package/build/protos/google/spanner/v1/query_plan.proto +0 -1
- package/build/protos/google/spanner/v1/result_set.proto +0 -1
- package/build/protos/google/spanner/v1/transaction.proto +0 -1
- package/build/protos/google/spanner/v1/type.proto +0 -1
- package/build/protos/protos.d.ts +623 -261
- package/build/protos/protos.js +2996 -2096
- package/build/protos/protos.json +227 -87
- package/build/src/backup.d.ts +22 -4
- package/build/src/backup.js +60 -29
- package/build/src/codec.d.ts +11 -0
- package/build/src/codec.js +39 -2
- package/build/src/index.d.ts +17 -2
- package/build/src/index.js +19 -0
- package/build/src/instance.d.ts +40 -1
- package/build/src/instance.js +55 -1
- package/build/src/v1/database_admin_client.d.ts +166 -6
- package/build/src/v1/database_admin_client.js +106 -4
- package/build/src/v1/database_admin_client_config.json +5 -0
- package/package.json +1 -1
package/build/src/index.d.ts
CHANGED
|
@@ -18,12 +18,12 @@ import { GrpcService } from './common-grpc/service';
|
|
|
18
18
|
import { PreciseDate } from '@google-cloud/precise-date';
|
|
19
19
|
import { GoogleAuth, GoogleAuthOptions } from 'google-auth-library';
|
|
20
20
|
import { common as p } from 'protobufjs';
|
|
21
|
-
import { Float, Int, Numeric, Struct } from './codec';
|
|
21
|
+
import { Float, Int, Numeric, PGNumeric, Struct } from './codec';
|
|
22
22
|
import { Backup } from './backup';
|
|
23
23
|
import { Database } from './database';
|
|
24
24
|
import { Instance, CreateInstanceCallback, CreateInstanceResponse } from './instance';
|
|
25
25
|
import { grpc, GrpcClientOptions, CallOptions } from 'google-gax';
|
|
26
|
-
import { google as instanceAdmin } from '../protos/protos';
|
|
26
|
+
import { google, google as instanceAdmin } from '../protos/protos';
|
|
27
27
|
import { PagedOptions, PagedResponse, PagedCallback, PagedOptionsWithFilter, NormalCallback } from './common';
|
|
28
28
|
import { Session } from './session';
|
|
29
29
|
import { SessionPool } from './session-pool';
|
|
@@ -146,6 +146,8 @@ declare class Spanner extends GrpcService {
|
|
|
146
146
|
* @type {string}
|
|
147
147
|
*/
|
|
148
148
|
static COMMIT_TIMESTAMP: string;
|
|
149
|
+
static POSTGRESQL: google.spanner.admin.database.v1.DatabaseDialect;
|
|
150
|
+
static GOOGLE_STANDARD_SQL: google.spanner.admin.database.v1.DatabaseDialect;
|
|
149
151
|
/**
|
|
150
152
|
* Gets the configured Spanner emulator host from an environment variable.
|
|
151
153
|
*/
|
|
@@ -684,6 +686,19 @@ declare class Spanner extends GrpcService {
|
|
|
684
686
|
* ```
|
|
685
687
|
*/
|
|
686
688
|
static numeric(value: any): Numeric;
|
|
689
|
+
/**
|
|
690
|
+
* Helper function to get a Cloud Spanner pgNumeric object.
|
|
691
|
+
*
|
|
692
|
+
* @param {string} value The pgNumeric value as a string.
|
|
693
|
+
* @returns {PGNumeric}
|
|
694
|
+
*
|
|
695
|
+
* @example
|
|
696
|
+
* ```
|
|
697
|
+
* const {Spanner} = require('@google-cloud/spanner');
|
|
698
|
+
* const pgNumeric = Spanner.pgNumeric("3.141592653");
|
|
699
|
+
* ```
|
|
700
|
+
*/
|
|
701
|
+
static pgNumeric(value: any): PGNumeric;
|
|
687
702
|
/**
|
|
688
703
|
* Helper function to get a Cloud Spanner Struct object.
|
|
689
704
|
*
|
package/build/src/index.js
CHANGED
|
@@ -33,6 +33,7 @@ Object.defineProperty(exports, "Database", { enumerable: true, get: function ()
|
|
|
33
33
|
const instance_1 = require("./instance");
|
|
34
34
|
Object.defineProperty(exports, "Instance", { enumerable: true, get: function () { return instance_1.Instance; } });
|
|
35
35
|
const google_gax_1 = require("google-gax");
|
|
36
|
+
const protos_1 = require("../protos/protos");
|
|
36
37
|
const common_1 = require("./common");
|
|
37
38
|
const session_1 = require("./session");
|
|
38
39
|
Object.defineProperty(exports, "Session", { enumerable: true, get: function () { return session_1.Session; } });
|
|
@@ -705,6 +706,21 @@ class Spanner extends service_1.GrpcService {
|
|
|
705
706
|
static numeric(value) {
|
|
706
707
|
return new codec_1.codec.Numeric(value);
|
|
707
708
|
}
|
|
709
|
+
/**
|
|
710
|
+
* Helper function to get a Cloud Spanner pgNumeric object.
|
|
711
|
+
*
|
|
712
|
+
* @param {string} value The pgNumeric value as a string.
|
|
713
|
+
* @returns {PGNumeric}
|
|
714
|
+
*
|
|
715
|
+
* @example
|
|
716
|
+
* ```
|
|
717
|
+
* const {Spanner} = require('@google-cloud/spanner');
|
|
718
|
+
* const pgNumeric = Spanner.pgNumeric("3.141592653");
|
|
719
|
+
* ```
|
|
720
|
+
*/
|
|
721
|
+
static pgNumeric(value) {
|
|
722
|
+
return new codec_1.codec.PGNumeric(value);
|
|
723
|
+
}
|
|
708
724
|
/**
|
|
709
725
|
* Helper function to get a Cloud Spanner Struct object.
|
|
710
726
|
*
|
|
@@ -736,6 +752,8 @@ exports.Spanner = Spanner;
|
|
|
736
752
|
* @type {string}
|
|
737
753
|
*/
|
|
738
754
|
Spanner.COMMIT_TIMESTAMP = 'spanner.commit_timestamp()';
|
|
755
|
+
Spanner.POSTGRESQL = protos_1.google.spanner.admin.database.v1.DatabaseDialect.POSTGRESQL;
|
|
756
|
+
Spanner.GOOGLE_STANDARD_SQL = protos_1.google.spanner.admin.database.v1.DatabaseDialect.GOOGLE_STANDARD_SQL;
|
|
739
757
|
/*! Developer Documentation
|
|
740
758
|
*
|
|
741
759
|
* All async methods (except for streams) will return a Promise in the event
|
|
@@ -748,6 +766,7 @@ promisify_1.promisifyAll(Spanner, {
|
|
|
748
766
|
'instance',
|
|
749
767
|
'int',
|
|
750
768
|
'numeric',
|
|
769
|
+
'pgNumeric',
|
|
751
770
|
'operation',
|
|
752
771
|
'timestamp',
|
|
753
772
|
],
|
package/build/src/instance.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import { RequestCallback, PagedOptions, PagedResponse, LongRunningCallback, Norm
|
|
|
22
22
|
import { Duplex } from 'stream';
|
|
23
23
|
import { SessionPoolOptions, SessionPool } from './session-pool';
|
|
24
24
|
import { Operation as GaxOperation, CallOptions } from 'google-gax';
|
|
25
|
-
import { Backup } from './backup';
|
|
25
|
+
import { Backup, CopyBackupCallback, CopyBackupResponse, CopyBackupOptions } from './backup';
|
|
26
26
|
import { google as instanceAdmin } from '../protos/protos';
|
|
27
27
|
import { google as databaseAdmin } from '../protos/protos';
|
|
28
28
|
import { google as spannerClient } from '../protos/protos';
|
|
@@ -119,6 +119,45 @@ declare class Instance extends common.GrpcServiceObject {
|
|
|
119
119
|
* ```
|
|
120
120
|
*/
|
|
121
121
|
backup(backupId: string): Backup;
|
|
122
|
+
/**
|
|
123
|
+
* Get a reference to a Backup object.
|
|
124
|
+
*
|
|
125
|
+
* @throws {GoogleError} If any parameter is not provided.
|
|
126
|
+
*
|
|
127
|
+
* @typedef {object} CopyBackupOptions
|
|
128
|
+
* * @property {string|null}
|
|
129
|
+
* * sourceBackup The full path of the backup to be copied
|
|
130
|
+
* * @property {string|number|google.protobuf.Timestamp|external:PreciseDate}
|
|
131
|
+
* * expireTime The expire time of the backup.
|
|
132
|
+
* * @property {google.spanner.admin.database.v1.ICopyBackupEncryptionConfig}
|
|
133
|
+
* * encryptionConfig An encryption configuration describing the
|
|
134
|
+
* * encryption type and key resources in Cloud KMS to be used to encrypt
|
|
135
|
+
* * the copy backup.
|
|
136
|
+
* * @property {object} [gaxOptions] The request configuration options,
|
|
137
|
+
* * See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions}
|
|
138
|
+
* * for more details.
|
|
139
|
+
* */
|
|
140
|
+
/**
|
|
141
|
+
* @callback CopyBackupCallback
|
|
142
|
+
* @param {string} sourceBackupId Full path of the source backup to be copied.
|
|
143
|
+
* @param {string} backupId The name of the backup.
|
|
144
|
+
* @param {CopyBackupOptions}
|
|
145
|
+
* @return {Backup} A Backup object.
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```
|
|
149
|
+
* const {Spanner} = require('@google-cloud/spanner');
|
|
150
|
+
* const spanner = new Spanner();
|
|
151
|
+
* const instance = spanner.instance('my-instance');
|
|
152
|
+
* const backup = instance.backup('my-source-backup','my-backup',{
|
|
153
|
+
* expireTime: expireTime,
|
|
154
|
+
* encryptionConfig: {
|
|
155
|
+
* encryptionType: 'CUSTOMER_MANAGED_ENCRYPTION',
|
|
156
|
+
* kmsKeyName: 'projects/my-project-id/my-region/keyRings/my-key-ring/cryptoKeys/my-key',
|
|
157
|
+
* },);
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
copyBackup(sourceBackupId: string, backupId: string, options: CopyBackupOptions, callback?: CopyBackupCallback): Promise<CopyBackupResponse> | void;
|
|
122
161
|
/**
|
|
123
162
|
* Query object for listing backups.
|
|
124
163
|
*
|
package/build/src/instance.js
CHANGED
|
@@ -26,6 +26,7 @@ const database_1 = require("./database");
|
|
|
26
26
|
const common_1 = require("./common");
|
|
27
27
|
const google_gax_1 = require("google-gax");
|
|
28
28
|
const backup_1 = require("./backup");
|
|
29
|
+
const protos_1 = require("../protos/protos");
|
|
29
30
|
/**
|
|
30
31
|
* The {@link Instance} class represents a [Cloud Spanner
|
|
31
32
|
* instance](https://cloud.google.com/spanner/docs/instances).
|
|
@@ -139,6 +140,54 @@ class Instance extends common.GrpcServiceObject {
|
|
|
139
140
|
}
|
|
140
141
|
return new backup_1.Backup(this, backupId);
|
|
141
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Get a reference to a Backup object.
|
|
145
|
+
*
|
|
146
|
+
* @throws {GoogleError} If any parameter is not provided.
|
|
147
|
+
*
|
|
148
|
+
* @typedef {object} CopyBackupOptions
|
|
149
|
+
* * @property {string|null}
|
|
150
|
+
* * sourceBackup The full path of the backup to be copied
|
|
151
|
+
* * @property {string|number|google.protobuf.Timestamp|external:PreciseDate}
|
|
152
|
+
* * expireTime The expire time of the backup.
|
|
153
|
+
* * @property {google.spanner.admin.database.v1.ICopyBackupEncryptionConfig}
|
|
154
|
+
* * encryptionConfig An encryption configuration describing the
|
|
155
|
+
* * encryption type and key resources in Cloud KMS to be used to encrypt
|
|
156
|
+
* * the copy backup.
|
|
157
|
+
* * @property {object} [gaxOptions] The request configuration options,
|
|
158
|
+
* * See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions}
|
|
159
|
+
* * for more details.
|
|
160
|
+
* */
|
|
161
|
+
/**
|
|
162
|
+
* @callback CopyBackupCallback
|
|
163
|
+
* @param {string} sourceBackupId Full path of the source backup to be copied.
|
|
164
|
+
* @param {string} backupId The name of the backup.
|
|
165
|
+
* @param {CopyBackupOptions}
|
|
166
|
+
* @return {Backup} A Backup object.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```
|
|
170
|
+
* const {Spanner} = require('@google-cloud/spanner');
|
|
171
|
+
* const spanner = new Spanner();
|
|
172
|
+
* const instance = spanner.instance('my-instance');
|
|
173
|
+
* const backup = instance.backup('my-source-backup','my-backup',{
|
|
174
|
+
* expireTime: expireTime,
|
|
175
|
+
* encryptionConfig: {
|
|
176
|
+
* encryptionType: 'CUSTOMER_MANAGED_ENCRYPTION',
|
|
177
|
+
* kmsKeyName: 'projects/my-project-id/my-region/keyRings/my-key-ring/cryptoKeys/my-key',
|
|
178
|
+
* },);
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
copyBackup(sourceBackupId, backupId, options, callback) {
|
|
182
|
+
if (!backupId || !sourceBackupId) {
|
|
183
|
+
throw new google_gax_1.GoogleError('A backup ID and source backup ID is required to create a copy of the source backup.');
|
|
184
|
+
}
|
|
185
|
+
const copyOfBackup = new backup_1.Backup(this, backupId, sourceBackupId);
|
|
186
|
+
if (callback) {
|
|
187
|
+
return copyOfBackup.create(options, callback);
|
|
188
|
+
}
|
|
189
|
+
return copyOfBackup.create(options);
|
|
190
|
+
}
|
|
142
191
|
getBackups(optionsOrCallback, cb) {
|
|
143
192
|
const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb;
|
|
144
193
|
const options = typeof optionsOrCallback === 'object'
|
|
@@ -394,9 +443,14 @@ class Instance extends common.GrpcServiceObject {
|
|
|
394
443
|
: {};
|
|
395
444
|
const poolOptions = options.poolOptions;
|
|
396
445
|
const poolCtor = options.poolCtor;
|
|
446
|
+
let createStatement = 'CREATE DATABASE `' + name.split('/').pop() + '`';
|
|
447
|
+
if (protos_1.google.spanner.admin.database.v1.DatabaseDialect.POSTGRESQL ===
|
|
448
|
+
options.databaseDialect) {
|
|
449
|
+
createStatement = 'CREATE DATABASE "' + name.split('/').pop() + '"';
|
|
450
|
+
}
|
|
397
451
|
const reqOpts = extend({
|
|
398
452
|
parent: this.formattedName_,
|
|
399
|
-
createStatement:
|
|
453
|
+
createStatement: createStatement,
|
|
400
454
|
}, options);
|
|
401
455
|
delete reqOpts.poolOptions;
|
|
402
456
|
delete reqOpts.poolCtor;
|
|
@@ -534,6 +534,76 @@ export declare class DatabaseAdminClient {
|
|
|
534
534
|
* region_tag:spanner_v1_generated_DatabaseAdmin_CreateBackup_async
|
|
535
535
|
*/
|
|
536
536
|
checkCreateBackupProgress(name: string): Promise<LROperation<protos.google.spanner.admin.database.v1.Backup, protos.google.spanner.admin.database.v1.CreateBackupMetadata>>;
|
|
537
|
+
/**
|
|
538
|
+
* Starts copying a Cloud Spanner Backup.
|
|
539
|
+
* The returned backup {@link google.longrunning.Operation|long-running operation}
|
|
540
|
+
* will have a name of the format
|
|
541
|
+
* `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
|
|
542
|
+
* and can be used to track copying of the backup. The operation is associated
|
|
543
|
+
* with the destination backup.
|
|
544
|
+
* The {@link google.longrunning.Operation.metadata|metadata} field type is
|
|
545
|
+
* {@link google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata}.
|
|
546
|
+
* The {@link google.longrunning.Operation.response|response} field type is
|
|
547
|
+
* {@link google.spanner.admin.database.v1.Backup|Backup}, if successful. Cancelling the returned operation will stop the
|
|
548
|
+
* copying and delete the backup.
|
|
549
|
+
* Concurrent CopyBackup requests can run on the same source backup.
|
|
550
|
+
*
|
|
551
|
+
* @param {Object} request
|
|
552
|
+
* The request object that will be sent.
|
|
553
|
+
* @param {string} request.parent
|
|
554
|
+
* Required. The name of the destination instance that will contain the backup copy.
|
|
555
|
+
* Values are of the form: `projects/<project>/instances/<instance>`.
|
|
556
|
+
* @param {string} request.backupId
|
|
557
|
+
* Required. The id of the backup copy.
|
|
558
|
+
* The `backup_id` appended to `parent` forms the full backup_uri of the form
|
|
559
|
+
* `projects/<project>/instances/<instance>/backups/<backup>`.
|
|
560
|
+
* @param {string} request.sourceBackup
|
|
561
|
+
* Required. The source backup to be copied.
|
|
562
|
+
* The source backup needs to be in READY state for it to be copied.
|
|
563
|
+
* Once CopyBackup is in progress, the source backup cannot be deleted or
|
|
564
|
+
* cleaned up on expiration until CopyBackup is finished.
|
|
565
|
+
* Values are of the form:
|
|
566
|
+
* `projects/<project>/instances/<instance>/backups/<backup>`.
|
|
567
|
+
* @param {google.protobuf.Timestamp} request.expireTime
|
|
568
|
+
* Required. The expiration time of the backup in microsecond granularity.
|
|
569
|
+
* The expiration time must be at least 6 hours and at most 366 days
|
|
570
|
+
* from the `create_time` of the source backup. Once the `expire_time` has
|
|
571
|
+
* passed, the backup is eligible to be automatically deleted by Cloud Spanner
|
|
572
|
+
* to free the resources used by the backup.
|
|
573
|
+
* @param {google.spanner.admin.database.v1.CopyBackupEncryptionConfig} [request.encryptionConfig]
|
|
574
|
+
* Optional. The encryption configuration used to encrypt the backup. If this field is
|
|
575
|
+
* not specified, the backup will use the same
|
|
576
|
+
* encryption configuration as the source backup by default, namely
|
|
577
|
+
* {@link google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type|encryption_type} =
|
|
578
|
+
* `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
|
|
579
|
+
* @param {object} [options]
|
|
580
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
581
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
582
|
+
* The first element of the array is an object representing
|
|
583
|
+
* a long running operation. Its `promise()` method returns a promise
|
|
584
|
+
* you can `await` for.
|
|
585
|
+
* Please see the
|
|
586
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
587
|
+
* for more details and examples.
|
|
588
|
+
* @example <caption>include:samples/generated/v1/database_admin.copy_backup.js</caption>
|
|
589
|
+
* region_tag:spanner_v1_generated_DatabaseAdmin_CopyBackup_async
|
|
590
|
+
*/
|
|
591
|
+
copyBackup(request?: protos.google.spanner.admin.database.v1.ICopyBackupRequest, options?: CallOptions): Promise<[LROperation<protos.google.spanner.admin.database.v1.IBackup, protos.google.spanner.admin.database.v1.ICopyBackupMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
|
|
592
|
+
copyBackup(request: protos.google.spanner.admin.database.v1.ICopyBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.spanner.admin.database.v1.IBackup, protos.google.spanner.admin.database.v1.ICopyBackupMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
593
|
+
copyBackup(request: protos.google.spanner.admin.database.v1.ICopyBackupRequest, callback: Callback<LROperation<protos.google.spanner.admin.database.v1.IBackup, protos.google.spanner.admin.database.v1.ICopyBackupMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
594
|
+
/**
|
|
595
|
+
* Check the status of the long running operation returned by `copyBackup()`.
|
|
596
|
+
* @param {String} name
|
|
597
|
+
* The operation name that will be passed.
|
|
598
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
599
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
600
|
+
* Please see the
|
|
601
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
|
602
|
+
* for more details and examples.
|
|
603
|
+
* @example <caption>include:samples/generated/v1/database_admin.copy_backup.js</caption>
|
|
604
|
+
* region_tag:spanner_v1_generated_DatabaseAdmin_CopyBackup_async
|
|
605
|
+
*/
|
|
606
|
+
checkCopyBackupProgress(name: string): Promise<LROperation<protos.google.spanner.admin.database.v1.Backup, protos.google.spanner.admin.database.v1.CopyBackupMetadata>>;
|
|
537
607
|
/**
|
|
538
608
|
* Create a new database by restoring from a completed backup. The new
|
|
539
609
|
* database must be in the same project and in an instance with the same
|
|
@@ -926,6 +996,8 @@ export declare class DatabaseAdminClient {
|
|
|
926
996
|
* for {@link google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} is
|
|
927
997
|
* `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
|
|
928
998
|
* * `metadata.<field_name>` - any field in metadata.value.
|
|
999
|
+
* `metadata.@type` must be specified first, if filtering on metadata
|
|
1000
|
+
* fields.
|
|
929
1001
|
* * `error` - Error associated with the long-running operation.
|
|
930
1002
|
* * `response.@type` - the type of response.
|
|
931
1003
|
* * `response.<field_name>` - any field in response.value.
|
|
@@ -998,6 +1070,8 @@ export declare class DatabaseAdminClient {
|
|
|
998
1070
|
* for {@link google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} is
|
|
999
1071
|
* `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
|
|
1000
1072
|
* * `metadata.<field_name>` - any field in metadata.value.
|
|
1073
|
+
* `metadata.@type` must be specified first, if filtering on metadata
|
|
1074
|
+
* fields.
|
|
1001
1075
|
* * `error` - Error associated with the long-running operation.
|
|
1002
1076
|
* * `response.@type` - the type of response.
|
|
1003
1077
|
* * `response.<field_name>` - any field in response.value.
|
|
@@ -1069,6 +1143,8 @@ export declare class DatabaseAdminClient {
|
|
|
1069
1143
|
* for {@link google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} is
|
|
1070
1144
|
* `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
|
|
1071
1145
|
* * `metadata.<field_name>` - any field in metadata.value.
|
|
1146
|
+
* `metadata.@type` must be specified first, if filtering on metadata
|
|
1147
|
+
* fields.
|
|
1072
1148
|
* * `error` - Error associated with the long-running operation.
|
|
1073
1149
|
* * `response.@type` - the type of response.
|
|
1074
1150
|
* * `response.<field_name>` - any field in response.value.
|
|
@@ -1149,6 +1225,8 @@ export declare class DatabaseAdminClient {
|
|
|
1149
1225
|
* for {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} is
|
|
1150
1226
|
* `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
|
|
1151
1227
|
* * `metadata.<field_name>` - any field in metadata.value.
|
|
1228
|
+
* `metadata.@type` must be specified first if filtering on metadata
|
|
1229
|
+
* fields.
|
|
1152
1230
|
* * `error` - Error associated with the long-running operation.
|
|
1153
1231
|
* * `response.@type` - the type of response.
|
|
1154
1232
|
* * `response.<field_name>` - any field in response.value.
|
|
@@ -1160,8 +1238,11 @@ export declare class DatabaseAdminClient {
|
|
|
1160
1238
|
* Here are a few examples:
|
|
1161
1239
|
*
|
|
1162
1240
|
* * `done:true` - The operation is complete.
|
|
1163
|
-
* * `metadata.database
|
|
1164
|
-
*
|
|
1241
|
+
* * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
|
1242
|
+
* `metadata.database:prod` - Returns operations where:
|
|
1243
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}.
|
|
1244
|
+
* * The database the backup was taken from has a name containing the
|
|
1245
|
+
* string "prod".
|
|
1165
1246
|
* * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
|
1166
1247
|
* `(metadata.name:howl) AND` \
|
|
1167
1248
|
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
|
|
@@ -1170,6 +1251,29 @@ export declare class DatabaseAdminClient {
|
|
|
1170
1251
|
* * The backup name contains the string "howl".
|
|
1171
1252
|
* * The operation started before 2018-03-28T14:50:00Z.
|
|
1172
1253
|
* * The operation resulted in an error.
|
|
1254
|
+
* * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \
|
|
1255
|
+
* `(metadata.source_backup:test) AND` \
|
|
1256
|
+
* `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \
|
|
1257
|
+
* `(error:*)` - Returns operations where:
|
|
1258
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata}.
|
|
1259
|
+
* * The source backup of the copied backup name contains the string
|
|
1260
|
+
* "test".
|
|
1261
|
+
* * The operation started before 2022-01-18T14:50:00Z.
|
|
1262
|
+
* * The operation resulted in an error.
|
|
1263
|
+
* * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
|
1264
|
+
* `(metadata.database:test_db)) OR` \
|
|
1265
|
+
* `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata)
|
|
1266
|
+
* AND` \
|
|
1267
|
+
* `(metadata.source_backup:test_bkp)) AND` \
|
|
1268
|
+
* `(error:*)` - Returns operations where:
|
|
1269
|
+
* * The operation's metadata matches either of criteria:
|
|
1270
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} AND the
|
|
1271
|
+
* database the backup was taken from has name containing string
|
|
1272
|
+
* "test_db"
|
|
1273
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata} AND the
|
|
1274
|
+
* backup the backup was copied from has name containing string
|
|
1275
|
+
* "test_bkp"
|
|
1276
|
+
* * The operation resulted in an error.
|
|
1173
1277
|
* @param {number} request.pageSize
|
|
1174
1278
|
* Number of operations to be returned in the response. If 0 or
|
|
1175
1279
|
* less, defaults to the server's maximum allowed page size.
|
|
@@ -1219,6 +1323,8 @@ export declare class DatabaseAdminClient {
|
|
|
1219
1323
|
* for {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} is
|
|
1220
1324
|
* `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
|
|
1221
1325
|
* * `metadata.<field_name>` - any field in metadata.value.
|
|
1326
|
+
* `metadata.@type` must be specified first if filtering on metadata
|
|
1327
|
+
* fields.
|
|
1222
1328
|
* * `error` - Error associated with the long-running operation.
|
|
1223
1329
|
* * `response.@type` - the type of response.
|
|
1224
1330
|
* * `response.<field_name>` - any field in response.value.
|
|
@@ -1230,8 +1336,11 @@ export declare class DatabaseAdminClient {
|
|
|
1230
1336
|
* Here are a few examples:
|
|
1231
1337
|
*
|
|
1232
1338
|
* * `done:true` - The operation is complete.
|
|
1233
|
-
* * `metadata.database
|
|
1234
|
-
*
|
|
1339
|
+
* * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
|
1340
|
+
* `metadata.database:prod` - Returns operations where:
|
|
1341
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}.
|
|
1342
|
+
* * The database the backup was taken from has a name containing the
|
|
1343
|
+
* string "prod".
|
|
1235
1344
|
* * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
|
1236
1345
|
* `(metadata.name:howl) AND` \
|
|
1237
1346
|
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
|
|
@@ -1240,6 +1349,29 @@ export declare class DatabaseAdminClient {
|
|
|
1240
1349
|
* * The backup name contains the string "howl".
|
|
1241
1350
|
* * The operation started before 2018-03-28T14:50:00Z.
|
|
1242
1351
|
* * The operation resulted in an error.
|
|
1352
|
+
* * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \
|
|
1353
|
+
* `(metadata.source_backup:test) AND` \
|
|
1354
|
+
* `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \
|
|
1355
|
+
* `(error:*)` - Returns operations where:
|
|
1356
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata}.
|
|
1357
|
+
* * The source backup of the copied backup name contains the string
|
|
1358
|
+
* "test".
|
|
1359
|
+
* * The operation started before 2022-01-18T14:50:00Z.
|
|
1360
|
+
* * The operation resulted in an error.
|
|
1361
|
+
* * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
|
1362
|
+
* `(metadata.database:test_db)) OR` \
|
|
1363
|
+
* `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata)
|
|
1364
|
+
* AND` \
|
|
1365
|
+
* `(metadata.source_backup:test_bkp)) AND` \
|
|
1366
|
+
* `(error:*)` - Returns operations where:
|
|
1367
|
+
* * The operation's metadata matches either of criteria:
|
|
1368
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} AND the
|
|
1369
|
+
* database the backup was taken from has name containing string
|
|
1370
|
+
* "test_db"
|
|
1371
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata} AND the
|
|
1372
|
+
* backup the backup was copied from has name containing string
|
|
1373
|
+
* "test_bkp"
|
|
1374
|
+
* * The operation resulted in an error.
|
|
1243
1375
|
* @param {number} request.pageSize
|
|
1244
1376
|
* Number of operations to be returned in the response. If 0 or
|
|
1245
1377
|
* less, defaults to the server's maximum allowed page size.
|
|
@@ -1288,6 +1420,8 @@ export declare class DatabaseAdminClient {
|
|
|
1288
1420
|
* for {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} is
|
|
1289
1421
|
* `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
|
|
1290
1422
|
* * `metadata.<field_name>` - any field in metadata.value.
|
|
1423
|
+
* `metadata.@type` must be specified first if filtering on metadata
|
|
1424
|
+
* fields.
|
|
1291
1425
|
* * `error` - Error associated with the long-running operation.
|
|
1292
1426
|
* * `response.@type` - the type of response.
|
|
1293
1427
|
* * `response.<field_name>` - any field in response.value.
|
|
@@ -1299,8 +1433,11 @@ export declare class DatabaseAdminClient {
|
|
|
1299
1433
|
* Here are a few examples:
|
|
1300
1434
|
*
|
|
1301
1435
|
* * `done:true` - The operation is complete.
|
|
1302
|
-
* * `metadata.database
|
|
1303
|
-
*
|
|
1436
|
+
* * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
|
1437
|
+
* `metadata.database:prod` - Returns operations where:
|
|
1438
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}.
|
|
1439
|
+
* * The database the backup was taken from has a name containing the
|
|
1440
|
+
* string "prod".
|
|
1304
1441
|
* * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
|
1305
1442
|
* `(metadata.name:howl) AND` \
|
|
1306
1443
|
* `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
|
|
@@ -1309,6 +1446,29 @@ export declare class DatabaseAdminClient {
|
|
|
1309
1446
|
* * The backup name contains the string "howl".
|
|
1310
1447
|
* * The operation started before 2018-03-28T14:50:00Z.
|
|
1311
1448
|
* * The operation resulted in an error.
|
|
1449
|
+
* * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \
|
|
1450
|
+
* `(metadata.source_backup:test) AND` \
|
|
1451
|
+
* `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \
|
|
1452
|
+
* `(error:*)` - Returns operations where:
|
|
1453
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata}.
|
|
1454
|
+
* * The source backup of the copied backup name contains the string
|
|
1455
|
+
* "test".
|
|
1456
|
+
* * The operation started before 2022-01-18T14:50:00Z.
|
|
1457
|
+
* * The operation resulted in an error.
|
|
1458
|
+
* * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
|
1459
|
+
* `(metadata.database:test_db)) OR` \
|
|
1460
|
+
* `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata)
|
|
1461
|
+
* AND` \
|
|
1462
|
+
* `(metadata.source_backup:test_bkp)) AND` \
|
|
1463
|
+
* `(error:*)` - Returns operations where:
|
|
1464
|
+
* * The operation's metadata matches either of criteria:
|
|
1465
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} AND the
|
|
1466
|
+
* database the backup was taken from has name containing string
|
|
1467
|
+
* "test_db"
|
|
1468
|
+
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CopyBackupMetadata|CopyBackupMetadata} AND the
|
|
1469
|
+
* backup the backup was copied from has name containing string
|
|
1470
|
+
* "test_bkp"
|
|
1471
|
+
* * The operation resulted in an error.
|
|
1312
1472
|
* @param {number} request.pageSize
|
|
1313
1473
|
* Number of operations to be returned in the response. If 0 or
|
|
1314
1474
|
* less, defaults to the server's maximum allowed page size.
|