google-cloud-spanner-admin-database-v1 0.6.1 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +4 -4
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +93 -102
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +34 -25
- data/lib/google/cloud/spanner/admin/database/v1/version.rb +1 -1
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +1 -0
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +8 -0
- data/proto_docs/google/type/expr.rb +35 -12
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 812a5059bcfc37d350244a986272e0c8645eb484cad1cff6b456b9cb3ab7bff1
|
4
|
+
data.tar.gz: 44f4c623513fb2773d925174f3f1e4796c1092a9d2e91a457c01d3afe3528933
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 103cf225a285f56eef7ecbb12c53942f0e29699c79fe34c932cb5ce3cc9bdf6e1d3922beef7befae5eb645ff7747f1ca086f1f45050f6e0e0a03593936890934
|
7
|
+
data.tar.gz: 788c17bca99fc2cf7b9b76ad12bd584543f9fb9816643423130ed3bb9bc2693f1bf815db09e1189a9bd0adf95716627d2baa3ebae70cbd188122799af2ad0251
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-spanner-admin-database-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `SPANNER_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `SPANNER_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/spanner/admin/database/v1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.ne
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/spanner/admin/database/v1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.ne
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/spanner/admin/database/v1"
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ https://github.com/googleapis/google-cloud-ruby
|
|
9
9
|
This gem is a _versioned_ client. It provides basic client classes for a
|
10
10
|
specific version of the Cloud Spanner Database Admin V1 API. Most users should consider using
|
11
11
|
the main client gem,
|
12
|
-
[google-cloud-spanner
|
12
|
+
[google-cloud-spanner](https://rubygems.org/gems/google-cloud-spanner).
|
13
13
|
See the section below titled *Which client should I use?* for more information.
|
14
14
|
|
15
15
|
## Installation
|
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/spanner/admin/database/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.list_databases request
|
38
38
|
```
|
39
39
|
|
@@ -83,7 +83,7 @@ about the Ruby support schedule.
|
|
83
83
|
## Which client should I use?
|
84
84
|
|
85
85
|
Most modern Ruby client libraries for Google APIs come in two flavors: the main
|
86
|
-
client library with a name such as `google-cloud-spanner
|
86
|
+
client library with a name such as `google-cloud-spanner`,
|
87
87
|
and lower-level _versioned_ client libraries with names such as
|
88
88
|
`google-cloud-spanner-admin-database-v1`.
|
89
89
|
_In most cases, you should install the main client._
|
@@ -110,7 +110,7 @@ service version.
|
|
110
110
|
|
111
111
|
We recommend that most users install the main client gem for a service. You can
|
112
112
|
identify this gem as the one _without_ a version in its name, e.g.
|
113
|
-
`google-cloud-spanner
|
113
|
+
`google-cloud-spanner`.
|
114
114
|
The main client is recommended because it will embody the best practices for
|
115
115
|
accessing the service, and may also provide more convenient interfaces or
|
116
116
|
tighter integration into frameworks and third-party libraries. In addition, the
|
@@ -48,13 +48,12 @@ module Google
|
|
48
48
|
# See {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration}
|
49
49
|
# for a description of the configuration fields.
|
50
50
|
#
|
51
|
-
#
|
51
|
+
# @example
|
52
52
|
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
# end
|
53
|
+
# # Modify the configuration for all DatabaseAdmin clients
|
54
|
+
# ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config|
|
55
|
+
# config.timeout = 10.0
|
56
|
+
# end
|
58
57
|
#
|
59
58
|
# @yield [config] Configure the Client client.
|
60
59
|
# @yieldparam config [Client::Configuration]
|
@@ -74,54 +73,36 @@ module Google
|
|
74
73
|
|
75
74
|
default_config.rpcs.list_databases.timeout = 3600.0
|
76
75
|
default_config.rpcs.list_databases.retry_policy = {
|
77
|
-
initial_delay: 1.0,
|
78
|
-
max_delay: 32.0,
|
79
|
-
multiplier: 1.3,
|
80
|
-
retry_codes: [14, 4]
|
76
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
81
77
|
}
|
82
78
|
|
83
79
|
default_config.rpcs.create_database.timeout = 3600.0
|
84
80
|
|
85
81
|
default_config.rpcs.get_database.timeout = 3600.0
|
86
82
|
default_config.rpcs.get_database.retry_policy = {
|
87
|
-
initial_delay: 1.0,
|
88
|
-
max_delay: 32.0,
|
89
|
-
multiplier: 1.3,
|
90
|
-
retry_codes: [14, 4]
|
83
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
91
84
|
}
|
92
85
|
|
93
86
|
default_config.rpcs.update_database_ddl.timeout = 3600.0
|
94
87
|
default_config.rpcs.update_database_ddl.retry_policy = {
|
95
|
-
initial_delay: 1.0,
|
96
|
-
max_delay: 32.0,
|
97
|
-
multiplier: 1.3,
|
98
|
-
retry_codes: [14, 4]
|
88
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
99
89
|
}
|
100
90
|
|
101
91
|
default_config.rpcs.drop_database.timeout = 3600.0
|
102
92
|
default_config.rpcs.drop_database.retry_policy = {
|
103
|
-
initial_delay: 1.0,
|
104
|
-
max_delay: 32.0,
|
105
|
-
multiplier: 1.3,
|
106
|
-
retry_codes: [14, 4]
|
93
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
107
94
|
}
|
108
95
|
|
109
96
|
default_config.rpcs.get_database_ddl.timeout = 3600.0
|
110
97
|
default_config.rpcs.get_database_ddl.retry_policy = {
|
111
|
-
initial_delay: 1.0,
|
112
|
-
max_delay: 32.0,
|
113
|
-
multiplier: 1.3,
|
114
|
-
retry_codes: [14, 4]
|
98
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
115
99
|
}
|
116
100
|
|
117
101
|
default_config.rpcs.set_iam_policy.timeout = 30.0
|
118
102
|
|
119
103
|
default_config.rpcs.get_iam_policy.timeout = 30.0
|
120
104
|
default_config.rpcs.get_iam_policy.retry_policy = {
|
121
|
-
initial_delay: 1.0,
|
122
|
-
max_delay: 32.0,
|
123
|
-
multiplier: 1.3,
|
124
|
-
retry_codes: [14, 4]
|
105
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
125
106
|
}
|
126
107
|
|
127
108
|
default_config.rpcs.test_iam_permissions.timeout = 30.0
|
@@ -130,52 +111,34 @@ module Google
|
|
130
111
|
|
131
112
|
default_config.rpcs.get_backup.timeout = 3600.0
|
132
113
|
default_config.rpcs.get_backup.retry_policy = {
|
133
|
-
initial_delay: 1.0,
|
134
|
-
max_delay: 32.0,
|
135
|
-
multiplier: 1.3,
|
136
|
-
retry_codes: [14, 4]
|
114
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
137
115
|
}
|
138
116
|
|
139
117
|
default_config.rpcs.update_backup.timeout = 3600.0
|
140
118
|
default_config.rpcs.update_backup.retry_policy = {
|
141
|
-
initial_delay: 1.0,
|
142
|
-
max_delay: 32.0,
|
143
|
-
multiplier: 1.3,
|
144
|
-
retry_codes: [14, 4]
|
119
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
145
120
|
}
|
146
121
|
|
147
122
|
default_config.rpcs.delete_backup.timeout = 3600.0
|
148
123
|
default_config.rpcs.delete_backup.retry_policy = {
|
149
|
-
initial_delay: 1.0,
|
150
|
-
max_delay: 32.0,
|
151
|
-
multiplier: 1.3,
|
152
|
-
retry_codes: [14, 4]
|
124
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
153
125
|
}
|
154
126
|
|
155
127
|
default_config.rpcs.list_backups.timeout = 3600.0
|
156
128
|
default_config.rpcs.list_backups.retry_policy = {
|
157
|
-
initial_delay: 1.0,
|
158
|
-
max_delay: 32.0,
|
159
|
-
multiplier: 1.3,
|
160
|
-
retry_codes: [14, 4]
|
129
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
161
130
|
}
|
162
131
|
|
163
132
|
default_config.rpcs.restore_database.timeout = 3600.0
|
164
133
|
|
165
134
|
default_config.rpcs.list_database_operations.timeout = 3600.0
|
166
135
|
default_config.rpcs.list_database_operations.retry_policy = {
|
167
|
-
initial_delay: 1.0,
|
168
|
-
max_delay: 32.0,
|
169
|
-
multiplier: 1.3,
|
170
|
-
retry_codes: [14, 4]
|
136
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
171
137
|
}
|
172
138
|
|
173
139
|
default_config.rpcs.list_backup_operations.timeout = 3600.0
|
174
140
|
default_config.rpcs.list_backup_operations.retry_policy = {
|
175
|
-
initial_delay: 1.0,
|
176
|
-
max_delay: 32.0,
|
177
|
-
multiplier: 1.3,
|
178
|
-
retry_codes: [14, 4]
|
141
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
179
142
|
}
|
180
143
|
|
181
144
|
default_config
|
@@ -207,19 +170,15 @@ module Google
|
|
207
170
|
##
|
208
171
|
# Create a new DatabaseAdmin client object.
|
209
172
|
#
|
210
|
-
#
|
211
|
-
#
|
212
|
-
# To create a new DatabaseAdmin client with the default
|
213
|
-
# configuration:
|
214
|
-
#
|
215
|
-
# client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
|
173
|
+
# @example
|
216
174
|
#
|
217
|
-
#
|
218
|
-
#
|
175
|
+
# # Create a client using the default configuration
|
176
|
+
# client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
|
219
177
|
#
|
220
|
-
#
|
221
|
-
#
|
222
|
-
#
|
178
|
+
# # Create a client using a custom configuration
|
179
|
+
# client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config|
|
180
|
+
# config.timeout = 10.0
|
181
|
+
# end
|
223
182
|
#
|
224
183
|
# @yield [config] Configure the DatabaseAdmin client.
|
225
184
|
# @yieldparam config [Client::Configuration]
|
@@ -239,14 +198,13 @@ module Google
|
|
239
198
|
|
240
199
|
# Create credentials
|
241
200
|
credentials = @config.credentials
|
242
|
-
# Use self-signed JWT if the
|
201
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
243
202
|
# but only if the default endpoint does not have a region prefix.
|
244
|
-
enable_self_signed_jwt = @config.
|
245
|
-
@config.endpoint == Client.configure.endpoint &&
|
203
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
246
204
|
!@config.endpoint.split(".").first.include?("-")
|
247
205
|
credentials ||= Credentials.default scope: @config.scope,
|
248
206
|
enable_self_signed_jwt: enable_self_signed_jwt
|
249
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
207
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
250
208
|
credentials = Credentials.new credentials, scope: @config.scope
|
251
209
|
end
|
252
210
|
@quota_project_id = @config.quota_project
|
@@ -338,7 +296,9 @@ module Google
|
|
338
296
|
options.apply_defaults timeout: @config.rpcs.list_databases.timeout,
|
339
297
|
metadata: metadata,
|
340
298
|
retry_policy: @config.rpcs.list_databases.retry_policy
|
341
|
-
|
299
|
+
|
300
|
+
options.apply_defaults timeout: @config.timeout,
|
301
|
+
metadata: @config.metadata,
|
342
302
|
retry_policy: @config.retry_policy
|
343
303
|
|
344
304
|
@database_admin_stub.call_rpc :list_databases, request, options: options do |response, operation|
|
@@ -428,7 +388,9 @@ module Google
|
|
428
388
|
options.apply_defaults timeout: @config.rpcs.create_database.timeout,
|
429
389
|
metadata: metadata,
|
430
390
|
retry_policy: @config.rpcs.create_database.retry_policy
|
431
|
-
|
391
|
+
|
392
|
+
options.apply_defaults timeout: @config.timeout,
|
393
|
+
metadata: @config.metadata,
|
432
394
|
retry_policy: @config.retry_policy
|
433
395
|
|
434
396
|
@database_admin_stub.call_rpc :create_database, request, options: options do |response, operation|
|
@@ -496,7 +458,9 @@ module Google
|
|
496
458
|
options.apply_defaults timeout: @config.rpcs.get_database.timeout,
|
497
459
|
metadata: metadata,
|
498
460
|
retry_policy: @config.rpcs.get_database.retry_policy
|
499
|
-
|
461
|
+
|
462
|
+
options.apply_defaults timeout: @config.timeout,
|
463
|
+
metadata: @config.metadata,
|
500
464
|
retry_policy: @config.retry_policy
|
501
465
|
|
502
466
|
@database_admin_stub.call_rpc :get_database, request, options: options do |response, operation|
|
@@ -590,7 +554,9 @@ module Google
|
|
590
554
|
options.apply_defaults timeout: @config.rpcs.update_database_ddl.timeout,
|
591
555
|
metadata: metadata,
|
592
556
|
retry_policy: @config.rpcs.update_database_ddl.retry_policy
|
593
|
-
|
557
|
+
|
558
|
+
options.apply_defaults timeout: @config.timeout,
|
559
|
+
metadata: @config.metadata,
|
594
560
|
retry_policy: @config.retry_policy
|
595
561
|
|
596
562
|
@database_admin_stub.call_rpc :update_database_ddl, request, options: options do |response, operation|
|
@@ -659,7 +625,9 @@ module Google
|
|
659
625
|
options.apply_defaults timeout: @config.rpcs.drop_database.timeout,
|
660
626
|
metadata: metadata,
|
661
627
|
retry_policy: @config.rpcs.drop_database.retry_policy
|
662
|
-
|
628
|
+
|
629
|
+
options.apply_defaults timeout: @config.timeout,
|
630
|
+
metadata: @config.metadata,
|
663
631
|
retry_policy: @config.retry_policy
|
664
632
|
|
665
633
|
@database_admin_stub.call_rpc :drop_database, request, options: options do |response, operation|
|
@@ -729,7 +697,9 @@ module Google
|
|
729
697
|
options.apply_defaults timeout: @config.rpcs.get_database_ddl.timeout,
|
730
698
|
metadata: metadata,
|
731
699
|
retry_policy: @config.rpcs.get_database_ddl.retry_policy
|
732
|
-
|
700
|
+
|
701
|
+
options.apply_defaults timeout: @config.timeout,
|
702
|
+
metadata: @config.metadata,
|
733
703
|
retry_policy: @config.retry_policy
|
734
704
|
|
735
705
|
@database_admin_stub.call_rpc :get_database_ddl, request, options: options do |response, operation|
|
@@ -807,7 +777,9 @@ module Google
|
|
807
777
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
808
778
|
metadata: metadata,
|
809
779
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
810
|
-
|
780
|
+
|
781
|
+
options.apply_defaults timeout: @config.timeout,
|
782
|
+
metadata: @config.metadata,
|
811
783
|
retry_policy: @config.retry_policy
|
812
784
|
|
813
785
|
@database_admin_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -884,7 +856,9 @@ module Google
|
|
884
856
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
885
857
|
metadata: metadata,
|
886
858
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
887
|
-
|
859
|
+
|
860
|
+
options.apply_defaults timeout: @config.timeout,
|
861
|
+
metadata: @config.metadata,
|
888
862
|
retry_policy: @config.retry_policy
|
889
863
|
|
890
864
|
@database_admin_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -965,7 +939,9 @@ module Google
|
|
965
939
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
966
940
|
metadata: metadata,
|
967
941
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
968
|
-
|
942
|
+
|
943
|
+
options.apply_defaults timeout: @config.timeout,
|
944
|
+
metadata: @config.metadata,
|
969
945
|
retry_policy: @config.retry_policy
|
970
946
|
|
971
947
|
@database_admin_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -1059,7 +1035,9 @@ module Google
|
|
1059
1035
|
options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
|
1060
1036
|
metadata: metadata,
|
1061
1037
|
retry_policy: @config.rpcs.create_backup.retry_policy
|
1062
|
-
|
1038
|
+
|
1039
|
+
options.apply_defaults timeout: @config.timeout,
|
1040
|
+
metadata: @config.metadata,
|
1063
1041
|
retry_policy: @config.retry_policy
|
1064
1042
|
|
1065
1043
|
@database_admin_stub.call_rpc :create_backup, request, options: options do |response, operation|
|
@@ -1128,7 +1106,9 @@ module Google
|
|
1128
1106
|
options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
|
1129
1107
|
metadata: metadata,
|
1130
1108
|
retry_policy: @config.rpcs.get_backup.retry_policy
|
1131
|
-
|
1109
|
+
|
1110
|
+
options.apply_defaults timeout: @config.timeout,
|
1111
|
+
metadata: @config.metadata,
|
1132
1112
|
retry_policy: @config.retry_policy
|
1133
1113
|
|
1134
1114
|
@database_admin_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
@@ -1203,7 +1183,9 @@ module Google
|
|
1203
1183
|
options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
|
1204
1184
|
metadata: metadata,
|
1205
1185
|
retry_policy: @config.rpcs.update_backup.retry_policy
|
1206
|
-
|
1186
|
+
|
1187
|
+
options.apply_defaults timeout: @config.timeout,
|
1188
|
+
metadata: @config.metadata,
|
1207
1189
|
retry_policy: @config.retry_policy
|
1208
1190
|
|
1209
1191
|
@database_admin_stub.call_rpc :update_backup, request, options: options do |response, operation|
|
@@ -1271,7 +1253,9 @@ module Google
|
|
1271
1253
|
options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
|
1272
1254
|
metadata: metadata,
|
1273
1255
|
retry_policy: @config.rpcs.delete_backup.retry_policy
|
1274
|
-
|
1256
|
+
|
1257
|
+
options.apply_defaults timeout: @config.timeout,
|
1258
|
+
metadata: @config.metadata,
|
1275
1259
|
retry_policy: @config.retry_policy
|
1276
1260
|
|
1277
1261
|
@database_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
@@ -1384,7 +1368,9 @@ module Google
|
|
1384
1368
|
options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
|
1385
1369
|
metadata: metadata,
|
1386
1370
|
retry_policy: @config.rpcs.list_backups.retry_policy
|
1387
|
-
|
1371
|
+
|
1372
|
+
options.apply_defaults timeout: @config.timeout,
|
1373
|
+
metadata: @config.metadata,
|
1388
1374
|
retry_policy: @config.retry_policy
|
1389
1375
|
|
1390
1376
|
@database_admin_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
@@ -1486,7 +1472,9 @@ module Google
|
|
1486
1472
|
options.apply_defaults timeout: @config.rpcs.restore_database.timeout,
|
1487
1473
|
metadata: metadata,
|
1488
1474
|
retry_policy: @config.rpcs.restore_database.retry_policy
|
1489
|
-
|
1475
|
+
|
1476
|
+
options.apply_defaults timeout: @config.timeout,
|
1477
|
+
metadata: @config.metadata,
|
1490
1478
|
retry_policy: @config.retry_policy
|
1491
1479
|
|
1492
1480
|
@database_admin_stub.call_rpc :restore_database, request, options: options do |response, operation|
|
@@ -1610,7 +1598,9 @@ module Google
|
|
1610
1598
|
options.apply_defaults timeout: @config.rpcs.list_database_operations.timeout,
|
1611
1599
|
metadata: metadata,
|
1612
1600
|
retry_policy: @config.rpcs.list_database_operations.retry_policy
|
1613
|
-
|
1601
|
+
|
1602
|
+
options.apply_defaults timeout: @config.timeout,
|
1603
|
+
metadata: @config.metadata,
|
1614
1604
|
retry_policy: @config.retry_policy
|
1615
1605
|
|
1616
1606
|
@database_admin_stub.call_rpc :list_database_operations, request, options: options do |response, operation|
|
@@ -1735,7 +1725,9 @@ module Google
|
|
1735
1725
|
options.apply_defaults timeout: @config.rpcs.list_backup_operations.timeout,
|
1736
1726
|
metadata: metadata,
|
1737
1727
|
retry_policy: @config.rpcs.list_backup_operations.retry_policy
|
1738
|
-
|
1728
|
+
|
1729
|
+
options.apply_defaults timeout: @config.timeout,
|
1730
|
+
metadata: @config.metadata,
|
1739
1731
|
retry_policy: @config.retry_policy
|
1740
1732
|
|
1741
1733
|
@database_admin_stub.call_rpc :list_backup_operations, request, options: options do |response, operation|
|
@@ -1761,22 +1753,21 @@ module Google
|
|
1761
1753
|
# Configuration can be applied globally to all clients, or to a single client
|
1762
1754
|
# on construction.
|
1763
1755
|
#
|
1764
|
-
#
|
1765
|
-
#
|
1766
|
-
#
|
1767
|
-
# to 20 seconds,
|
1768
|
-
#
|
1769
|
-
#
|
1770
|
-
#
|
1771
|
-
#
|
1772
|
-
#
|
1773
|
-
#
|
1774
|
-
#
|
1775
|
-
#
|
1776
|
-
#
|
1777
|
-
#
|
1778
|
-
#
|
1779
|
-
# end
|
1756
|
+
# @example
|
1757
|
+
#
|
1758
|
+
# # Modify the global config, setting the timeout for
|
1759
|
+
# # list_databases to 20 seconds,
|
1760
|
+
# # and all remaining timeouts to 10 seconds.
|
1761
|
+
# ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config|
|
1762
|
+
# config.timeout = 10.0
|
1763
|
+
# config.rpcs.list_databases.timeout = 20.0
|
1764
|
+
# end
|
1765
|
+
#
|
1766
|
+
# # Apply the above configuration only to a new client.
|
1767
|
+
# client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config|
|
1768
|
+
# config.timeout = 10.0
|
1769
|
+
# config.rpcs.list_databases.timeout = 20.0
|
1770
|
+
# end
|
1780
1771
|
#
|
1781
1772
|
# @!attribute [rw] endpoint
|
1782
1773
|
# The hostname or hostname:port of the service endpoint.
|
@@ -84,7 +84,7 @@ module Google
|
|
84
84
|
# Create credentials
|
85
85
|
credentials = @config.credentials
|
86
86
|
credentials ||= Credentials.default scope: @config.scope
|
87
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
87
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
88
88
|
credentials = Credentials.new credentials, scope: @config.scope
|
89
89
|
end
|
90
90
|
@quota_project_id = @config.quota_project
|
@@ -171,7 +171,9 @@ module Google
|
|
171
171
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
172
172
|
metadata: metadata,
|
173
173
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
174
|
-
|
174
|
+
|
175
|
+
options.apply_defaults timeout: @config.timeout,
|
176
|
+
metadata: @config.metadata,
|
175
177
|
retry_policy: @config.retry_policy
|
176
178
|
|
177
179
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -241,7 +243,9 @@ module Google
|
|
241
243
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
242
244
|
metadata: metadata,
|
243
245
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
244
|
-
|
246
|
+
|
247
|
+
options.apply_defaults timeout: @config.timeout,
|
248
|
+
metadata: @config.metadata,
|
245
249
|
retry_policy: @config.retry_policy
|
246
250
|
|
247
251
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -311,7 +315,9 @@ module Google
|
|
311
315
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
312
316
|
metadata: metadata,
|
313
317
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
314
|
-
|
318
|
+
|
319
|
+
options.apply_defaults timeout: @config.timeout,
|
320
|
+
metadata: @config.metadata,
|
315
321
|
retry_policy: @config.retry_policy
|
316
322
|
|
317
323
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -386,7 +392,9 @@ module Google
|
|
386
392
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
387
393
|
metadata: metadata,
|
388
394
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
389
|
-
|
395
|
+
|
396
|
+
options.apply_defaults timeout: @config.timeout,
|
397
|
+
metadata: @config.metadata,
|
390
398
|
retry_policy: @config.retry_policy
|
391
399
|
|
392
400
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -398,9 +406,9 @@ module Google
|
|
398
406
|
end
|
399
407
|
|
400
408
|
##
|
401
|
-
# Waits
|
402
|
-
#
|
403
|
-
#
|
409
|
+
# Waits until the specified long-running operation is done or reaches at most
|
410
|
+
# a specified timeout, returning the latest state. If the operation is
|
411
|
+
# already done, the latest state is immediately returned. If the timeout
|
404
412
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
405
413
|
# timeout is used. If the server does not support this method, it returns
|
406
414
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -458,7 +466,9 @@ module Google
|
|
458
466
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
459
467
|
metadata: metadata,
|
460
468
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
461
|
-
|
469
|
+
|
470
|
+
options.apply_defaults timeout: @config.timeout,
|
471
|
+
metadata: @config.metadata,
|
462
472
|
retry_policy: @config.retry_policy
|
463
473
|
|
464
474
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -483,22 +493,21 @@ module Google
|
|
483
493
|
# Configuration can be applied globally to all clients, or to a single client
|
484
494
|
# on construction.
|
485
495
|
#
|
486
|
-
#
|
487
|
-
#
|
488
|
-
#
|
489
|
-
# to 20 seconds,
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
#
|
500
|
-
#
|
501
|
-
# end
|
496
|
+
# @example
|
497
|
+
#
|
498
|
+
# # Modify the global config, setting the timeout for
|
499
|
+
# # list_operations to 20 seconds,
|
500
|
+
# # and all remaining timeouts to 10 seconds.
|
501
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
502
|
+
# config.timeout = 10.0
|
503
|
+
# config.rpcs.list_operations.timeout = 20.0
|
504
|
+
# end
|
505
|
+
#
|
506
|
+
# # Apply the above configuration only to a new client.
|
507
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
508
|
+
# config.timeout = 10.0
|
509
|
+
# config.rpcs.list_operations.timeout = 20.0
|
510
|
+
# end
|
502
511
|
#
|
503
512
|
# @!attribute [rw] endpoint
|
504
513
|
# The hostname or hostname:port of the service endpoint.
|
@@ -31,6 +31,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
31
31
|
repeated :encryption_info, :message, 8, "google.spanner.admin.database.v1.EncryptionInfo"
|
32
32
|
optional :version_retention_period, :string, 6
|
33
33
|
optional :earliest_version_time, :message, 7, "google.protobuf.Timestamp"
|
34
|
+
optional :default_leader, :string, 9
|
34
35
|
end
|
35
36
|
add_enum "google.spanner.admin.database.v1.Database.State" do
|
36
37
|
value :STATE_UNSPECIFIED, 0
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -85,6 +85,14 @@ module Google
|
|
85
85
|
# the moment it is queried. If you are using this value to recover data, make
|
86
86
|
# sure to account for the time from the moment when the value is queried to
|
87
87
|
# the moment when you initiate the recovery.
|
88
|
+
# @!attribute [r] default_leader
|
89
|
+
# @return [::String]
|
90
|
+
# Output only. The read-write region which contains the database's leader
|
91
|
+
# replicas.
|
92
|
+
#
|
93
|
+
# This is the same as the value of default_leader
|
94
|
+
# database option set using DatabaseAdmin.CreateDatabase or
|
95
|
+
# DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
|
88
96
|
class Database
|
89
97
|
include ::Google::Protobuf::MessageExts
|
90
98
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -19,30 +19,53 @@
|
|
19
19
|
|
20
20
|
module Google
|
21
21
|
module Type
|
22
|
-
# Represents
|
22
|
+
# Represents a textual expression in the Common Expression Language (CEL)
|
23
|
+
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL
|
24
|
+
# are documented at https://github.com/google/cel-spec.
|
23
25
|
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
26
|
+
# Example (Comparison):
|
27
|
+
#
|
28
|
+
# title: "Summary size limit"
|
29
|
+
# description: "Determines if a summary is less than 100 chars"
|
30
|
+
# expression: "document.summary.size() < 100"
|
31
|
+
#
|
32
|
+
# Example (Equality):
|
33
|
+
#
|
34
|
+
# title: "Requestor is owner"
|
35
|
+
# description: "Determines if requestor is the document owner"
|
36
|
+
# expression: "document.owner == request.auth.claims.email"
|
37
|
+
#
|
38
|
+
# Example (Logic):
|
39
|
+
#
|
40
|
+
# title: "Public documents"
|
41
|
+
# description: "Determine whether the document should be publicly visible"
|
42
|
+
# expression: "document.type != 'private' && document.type != 'internal'"
|
43
|
+
#
|
44
|
+
# Example (Data Manipulation):
|
45
|
+
#
|
46
|
+
# title: "Notification string"
|
47
|
+
# description: "Create a notification string with a timestamp."
|
48
|
+
# expression: "'New message received at ' + string(document.create_time)"
|
49
|
+
#
|
50
|
+
# The exact variables and functions that may be referenced within an expression
|
51
|
+
# are determined by the service that evaluates it. See the service
|
52
|
+
# documentation for additional information.
|
27
53
|
# @!attribute [rw] expression
|
28
54
|
# @return [::String]
|
29
|
-
# Textual representation of an expression in
|
30
|
-
#
|
31
|
-
#
|
32
|
-
# The application context of the containing message determines which
|
33
|
-
# well-known feature set of CEL is supported.
|
55
|
+
# Textual representation of an expression in Common Expression Language
|
56
|
+
# syntax.
|
34
57
|
# @!attribute [rw] title
|
35
58
|
# @return [::String]
|
36
|
-
#
|
59
|
+
# Optional. Title for the expression, i.e. a short string describing
|
37
60
|
# its purpose. This can be used e.g. in UIs which allow to enter the
|
38
61
|
# expression.
|
39
62
|
# @!attribute [rw] description
|
40
63
|
# @return [::String]
|
41
|
-
#
|
64
|
+
# Optional. Description of the expression. This is a longer text which
|
42
65
|
# describes the expression, e.g. when hovered over it in a UI.
|
43
66
|
# @!attribute [rw] location
|
44
67
|
# @return [::String]
|
45
|
-
#
|
68
|
+
# Optional. String indicating the location of the expression for error
|
46
69
|
# reporting, e.g. a file name and a position in the file.
|
47
70
|
class Expr
|
48
71
|
include ::Google::Protobuf::MessageExts
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-spanner-admin-database-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.3
|
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-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -179,8 +179,7 @@ dependencies:
|
|
179
179
|
description: Cloud Spanner is a managed, mission-critical, globally consistent and
|
180
180
|
scalable relational database service. Note that google-cloud-spanner-admin-database-v1
|
181
181
|
is a version-specific client library. For most uses, we recommend installing the
|
182
|
-
main client library google-cloud-spanner
|
183
|
-
for more details.
|
182
|
+
main client library google-cloud-spanner instead. See the readme for more details.
|
184
183
|
email: googleapis-packages@google.com
|
185
184
|
executables: []
|
186
185
|
extensions: []
|