@maxim_mazurok/gapi.client.spanner-v1 0.0.20240423 → 0.0.20240514
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/index.d.ts +104 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://spanner.googleapis.com/$discovery/rest?version=v1
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20240514
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -124,6 +124,22 @@ declare namespace gapi.client {
|
|
|
124
124
|
/** Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). */
|
|
125
125
|
role?: string;
|
|
126
126
|
}
|
|
127
|
+
interface ChangeQuorumMetadata {
|
|
128
|
+
/** If set, the time at which this operation failed or was completed successfully. */
|
|
129
|
+
endTime?: string;
|
|
130
|
+
/** The request for ChangeQuorum. */
|
|
131
|
+
request?: ChangeQuorumRequest;
|
|
132
|
+
/** Time the request was received. */
|
|
133
|
+
startTime?: string;
|
|
134
|
+
}
|
|
135
|
+
interface ChangeQuorumRequest {
|
|
136
|
+
/** Optional. The etag is the hash of the QuorumInfo. The ChangeQuorum operation will only be performed if the etag matches that of the QuorumInfo in the current database resource. Otherwise the API will return an `ABORTED` error. The etag is used for optimistic concurrency control as a way to help prevent simultaneous change quorum requests that could create a race condition. */
|
|
137
|
+
etag?: string;
|
|
138
|
+
/** Required. Name of the database in which to apply the ChangeQuorum. Values are of the form `projects//instances//databases/`. */
|
|
139
|
+
name?: string;
|
|
140
|
+
/** Required. The type of this Quorum. */
|
|
141
|
+
quorumType?: QuorumType;
|
|
142
|
+
}
|
|
127
143
|
interface ChildLink {
|
|
128
144
|
/** The node to which the link points. */
|
|
129
145
|
childIndex?: number;
|
|
@@ -291,6 +307,8 @@ declare namespace gapi.client {
|
|
|
291
307
|
encryptionInfo?: EncryptionInfo[];
|
|
292
308
|
/** Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database. */
|
|
293
309
|
name?: string;
|
|
310
|
+
/** Output only. Applicable only for databases that use dual region instance configurations. Contains information about the quorum. */
|
|
311
|
+
quorumInfo?: QuorumInfo;
|
|
294
312
|
/** Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database. */
|
|
295
313
|
reconciling?: boolean;
|
|
296
314
|
/** Output only. Applicable only for restored databases. Contains information about the restore source. */
|
|
@@ -342,6 +360,7 @@ declare namespace gapi.client {
|
|
|
342
360
|
/** Include_replicas indicates the order of replicas (as they appear in this list) to process the request. If auto_failover_disabled is set to true and all replicas are exhausted without finding a healthy replica, Spanner will wait for a replica in the list to become available, requests may fail due to `DEADLINE_EXCEEDED` errors. */
|
|
343
361
|
includeReplicas?: IncludeReplicas;
|
|
344
362
|
}
|
|
363
|
+
interface DualRegionQuorum {}
|
|
345
364
|
interface Empty {}
|
|
346
365
|
interface EncryptionConfig {
|
|
347
366
|
/** The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`. */
|
|
@@ -480,9 +499,9 @@ declare namespace gapi.client {
|
|
|
480
499
|
labels?: {[P in string]: string};
|
|
481
500
|
/** Required. A unique identifier for the instance, which cannot be changed after the instance is created. Values are of the form `projects//instances/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length. */
|
|
482
501
|
name?: string;
|
|
483
|
-
/** The number of nodes allocated to this instance. At most one of either node_count or processing_units should be present in the message. Users can set the node_count field to specify the target number of nodes allocated to the instance. This may be zero in API responses for instances that are not yet in state `READY`. See [the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for more information about nodes and processing units. */
|
|
502
|
+
/** The number of nodes allocated to this instance. At most one of either node_count or processing_units should be present in the message. Users can set the node_count field to specify the target number of nodes allocated to the instance. If autoscaling is enabled, node_count is treated as an OUTPUT_ONLY field and reflects the current number of nodes allocated to the instance. This may be zero in API responses for instances that are not yet in state `READY`. See [the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for more information about nodes and processing units. */
|
|
484
503
|
nodeCount?: number;
|
|
485
|
-
/** The number of processing units allocated to this instance. At most one of processing_units or node_count should be present in the message. Users can set the processing_units field to specify the target number of processing units allocated to the instance. This may be zero in API responses for instances that are not yet in state `READY`. See [the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for more information about nodes and processing units. */
|
|
504
|
+
/** The number of processing units allocated to this instance. At most one of processing_units or node_count should be present in the message. Users can set the processing_units field to specify the target number of processing units allocated to the instance. If autoscaling is enabled, processing_units is treated as an OUTPUT_ONLY field and reflects the current number of processing units allocated to the instance. This may be zero in API responses for instances that are not yet in state `READY`. See [the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for more information about nodes and processing units. */
|
|
486
505
|
processingUnits?: number;
|
|
487
506
|
/** Output only. The current instance state. For CreateInstance, the state must be either omitted or set to `CREATING`. For UpdateInstance, the state must be either omitted or set to `READY`. */
|
|
488
507
|
state?: string;
|
|
@@ -508,6 +527,8 @@ declare namespace gapi.client {
|
|
|
508
527
|
name?: string;
|
|
509
528
|
/** Output only. The available optional replicas to choose from for user managed configurations. Populated for Google managed configurations. */
|
|
510
529
|
optionalReplicas?: ReplicaInfo[];
|
|
530
|
+
/** Output only. The `QuorumType` of the instance configuration. */
|
|
531
|
+
quorumType?: string;
|
|
511
532
|
/** Output only. If true, the instance config is being created or updated. If false, there are no ongoing operations for the instance config. */
|
|
512
533
|
reconciling?: boolean;
|
|
513
534
|
/** The geographic placement of nodes in this instance configuration and their replication properties. */
|
|
@@ -648,7 +669,7 @@ declare namespace gapi.client {
|
|
|
648
669
|
instancePartitions?: InstancePartition[];
|
|
649
670
|
/** `next_page_token` can be sent in a subsequent ListInstancePartitions call to fetch more of the matching instance partitions. */
|
|
650
671
|
nextPageToken?: string;
|
|
651
|
-
/** The list of unreachable instance partitions. It includes the names of instance partitions whose metadata could not be retrieved within instance_partition_deadline. */
|
|
672
|
+
/** The list of unreachable instances or instance partitions. It includes the names of instances or instance partitions whose metadata could not be retrieved within instance_partition_deadline. */
|
|
652
673
|
unreachable?: string[];
|
|
653
674
|
}
|
|
654
675
|
interface ListInstancesResponse {
|
|
@@ -872,6 +893,22 @@ declare namespace gapi.client {
|
|
|
872
893
|
/** Optional. The advices/recommendations for a query. Currently this field will be serving index recommendations for a query. */
|
|
873
894
|
queryAdvice?: QueryAdvisorResult;
|
|
874
895
|
}
|
|
896
|
+
interface QuorumInfo {
|
|
897
|
+
/** Output only. The etag is used for optimistic concurrency control as a way to help prevent simultaneous ChangeQuorum requests that could create a race condition. */
|
|
898
|
+
etag?: string;
|
|
899
|
+
/** Output only. Whether this ChangeQuorum is a Google or User initiated. */
|
|
900
|
+
initiator?: string;
|
|
901
|
+
/** Output only. The type of this quorum. See QuorumType for more information about quorum type specifications. */
|
|
902
|
+
quorumType?: QuorumType;
|
|
903
|
+
/** Output only. The timestamp when the request was triggered. */
|
|
904
|
+
startTime?: string;
|
|
905
|
+
}
|
|
906
|
+
interface QuorumType {
|
|
907
|
+
/** Dual region quorum type. */
|
|
908
|
+
dualRegion?: any;
|
|
909
|
+
/** Single region quorum type. */
|
|
910
|
+
singleRegion?: SingleRegionQuorum;
|
|
911
|
+
}
|
|
875
912
|
interface ReadOnly {
|
|
876
913
|
/** Executes all reads at a timestamp that is `exact_staleness` old. The timestamp is chosen soon after the read is started. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading at nearby replicas without the distributed timestamp negotiation overhead of `max_staleness`. */
|
|
877
914
|
exactStaleness?: string;
|
|
@@ -1046,6 +1083,10 @@ declare namespace gapi.client {
|
|
|
1046
1083
|
/** A mapping of (subquery variable name) -> (subquery node id) for cases where the `description` string of this node references a `SCALAR` subquery contained in the expression subtree rooted at this node. The referenced `SCALAR` subquery may not necessarily be a direct child of this node. */
|
|
1047
1084
|
subqueries?: {[P in string]: number};
|
|
1048
1085
|
}
|
|
1086
|
+
interface SingleRegionQuorum {
|
|
1087
|
+
/** Required. The location of the serving region, e.g. "us-central1". The location must be one of the regions within the dual region instance configuration of your database. The list of valid locations is available via [GetInstanceConfig[InstanceAdmin.GetInstanceConfig] API. This should only be used if you plan to change quorum in single-region quorum type. */
|
|
1088
|
+
servingLocation?: string;
|
|
1089
|
+
}
|
|
1049
1090
|
interface Statement {
|
|
1050
1091
|
/** Parameter names and values that bind to placeholders in the DML string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names can contain letters, numbers, and underscores. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: `"WHERE id > @msg_id AND id < @msg_id + 100"` It is an error to execute a SQL statement with unbound parameters. */
|
|
1051
1092
|
params?: {[P in string]: any};
|
|
@@ -3288,6 +3329,64 @@ declare namespace gapi.client {
|
|
|
3288
3329
|
): Request<PartialResultSet>;
|
|
3289
3330
|
}
|
|
3290
3331
|
interface DatabasesResource {
|
|
3332
|
+
/** ChangeQuorum is strictly restricted to databases that use dual region instance configurations. Initiates a background operation to change quorum a database from dual-region mode to single-region mode and vice versa. The returned long-running operation will have a name of the format `projects//instances//databases//operations/` and can be used to track execution of the ChangeQuorum. The metadata field type is ChangeQuorumMetadata. Authorization requires `spanner.databases.changequorum` permission on the resource database. */
|
|
3333
|
+
changequorum(request: {
|
|
3334
|
+
/** V1 error format. */
|
|
3335
|
+
'$.xgafv'?: string;
|
|
3336
|
+
/** OAuth access token. */
|
|
3337
|
+
access_token?: string;
|
|
3338
|
+
/** Data format for response. */
|
|
3339
|
+
alt?: string;
|
|
3340
|
+
/** JSONP */
|
|
3341
|
+
callback?: string;
|
|
3342
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3343
|
+
fields?: string;
|
|
3344
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
3345
|
+
key?: string;
|
|
3346
|
+
/** Required. Name of the database in which to apply the ChangeQuorum. Values are of the form `projects//instances//databases/`. */
|
|
3347
|
+
name: string;
|
|
3348
|
+
/** OAuth 2.0 token for the current user. */
|
|
3349
|
+
oauth_token?: string;
|
|
3350
|
+
/** Returns response with indentations and line breaks. */
|
|
3351
|
+
prettyPrint?: boolean;
|
|
3352
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3353
|
+
quotaUser?: string;
|
|
3354
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3355
|
+
upload_protocol?: string;
|
|
3356
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3357
|
+
uploadType?: string;
|
|
3358
|
+
/** Request body */
|
|
3359
|
+
resource: ChangeQuorumRequest;
|
|
3360
|
+
}): Request<Operation>;
|
|
3361
|
+
changequorum(
|
|
3362
|
+
request: {
|
|
3363
|
+
/** V1 error format. */
|
|
3364
|
+
'$.xgafv'?: string;
|
|
3365
|
+
/** OAuth access token. */
|
|
3366
|
+
access_token?: string;
|
|
3367
|
+
/** Data format for response. */
|
|
3368
|
+
alt?: string;
|
|
3369
|
+
/** JSONP */
|
|
3370
|
+
callback?: string;
|
|
3371
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3372
|
+
fields?: string;
|
|
3373
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
3374
|
+
key?: string;
|
|
3375
|
+
/** Required. Name of the database in which to apply the ChangeQuorum. Values are of the form `projects//instances//databases/`. */
|
|
3376
|
+
name: string;
|
|
3377
|
+
/** OAuth 2.0 token for the current user. */
|
|
3378
|
+
oauth_token?: string;
|
|
3379
|
+
/** Returns response with indentations and line breaks. */
|
|
3380
|
+
prettyPrint?: boolean;
|
|
3381
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3382
|
+
quotaUser?: string;
|
|
3383
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3384
|
+
upload_protocol?: string;
|
|
3385
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3386
|
+
uploadType?: string;
|
|
3387
|
+
},
|
|
3388
|
+
body: ChangeQuorumRequest
|
|
3389
|
+
): Request<Operation>;
|
|
3291
3390
|
/** Creates a new Cloud Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format `/operations/` and can be used to track preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful. */
|
|
3292
3391
|
create(request: {
|
|
3293
3392
|
/** V1 error format. */
|
|
@@ -4053,7 +4152,7 @@ declare namespace gapi.client {
|
|
|
4053
4152
|
pageSize?: number;
|
|
4054
4153
|
/** If non-empty, `page_token` should contain a next_page_token from a previous ListInstancePartitionsResponse. */
|
|
4055
4154
|
pageToken?: string;
|
|
4056
|
-
/** Required. The instance whose instance partitions should be listed. Values are of the form `projects//instances/`. */
|
|
4155
|
+
/** Required. The instance whose instance partitions should be listed. Values are of the form `projects//instances/`. Use `{instance} = '-'` to list instance partitions for all Instances in a project, e.g., `projects/myproject/instances/-`. */
|
|
4057
4156
|
parent: string;
|
|
4058
4157
|
/** Returns response with indentations and line breaks. */
|
|
4059
4158
|
prettyPrint?: boolean;
|