google-apis-spanner_v1 0.2.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/lib/google/apis/spanner_v1/classes.rb +235 -46
- data/lib/google/apis/spanner_v1/gem_version.rb +3 -3
- data/lib/google/apis/spanner_v1/representations.rb +77 -0
- data/lib/google/apis/spanner_v1/service.rb +22 -13
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 968ad8bc1d63f27fa28ed1ca706bda5a5f416d19850ab1fe57dc43b5f4456b66
|
4
|
+
data.tar.gz: 5cce24c7792a710d4ba6ee22b4e0761aae41b5c1a8b223e371d0f4eea012a722
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b86bb700283b586fbacd97cd1441fed2e100d13d567f33e7209dcf9b4cacad76b245bc7420c12dba4111c72f95535e8982cf4268d0ccf5dad50fbb145f602b5
|
7
|
+
data.tar.gz: 25d611a12f3ababdd4e000a273c4339f85c54d904de5413bebbf2a50ed93d3c29f4e245f0c3b162aaaef876380d483f8bc40464bf6da5a6e751fc7968e0a24d0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Release history for google-apis-spanner_v1
|
2
2
|
|
3
|
+
### v0.7.0 (2021-03-26)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20210318
|
6
|
+
|
7
|
+
### v0.6.0 (2021-03-13)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20210309
|
10
|
+
* Regenerated using generator version 0.2.0
|
11
|
+
|
12
|
+
### v0.5.0 (2021-03-04)
|
13
|
+
|
14
|
+
* Unspecified changes
|
15
|
+
|
16
|
+
### v0.4.0 (2021-02-24)
|
17
|
+
|
18
|
+
* Regenerated from discovery document revision 20210217
|
19
|
+
|
20
|
+
### v0.3.0 (2021-02-13)
|
21
|
+
|
22
|
+
* Regenerated from discovery document revision 20210206
|
23
|
+
|
3
24
|
### v0.2.0 (2021-01-28)
|
4
25
|
|
5
26
|
* Regenerated from discovery document revision 20210123
|
@@ -40,6 +40,11 @@ module Google
|
|
40
40
|
# @return [String]
|
41
41
|
attr_accessor :database
|
42
42
|
|
43
|
+
# Encryption information for a Cloud Spanner database or backup.
|
44
|
+
# Corresponds to the JSON property `encryptionInfo`
|
45
|
+
# @return [Google::Apis::SpannerV1::EncryptionInfo]
|
46
|
+
attr_accessor :encryption_info
|
47
|
+
|
43
48
|
# Required for the CreateBackup operation. The expiration time of the backup,
|
44
49
|
# with microseconds granularity that must be at least 6 hours and at most 366
|
45
50
|
# days from the time the CreateBackup request is processed. Once the `
|
@@ -95,6 +100,7 @@ module Google
|
|
95
100
|
def update!(**args)
|
96
101
|
@create_time = args[:create_time] if args.key?(:create_time)
|
97
102
|
@database = args[:database] if args.key?(:database)
|
103
|
+
@encryption_info = args[:encryption_info] if args.key?(:encryption_info)
|
98
104
|
@expire_time = args[:expire_time] if args.key?(:expire_time)
|
99
105
|
@name = args[:name] if args.key?(:name)
|
100
106
|
@referencing_databases = args[:referencing_databases] if args.key?(:referencing_databases)
|
@@ -228,7 +234,7 @@ module Google
|
|
228
234
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
229
235
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
230
236
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
231
|
-
# the client can send a Rollback request to abort the transaction.
|
237
|
+
# the client can send a Rollback request to abort the transaction. ## Semantics
|
232
238
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
233
239
|
# still valid at commit time, and it is able to acquire write locks for all
|
234
240
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -236,7 +242,7 @@ module Google
|
|
236
242
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
237
243
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
238
244
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
239
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
245
|
+
# exclusion other than between Cloud Spanner transactions themselves. ##
|
240
246
|
# Retrying Aborted Transactions When a transaction aborts, the application can
|
241
247
|
# choose to retry the whole transaction again. To maximize the chances of
|
242
248
|
# successfully committing the retry, the client should execute the retry in the
|
@@ -247,7 +253,7 @@ module Google
|
|
247
253
|
# can abort many times in a short period before successfully committing. Thus,
|
248
254
|
# it is not a good idea to cap the number of retries a transaction can attempt;
|
249
255
|
# instead, it is better to limit the total amount of wall time spent retrying. ##
|
250
|
-
#
|
256
|
+
# Idle Transactions A transaction is considered idle if it has no outstanding
|
251
257
|
# reads or SQL queries and has not started a read or SQL query within the last
|
252
258
|
# 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don'
|
253
259
|
# t hold on to locks indefinitely. In that case, the commit will fail with error
|
@@ -271,7 +277,7 @@ module Google
|
|
271
277
|
# is geographically distributed, stale read-only transactions can execute more
|
272
278
|
# quickly than strong or read-write transaction, because they are able to
|
273
279
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
274
|
-
# in detail below.
|
280
|
+
# in detail below. ## Strong Strong reads are guaranteed to see the effects of
|
275
281
|
# all transactions that have committed before the start of the read. Furthermore,
|
276
282
|
# all rows yielded by a single read are consistent with each other -- if any
|
277
283
|
# part of the read observes a transaction, all parts of the read see the
|
@@ -279,7 +285,7 @@ module Google
|
|
279
285
|
# transactions might return inconsistent results if there are concurrent writes.
|
280
286
|
# If consistency across reads is required, the reads should be executed within a
|
281
287
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
282
|
-
# strong.
|
288
|
+
# strong. ## Exact Staleness These timestamp bounds execute reads at a user-
|
283
289
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
284
290
|
# prefix of the global transaction history: they observe modifications done by
|
285
291
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -291,7 +297,7 @@ module Google
|
|
291
297
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
292
298
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
293
299
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
294
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
300
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ## Bounded
|
295
301
|
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
296
302
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
297
303
|
# the newest timestamp within the staleness bound that allows execution of the
|
@@ -309,7 +315,7 @@ module Google
|
|
309
315
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
310
316
|
# it can only be used with single-use read-only transactions. See
|
311
317
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
312
|
-
# min_read_timestamp.
|
318
|
+
# min_read_timestamp. ## Old Read Timestamps and Garbage Collection Cloud
|
313
319
|
# Spanner continuously garbage collects deleted and overwritten data in the
|
314
320
|
# background to reclaim storage space. This process is known as "version GC". By
|
315
321
|
# default, version GC reclaims versions after they are one hour old. Because of
|
@@ -358,6 +364,11 @@ module Google
|
|
358
364
|
# @return [Google::Apis::SpannerV1::TransactionOptions]
|
359
365
|
attr_accessor :options
|
360
366
|
|
367
|
+
# Common request options for various APIs.
|
368
|
+
# Corresponds to the JSON property `requestOptions`
|
369
|
+
# @return [Google::Apis::SpannerV1::RequestOptions]
|
370
|
+
attr_accessor :request_options
|
371
|
+
|
361
372
|
def initialize(**args)
|
362
373
|
update!(**args)
|
363
374
|
end
|
@@ -365,6 +376,7 @@ module Google
|
|
365
376
|
# Update properties of this object
|
366
377
|
def update!(**args)
|
367
378
|
@options = args[:options] if args.key?(:options)
|
379
|
+
@request_options = args[:request_options] if args.key?(:request_options)
|
368
380
|
end
|
369
381
|
end
|
370
382
|
|
@@ -488,6 +500,11 @@ module Google
|
|
488
500
|
# @return [Array<Google::Apis::SpannerV1::Mutation>]
|
489
501
|
attr_accessor :mutations
|
490
502
|
|
503
|
+
# Common request options for various APIs.
|
504
|
+
# Corresponds to the JSON property `requestOptions`
|
505
|
+
# @return [Google::Apis::SpannerV1::RequestOptions]
|
506
|
+
attr_accessor :request_options
|
507
|
+
|
491
508
|
# If `true`, then statistics related to the transaction will be included in the
|
492
509
|
# CommitResponse. Default value is `false`.
|
493
510
|
# Corresponds to the JSON property `returnCommitStats`
|
@@ -528,7 +545,7 @@ module Google
|
|
528
545
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
529
546
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
530
547
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
531
|
-
# the client can send a Rollback request to abort the transaction.
|
548
|
+
# the client can send a Rollback request to abort the transaction. ## Semantics
|
532
549
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
533
550
|
# still valid at commit time, and it is able to acquire write locks for all
|
534
551
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -536,7 +553,7 @@ module Google
|
|
536
553
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
537
554
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
538
555
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
539
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
556
|
+
# exclusion other than between Cloud Spanner transactions themselves. ##
|
540
557
|
# Retrying Aborted Transactions When a transaction aborts, the application can
|
541
558
|
# choose to retry the whole transaction again. To maximize the chances of
|
542
559
|
# successfully committing the retry, the client should execute the retry in the
|
@@ -547,7 +564,7 @@ module Google
|
|
547
564
|
# can abort many times in a short period before successfully committing. Thus,
|
548
565
|
# it is not a good idea to cap the number of retries a transaction can attempt;
|
549
566
|
# instead, it is better to limit the total amount of wall time spent retrying. ##
|
550
|
-
#
|
567
|
+
# Idle Transactions A transaction is considered idle if it has no outstanding
|
551
568
|
# reads or SQL queries and has not started a read or SQL query within the last
|
552
569
|
# 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don'
|
553
570
|
# t hold on to locks indefinitely. In that case, the commit will fail with error
|
@@ -571,7 +588,7 @@ module Google
|
|
571
588
|
# is geographically distributed, stale read-only transactions can execute more
|
572
589
|
# quickly than strong or read-write transaction, because they are able to
|
573
590
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
574
|
-
# in detail below.
|
591
|
+
# in detail below. ## Strong Strong reads are guaranteed to see the effects of
|
575
592
|
# all transactions that have committed before the start of the read. Furthermore,
|
576
593
|
# all rows yielded by a single read are consistent with each other -- if any
|
577
594
|
# part of the read observes a transaction, all parts of the read see the
|
@@ -579,7 +596,7 @@ module Google
|
|
579
596
|
# transactions might return inconsistent results if there are concurrent writes.
|
580
597
|
# If consistency across reads is required, the reads should be executed within a
|
581
598
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
582
|
-
# strong.
|
599
|
+
# strong. ## Exact Staleness These timestamp bounds execute reads at a user-
|
583
600
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
584
601
|
# prefix of the global transaction history: they observe modifications done by
|
585
602
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -591,7 +608,7 @@ module Google
|
|
591
608
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
592
609
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
593
610
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
594
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
611
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ## Bounded
|
595
612
|
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
596
613
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
597
614
|
# the newest timestamp within the staleness bound that allows execution of the
|
@@ -609,7 +626,7 @@ module Google
|
|
609
626
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
610
627
|
# it can only be used with single-use read-only transactions. See
|
611
628
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
612
|
-
# min_read_timestamp.
|
629
|
+
# min_read_timestamp. ## Old Read Timestamps and Garbage Collection Cloud
|
613
630
|
# Spanner continuously garbage collects deleted and overwritten data in the
|
614
631
|
# background to reclaim storage space. This process is known as "version GC". By
|
615
632
|
# default, version GC reclaims versions after they are one hour old. Because of
|
@@ -671,6 +688,7 @@ module Google
|
|
671
688
|
# Update properties of this object
|
672
689
|
def update!(**args)
|
673
690
|
@mutations = args[:mutations] if args.key?(:mutations)
|
691
|
+
@request_options = args[:request_options] if args.key?(:request_options)
|
674
692
|
@return_commit_stats = args[:return_commit_stats] if args.key?(:return_commit_stats)
|
675
693
|
@single_use_transaction = args[:single_use_transaction] if args.key?(:single_use_transaction)
|
676
694
|
@transaction_id = args[:transaction_id] if args.key?(:transaction_id)
|
@@ -805,6 +823,11 @@ module Google
|
|
805
823
|
# @return [String]
|
806
824
|
attr_accessor :create_statement
|
807
825
|
|
826
|
+
# Encryption configuration for a Cloud Spanner database.
|
827
|
+
# Corresponds to the JSON property `encryptionConfig`
|
828
|
+
# @return [Google::Apis::SpannerV1::EncryptionConfig]
|
829
|
+
attr_accessor :encryption_config
|
830
|
+
|
808
831
|
# Optional. A list of DDL statements to run inside the newly created database.
|
809
832
|
# Statements can create tables, indexes, etc. These statements execute
|
810
833
|
# atomically with the creation of the database: if there is an error in any
|
@@ -820,6 +843,7 @@ module Google
|
|
820
843
|
# Update properties of this object
|
821
844
|
def update!(**args)
|
822
845
|
@create_statement = args[:create_statement] if args.key?(:create_statement)
|
846
|
+
@encryption_config = args[:encryption_config] if args.key?(:encryption_config)
|
823
847
|
@extra_statements = args[:extra_statements] if args.key?(:extra_statements)
|
824
848
|
end
|
825
849
|
end
|
@@ -918,11 +942,29 @@ module Google
|
|
918
942
|
attr_accessor :create_time
|
919
943
|
|
920
944
|
# Output only. Earliest timestamp at which older versions of the data can be
|
921
|
-
# read.
|
945
|
+
# read. This value is continuously updated by Cloud Spanner and becomes stale
|
946
|
+
# the moment it is queried. If you are using this value to recover data, make
|
947
|
+
# sure to account for the time from the moment when the value is queried to the
|
948
|
+
# moment when you initiate the recovery.
|
922
949
|
# Corresponds to the JSON property `earliestVersionTime`
|
923
950
|
# @return [String]
|
924
951
|
attr_accessor :earliest_version_time
|
925
952
|
|
953
|
+
# Encryption configuration for a Cloud Spanner database.
|
954
|
+
# Corresponds to the JSON property `encryptionConfig`
|
955
|
+
# @return [Google::Apis::SpannerV1::EncryptionConfig]
|
956
|
+
attr_accessor :encryption_config
|
957
|
+
|
958
|
+
# Output only. For databases that are using customer managed encryption, this
|
959
|
+
# field contains the encryption information for the database, such as encryption
|
960
|
+
# state and the Cloud KMS key versions that are in use. For databases that are
|
961
|
+
# using Google default or other types of encryption, this field is empty. This
|
962
|
+
# field is propagated lazily from the backend. There might be a delay from when
|
963
|
+
# a key version is being used and when it appears in this field.
|
964
|
+
# Corresponds to the JSON property `encryptionInfo`
|
965
|
+
# @return [Array<Google::Apis::SpannerV1::EncryptionInfo>]
|
966
|
+
attr_accessor :encryption_info
|
967
|
+
|
926
968
|
# Required. The name of the database. Values are of the form `projects//
|
927
969
|
# instances//databases/`, where `` is as specified in the `CREATE DATABASE`
|
928
970
|
# statement. This name can be passed to other API methods to identify the
|
@@ -942,7 +984,7 @@ module Google
|
|
942
984
|
attr_accessor :state
|
943
985
|
|
944
986
|
# Output only. The period in which Cloud Spanner retains all versions of data
|
945
|
-
# for the database. This is same as the value of version_retention_period
|
987
|
+
# for the database. This is the same as the value of version_retention_period
|
946
988
|
# database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.
|
947
989
|
# Corresponds to the JSON property `versionRetentionPeriod`
|
948
990
|
# @return [String]
|
@@ -956,6 +998,8 @@ module Google
|
|
956
998
|
def update!(**args)
|
957
999
|
@create_time = args[:create_time] if args.key?(:create_time)
|
958
1000
|
@earliest_version_time = args[:earliest_version_time] if args.key?(:earliest_version_time)
|
1001
|
+
@encryption_config = args[:encryption_config] if args.key?(:encryption_config)
|
1002
|
+
@encryption_info = args[:encryption_info] if args.key?(:encryption_info)
|
959
1003
|
@name = args[:name] if args.key?(:name)
|
960
1004
|
@restore_info = args[:restore_info] if args.key?(:restore_info)
|
961
1005
|
@state = args[:state] if args.key?(:state)
|
@@ -1009,10 +1053,72 @@ module Google
|
|
1009
1053
|
end
|
1010
1054
|
end
|
1011
1055
|
|
1056
|
+
# Encryption configuration for a Cloud Spanner database.
|
1057
|
+
class EncryptionConfig
|
1058
|
+
include Google::Apis::Core::Hashable
|
1059
|
+
|
1060
|
+
# The Cloud KMS key to be used for encrypting and decrypting the database.
|
1061
|
+
# Values are of the form `projects//locations//keyRings//cryptoKeys/`.
|
1062
|
+
# Corresponds to the JSON property `kmsKeyName`
|
1063
|
+
# @return [String]
|
1064
|
+
attr_accessor :kms_key_name
|
1065
|
+
|
1066
|
+
def initialize(**args)
|
1067
|
+
update!(**args)
|
1068
|
+
end
|
1069
|
+
|
1070
|
+
# Update properties of this object
|
1071
|
+
def update!(**args)
|
1072
|
+
@kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
|
1073
|
+
end
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
# Encryption information for a Cloud Spanner database or backup.
|
1077
|
+
class EncryptionInfo
|
1078
|
+
include Google::Apis::Core::Hashable
|
1079
|
+
|
1080
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1081
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1082
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1083
|
+
# data: error code, error message, and error details. You can find out more
|
1084
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1085
|
+
# //cloud.google.com/apis/design/errors).
|
1086
|
+
# Corresponds to the JSON property `encryptionStatus`
|
1087
|
+
# @return [Google::Apis::SpannerV1::Status]
|
1088
|
+
attr_accessor :encryption_status
|
1089
|
+
|
1090
|
+
# Output only. The type of encryption.
|
1091
|
+
# Corresponds to the JSON property `encryptionType`
|
1092
|
+
# @return [String]
|
1093
|
+
attr_accessor :encryption_type
|
1094
|
+
|
1095
|
+
# Output only. A Cloud KMS key version that is being used to protect the
|
1096
|
+
# database or backup.
|
1097
|
+
# Corresponds to the JSON property `kmsKeyVersion`
|
1098
|
+
# @return [String]
|
1099
|
+
attr_accessor :kms_key_version
|
1100
|
+
|
1101
|
+
def initialize(**args)
|
1102
|
+
update!(**args)
|
1103
|
+
end
|
1104
|
+
|
1105
|
+
# Update properties of this object
|
1106
|
+
def update!(**args)
|
1107
|
+
@encryption_status = args[:encryption_status] if args.key?(:encryption_status)
|
1108
|
+
@encryption_type = args[:encryption_type] if args.key?(:encryption_type)
|
1109
|
+
@kms_key_version = args[:kms_key_version] if args.key?(:kms_key_version)
|
1110
|
+
end
|
1111
|
+
end
|
1112
|
+
|
1012
1113
|
# The request for ExecuteBatchDml.
|
1013
1114
|
class ExecuteBatchDmlRequest
|
1014
1115
|
include Google::Apis::Core::Hashable
|
1015
1116
|
|
1117
|
+
# Common request options for various APIs.
|
1118
|
+
# Corresponds to the JSON property `requestOptions`
|
1119
|
+
# @return [Google::Apis::SpannerV1::RequestOptions]
|
1120
|
+
attr_accessor :request_options
|
1121
|
+
|
1016
1122
|
# Required. A per-transaction sequence number used to identify this request.
|
1017
1123
|
# This field makes each request idempotent such that if the request is received
|
1018
1124
|
# multiple times, at most one will succeed. The sequence number must be
|
@@ -1045,6 +1151,7 @@ module Google
|
|
1045
1151
|
|
1046
1152
|
# Update properties of this object
|
1047
1153
|
def update!(**args)
|
1154
|
+
@request_options = args[:request_options] if args.key?(:request_options)
|
1048
1155
|
@seqno = args[:seqno] if args.key?(:seqno)
|
1049
1156
|
@statements = args[:statements] if args.key?(:statements)
|
1050
1157
|
@transaction = args[:transaction] if args.key?(:transaction)
|
@@ -1143,6 +1250,11 @@ module Google
|
|
1143
1250
|
# @return [Google::Apis::SpannerV1::QueryOptions]
|
1144
1251
|
attr_accessor :query_options
|
1145
1252
|
|
1253
|
+
# Common request options for various APIs.
|
1254
|
+
# Corresponds to the JSON property `requestOptions`
|
1255
|
+
# @return [Google::Apis::SpannerV1::RequestOptions]
|
1256
|
+
attr_accessor :request_options
|
1257
|
+
|
1146
1258
|
# If this request is resuming a previously interrupted SQL statement execution, `
|
1147
1259
|
# resume_token` should be copied from the last PartialResultSet yielded before
|
1148
1260
|
# the interruption. Doing this enables the new SQL statement execution to resume
|
@@ -1186,6 +1298,7 @@ module Google
|
|
1186
1298
|
@partition_token = args[:partition_token] if args.key?(:partition_token)
|
1187
1299
|
@query_mode = args[:query_mode] if args.key?(:query_mode)
|
1188
1300
|
@query_options = args[:query_options] if args.key?(:query_options)
|
1301
|
+
@request_options = args[:request_options] if args.key?(:request_options)
|
1189
1302
|
@resume_token = args[:resume_token] if args.key?(:resume_token)
|
1190
1303
|
@seqno = args[:seqno] if args.key?(:seqno)
|
1191
1304
|
@sql = args[:sql] if args.key?(:sql)
|
@@ -2404,18 +2517,34 @@ module Google
|
|
2404
2517
|
class QueryOptions
|
2405
2518
|
include Google::Apis::Core::Hashable
|
2406
2519
|
|
2520
|
+
# An option to control the selection of optimizer statistics package. This
|
2521
|
+
# parameter allows individual queries to use a different query optimizer
|
2522
|
+
# statistics package. Specifying `latest` as a value instructs Cloud Spanner to
|
2523
|
+
# use the latest generated statistics package. If not specified, Cloud Spanner
|
2524
|
+
# uses the statistics package set at the database level options, or the latest
|
2525
|
+
# package if the database option is not set. The statistics package requested by
|
2526
|
+
# the query has to be exempt from garbage collection. This can be achieved with
|
2527
|
+
# the following DDL statement: ``` ALTER STATISTICS SET OPTIONS (allow_gc=false)
|
2528
|
+
# ``` The list of available statistics packages can be queried from `
|
2529
|
+
# INFORMATION_SCHEMA.SPANNER_STATISTICS`. Executing a SQL statement with an
|
2530
|
+
# invalid optimizer statistics package or with a statistics package that allows
|
2531
|
+
# garbage collection fails with an `INVALID_ARGUMENT` error.
|
2532
|
+
# Corresponds to the JSON property `optimizerStatisticsPackage`
|
2533
|
+
# @return [String]
|
2534
|
+
attr_accessor :optimizer_statistics_package
|
2535
|
+
|
2407
2536
|
# An option to control the selection of optimizer version. This parameter allows
|
2408
|
-
# individual queries to pick different query optimizer versions. Specifying
|
2409
|
-
# latest
|
2410
|
-
# optimizer version. If not specified, Cloud Spanner uses optimizer version
|
2411
|
-
# at the database level options. Any other positive integer (from the list
|
2412
|
-
# supported optimizer versions) overrides the default optimizer version for
|
2537
|
+
# individual queries to pick different query optimizer versions. Specifying `
|
2538
|
+
# latest` as a value instructs Cloud Spanner to use the latest supported query
|
2539
|
+
# optimizer version. If not specified, Cloud Spanner uses the optimizer version
|
2540
|
+
# set at the database level options. Any other positive integer (from the list
|
2541
|
+
# of supported optimizer versions) overrides the default optimizer version for
|
2413
2542
|
# query execution. The list of supported optimizer versions can be queried from
|
2414
2543
|
# SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement with an
|
2415
|
-
# invalid optimizer version
|
2416
|
-
#
|
2417
|
-
#
|
2418
|
-
#
|
2544
|
+
# invalid optimizer version fails with an `INVALID_ARGUMENT` error. See https://
|
2545
|
+
# cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer for more
|
2546
|
+
# information on managing the query optimizer. The `optimizer_version` statement
|
2547
|
+
# hint has precedence over this setting.
|
2419
2548
|
# Corresponds to the JSON property `optimizerVersion`
|
2420
2549
|
# @return [String]
|
2421
2550
|
attr_accessor :optimizer_version
|
@@ -2426,6 +2555,7 @@ module Google
|
|
2426
2555
|
|
2427
2556
|
# Update properties of this object
|
2428
2557
|
def update!(**args)
|
2558
|
+
@optimizer_statistics_package = args[:optimizer_statistics_package] if args.key?(:optimizer_statistics_package)
|
2429
2559
|
@optimizer_version = args[:optimizer_version] if args.key?(:optimizer_version)
|
2430
2560
|
end
|
2431
2561
|
end
|
@@ -2568,6 +2698,11 @@ module Google
|
|
2568
2698
|
# @return [String]
|
2569
2699
|
attr_accessor :partition_token
|
2570
2700
|
|
2701
|
+
# Common request options for various APIs.
|
2702
|
+
# Corresponds to the JSON property `requestOptions`
|
2703
|
+
# @return [Google::Apis::SpannerV1::RequestOptions]
|
2704
|
+
attr_accessor :request_options
|
2705
|
+
|
2571
2706
|
# If this request is resuming a previously interrupted read, `resume_token`
|
2572
2707
|
# should be copied from the last PartialResultSet yielded before the
|
2573
2708
|
# interruption. Doing this enables the new read to resume where the last read
|
@@ -2600,6 +2735,7 @@ module Google
|
|
2600
2735
|
@key_set = args[:key_set] if args.key?(:key_set)
|
2601
2736
|
@limit = args[:limit] if args.key?(:limit)
|
2602
2737
|
@partition_token = args[:partition_token] if args.key?(:partition_token)
|
2738
|
+
@request_options = args[:request_options] if args.key?(:request_options)
|
2603
2739
|
@resume_token = args[:resume_token] if args.key?(:resume_token)
|
2604
2740
|
@table = args[:table] if args.key?(:table)
|
2605
2741
|
@transaction = args[:transaction] if args.key?(:transaction)
|
@@ -2654,6 +2790,53 @@ module Google
|
|
2654
2790
|
end
|
2655
2791
|
end
|
2656
2792
|
|
2793
|
+
# Common request options for various APIs.
|
2794
|
+
class RequestOptions
|
2795
|
+
include Google::Apis::Core::Hashable
|
2796
|
+
|
2797
|
+
# Priority for the request.
|
2798
|
+
# Corresponds to the JSON property `priority`
|
2799
|
+
# @return [String]
|
2800
|
+
attr_accessor :priority
|
2801
|
+
|
2802
|
+
def initialize(**args)
|
2803
|
+
update!(**args)
|
2804
|
+
end
|
2805
|
+
|
2806
|
+
# Update properties of this object
|
2807
|
+
def update!(**args)
|
2808
|
+
@priority = args[:priority] if args.key?(:priority)
|
2809
|
+
end
|
2810
|
+
end
|
2811
|
+
|
2812
|
+
# Encryption configuration for the restored database.
|
2813
|
+
class RestoreDatabaseEncryptionConfig
|
2814
|
+
include Google::Apis::Core::Hashable
|
2815
|
+
|
2816
|
+
# Required. The encryption type of the restored database.
|
2817
|
+
# Corresponds to the JSON property `encryptionType`
|
2818
|
+
# @return [String]
|
2819
|
+
attr_accessor :encryption_type
|
2820
|
+
|
2821
|
+
# Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored
|
2822
|
+
# database. This field should be set only when encryption_type is `
|
2823
|
+
# CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//
|
2824
|
+
# keyRings//cryptoKeys/`.
|
2825
|
+
# Corresponds to the JSON property `kmsKeyName`
|
2826
|
+
# @return [String]
|
2827
|
+
attr_accessor :kms_key_name
|
2828
|
+
|
2829
|
+
def initialize(**args)
|
2830
|
+
update!(**args)
|
2831
|
+
end
|
2832
|
+
|
2833
|
+
# Update properties of this object
|
2834
|
+
def update!(**args)
|
2835
|
+
@encryption_type = args[:encryption_type] if args.key?(:encryption_type)
|
2836
|
+
@kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
|
2837
|
+
end
|
2838
|
+
end
|
2839
|
+
|
2657
2840
|
# Metadata type for the long-running operation returned by RestoreDatabase.
|
2658
2841
|
class RestoreDatabaseMetadata
|
2659
2842
|
include Google::Apis::Core::Hashable
|
@@ -2736,6 +2919,11 @@ module Google
|
|
2736
2919
|
# @return [String]
|
2737
2920
|
attr_accessor :database_id
|
2738
2921
|
|
2922
|
+
# Encryption configuration for the restored database.
|
2923
|
+
# Corresponds to the JSON property `encryptionConfig`
|
2924
|
+
# @return [Google::Apis::SpannerV1::RestoreDatabaseEncryptionConfig]
|
2925
|
+
attr_accessor :encryption_config
|
2926
|
+
|
2739
2927
|
def initialize(**args)
|
2740
2928
|
update!(**args)
|
2741
2929
|
end
|
@@ -2744,6 +2932,7 @@ module Google
|
|
2744
2932
|
def update!(**args)
|
2745
2933
|
@backup = args[:backup] if args.key?(:backup)
|
2746
2934
|
@database_id = args[:database_id] if args.key?(:database_id)
|
2935
|
+
@encryption_config = args[:encryption_config] if args.key?(:encryption_config)
|
2747
2936
|
end
|
2748
2937
|
end
|
2749
2938
|
|
@@ -3213,7 +3402,7 @@ module Google
|
|
3213
3402
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
3214
3403
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
3215
3404
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
3216
|
-
# the client can send a Rollback request to abort the transaction.
|
3405
|
+
# the client can send a Rollback request to abort the transaction. ## Semantics
|
3217
3406
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
3218
3407
|
# still valid at commit time, and it is able to acquire write locks for all
|
3219
3408
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -3221,7 +3410,7 @@ module Google
|
|
3221
3410
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
3222
3411
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
3223
3412
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
3224
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
3413
|
+
# exclusion other than between Cloud Spanner transactions themselves. ##
|
3225
3414
|
# Retrying Aborted Transactions When a transaction aborts, the application can
|
3226
3415
|
# choose to retry the whole transaction again. To maximize the chances of
|
3227
3416
|
# successfully committing the retry, the client should execute the retry in the
|
@@ -3232,7 +3421,7 @@ module Google
|
|
3232
3421
|
# can abort many times in a short period before successfully committing. Thus,
|
3233
3422
|
# it is not a good idea to cap the number of retries a transaction can attempt;
|
3234
3423
|
# instead, it is better to limit the total amount of wall time spent retrying. ##
|
3235
|
-
#
|
3424
|
+
# Idle Transactions A transaction is considered idle if it has no outstanding
|
3236
3425
|
# reads or SQL queries and has not started a read or SQL query within the last
|
3237
3426
|
# 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don'
|
3238
3427
|
# t hold on to locks indefinitely. In that case, the commit will fail with error
|
@@ -3256,7 +3445,7 @@ module Google
|
|
3256
3445
|
# is geographically distributed, stale read-only transactions can execute more
|
3257
3446
|
# quickly than strong or read-write transaction, because they are able to
|
3258
3447
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
3259
|
-
# in detail below.
|
3448
|
+
# in detail below. ## Strong Strong reads are guaranteed to see the effects of
|
3260
3449
|
# all transactions that have committed before the start of the read. Furthermore,
|
3261
3450
|
# all rows yielded by a single read are consistent with each other -- if any
|
3262
3451
|
# part of the read observes a transaction, all parts of the read see the
|
@@ -3264,7 +3453,7 @@ module Google
|
|
3264
3453
|
# transactions might return inconsistent results if there are concurrent writes.
|
3265
3454
|
# If consistency across reads is required, the reads should be executed within a
|
3266
3455
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
3267
|
-
# strong.
|
3456
|
+
# strong. ## Exact Staleness These timestamp bounds execute reads at a user-
|
3268
3457
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
3269
3458
|
# prefix of the global transaction history: they observe modifications done by
|
3270
3459
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -3276,7 +3465,7 @@ module Google
|
|
3276
3465
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
3277
3466
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
3278
3467
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
3279
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
3468
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ## Bounded
|
3280
3469
|
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
3281
3470
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
3282
3471
|
# the newest timestamp within the staleness bound that allows execution of the
|
@@ -3294,7 +3483,7 @@ module Google
|
|
3294
3483
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
3295
3484
|
# it can only be used with single-use read-only transactions. See
|
3296
3485
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
3297
|
-
# min_read_timestamp.
|
3486
|
+
# min_read_timestamp. ## Old Read Timestamps and Garbage Collection Cloud
|
3298
3487
|
# Spanner continuously garbage collects deleted and overwritten data in the
|
3299
3488
|
# background to reclaim storage space. This process is known as "version GC". By
|
3300
3489
|
# default, version GC reclaims versions after they are one hour old. Because of
|
@@ -3408,7 +3597,7 @@ module Google
|
|
3408
3597
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
3409
3598
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
3410
3599
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
3411
|
-
# the client can send a Rollback request to abort the transaction.
|
3600
|
+
# the client can send a Rollback request to abort the transaction. ## Semantics
|
3412
3601
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
3413
3602
|
# still valid at commit time, and it is able to acquire write locks for all
|
3414
3603
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -3416,7 +3605,7 @@ module Google
|
|
3416
3605
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
3417
3606
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
3418
3607
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
3419
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
3608
|
+
# exclusion other than between Cloud Spanner transactions themselves. ##
|
3420
3609
|
# Retrying Aborted Transactions When a transaction aborts, the application can
|
3421
3610
|
# choose to retry the whole transaction again. To maximize the chances of
|
3422
3611
|
# successfully committing the retry, the client should execute the retry in the
|
@@ -3427,7 +3616,7 @@ module Google
|
|
3427
3616
|
# can abort many times in a short period before successfully committing. Thus,
|
3428
3617
|
# it is not a good idea to cap the number of retries a transaction can attempt;
|
3429
3618
|
# instead, it is better to limit the total amount of wall time spent retrying. ##
|
3430
|
-
#
|
3619
|
+
# Idle Transactions A transaction is considered idle if it has no outstanding
|
3431
3620
|
# reads or SQL queries and has not started a read or SQL query within the last
|
3432
3621
|
# 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don'
|
3433
3622
|
# t hold on to locks indefinitely. In that case, the commit will fail with error
|
@@ -3451,7 +3640,7 @@ module Google
|
|
3451
3640
|
# is geographically distributed, stale read-only transactions can execute more
|
3452
3641
|
# quickly than strong or read-write transaction, because they are able to
|
3453
3642
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
3454
|
-
# in detail below.
|
3643
|
+
# in detail below. ## Strong Strong reads are guaranteed to see the effects of
|
3455
3644
|
# all transactions that have committed before the start of the read. Furthermore,
|
3456
3645
|
# all rows yielded by a single read are consistent with each other -- if any
|
3457
3646
|
# part of the read observes a transaction, all parts of the read see the
|
@@ -3459,7 +3648,7 @@ module Google
|
|
3459
3648
|
# transactions might return inconsistent results if there are concurrent writes.
|
3460
3649
|
# If consistency across reads is required, the reads should be executed within a
|
3461
3650
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
3462
|
-
# strong.
|
3651
|
+
# strong. ## Exact Staleness These timestamp bounds execute reads at a user-
|
3463
3652
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
3464
3653
|
# prefix of the global transaction history: they observe modifications done by
|
3465
3654
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -3471,7 +3660,7 @@ module Google
|
|
3471
3660
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
3472
3661
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
3473
3662
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
3474
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
3663
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ## Bounded
|
3475
3664
|
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
3476
3665
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
3477
3666
|
# the newest timestamp within the staleness bound that allows execution of the
|
@@ -3489,7 +3678,7 @@ module Google
|
|
3489
3678
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
3490
3679
|
# it can only be used with single-use read-only transactions. See
|
3491
3680
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
3492
|
-
# min_read_timestamp.
|
3681
|
+
# min_read_timestamp. ## Old Read Timestamps and Garbage Collection Cloud
|
3493
3682
|
# Spanner continuously garbage collects deleted and overwritten data in the
|
3494
3683
|
# background to reclaim storage space. This process is known as "version GC". By
|
3495
3684
|
# default, version GC reclaims versions after they are one hour old. Because of
|
@@ -3577,7 +3766,7 @@ module Google
|
|
3577
3766
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
3578
3767
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
3579
3768
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
3580
|
-
# the client can send a Rollback request to abort the transaction.
|
3769
|
+
# the client can send a Rollback request to abort the transaction. ## Semantics
|
3581
3770
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
3582
3771
|
# still valid at commit time, and it is able to acquire write locks for all
|
3583
3772
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -3585,7 +3774,7 @@ module Google
|
|
3585
3774
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
3586
3775
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
3587
3776
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
3588
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
3777
|
+
# exclusion other than between Cloud Spanner transactions themselves. ##
|
3589
3778
|
# Retrying Aborted Transactions When a transaction aborts, the application can
|
3590
3779
|
# choose to retry the whole transaction again. To maximize the chances of
|
3591
3780
|
# successfully committing the retry, the client should execute the retry in the
|
@@ -3596,7 +3785,7 @@ module Google
|
|
3596
3785
|
# can abort many times in a short period before successfully committing. Thus,
|
3597
3786
|
# it is not a good idea to cap the number of retries a transaction can attempt;
|
3598
3787
|
# instead, it is better to limit the total amount of wall time spent retrying. ##
|
3599
|
-
#
|
3788
|
+
# Idle Transactions A transaction is considered idle if it has no outstanding
|
3600
3789
|
# reads or SQL queries and has not started a read or SQL query within the last
|
3601
3790
|
# 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don'
|
3602
3791
|
# t hold on to locks indefinitely. In that case, the commit will fail with error
|
@@ -3620,7 +3809,7 @@ module Google
|
|
3620
3809
|
# is geographically distributed, stale read-only transactions can execute more
|
3621
3810
|
# quickly than strong or read-write transaction, because they are able to
|
3622
3811
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
3623
|
-
# in detail below.
|
3812
|
+
# in detail below. ## Strong Strong reads are guaranteed to see the effects of
|
3624
3813
|
# all transactions that have committed before the start of the read. Furthermore,
|
3625
3814
|
# all rows yielded by a single read are consistent with each other -- if any
|
3626
3815
|
# part of the read observes a transaction, all parts of the read see the
|
@@ -3628,7 +3817,7 @@ module Google
|
|
3628
3817
|
# transactions might return inconsistent results if there are concurrent writes.
|
3629
3818
|
# If consistency across reads is required, the reads should be executed within a
|
3630
3819
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
3631
|
-
# strong.
|
3820
|
+
# strong. ## Exact Staleness These timestamp bounds execute reads at a user-
|
3632
3821
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
3633
3822
|
# prefix of the global transaction history: they observe modifications done by
|
3634
3823
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -3640,7 +3829,7 @@ module Google
|
|
3640
3829
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
3641
3830
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
3642
3831
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
3643
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
3832
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. ## Bounded
|
3644
3833
|
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
3645
3834
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
3646
3835
|
# the newest timestamp within the staleness bound that allows execution of the
|
@@ -3658,7 +3847,7 @@ module Google
|
|
3658
3847
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
3659
3848
|
# it can only be used with single-use read-only transactions. See
|
3660
3849
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
3661
|
-
# min_read_timestamp.
|
3850
|
+
# min_read_timestamp. ## Old Read Timestamps and Garbage Collection Cloud
|
3662
3851
|
# Spanner continuously garbage collects deleted and overwritten data in the
|
3663
3852
|
# background to reclaim storage space. This process is known as "version GC". By
|
3664
3853
|
# default, version GC reclaims versions after they are one hour old. Because of
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module SpannerV1
|
18
18
|
# Version of the google-apis-spanner_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.7.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.
|
22
|
+
GENERATOR_VERSION = "0.2.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20210318"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -136,6 +136,18 @@ module Google
|
|
136
136
|
include Google::Apis::Core::JsonObjectSupport
|
137
137
|
end
|
138
138
|
|
139
|
+
class EncryptionConfig
|
140
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
141
|
+
|
142
|
+
include Google::Apis::Core::JsonObjectSupport
|
143
|
+
end
|
144
|
+
|
145
|
+
class EncryptionInfo
|
146
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
147
|
+
|
148
|
+
include Google::Apis::Core::JsonObjectSupport
|
149
|
+
end
|
150
|
+
|
139
151
|
class ExecuteBatchDmlRequest
|
140
152
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
141
153
|
|
@@ -370,6 +382,18 @@ module Google
|
|
370
382
|
include Google::Apis::Core::JsonObjectSupport
|
371
383
|
end
|
372
384
|
|
385
|
+
class RequestOptions
|
386
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
387
|
+
|
388
|
+
include Google::Apis::Core::JsonObjectSupport
|
389
|
+
end
|
390
|
+
|
391
|
+
class RestoreDatabaseEncryptionConfig
|
392
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
393
|
+
|
394
|
+
include Google::Apis::Core::JsonObjectSupport
|
395
|
+
end
|
396
|
+
|
373
397
|
class RestoreDatabaseMetadata
|
374
398
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
375
399
|
|
@@ -519,6 +543,8 @@ module Google
|
|
519
543
|
class Representation < Google::Apis::Core::JsonRepresentation
|
520
544
|
property :create_time, as: 'createTime'
|
521
545
|
property :database, as: 'database'
|
546
|
+
property :encryption_info, as: 'encryptionInfo', class: Google::Apis::SpannerV1::EncryptionInfo, decorator: Google::Apis::SpannerV1::EncryptionInfo::Representation
|
547
|
+
|
522
548
|
property :expire_time, as: 'expireTime'
|
523
549
|
property :name, as: 'name'
|
524
550
|
collection :referencing_databases, as: 'referencingDatabases'
|
@@ -560,6 +586,8 @@ module Google
|
|
560
586
|
class Representation < Google::Apis::Core::JsonRepresentation
|
561
587
|
property :options, as: 'options', class: Google::Apis::SpannerV1::TransactionOptions, decorator: Google::Apis::SpannerV1::TransactionOptions::Representation
|
562
588
|
|
589
|
+
property :request_options, as: 'requestOptions', class: Google::Apis::SpannerV1::RequestOptions, decorator: Google::Apis::SpannerV1::RequestOptions::Representation
|
590
|
+
|
563
591
|
end
|
564
592
|
end
|
565
593
|
|
@@ -587,6 +615,8 @@ module Google
|
|
587
615
|
class Representation < Google::Apis::Core::JsonRepresentation
|
588
616
|
collection :mutations, as: 'mutations', class: Google::Apis::SpannerV1::Mutation, decorator: Google::Apis::SpannerV1::Mutation::Representation
|
589
617
|
|
618
|
+
property :request_options, as: 'requestOptions', class: Google::Apis::SpannerV1::RequestOptions, decorator: Google::Apis::SpannerV1::RequestOptions::Representation
|
619
|
+
|
590
620
|
property :return_commit_stats, as: 'returnCommitStats'
|
591
621
|
property :single_use_transaction, as: 'singleUseTransaction', class: Google::Apis::SpannerV1::TransactionOptions, decorator: Google::Apis::SpannerV1::TransactionOptions::Representation
|
592
622
|
|
@@ -632,6 +662,8 @@ module Google
|
|
632
662
|
# @private
|
633
663
|
class Representation < Google::Apis::Core::JsonRepresentation
|
634
664
|
property :create_statement, as: 'createStatement'
|
665
|
+
property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::EncryptionConfig, decorator: Google::Apis::SpannerV1::EncryptionConfig::Representation
|
666
|
+
|
635
667
|
collection :extra_statements, as: 'extraStatements'
|
636
668
|
end
|
637
669
|
end
|
@@ -669,6 +701,10 @@ module Google
|
|
669
701
|
class Representation < Google::Apis::Core::JsonRepresentation
|
670
702
|
property :create_time, as: 'createTime'
|
671
703
|
property :earliest_version_time, as: 'earliestVersionTime'
|
704
|
+
property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::EncryptionConfig, decorator: Google::Apis::SpannerV1::EncryptionConfig::Representation
|
705
|
+
|
706
|
+
collection :encryption_info, as: 'encryptionInfo', class: Google::Apis::SpannerV1::EncryptionInfo, decorator: Google::Apis::SpannerV1::EncryptionInfo::Representation
|
707
|
+
|
672
708
|
property :name, as: 'name'
|
673
709
|
property :restore_info, as: 'restoreInfo', class: Google::Apis::SpannerV1::RestoreInfo, decorator: Google::Apis::SpannerV1::RestoreInfo::Representation
|
674
710
|
|
@@ -692,9 +728,28 @@ module Google
|
|
692
728
|
end
|
693
729
|
end
|
694
730
|
|
731
|
+
class EncryptionConfig
|
732
|
+
# @private
|
733
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
734
|
+
property :kms_key_name, as: 'kmsKeyName'
|
735
|
+
end
|
736
|
+
end
|
737
|
+
|
738
|
+
class EncryptionInfo
|
739
|
+
# @private
|
740
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
741
|
+
property :encryption_status, as: 'encryptionStatus', class: Google::Apis::SpannerV1::Status, decorator: Google::Apis::SpannerV1::Status::Representation
|
742
|
+
|
743
|
+
property :encryption_type, as: 'encryptionType'
|
744
|
+
property :kms_key_version, as: 'kmsKeyVersion'
|
745
|
+
end
|
746
|
+
end
|
747
|
+
|
695
748
|
class ExecuteBatchDmlRequest
|
696
749
|
# @private
|
697
750
|
class Representation < Google::Apis::Core::JsonRepresentation
|
751
|
+
property :request_options, as: 'requestOptions', class: Google::Apis::SpannerV1::RequestOptions, decorator: Google::Apis::SpannerV1::RequestOptions::Representation
|
752
|
+
|
698
753
|
property :seqno, :numeric_string => true, as: 'seqno'
|
699
754
|
collection :statements, as: 'statements', class: Google::Apis::SpannerV1::Statement, decorator: Google::Apis::SpannerV1::Statement::Representation
|
700
755
|
|
@@ -723,6 +778,8 @@ module Google
|
|
723
778
|
property :query_mode, as: 'queryMode'
|
724
779
|
property :query_options, as: 'queryOptions', class: Google::Apis::SpannerV1::QueryOptions, decorator: Google::Apis::SpannerV1::QueryOptions::Representation
|
725
780
|
|
781
|
+
property :request_options, as: 'requestOptions', class: Google::Apis::SpannerV1::RequestOptions, decorator: Google::Apis::SpannerV1::RequestOptions::Representation
|
782
|
+
|
726
783
|
property :resume_token, :base64 => true, as: 'resumeToken'
|
727
784
|
property :seqno, :numeric_string => true, as: 'seqno'
|
728
785
|
property :sql, as: 'sql'
|
@@ -1039,6 +1096,7 @@ module Google
|
|
1039
1096
|
class QueryOptions
|
1040
1097
|
# @private
|
1041
1098
|
class Representation < Google::Apis::Core::JsonRepresentation
|
1099
|
+
property :optimizer_statistics_package, as: 'optimizerStatisticsPackage'
|
1042
1100
|
property :optimizer_version, as: 'optimizerVersion'
|
1043
1101
|
end
|
1044
1102
|
end
|
@@ -1072,6 +1130,8 @@ module Google
|
|
1072
1130
|
|
1073
1131
|
property :limit, :numeric_string => true, as: 'limit'
|
1074
1132
|
property :partition_token, :base64 => true, as: 'partitionToken'
|
1133
|
+
property :request_options, as: 'requestOptions', class: Google::Apis::SpannerV1::RequestOptions, decorator: Google::Apis::SpannerV1::RequestOptions::Representation
|
1134
|
+
|
1075
1135
|
property :resume_token, :base64 => true, as: 'resumeToken'
|
1076
1136
|
property :table, as: 'table'
|
1077
1137
|
property :transaction, as: 'transaction', class: Google::Apis::SpannerV1::TransactionSelector, decorator: Google::Apis::SpannerV1::TransactionSelector::Representation
|
@@ -1094,6 +1154,21 @@ module Google
|
|
1094
1154
|
end
|
1095
1155
|
end
|
1096
1156
|
|
1157
|
+
class RequestOptions
|
1158
|
+
# @private
|
1159
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
1160
|
+
property :priority, as: 'priority'
|
1161
|
+
end
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
class RestoreDatabaseEncryptionConfig
|
1165
|
+
# @private
|
1166
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
1167
|
+
property :encryption_type, as: 'encryptionType'
|
1168
|
+
property :kms_key_name, as: 'kmsKeyName'
|
1169
|
+
end
|
1170
|
+
end
|
1171
|
+
|
1097
1172
|
class RestoreDatabaseMetadata
|
1098
1173
|
# @private
|
1099
1174
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -1113,6 +1188,8 @@ module Google
|
|
1113
1188
|
class Representation < Google::Apis::Core::JsonRepresentation
|
1114
1189
|
property :backup, as: 'backup'
|
1115
1190
|
property :database_id, as: 'databaseId'
|
1191
|
+
property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::RestoreDatabaseEncryptionConfig, decorator: Google::Apis::SpannerV1::RestoreDatabaseEncryptionConfig::Representation
|
1192
|
+
|
1116
1193
|
end
|
1117
1194
|
end
|
1118
1195
|
|
@@ -549,6 +549,12 @@ module Google
|
|
549
549
|
# @param [String] backup_id
|
550
550
|
# Required. The id of the backup to be created. The `backup_id` appended to `
|
551
551
|
# parent` forms the full backup name of the form `projects//instances//backups/`.
|
552
|
+
# @param [String] encryption_config_encryption_type
|
553
|
+
# Required. The encryption type of the backup.
|
554
|
+
# @param [String] encryption_config_kms_key_name
|
555
|
+
# Optional. The Cloud KMS key that will be used to protect the backup. This
|
556
|
+
# field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`.
|
557
|
+
# Values are of the form `projects//locations//keyRings//cryptoKeys/`.
|
552
558
|
# @param [String] fields
|
553
559
|
# Selector specifying which fields to include in a partial response.
|
554
560
|
# @param [String] quota_user
|
@@ -566,7 +572,7 @@ module Google
|
|
566
572
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
567
573
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
568
574
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
569
|
-
def create_project_instance_backup(parent, backup_object = nil, backup_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
575
|
+
def create_project_instance_backup(parent, backup_object = nil, backup_id: nil, encryption_config_encryption_type: nil, encryption_config_kms_key_name: nil, fields: nil, quota_user: nil, options: nil, &block)
|
570
576
|
command = make_simple_command(:post, 'v1/{+parent}/backups', options)
|
571
577
|
command.request_representation = Google::Apis::SpannerV1::Backup::Representation
|
572
578
|
command.request_object = backup_object
|
@@ -574,6 +580,8 @@ module Google
|
|
574
580
|
command.response_class = Google::Apis::SpannerV1::Operation
|
575
581
|
command.params['parent'] = parent unless parent.nil?
|
576
582
|
command.query['backupId'] = backup_id unless backup_id.nil?
|
583
|
+
command.query['encryptionConfig.encryptionType'] = encryption_config_encryption_type unless encryption_config_encryption_type.nil?
|
584
|
+
command.query['encryptionConfig.kmsKeyName'] = encryption_config_kms_key_name unless encryption_config_kms_key_name.nil?
|
577
585
|
command.query['fields'] = fields unless fields.nil?
|
578
586
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
579
587
|
execute_or_queue_command(command, &block)
|
@@ -693,18 +701,19 @@ module Google
|
|
693
701
|
# contains operator. Filter rules are not case sensitive. The following fields
|
694
702
|
# in the Backup are eligible for filtering: * `name` * `database` * `state` * `
|
695
703
|
# create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `
|
696
|
-
# expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `
|
697
|
-
#
|
698
|
-
#
|
699
|
-
#
|
700
|
-
#
|
701
|
-
#
|
702
|
-
#
|
703
|
-
#
|
704
|
-
#
|
705
|
-
#
|
706
|
-
#
|
707
|
-
#
|
704
|
+
# expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `
|
705
|
+
# version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `
|
706
|
+
# size_bytes` You can combine multiple expressions by enclosing each expression
|
707
|
+
# in parentheses. By default, expressions are combined with AND logic, but you
|
708
|
+
# can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `
|
709
|
+
# name:Howl` - The backup's name contains the string "howl". * `database:prod` -
|
710
|
+
# The database's name contains the string "prod". * `state:CREATING` - The
|
711
|
+
# backup is pending creation. * `state:READY` - The backup is fully created and
|
712
|
+
# ready for use. * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` -
|
713
|
+
# The backup name contains the string "howl" and `create_time` of the backup is
|
714
|
+
# before 2018-03-28T14:50:00Z. * `expire_time < \"2018-03-28T14:50:00Z\"` - The
|
715
|
+
# backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes >
|
716
|
+
# 10000000000` - The backup's size is greater than 10GB
|
708
717
|
# @param [Fixnum] page_size
|
709
718
|
# Number of backups to be returned in the response. If 0 or less, defaults to
|
710
719
|
# the server's maximum allowed page size.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-spanner_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -52,7 +52,7 @@ licenses:
|
|
52
52
|
metadata:
|
53
53
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
54
54
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-spanner_v1/CHANGELOG.md
|
55
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.
|
55
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.7.0
|
56
56
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-spanner_v1
|
57
57
|
post_install_message:
|
58
58
|
rdoc_options: []
|
@@ -62,14 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
62
|
requirements:
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: '2.
|
65
|
+
version: '2.5'
|
66
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.2.
|
72
|
+
rubygems_version: 3.2.13
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Simple REST client for Cloud Spanner API V1
|