google-cloud-spanner 1.12.0 → 1.12.2

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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -0
  3. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client.rb +14 -11
  4. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/policy.rb +6 -5
  5. data/lib/google/cloud/spanner/admin/database/v1/doc/google/spanner/admin/database/v1/spanner_database_admin.rb +1 -1
  6. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/policy.rb +6 -5
  7. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/spanner/admin/instance/v1/spanner_instance_admin.rb +96 -44
  8. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client.rb +20 -14
  9. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/keys.rb +2 -2
  10. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/mutation.rb +22 -24
  11. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/query_plan.rb +18 -21
  12. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/result_set.rb +19 -23
  13. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/spanner.rb +86 -76
  14. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/transaction.rb +6 -14
  15. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/type.rb +8 -11
  16. data/lib/google/cloud/spanner/v1/spanner_client.rb +64 -72
  17. data/lib/google/cloud/spanner/version.rb +1 -1
  18. data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +3 -0
  19. data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +13 -11
  20. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb +19 -0
  21. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb +5 -4
  22. data/lib/google/spanner/v1/keys_pb.rb +1 -1
  23. data/lib/google/spanner/v1/mutation_pb.rb +1 -1
  24. data/lib/google/spanner/v1/query_plan_pb.rb +1 -1
  25. data/lib/google/spanner/v1/result_set_pb.rb +1 -1
  26. data/lib/google/spanner/v1/spanner_pb.rb +3 -0
  27. data/lib/google/spanner/v1/spanner_services_pb.rb +9 -17
  28. data/lib/google/spanner/v1/transaction_pb.rb +1 -1
  29. metadata +42 -2
@@ -172,8 +172,7 @@ module Google
172
172
  # reads should be executed within a transaction or at an exact read
173
173
  # timestamp.
174
174
  #
175
- # See
176
- # {Google::Spanner::V1::TransactionOptions::ReadOnly#strong TransactionOptions::ReadOnly#strong}.
175
+ # See {Google::Spanner::V1::TransactionOptions::ReadOnly#strong TransactionOptions::ReadOnly#strong}.
177
176
  #
178
177
  # === Exact Staleness
179
178
  #
@@ -194,9 +193,7 @@ module Google
194
193
  # equivalent boundedly stale concurrency modes. On the other hand,
195
194
  # boundedly stale reads usually return fresher results.
196
195
  #
197
- # See
198
- # {Google::Spanner::V1::TransactionOptions::ReadOnly#read_timestamp TransactionOptions::ReadOnly#read_timestamp}
199
- # and
196
+ # See {Google::Spanner::V1::TransactionOptions::ReadOnly#read_timestamp TransactionOptions::ReadOnly#read_timestamp} and
200
197
  # {Google::Spanner::V1::TransactionOptions::ReadOnly#exact_staleness TransactionOptions::ReadOnly#exact_staleness}.
201
198
  #
202
199
  # === Bounded Staleness
@@ -226,9 +223,7 @@ module Google
226
223
  # which rows will be read, it can only be used with single-use
227
224
  # read-only transactions.
228
225
  #
229
- # See
230
- # {Google::Spanner::V1::TransactionOptions::ReadOnly#max_staleness TransactionOptions::ReadOnly#max_staleness}
231
- # and
226
+ # See {Google::Spanner::V1::TransactionOptions::ReadOnly#max_staleness TransactionOptions::ReadOnly#max_staleness} and
232
227
  # {Google::Spanner::V1::TransactionOptions::ReadOnly#min_read_timestamp TransactionOptions::ReadOnly#min_read_timestamp}.
233
228
  #
234
229
  # === Old Read Timestamps and Garbage Collection
@@ -388,8 +383,7 @@ module Google
388
383
  # @!attribute [rw] return_read_timestamp
389
384
  # @return [true, false]
390
385
  # If true, the Cloud Spanner-selected read timestamp is included in
391
- # the {Google::Spanner::V1::Transaction Transaction} message that describes
392
- # the transaction.
386
+ # the {Google::Spanner::V1::Transaction Transaction} message that describes the transaction.
393
387
  class ReadOnly; end
394
388
  end
395
389
 
@@ -418,8 +412,7 @@ module Google
418
412
  # {Google::Spanner::V1::Spanner::Read Read} or
419
413
  # {Google::Spanner::V1::Spanner::ExecuteSql ExecuteSql} call runs.
420
414
  #
