@google-cloud/spanner
Advanced tools
Comparing version 5.5.0 to 5.6.0
@@ -31,2 +31,3 @@ /** | ||
versionTime?: string | number | p.ITimestamp | PreciseDate; | ||
encryptionConfig?: databaseAdmin.spanner.admin.database.v1.ICreateBackupEncryptionConfig; | ||
gaxOptions?: CallOptions; | ||
@@ -33,0 +34,0 @@ } |
@@ -53,2 +53,6 @@ "use strict"; | ||
* versionTime Take a backup of the state of the database at this time. | ||
* @property {databaseAdmin.spanner.admin.database.v1.ICreateBackupEncryptionConfig} | ||
* encryptionConfig An encryption configuration describing the | ||
* encryption type and key resources in Cloud KMS to be used to encrypt | ||
* the backup. | ||
* @property {CallOptions} [gaxOptions] The request configuration options | ||
@@ -97,2 +101,6 @@ * outlined here: | ||
* versionTime: versionTime, | ||
* encryptionConfig: { | ||
* encryptionType: 'CUSTOMER_MANAGED_ENCRYPTION', | ||
* kmsKeyName: 'projects/my-project-id/my-region/keyRings/my-key-ring/cryptoKeys/my-key', | ||
* }, | ||
* }); | ||
@@ -116,2 +124,6 @@ * // Await completion of the backup operation. | ||
} | ||
if ('encryptionConfig' in options && | ||
options.encryptionConfig) { | ||
reqOpts.encryptionConfig = options.encryptionConfig; | ||
} | ||
this.request({ | ||
@@ -118,0 +130,0 @@ client: 'DatabaseAdminClient', |
@@ -17,5 +17,2 @@ /*! | ||
/// <reference types="node" /> | ||
/*! | ||
* @module commonGrpc/service | ||
*/ | ||
import { Abortable, BodyResponseCallback, DecorateRequestOptions, Service, ServiceConfig } from '@google-cloud/common'; | ||
@@ -22,0 +19,0 @@ import { grpc } from 'google-gax'; |
@@ -22,2 +22,3 @@ "use strict"; | ||
*/ | ||
const path = require("path"); | ||
const common_1 = require("@google-cloud/common"); | ||
@@ -32,2 +33,3 @@ const projectify_1 = require("@google-cloud/projectify"); | ||
const stream_1 = require("stream"); | ||
const gaxProtoPath = path.join(path.dirname(require.resolve('google-gax')), '..', 'protos'); | ||
// TODO: convert this object to an array | ||
@@ -790,3 +792,3 @@ /** | ||
oneofs: true, | ||
includeDirs: [config.protosDir], | ||
includeDirs: [config.protosDir, gaxProtoPath], | ||
}); | ||
@@ -793,0 +795,0 @@ GrpcService.protoObjectCache[protoObjectCacheKey] = services; |
@@ -93,2 +93,6 @@ /*! | ||
} | ||
export interface RestoreOptions { | ||
encryptionConfig?: databaseAdmin.spanner.admin.database.v1.IRestoreDatabaseEncryptionConfig; | ||
gaxOptions?: CallOptions; | ||
} | ||
/** | ||
@@ -252,5 +256,5 @@ * Create a Database object to interact with a Cloud Spanner database. | ||
restore(backupPath: string): Promise<RestoreDatabaseResponse>; | ||
restore(backupPath: string, options?: CallOptions): Promise<RestoreDatabaseResponse>; | ||
restore(backupPath: string, options?: RestoreOptions | CallOptions): Promise<RestoreDatabaseResponse>; | ||
restore(backupPath: string, callback: RestoreDatabaseCallback): void; | ||
restore(backupPath: string, options: CallOptions, callback: RestoreDatabaseCallback): void; | ||
restore(backupPath: string, options: RestoreOptions | CallOptions, callback: RestoreDatabaseCallback): void; | ||
run(query: string | ExecuteSqlRequest): Promise<RunResponse>; | ||
@@ -257,0 +261,0 @@ run(query: string | ExecuteSqlRequest, options?: TimestampBounds): Promise<RunResponse>; |
@@ -226,4 +226,5 @@ /// <reference types="node" /> | ||
* If non-empty, `page_token` should contain a | ||
* {@link google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token|next_page_token} from a | ||
* previous {@link google.spanner.admin.database.v1.ListDatabasesResponse|ListDatabasesResponse}. | ||
* {@link google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token|next_page_token} | ||
* from a previous | ||
* {@link google.spanner.admin.database.v1.ListDatabasesResponse|ListDatabasesResponse}. | ||
* @param {object} [options] | ||
@@ -256,4 +257,5 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* If non-empty, `page_token` should contain a | ||
* {@link google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token|next_page_token} from a | ||
* previous {@link google.spanner.admin.database.v1.ListDatabasesResponse|ListDatabasesResponse}. | ||
* {@link google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token|next_page_token} | ||
* from a previous | ||
* {@link google.spanner.admin.database.v1.ListDatabasesResponse|ListDatabasesResponse}. | ||
* @param {object} [options] | ||
@@ -295,3 +297,5 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* | ||
* The following fields in the {@link google.spanner.admin.database.v1.Backup|Backup} are eligible for filtering: | ||
* The following fields in the | ||
* {@link google.spanner.admin.database.v1.Backup|Backup} are eligible for | ||
* filtering: | ||
* | ||
@@ -301,4 +305,5 @@ * * `name` | ||
* * `state` | ||
* * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | ||
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | ||
* * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | ||
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | ||
* * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | ||
* * `size_bytes` | ||
@@ -328,5 +333,6 @@ * | ||
* If non-empty, `page_token` should contain a | ||
* {@link google.spanner.admin.database.v1.ListBackupsResponse.next_page_token|next_page_token} from a | ||
* previous {@link google.spanner.admin.database.v1.ListBackupsResponse|ListBackupsResponse} to the same `parent` and with the same | ||
* `filter`. | ||
* {@link google.spanner.admin.database.v1.ListBackupsResponse.next_page_token|next_page_token} | ||
* from a previous | ||
* {@link google.spanner.admin.database.v1.ListBackupsResponse|ListBackupsResponse} | ||
* to the same `parent` and with the same `filter`. | ||
* @param {object} [options] | ||
@@ -363,3 +369,5 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* | ||
* The following fields in the {@link google.spanner.admin.database.v1.Backup|Backup} are eligible for filtering: | ||
* The following fields in the | ||
* {@link google.spanner.admin.database.v1.Backup|Backup} are eligible for | ||
* filtering: | ||
* | ||
@@ -369,4 +377,5 @@ * * `name` | ||
* * `state` | ||
* * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | ||
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | ||
* * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | ||
* * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | ||
* * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | ||
* * `size_bytes` | ||
@@ -396,5 +405,6 @@ * | ||
* If non-empty, `page_token` should contain a | ||
* {@link google.spanner.admin.database.v1.ListBackupsResponse.next_page_token|next_page_token} from a | ||
* previous {@link google.spanner.admin.database.v1.ListBackupsResponse|ListBackupsResponse} to the same `parent` and with the same | ||
* `filter`. | ||
* {@link google.spanner.admin.database.v1.ListBackupsResponse.next_page_token|next_page_token} | ||
* from a previous | ||
* {@link google.spanner.admin.database.v1.ListBackupsResponse|ListBackupsResponse} | ||
* to the same `parent` and with the same `filter`. | ||
* @param {object} [options] | ||
@@ -442,3 +452,5 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* * `metadata.@type` - the type of metadata. For example, the type string | ||
* for {@link google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} is | ||
* for | ||
* {@link google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} | ||
* is | ||
* `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. | ||
@@ -463,3 +475,4 @@ * * `metadata.<field_name>` - any field in metadata.value. | ||
* `(error:*)` - Return operations where: | ||
* * The operation's metadata type is {@link google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata}. | ||
* * The operation's metadata type is | ||
* {@link google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata}. | ||
* * The database is restored from a backup. | ||
@@ -476,4 +489,5 @@ * * The backup name contains "backup_howl". | ||
* {@link google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token|next_page_token} | ||
* from a previous {@link google.spanner.admin.database.v1.ListDatabaseOperationsResponse|ListDatabaseOperationsResponse} to the | ||
* same `parent` and with the same `filter`. | ||
* from a previous | ||
* {@link google.spanner.admin.database.v1.ListDatabaseOperationsResponse|ListDatabaseOperationsResponse} | ||
* to the same `parent` and with the same `filter`. | ||
* @param {object} [options] | ||
@@ -516,3 +530,5 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* * `metadata.@type` - the type of metadata. For example, the type string | ||
* for {@link google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} is | ||
* for | ||
* {@link google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata} | ||
* is | ||
* `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. | ||
@@ -537,3 +553,4 @@ * * `metadata.<field_name>` - any field in metadata.value. | ||
* `(error:*)` - Return operations where: | ||
* * The operation's metadata type is {@link google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata}. | ||
* * The operation's metadata type is | ||
* {@link google.spanner.admin.database.v1.RestoreDatabaseMetadata|RestoreDatabaseMetadata}. | ||
* * The database is restored from a backup. | ||
@@ -550,4 +567,5 @@ * * The backup name contains "backup_howl". | ||
* {@link google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token|next_page_token} | ||
* from a previous {@link google.spanner.admin.database.v1.ListDatabaseOperationsResponse|ListDatabaseOperationsResponse} to the | ||
* same `parent` and with the same `filter`. | ||
* from a previous | ||
* {@link google.spanner.admin.database.v1.ListDatabaseOperationsResponse|ListDatabaseOperationsResponse} | ||
* to the same `parent` and with the same `filter`. | ||
* @param {object} [options] | ||
@@ -595,3 +613,5 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* * `metadata.@type` - the type of metadata. For example, the type string | ||
* for {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} is | ||
* for | ||
* {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} | ||
* is | ||
* `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. | ||
@@ -616,3 +636,4 @@ * * `metadata.<field_name>` - any field in metadata.value. | ||
* `(error:*)` - Returns operations where: | ||
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. | ||
* * The operation's metadata type is | ||
* {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. | ||
* * The backup name contains the string "howl". | ||
@@ -627,4 +648,5 @@ * * The operation started before 2018-03-28T14:50:00Z. | ||
* {@link google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token|next_page_token} | ||
* from a previous {@link google.spanner.admin.database.v1.ListBackupOperationsResponse|ListBackupOperationsResponse} to the | ||
* same `parent` and with the same `filter`. | ||
* from a previous | ||
* {@link google.spanner.admin.database.v1.ListBackupOperationsResponse|ListBackupOperationsResponse} | ||
* to the same `parent` and with the same `filter`. | ||
* @param {object} [options] | ||
@@ -667,3 +689,5 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* * `metadata.@type` - the type of metadata. For example, the type string | ||
* for {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} is | ||
* for | ||
* {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata} | ||
* is | ||
* `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. | ||
@@ -688,3 +712,4 @@ * * `metadata.<field_name>` - any field in metadata.value. | ||
* `(error:*)` - Returns operations where: | ||
* * The operation's metadata type is {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. | ||
* * The operation's metadata type is | ||
* {@link google.spanner.admin.database.v1.CreateBackupMetadata|CreateBackupMetadata}. | ||
* * The backup name contains the string "howl". | ||
@@ -699,4 +724,5 @@ * * The operation started before 2018-03-28T14:50:00Z. | ||
* {@link google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token|next_page_token} | ||
* from a previous {@link google.spanner.admin.database.v1.ListBackupOperationsResponse|ListBackupOperationsResponse} to the | ||
* same `parent` and with the same `filter`. | ||
* from a previous | ||
* {@link google.spanner.admin.database.v1.ListBackupOperationsResponse|ListBackupOperationsResponse} | ||
* to the same `parent` and with the same `filter`. | ||
* @param {object} [options] | ||
@@ -753,2 +779,44 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
/** | ||
* Return a fully-qualified cryptoKey resource name string. | ||
* | ||
* @param {string} project | ||
* @param {string} location | ||
* @param {string} key_ring | ||
* @param {string} crypto_key | ||
* @returns {string} Resource name string. | ||
*/ | ||
cryptoKeyPath(project: string, location: string, keyRing: string, cryptoKey: string): string; | ||
/** | ||
* Parse the project from CryptoKey resource. | ||
* | ||
* @param {string} cryptoKeyName | ||
* A fully-qualified path representing CryptoKey resource. | ||
* @returns {string} A string representing the project. | ||
*/ | ||
matchProjectFromCryptoKeyName(cryptoKeyName: string): string | number; | ||
/** | ||
* Parse the location from CryptoKey resource. | ||
* | ||
* @param {string} cryptoKeyName | ||
* A fully-qualified path representing CryptoKey resource. | ||
* @returns {string} A string representing the location. | ||
*/ | ||
matchLocationFromCryptoKeyName(cryptoKeyName: string): string | number; | ||
/** | ||
* Parse the key_ring from CryptoKey resource. | ||
* | ||
* @param {string} cryptoKeyName | ||
* A fully-qualified path representing CryptoKey resource. | ||
* @returns {string} A string representing the key_ring. | ||
*/ | ||
matchKeyRingFromCryptoKeyName(cryptoKeyName: string): string | number; | ||
/** | ||
* Parse the crypto_key from CryptoKey resource. | ||
* | ||
* @param {string} cryptoKeyName | ||
* A fully-qualified path representing CryptoKey resource. | ||
* @returns {string} A string representing the crypto_key. | ||
*/ | ||
matchCryptoKeyFromCryptoKeyName(cryptoKeyName: string): string | number; | ||
/** | ||
* Return a fully-qualified database resource name string. | ||
@@ -755,0 +823,0 @@ * |
@@ -7,2 +7,15 @@ # Changelog | ||
## [5.6.0](https://www.github.com/googleapis/nodejs-spanner/compare/v5.5.0...v5.6.0) (2021-03-20) | ||
### Features | ||
* customer-managed encryption keys ([#1274](https://www.github.com/googleapis/nodejs-spanner/issues/1274)) ([51cabc7](https://www.github.com/googleapis/nodejs-spanner/commit/51cabc7a6d8c96a86acbbeea3a357c261248ddb4)) | ||
### Bug Fixes | ||
* remove common protos ([#1320](https://www.github.com/googleapis/nodejs-spanner/issues/1320)) ([a73f9fc](https://www.github.com/googleapis/nodejs-spanner/commit/a73f9fc534019186e262a3e5ac6a78f156e7a56d)) | ||
* run [spanner_batch_client] independently ([#1318](https://www.github.com/googleapis/nodejs-spanner/issues/1318)) ([3844ff8](https://www.github.com/googleapis/nodejs-spanner/commit/3844ff89cb53aeeefe7309ce82f31200a0de3ae2)) | ||
## [5.5.0](https://www.github.com/googleapis/nodejs-spanner/compare/v5.4.0...v5.5.0) (2021-02-19) | ||
@@ -9,0 +22,0 @@ |
{ | ||
"name": "@google-cloud/spanner", | ||
"description": "Cloud Spanner Client Library for Node.js", | ||
"version": "5.5.0", | ||
"version": "5.6.0", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "author": "Google Inc.", |
@@ -104,2 +104,3 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
| CRUD | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/crud.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/crud.js,samples/README.md) | | ||
| Database-create-with-version-retention-period | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/database-create-with-version-retention-period.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-create-with-version-retention-period.js,samples/README.md) | | ||
| Datatypes | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/datatypes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/datatypes.js,samples/README.md) | | ||
@@ -106,0 +107,0 @@ | DML | [source code](https://github.com/googleapis/nodejs-spanner/blob/master/samples/dml.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml.js,samples/README.md) | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
84657
188
4991362
65