421
- # See {Google::Spanner::V1::TransactionOptions TransactionOptions} for more
422
- # information about transactions.
415
+ # See {Google::Spanner::V1::TransactionOptions TransactionOptions} for more information about transactions.
423
416
  # @!attribute [rw] single_use
424
417
  # @return [Google::Spanner::V1::TransactionOptions]
425
418
  # Execute the read or SQL query in a temporary transaction.
@@ -432,8 +425,7 @@ module Google
432
425
  # @return [Google::Spanner::V1::TransactionOptions]
433
426
  # Begin a new transaction and execute this read or SQL query in
434
427
  # it. The transaction ID of the new transaction is returned in
435
- # {Google::Spanner::V1::ResultSetMetadata#transaction ResultSetMetadata#transaction},
436
- # which is a {Google::Spanner::V1::Transaction Transaction}.
428
+ # {Google::Spanner::V1::ResultSetMetadata#transaction ResultSetMetadata#transaction}, which is a {Google::Spanner::V1::Transaction Transaction}.
437
429
  class TransactionSelector; end
438
430
  end
439
431
  end
@@ -23,26 +23,23 @@ module Google
23
23
  # Required. The {Google::Spanner::V1::TypeCode TypeCode} for this type.
24
24
  # @!attribute [rw] array_element_type
25
25
  # @return [Google::Spanner::V1::Type]
26
- # If {Google::Spanner::V1::Type#code code} ==
27
- # {Google::Spanner::V1::TypeCode::ARRAY ARRAY}, then `array_element_type` is the
28
- # type of the array elements.
26
+ # If {Google::Spanner::V1::Type#code code} == {Google::Spanner::V1::TypeCode::ARRAY ARRAY}, then `array_element_type`
27
+ # is the type of the array elements.
29
28
  # @!attribute [rw] struct_type
30
29
  # @return [Google::Spanner::V1::StructType]
31
- # If {Google::Spanner::V1::Type#code code} ==
32
- # {Google::Spanner::V1::TypeCode::STRUCT STRUCT}, then `struct_type` provides
33
- # type information for the struct's fields.
30
+ # If {Google::Spanner::V1::Type#code code} == {Google::Spanner::V1::TypeCode::STRUCT STRUCT}, then `struct_type`
31
+ # provides type information for the struct's fields.
34
32
  class Type; end
35
33
 
36
- # `StructType` defines the fields of a
37
- # {Google::Spanner::V1::TypeCode::STRUCT STRUCT} type.
34
+ # `StructType` defines the fields of a {Google::Spanner::V1::TypeCode::STRUCT STRUCT} type.
38
35
  # @!attribute [rw] fields
39
36
  # @return [Array<Google::Spanner::V1::StructType::Field>]
40
37
  # The list of fields that make up this struct. Order is
41
38
  # significant, because values of this struct type are represented as
42
39
  # lists, where the order of field values matches the order of
43
- # fields in the {Google::Spanner::V1::StructType StructType}. In turn, the
44
- # order of fields matches the order of columns in a read request, or the
45
- # order of fields in the `SELECT` clause of a query.
40
+ # fields in the {Google::Spanner::V1::StructType StructType}. In turn, the order of fields
41
+ # matches the order of columns in a read request, or the order of
42
+ # fields in the `SELECT` clause of a query.
46
43
  class StructType
47
44
  # Message representing a single field of a struct.
48
45
  # @!attribute [rw] name
@@ -356,8 +356,8 @@ module Google
356
356
  # transaction internally, and count toward the one transaction
357
357
  # limit.
358
358
  #
359
- # Cloud Spanner limits the number of sessions that can exist at any given
360
- # time; thus, it is a good idea to delete idle and/or unneeded sessions.
359
+ # Active sessions use additional server resources, so it is a good idea to
360
+ # delete idle and unneeded sessions.
361
361
  # Aside from explicit deletes, Cloud Spanner can delete sessions for which no
362
362
  # operations are sent for more than an hour. If a session is deleted,
363
363
  # requests to it return `NOT_FOUND`.
@@ -605,28 +605,26 @@ module Google
605
605
  # For queries, if none is provided, the default is a temporary read-only
606
606
  # transaction with strong concurrency.
607
607
  #
608
- # Standard DML statements require a ReadWrite transaction. Single-use
609
- # transactions are not supported (to avoid replay). The caller must
610
- # either supply an existing transaction ID or begin a new transaction.
608
+ # Standard DML statements require a read-write transaction. To protect
609
+ # against replays, single-use transactions are not supported. The caller
610
+ # must either supply an existing transaction ID or begin a new transaction.
611
611
  #
612
- # Partitioned DML requires an existing PartitionedDml transaction ID.
612
+ # Partitioned DML requires an existing Partitioned DML transaction ID.
613
613
  # A hash of the same form as `Google::Spanner::V1::TransactionSelector`
614
614
  # can also be provided.
615
615
  # @param params [Google::Protobuf::Struct | Hash]
616
- # The SQL string can contain parameter placeholders. A parameter
617
- # placeholder consists of `'@'` followed by the parameter
618
- # name. Parameter names consist of any combination of letters,
619
- # numbers, and underscores.
616
+ # Parameter names and values that bind to placeholders in the SQL string.
617
+ #
618
+ # A parameter placeholder consists of the `@` character followed by the
619
+ # parameter name (for example, `@firstName`). Parameter names can contain
620
+ # letters, numbers, and underscores.
620
621
  #
621
622
  # Parameters can appear anywhere that a literal value is expected. The same
622
623
  # parameter name can be used more than once, for example:
623
- # `"WHERE id > @msg_id AND id < @msg_id + 100"`
624
624
  #
625
- # It is an error to execute an SQL statement with unbound parameters.
625
+ # `"WHERE id > @msg_id AND id < @msg_id + 100"`
626
626
  #
627
- # Parameter values are specified using `params`, which is a JSON
628
- # object whose keys are parameter names, and whose values are the
629
- # corresponding parameter values.
627
+ # It is an error to execute a SQL statement with unbound parameters.
630
628
  # A hash of the same form as `Google::Protobuf::Struct`
631
629
  # can also be provided.
632
630
  # @param param_types [Hash{String => Google::Spanner::V1::Type | Hash}]
@@ -661,7 +659,7 @@ module Google
661
659
  # match for the values of fields common to this message and the
662
660
  # PartitionQueryRequest message used to create this partition_token.
663
661
  # @param seqno [Integer]
664
- # A per-transaction sequence number used to identify this request. This
662
+ # A per-transaction sequence number used to identify this request. This field
665
663
  # makes each request idempotent such that if the request is received multiple
666
664
  # times, at most one will succeed.
667
665
  #
@@ -732,28 +730,26 @@ module Google
732
730
  # For queries, if none is provided, the default is a temporary read-only
733
731
  # transaction with strong concurrency.
734
732
  #
735
- # Standard DML statements require a ReadWrite transaction. Single-use
736
- # transactions are not supported (to avoid replay). The caller must
737
- # either supply an existing transaction ID or begin a new transaction.
733
+ # Standard DML statements require a read-write transaction. To protect
734
+ # against replays, single-use transactions are not supported. The caller
735
+ # must either supply an existing transaction ID or begin a new transaction.
738
736
  #
739
- # Partitioned DML requires an existing PartitionedDml transaction ID.
737
+ # Partitioned DML requires an existing Partitioned DML transaction ID.
740
738
  # A hash of the same form as `Google::Spanner::V1::TransactionSelector`
741
739
  # can also be provided.
742
740
  # @param params [Google::Protobuf::Struct | Hash]
743
- # The SQL string can contain parameter placeholders. A parameter
744
- # placeholder consists of `'@'` followed by the parameter
745
- # name. Parameter names consist of any combination of letters,
746
- # numbers, and underscores.
741
+ # Parameter names and values that bind to placeholders in the SQL string.
742
+ #
743
+ # A parameter placeholder consists of the `@` character followed by the
744
+ # parameter name (for example, `@firstName`). Parameter names can contain
745
+ # letters, numbers, and underscores.
747
746
  #
748
747
  # Parameters can appear anywhere that a literal value is expected. The same
749
748
  # parameter name can be used more than once, for example:
750
- # `"WHERE id > @msg_id AND id < @msg_id + 100"`
751
749
  #
752
- # It is an error to execute an SQL statement with unbound parameters.
750
+ # `"WHERE id > @msg_id AND id < @msg_id + 100"`
753
751
  #
754
- # Parameter values are specified using `params`, which is a JSON
755
- # object whose keys are parameter names, and whose values are the
756
- # corresponding parameter values.
752
+ # It is an error to execute a SQL statement with unbound parameters.
757
753
  # A hash of the same form as `Google::Protobuf::Struct`
758
754
  # can also be provided.
759
755
  # @param param_types [Hash{String => Google::Spanner::V1::Type | Hash}]
@@ -788,7 +784,7 @@ module Google
788
784
  # match for the values of fields common to this message and the
789
785
  # PartitionQueryRequest message used to create this partition_token.
790
786
  # @param seqno [Integer]
791
- # A per-transaction sequence number used to identify this request. This
787
+ # A per-transaction sequence number used to identify this request. This field
792
788
  # makes each request idempotent such that if the request is received multiple
793
789
  # times, at most one will succeed.
794
790
  #
@@ -847,45 +843,43 @@ module Google
847
843
  # to be run with lower latency than submitting them sequentially with
848
844
  # {Google::Spanner::V1::Spanner::ExecuteSql ExecuteSql}.
849
845
  #
850
- # Statements are executed in order, sequentially.
851
- # {Spanner::ExecuteBatchDmlResponse ExecuteBatchDmlResponse} will contain a
852
- # {Google::Spanner::V1::ResultSet ResultSet} for each DML statement that has
853
- # successfully executed. If a statement fails, its error status will be
854
- # returned as part of the
855
- # {Spanner::ExecuteBatchDmlResponse ExecuteBatchDmlResponse}. Execution will
856
- # stop at the first failed statement; the remaining statements will not run.
857
- #
858
- # ExecuteBatchDml is expected to return an OK status with a response even if
859
- # there was an error while processing one of the DML statements. Clients must
860
- # inspect response.status to determine if there were any errors while
861
- # processing the request.
846
+ # Statements are executed in sequential order. A request can succeed even if
847
+ # a statement fails. The
848
+ # {Google::Spanner::V1::ExecuteBatchDmlResponse#status ExecuteBatchDmlResponse#status}
849
+ # field in the response provides information about the statement that failed.
850
+ # Clients must inspect this field to determine whether an error occurred.
862
851
  #
863
- # See more details in
864
- # {Spanner::ExecuteBatchDmlRequest ExecuteBatchDmlRequest} and
865
- # {Spanner::ExecuteBatchDmlResponse ExecuteBatchDmlResponse}.
852
+ # Execution stops after the first failed statement; the remaining statements
853
+ # are not executed.
866
854
  #
867
855
  # @param session [String]
868
856
  # Required. The session in which the DML statements should be performed.
869
857
  # @param transaction [Google::Spanner::V1::TransactionSelector | Hash]
870
- # The transaction to use. A ReadWrite transaction is required. Single-use
871
- # transactions are not supported (to avoid replay). The caller must either
872
- # supply an existing transaction ID or begin a new transaction.
858
+ # Required. The transaction to use. Must be a read-write transaction.
859
+ #
860
+ # To protect against replays, single-use transactions are not supported. The
861
+ # caller must either supply an existing transaction ID or begin a new
862
+ # transaction.
873
863
  # A hash of the same form as `Google::Spanner::V1::TransactionSelector`
874
864
  # can also be provided.
875
865
  # @param statements [Array<Google::Spanner::V1::ExecuteBatchDmlRequest::Statement | Hash>]
876
- # The list of statements to execute in this batch. Statements are executed
877
- # serially, such that the effects of statement i are visible to statement
878
- # i+1. Each statement must be a DML statement. Execution will stop at the
879
- # first failed statement; the remaining statements will not run.
866
+ # Required. The list of statements to execute in this batch. Statements are
867
+ # executed serially, such that the effects of statement `i` are visible to
868
+ # statement `i+1`. Each statement must be a DML statement. Execution stops at
869
+ # the first failed statement; the remaining statements are not executed.
880
870
  #
881
- # REQUIRES: statements_size() > 0.
871
+ # Callers must provide at least one statement.
882
872
  # A hash of the same form as `Google::Spanner::V1::ExecuteBatchDmlRequest::Statement`
883
873
  # can also be provided.
884
874
  # @param seqno [Integer]
885
- # A per-transaction sequence number used to identify this request. This is
886
- # used in the same space as the seqno in
887
- # {Spanner::ExecuteSqlRequest ExecuteSqlRequest}. See more details
888
- # in {Spanner::ExecuteSqlRequest ExecuteSqlRequest}.
875
+ # Required. A per-transaction sequence number used to identify this request.
876
+ # This field makes each request idempotent such that if the request is
877
+ # received multiple times, at most one will succeed.
878
+ #
879
+ # The sequence number must be monotonically increasing within the
880
+ # transaction. If a request arrives for the first time with an out-of-order
881
+ # sequence number, the transaction may be aborted. Replays of previously
882
+ # handled requests will yield the same response as the first execution.
889
883
  # @param options [Google::Gax::CallOptions]
890
884
  # Overrides the default settings for this call, e.g, timeout,
891
885
  # retries, etc.
@@ -947,8 +941,8 @@ module Google
947
941
  # @param table [String]
948
942
  # Required. The name of the table in the database to be read.
949
943
  # @param columns [Array<String>]
950
- # The columns of {Google::Spanner::V1::ReadRequest#table table} to be returned
951
- # for each row matching this request.
944
+ # Required. The columns of {Google::Spanner::V1::ReadRequest#table table} to be
945
+ # returned for each row matching this request.
952
946
  # @param key_set [Google::Spanner::V1::KeySet | Hash]
953
947
  # Required. `key_set` identifies the rows to be yielded. `key_set` names the
954
948
  # primary keys of the rows in {Google::Spanner::V1::ReadRequest#table table} to
@@ -1058,8 +1052,8 @@ module Google
1058
1052
  # @param table [String]
1059
1053
  # Required. The name of the table in the database to be read.
1060
1054
  # @param columns [Array<String>]
1061
- # The columns of {Google::Spanner::V1::ReadRequest#table table} to be returned
1062
- # for each row matching this request.
1055
+ # Required. The columns of {Google::Spanner::V1::ReadRequest#table table} to be
1056
+ # returned for each row matching this request.
1063
1057
  # @param key_set [Google::Spanner::V1::KeySet | Hash]
1064
1058
  # Required. `key_set` identifies the rows to be yielded. `key_set` names the
1065
1059
  # primary keys of the rows in {Google::Spanner::V1::ReadRequest#table table} to
@@ -1328,8 +1322,8 @@ module Google
1328
1322
  # @param session [String]
1329
1323
  # Required. The session used to create the partitions.
1330
1324
  # @param sql [String]
1331
- # The query request to generate partitions for. The request will fail if
1332
- # the query is not root partitionable. The query plan of a root
1325
+ # Required. The query request to generate partitions for. The request will
1326
+ # fail if the query is not root partitionable. The query plan of a root
1333
1327
  # partitionable query has a single distributed union operator. A distributed
1334
1328
  # union operator conceptually divides one or more tables into multiple
1335
1329
  # splits, remotely evaluates a subquery independently on each split, and
@@ -1345,20 +1339,18 @@ module Google
1345
1339
  # A hash of the same form as `Google::Spanner::V1::TransactionSelector`
1346
1340
  # can also be provided.
1347
1341
  # @param params [Google::Protobuf::Struct | Hash]
1348
- # The SQL query string can contain parameter placeholders. A parameter
1349
- # placeholder consists of `'@'` followed by the parameter
1350
- # name. Parameter names consist of any combination of letters,
1351
- # numbers, and underscores.
1342
+ # Parameter names and values that bind to placeholders in the SQL string.
1343
+ #
1344
+ # A parameter placeholder consists of the `@` character followed by the
1345
+ # parameter name (for example, `@firstName`). Parameter names can contain
1346
+ # letters, numbers, and underscores.
1352
1347
  #
1353
1348
  # Parameters can appear anywhere that a literal value is expected. The same
1354
1349
  # parameter name can be used more than once, for example:
1355
- # `"WHERE id > @msg_id AND id < @msg_id + 100"`
1356
1350
  #
1357
- # It is an error to execute an SQL query with unbound parameters.
1351
+ # `"WHERE id > @msg_id AND id < @msg_id + 100"`
1358
1352
  #
1359
- # Parameter values are specified using `params`, which is a JSON
1360
- # object whose keys are parameter names, and whose values are the
1361
- # corresponding parameter values.
1353
+ # It is an error to execute a SQL statement with unbound parameters.
1362
1354
  # A hash of the same form as `Google::Protobuf::Struct`
1363
1355
  # can also be provided.
1364
1356
  # @param param_types [Hash{String => Google::Spanner::V1::Type | Hash}]
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Spanner
19
- VERSION = "1.12.0".freeze
19
+ VERSION = "1.12.2".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -5,6 +5,9 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
8
11
  require 'google/iam/v1/iam_policy_pb'
9
12
  require 'google/iam/v1/policy_pb'
10
13
  require 'google/longrunning/operations_pb'
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/spanner/admin/database/v1/spanner_database_admin.proto for package 'google.spanner.admin.database.v1'
3
3
  # Original file comments:
4
- # Copyright 2018 Google LLC
4
+ # Copyright 2019 Google LLC.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
+ #
18
19
 
19
20
 
20
21
  require 'grpc'
@@ -67,24 +68,25 @@ module Google
67
68
  # DDL statements. This method does not show pending schema updates, those may
68
69
  # be queried using the [Operations][google.longrunning.Operations] API.
69
70
  rpc :GetDatabaseDdl, GetDatabaseDdlRequest, GetDatabaseDdlResponse
70
- # Sets the access control policy on a database resource. Replaces any
71
- # existing policy.
71
+ # Sets the access control policy on a database resource.
72
+ # Replaces any existing policy.
72
73
  #
73
- # Authorization requires `spanner.databases.setIamPolicy` permission on
74
- # [resource][google.iam.v1.SetIamPolicyRequest.resource].
74
+ # Authorization requires `spanner.databases.setIamPolicy`
75
+ # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
75
76
  rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
76
- # Gets the access control policy for a database resource. Returns an empty
77
- # policy if a database exists but does not have a policy set.
77
+ # Gets the access control policy for a database resource.
78
+ # Returns an empty policy if a database exists but does
79
+ # not have a policy set.
78
80
  #
79
81
  # Authorization requires `spanner.databases.getIamPolicy` permission on
80
82
  # [resource][google.iam.v1.GetIamPolicyRequest.resource].
81
83
  rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
82
84
  # Returns permissions that the caller has on the specified database resource.
83
85
  #
84
- # Attempting this RPC on a non-existent Cloud Spanner database will result in
85
- # a NOT_FOUND error if the user has `spanner.databases.list` permission on
86
- # the containing Cloud Spanner instance. Otherwise returns an empty set of
87
- # permissions.
86
+ # Attempting this RPC on a non-existent Cloud Spanner database will
87
+ # result in a NOT_FOUND error if the user has
88
+ # `spanner.databases.list` permission on the containing Cloud
89
+ # Spanner instance. Otherwise returns an empty set of permissions.
88
90
  rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
89
91
  end
90
92
 
@@ -5,6 +5,9 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
8
11
  require 'google/iam/v1/iam_policy_pb'
9
12
  require 'google/iam/v1/policy_pb'
10
13
  require 'google/longrunning/operations_pb'
@@ -12,9 +15,21 @@ require 'google/protobuf/empty_pb'
12
15
  require 'google/protobuf/field_mask_pb'
13
16
  require 'google/protobuf/timestamp_pb'
14
17
  Google::Protobuf::DescriptorPool.generated_pool.build do
18
+ add_message "google.spanner.admin.instance.v1.ReplicaInfo" do
19
+ optional :location, :string, 1
20
+ optional :type, :enum, 2, "google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType"
21
+ optional :default_leader_location, :bool, 3
22
+ end
23
+ add_enum "google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType" do
24
+ value :TYPE_UNSPECIFIED, 0
25
+ value :READ_WRITE, 1
26
+ value :READ_ONLY, 2
27
+ value :WITNESS, 3
28
+ end
15
29
  add_message "google.spanner.admin.instance.v1.InstanceConfig" do
16
30
  optional :name, :string, 1
17
31
  optional :display_name, :string, 2
32
+ repeated :replicas, :message, 3, "google.spanner.admin.instance.v1.ReplicaInfo"
18
33
  end
19
34
  add_message "google.spanner.admin.instance.v1.Instance" do
20
35
  optional :name, :string, 1
@@ -23,6 +38,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
23
38
  optional :node_count, :int32, 5
24
39
  optional :state, :enum, 6, "google.spanner.admin.instance.v1.Instance.State"
25
40
  map :labels, :string, :string, 7
41
+ repeated :endpoint_uris, :string, 8
26
42
  end
27
43
  add_enum "google.spanner.admin.instance.v1.Instance.State" do
28
44
  value :STATE_UNSPECIFIED, 0
@@ -43,6 +59,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
43
59
  end
44
60
  add_message "google.spanner.admin.instance.v1.GetInstanceRequest" do
45
61
  optional :name, :string, 1
62
+ optional :field_mask, :message, 2, "google.protobuf.FieldMask"
46
63
  end
47
64
  add_message "google.spanner.admin.instance.v1.CreateInstanceRequest" do
48
65
  optional :parent, :string, 1
@@ -85,6 +102,8 @@ module Google
85
102
  module Admin
86
103
  module Instance
87
104
  module V1
105
+ ReplicaInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaInfo").msgclass
106
+ ReplicaInfo::ReplicaType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType").enummodule
88
107
  InstanceConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig").msgclass
89
108
  Instance = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance").msgclass
90
109
  Instance::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance.State").enummodule