google-cloud-spanner-admin-database-v1 0.5.0 → 0.7.1
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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +58 -112
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +4 -4
- data/lib/google/cloud/spanner/admin/database/v1/version.rb +1 -1
- data/lib/google/spanner/admin/database/v1/backup_pb.rb +1 -0
- data/lib/google/spanner/admin/database/v1/common_pb.rb +1 -0
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +2 -0
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +12 -16
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/spanner/admin/database/v1/backup.rb +45 -66
- data/proto_docs/google/spanner/admin/database/v1/common.rb +5 -5
- data/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +61 -59
- data/proto_docs/google/type/expr.rb +35 -12
- metadata +15 -9
@@ -9,6 +9,7 @@ require 'google/longrunning/operations_pb'
|
|
9
9
|
require 'google/protobuf/field_mask_pb'
|
10
10
|
require 'google/protobuf/timestamp_pb'
|
11
11
|
require 'google/spanner/admin/database/v1/common_pb'
|
12
|
+
require 'google/api/annotations_pb'
|
12
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
14
|
add_file("google/spanner/admin/database/v1/backup.proto", :syntax => :proto3) do
|
14
15
|
add_message "google.spanner.admin.database.v1.Backup" do
|
@@ -7,6 +7,7 @@ require 'google/api/field_behavior_pb'
|
|
7
7
|
require 'google/api/resource_pb'
|
8
8
|
require 'google/protobuf/timestamp_pb'
|
9
9
|
require 'google/rpc/status_pb'
|
10
|
+
require 'google/api/annotations_pb'
|
10
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
12
|
add_file("google/spanner/admin/database/v1/common.proto", :syntax => :proto3) do
|
12
13
|
add_message "google.spanner.admin.database.v1.OperationProgress" do
|
@@ -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
|
@@ -69,6 +70,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
69
70
|
repeated :statements, :string, 2
|
70
71
|
repeated :commit_timestamps, :message, 3, "google.protobuf.Timestamp"
|
71
72
|
optional :throttled, :bool, 4
|
73
|
+
repeated :progress, :message, 5, "google.spanner.admin.database.v1.OperationProgress"
|
72
74
|
end
|
73
75
|
add_message "google.spanner.admin.database.v1.DropDatabaseRequest" do
|
74
76
|
optional :database, :string, 1
|
@@ -47,8 +47,8 @@ module Google
|
|
47
47
|
# have a name of the format `<database_name>/operations/<operation_id>` and
|
48
48
|
# can be used to track preparation of the database. The
|
49
49
|
# [metadata][google.longrunning.Operation.metadata] field type is
|
50
|
-
# [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata].
|
51
|
-
#
|
50
|
+
# [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
|
51
|
+
# [response][google.longrunning.Operation.response] field type is
|
52
52
|
# [Database][google.spanner.admin.database.v1.Database], if successful.
|
53
53
|
rpc :CreateDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, ::Google::Longrunning::Operation
|
54
54
|
# Gets the state of a Cloud Spanner database.
|
@@ -59,8 +59,7 @@ module Google
|
|
59
59
|
# the format `<database_name>/operations/<operation_id>` and can be used to
|
60
60
|
# track execution of the schema change(s). The
|
61
61
|
# [metadata][google.longrunning.Operation.metadata] field type is
|
62
|
-
# [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
|
63
|
-
# The operation has no response.
|
62
|
+
# [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
|
64
63
|
rpc :UpdateDatabaseDdl, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, ::Google::Longrunning::Operation
|
65
64
|
# Drops (aka deletes) a Cloud Spanner database.
|
66
65
|
# Completed backups for the database will be retained according to their
|
@@ -104,21 +103,18 @@ module Google
|
|
104
103
|
# `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
|
105
104
|
# and can be used to track creation of the backup. The
|
106
105
|
# [metadata][google.longrunning.Operation.metadata] field type is
|
107
|
-
# [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
|
108
|
-
#
|
109
|
-
# [Backup][google.spanner.admin.database.v1.Backup], if successful.
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
106
|
+
# [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The
|
107
|
+
# [response][google.longrunning.Operation.response] field type is
|
108
|
+
# [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the
|
109
|
+
# creation and delete the backup.
|
110
|
+
# There can be only one pending backup creation per database. Backup creation
|
111
|
+
# of different databases can run concurrently.
|
113
112
|
rpc :CreateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, ::Google::Longrunning::Operation
|
114
|
-
# Gets metadata on a pending or completed
|
115
|
-
# [Backup][google.spanner.admin.database.v1.Backup].
|
113
|
+
# Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
|
116
114
|
rpc :GetBackup, ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup
|
117
|
-
# Updates a pending or completed
|
118
|
-
# [Backup][google.spanner.admin.database.v1.Backup].
|
115
|
+
# Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
|
119
116
|
rpc :UpdateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup
|
120
|
-
# Deletes a pending or completed
|
121
|
-
# [Backup][google.spanner.admin.database.v1.Backup].
|
117
|
+
# Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
|
122
118
|
rpc :DeleteBackup, ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, ::Google::Protobuf::Empty
|
123
119
|
# Lists completed and pending backups.
|
124
120
|
# Backups returned are ordered by `create_time` in descending order,
|
@@ -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
|
@@ -26,10 +26,10 @@ module Google
|
|
26
26
|
# A backup of a Cloud Spanner database.
|
27
27
|
# @!attribute [rw] database
|
28
28
|
# @return [::String]
|
29
|
-
# Required for the
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
29
|
+
# Required for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} operation.
|
30
|
+
# Name of the database from which this backup was
|
31
|
+
# created. This needs to be in the same instance as the backup.
|
32
|
+
# Values are of the form
|
33
33
|
# `projects/<project>/instances/<instance>/databases/<database>`.
|
34
34
|
# @!attribute [rw] version_time
|
35
35
|
# @return [::Google::Protobuf::Timestamp]
|
@@ -39,8 +39,7 @@ module Google
|
|
39
39
|
# backup.
|
40
40
|
# @!attribute [rw] expire_time
|
41
41
|
# @return [::Google::Protobuf::Timestamp]
|
42
|
-
# Required for the
|
43
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
42
|
+
# Required for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
44
43
|
# operation. The expiration time of the backup, with microseconds
|
45
44
|
# granularity that must be at least 6 hours and at most 366 days
|
46
45
|
# from the time the CreateBackup request is processed. Once the `expire_time`
|
@@ -48,11 +47,8 @@ module Google
|
|
48
47
|
# Spanner to free the resources used by the backup.
|
49
48
|
# @!attribute [rw] name
|
50
49
|
# @return [::String]
|
51
|
-
# Output only for the
|
52
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#
|
53
|
-
# operation. Required for the
|
54
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}
|
55
|
-
# operation.
|
50
|
+
# Output only for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} operation.
|
51
|
+
# Required for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup} operation.
|
56
52
|
#
|
57
53
|
# A globally unique identifier for the backup which cannot be
|
58
54
|
# changed. Values are of the form
|
@@ -66,8 +62,7 @@ module Google
|
|
66
62
|
# `projects/<project>/instances/<instance>`.
|
67
63
|
# @!attribute [r] create_time
|
68
64
|
# @return [::Google::Protobuf::Timestamp]
|
69
|
-
# Output only. The time the
|
70
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
65
|
+
# Output only. The time the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
71
66
|
# request is received. If the request does not specify `version_time`, the
|
72
67
|
# `version_time` of the backup will be equivalent to the `create_time`.
|
73
68
|
# @!attribute [r] size_bytes
|
@@ -106,8 +101,7 @@ module Google
|
|
106
101
|
end
|
107
102
|
end
|
108
103
|
|
109
|
-
# The request for
|
110
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}.
|
104
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}.
|
111
105
|
# @!attribute [rw] parent
|
112
106
|
# @return [::String]
|
113
107
|
# Required. The name of the instance in which the backup will be
|
@@ -126,11 +120,11 @@ module Google
|
|
126
120
|
# Required. The backup to create.
|
127
121
|
# @!attribute [rw] encryption_config
|
128
122
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig]
|
129
|
-
# Optional. The encryption configuration used to encrypt the backup. If this
|
130
|
-
#
|
131
|
-
# configuration as the database by default, namely
|
132
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
|
133
|
-
#
|
123
|
+
# Optional. The encryption configuration used to encrypt the backup. If this field is
|
124
|
+
# not specified, the backup will use the same
|
125
|
+
# encryption configuration as the database by default, namely
|
126
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} =
|
127
|
+
# `USE_DATABASE_ENCRYPTION`.
|
134
128
|
class CreateBackupRequest
|
135
129
|
include ::Google::Protobuf::MessageExts
|
136
130
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -147,8 +141,7 @@ module Google
|
|
147
141
|
# @!attribute [rw] progress
|
148
142
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress]
|
149
143
|
# The progress of the
|
150
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
151
|
-
# operation.
|
144
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} operation.
|
152
145
|
# @!attribute [rw] cancel_time
|
153
146
|
# @return [::Google::Protobuf::Timestamp]
|
154
147
|
# The time at which cancellation of this operation was received.
|
@@ -168,8 +161,7 @@ module Google
|
|
168
161
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
169
162
|
end
|
170
163
|
|
171
|
-
# The request for
|
172
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}.
|
164
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}.
|
173
165
|
# @!attribute [rw] backup
|
174
166
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup]
|
175
167
|
# Required. The backup to update. `backup.name`, and the fields to be updated
|
@@ -188,8 +180,7 @@ module Google
|
|
188
180
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
189
181
|
end
|
190
182
|
|
191
|
-
# The request for
|
192
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup GetBackup}.
|
183
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup GetBackup}.
|
193
184
|
# @!attribute [rw] name
|
194
185
|
# @return [::String]
|
195
186
|
# Required. Name of the backup.
|
@@ -200,8 +191,7 @@ module Google
|
|
200
191
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
201
192
|
end
|
202
193
|
|
203
|
-
# The request for
|
204
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup DeleteBackup}.
|
194
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup DeleteBackup}.
|
205
195
|
# @!attribute [rw] name
|
206
196
|
# @return [::String]
|
207
197
|
# Required. Name of the backup to delete.
|
@@ -212,8 +202,7 @@ module Google
|
|
212
202
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
213
203
|
end
|
214
204
|
|
215
|
-
# The request for
|
216
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
|
205
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
|
217
206
|
# @!attribute [rw] parent
|
218
207
|
# @return [::String]
|
219
208
|
# Required. The instance to list backups from. Values are of the
|
@@ -228,9 +217,7 @@ module Google
|
|
228
217
|
# must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
|
229
218
|
# Colon `:` is the contains operator. Filter rules are not case sensitive.
|
230
219
|
#
|
231
|
-
# The following fields in the
|
232
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for
|
233
|
-
# filtering:
|
220
|
+
# The following fields in the {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for filtering:
|
234
221
|
#
|
235
222
|
# * `name`
|
236
223
|
# * `database`
|
@@ -264,17 +251,15 @@ module Google
|
|
264
251
|
# @!attribute [rw] page_token
|
265
252
|
# @return [::String]
|
266
253
|
# If non-empty, `page_token` should contain a
|
267
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token}
|
268
|
-
#
|
269
|
-
#
|
270
|
-
# to the same `parent` and with the same `filter`.
|
254
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} from a
|
255
|
+
# previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} to the same `parent` and with the same
|
256
|
+
# `filter`.
|
271
257
|
class ListBackupsRequest
|
272
258
|
include ::Google::Protobuf::MessageExts
|
273
259
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
274
260
|
end
|
275
261
|
|
276
|
-
# The response for
|
277
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
|
262
|
+
# The response for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
|
278
263
|
# @!attribute [rw] backups
|
279
264
|
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Backup>]
|
280
265
|
# The list of matching backups. Backups returned are ordered by `create_time`
|
@@ -282,8 +267,8 @@ module Google
|
|
282
267
|
# @!attribute [rw] next_page_token
|
283
268
|
# @return [::String]
|
284
269
|
# `next_page_token` can be sent in a subsequent
|
285
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}
|
286
|
-
#
|
270
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups} call to fetch more
|
271
|
+
# of the matching backups.
|
287
272
|
class ListBackupsResponse
|
288
273
|
include ::Google::Protobuf::MessageExts
|
289
274
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -311,9 +296,7 @@ module Google
|
|
311
296
|
# * `name` - The name of the long-running operation
|
312
297
|
# * `done` - False if the operation is in progress, else true.
|
313
298
|
# * `metadata.@type` - the type of metadata. For example, the type string
|
314
|
-
# for
|
315
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
|
316
|
-
# is
|
299
|
+
# for {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} is
|
317
300
|
# `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
|
318
301
|
# * `metadata.<field_name>` - any field in metadata.value.
|
319
302
|
# * `error` - Error associated with the long-running operation.
|
@@ -333,8 +316,7 @@ module Google
|
|
333
316
|
# `(metadata.name:howl) AND` \
|
334
317
|
# `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
|
335
318
|
# `(error:*)` - Returns operations where:
|
336
|
-
# * The operation's metadata type is
|
337
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
319
|
+
# * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
338
320
|
# * The backup name contains the string "howl".
|
339
321
|
# * The operation started before 2018-03-28T14:50:00Z.
|
340
322
|
# * The operation resulted in an error.
|
@@ -346,9 +328,8 @@ module Google
|
|
346
328
|
# @return [::String]
|
347
329
|
# If non-empty, `page_token` should contain a
|
348
330
|
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token}
|
349
|
-
# from a previous
|
350
|
-
#
|
351
|
-
# to the same `parent` and with the same `filter`.
|
331
|
+
# from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} to the
|
332
|
+
# same `parent` and with the same `filter`.
|
352
333
|
class ListBackupOperationsRequest
|
353
334
|
include ::Google::Protobuf::MessageExts
|
354
335
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -362,11 +343,11 @@ module Google
|
|
362
343
|
# operations][google.longrunning.Operation]. Each operation's name will be
|
363
344
|
# prefixed by the backup's name and the operation's
|
364
345
|
# {::Google::Longrunning::Operation#metadata metadata} will be of type
|
365
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
366
|
-
#
|
367
|
-
#
|
368
|
-
#
|
369
|
-
#
|
346
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. Operations returned include those that are
|
347
|
+
# pending or have completed/failed/canceled within the last 7 days.
|
348
|
+
# Operations returned are ordered by
|
349
|
+
# `operation.metadata.value.progress.start_time` in descending order starting
|
350
|
+
# from the most recently started operation.
|
370
351
|
# @!attribute [rw] next_page_token
|
371
352
|
# @return [::String]
|
372
353
|
# `next_page_token` can be sent in a subsequent
|
@@ -385,14 +366,13 @@ module Google
|
|
385
366
|
# @return [::Google::Protobuf::Timestamp]
|
386
367
|
# The backup contains an externally consistent copy of `source_database` at
|
387
368
|
# the timestamp specified by `version_time`. If the
|
388
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
389
|
-
#
|
390
|
-
#
|
369
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} request did not specify
|
370
|
+
# `version_time`, the `version_time` of the backup is equivalent to the
|
371
|
+
# `create_time`.
|
391
372
|
# @!attribute [rw] create_time
|
392
373
|
# @return [::Google::Protobuf::Timestamp]
|
393
|
-
# The time the
|
394
|
-
#
|
395
|
-
# request was received.
|
374
|
+
# The time the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} request was
|
375
|
+
# received.
|
396
376
|
# @!attribute [rw] source_database
|
397
377
|
# @return [::String]
|
398
378
|
# Name of the database the backup was created from.
|
@@ -409,8 +389,8 @@ module Google
|
|
409
389
|
# @return [::String]
|
410
390
|
# Optional. The Cloud KMS key that will be used to protect the backup.
|
411
391
|
# This field should be set only when
|
412
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
|
413
|
-
#
|
392
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} is
|
393
|
+
# `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
|
414
394
|
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
415
395
|
class CreateBackupEncryptionConfig
|
416
396
|
include ::Google::Protobuf::MessageExts
|
@@ -423,10 +403,9 @@ module Google
|
|
423
403
|
|
424
404
|
# Use the same encryption configuration as the database. This is the
|
425
405
|
# default option when
|
426
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig encryption_config}
|
427
|
-
#
|
428
|
-
#
|
429
|
-
# KMS key as the database.
|
406
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig encryption_config} is empty.
|
407
|
+
# For example, if the database is using `Customer_Managed_Encryption`, the
|
408
|
+
# backup will be using the same Cloud KMS key as the database.
|
430
409
|
USE_DATABASE_ENCRYPTION = 1
|
431
410
|
|
432
411
|
# Use Google default encryption.
|
@@ -58,13 +58,13 @@ module Google
|
|
58
58
|
# Output only. The type of encryption.
|
59
59
|
# @!attribute [r] encryption_status
|
60
60
|
# @return [::Google::Rpc::Status]
|
61
|
-
# Output only. If present, the status of a recent encrypt/decrypt call on
|
62
|
-
#
|
63
|
-
#
|
61
|
+
# Output only. If present, the status of a recent encrypt/decrypt call on underlying data
|
62
|
+
# for this database or backup. Regardless of status, data is always encrypted
|
63
|
+
# at rest.
|
64
64
|
# @!attribute [r] kms_key_version
|
65
65
|
# @return [::String]
|
66
|
-
# Output only. A Cloud KMS key version that is being used to protect the
|
67
|
-
#
|
66
|
+
# Output only. A Cloud KMS key version that is being used to protect the database or
|
67
|
+
# backup.
|
68
68
|
class EncryptionInfo
|
69
69
|
include ::Google::Protobuf::MessageExts
|
70
70
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -76,8 +76,8 @@ module Google
|
|
76
76
|
# Output only. The period in which Cloud Spanner retains all versions of data
|
77
77
|
# for the database. This is the same as the value of version_retention_period
|
78
78
|
# database option set using
|
79
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}.
|
80
|
-
#
|
79
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}. Defaults to 1 hour,
|
80
|
+
# if not set.
|
81
81
|
# @!attribute [r] earliest_version_time
|
82
82
|
# @return [::Google::Protobuf::Timestamp]
|
83
83
|
# Output only. Earliest timestamp at which older versions of the data can be
|
@@ -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
|
@@ -113,8 +121,7 @@ module Google
|
|
113
121
|
end
|
114
122
|
end
|
115
123
|
|
116
|
-
# The request for
|
117
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
|
124
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
|
118
125
|
# @!attribute [rw] parent
|
119
126
|
# @return [::String]
|
120
127
|
# Required. The instance whose databases should be listed.
|
@@ -126,31 +133,28 @@ module Google
|
|
126
133
|
# @!attribute [rw] page_token
|
127
134
|
# @return [::String]
|
128
135
|
# If non-empty, `page_token` should contain a
|
129
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token}
|
130
|
-
#
|
131
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
|
136
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} from a
|
137
|
+
# previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
|
132
138
|
class ListDatabasesRequest
|
133
139
|
include ::Google::Protobuf::MessageExts
|
134
140
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
135
141
|
end
|
136
142
|
|
137
|
-
# The response for
|
138
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
|
143
|
+
# The response for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
|
139
144
|
# @!attribute [rw] databases
|
140
145
|
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Database>]
|
141
146
|
# Databases that matched the request.
|
142
147
|
# @!attribute [rw] next_page_token
|
143
148
|
# @return [::String]
|
144
149
|
# `next_page_token` can be sent in a subsequent
|
145
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}
|
146
|
-
#
|
150
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases} call to fetch more
|
151
|
+
# of the matching databases.
|
147
152
|
class ListDatabasesResponse
|
148
153
|
include ::Google::Protobuf::MessageExts
|
149
154
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
150
155
|
end
|
151
156
|
|
152
|
-
# The request for
|
153
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database CreateDatabase}.
|
157
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database CreateDatabase}.
|
154
158
|
# @!attribute [rw] parent
|
155
159
|
# @return [::String]
|
156
160
|
# Required. The name of the instance that will serve the new database.
|
@@ -170,8 +174,8 @@ module Google
|
|
170
174
|
# if there is an error in any statement, the database is not created.
|
171
175
|
# @!attribute [rw] encryption_config
|
172
176
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig]
|
173
|
-
# Optional. The encryption configuration for the database. If this field is
|
174
|
-
#
|
177
|
+
# Optional. The encryption configuration for the database. If this field is not
|
178
|
+
# specified, Cloud Spanner will encrypt/decrypt all data at rest using
|
175
179
|
# Google default encryption.
|
176
180
|
class CreateDatabaseRequest
|
177
181
|
include ::Google::Protobuf::MessageExts
|
@@ -188,8 +192,7 @@ module Google
|
|
188
192
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
189
193
|
end
|
190
194
|
|
191
|
-
# The request for
|
192
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database GetDatabase}.
|
195
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database GetDatabase}.
|
193
196
|
# @!attribute [rw] name
|
194
197
|
# @return [::String]
|
195
198
|
# Required. The name of the requested database. Values are of the form
|
@@ -213,8 +216,8 @@ module Google
|
|
213
216
|
# Each batch of statements is assigned a name which can be used with
|
214
217
|
# the Operations API to monitor
|
215
218
|
# progress. See the
|
216
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#operation_id operation_id}
|
217
|
-
#
|
219
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#operation_id operation_id} field for more
|
220
|
+
# details.
|
218
221
|
# @!attribute [rw] database
|
219
222
|
# @return [::String]
|
220
223
|
# Required. The database to update.
|
@@ -230,20 +233,18 @@ module Google
|
|
230
233
|
#
|
231
234
|
# Specifying an explicit operation ID simplifies determining
|
232
235
|
# whether the statements were executed in the event that the
|
233
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
|
234
|
-
#
|
235
|
-
#
|
236
|
-
# and `operation_id` fields can be combined to form the
|
236
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} call is replayed,
|
237
|
+
# or the return value is otherwise lost: the {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} and
|
238
|
+
# `operation_id` fields can be combined to form the
|
237
239
|
# {::Google::Longrunning::Operation#name name} of the resulting
|
238
|
-
# {::Google::Longrunning::Operation longrunning.Operation}:
|
239
|
-
# `<database>/operations/<operation_id>`.
|
240
|
+
# {::Google::Longrunning::Operation longrunning.Operation}: `<database>/operations/<operation_id>`.
|
240
241
|
#
|
241
242
|
# `operation_id` should be unique within the database, and must be
|
242
243
|
# a valid identifier: `[a-z][a-z0-9_]*`. Note that
|
243
244
|
# automatically-generated operation IDs always begin with an
|
244
245
|
# underscore. If the named operation already exists,
|
245
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
|
246
|
-
#
|
246
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} returns
|
247
|
+
# `ALREADY_EXISTS`.
|
247
248
|
class UpdateDatabaseDdlRequest
|
248
249
|
include ::Google::Protobuf::MessageExts
|
249
250
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -268,13 +269,22 @@ module Google
|
|
268
269
|
# Output only. When true, indicates that the operation is throttled e.g
|
269
270
|
# due to resource constraints. When resources become available the operation
|
270
271
|
# will resume and this field will be false again.
|
272
|
+
# @!attribute [rw] progress
|
273
|
+
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress>]
|
274
|
+
# The progress of the
|
275
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} operations.
|
276
|
+
# Currently, only index creation statements will have a continuously
|
277
|
+
# updating progress.
|
278
|
+
# For non-index creation statements, `progress[i]` will have start time
|
279
|
+
# and end time populated with commit timestamp of operation,
|
280
|
+
# as well as a progress of 100% once the operation has completed.
|
281
|
+
# `progress[i]` is the operation progress for `statements[i]`.
|
271
282
|
class UpdateDatabaseDdlMetadata
|
272
283
|
include ::Google::Protobuf::MessageExts
|
273
284
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
274
285
|
end
|
275
286
|
|
276
|
-
# The request for
|
277
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database DropDatabase}.
|
287
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database DropDatabase}.
|
278
288
|
# @!attribute [rw] database
|
279
289
|
# @return [::String]
|
280
290
|
# Required. The database to be dropped.
|
@@ -283,8 +293,7 @@ module Google
|
|
283
293
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
284
294
|
end
|
285
295
|
|
286
|
-
# The request for
|
287
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
|
296
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
|
288
297
|
# @!attribute [rw] database
|
289
298
|
# @return [::String]
|
290
299
|
# Required. The database whose schema we wish to get.
|
@@ -295,8 +304,7 @@ module Google
|
|
295
304
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
296
305
|
end
|
297
306
|
|
298
|
-
# The response for
|
299
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
|
307
|
+
# The response for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
|
300
308
|
# @!attribute [rw] statements
|
301
309
|
# @return [::Array<::String>]
|
302
310
|
# A list of formatted DDL statements defining the schema of the database
|
@@ -328,9 +336,7 @@ module Google
|
|
328
336
|
# * `name` - The name of the long-running operation
|
329
337
|
# * `done` - False if the operation is in progress, else true.
|
330
338
|
# * `metadata.@type` - the type of metadata. For example, the type string
|
331
|
-
# for
|
332
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}
|
333
|
-
# is
|
339
|
+
# for {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} is
|
334
340
|
# `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
|
335
341
|
# * `metadata.<field_name>` - any field in metadata.value.
|
336
342
|
# * `error` - Error associated with the long-running operation.
|
@@ -350,8 +356,7 @@ module Google
|
|
350
356
|
# `(metadata.name:restored_howl) AND` \
|
351
357
|
# `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
|
352
358
|
# `(error:*)` - Return operations where:
|
353
|
-
# * The operation's metadata type is
|
354
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
|
359
|
+
# * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
|
355
360
|
# * The database is restored from a backup.
|
356
361
|
# * The backup name contains "backup_howl".
|
357
362
|
# * The restored database's name contains "restored_howl".
|
@@ -365,9 +370,8 @@ module Google
|
|
365
370
|
# @return [::String]
|
366
371
|
# If non-empty, `page_token` should contain a
|
367
372
|
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token}
|
368
|
-
# from a previous
|
369
|
-
#
|
370
|
-
# to the same `parent` and with the same `filter`.
|
373
|
+
# from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} to the
|
374
|
+
# same `parent` and with the same `filter`.
|
371
375
|
class ListDatabaseOperationsRequest
|
372
376
|
include ::Google::Protobuf::MessageExts
|
373
377
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -413,12 +417,12 @@ module Google
|
|
413
417
|
# `projects/<project>/instances/<instance>/backups/<backup>`.
|
414
418
|
# @!attribute [rw] encryption_config
|
415
419
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig]
|
416
|
-
# Optional. An encryption configuration describing the encryption type and
|
417
|
-
#
|
418
|
-
#
|
419
|
-
# encryption configuration as the backup by default, namely
|
420
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
|
421
|
-
#
|
420
|
+
# Optional. An encryption configuration describing the encryption type and key
|
421
|
+
# resources in Cloud KMS used to encrypt/decrypt the database to restore to.
|
422
|
+
# If this field is not specified, the restored database will use
|
423
|
+
# the same encryption configuration as the backup by default, namely
|
424
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} =
|
425
|
+
# `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
|
422
426
|
class RestoreDatabaseRequest
|
423
427
|
include ::Google::Protobuf::MessageExts
|
424
428
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -430,10 +434,10 @@ module Google
|
|
430
434
|
# Required. The encryption type of the restored database.
|
431
435
|
# @!attribute [rw] kms_key_name
|
432
436
|
# @return [::String]
|
433
|
-
# Optional. The Cloud KMS key that will be used to encrypt/decrypt the
|
434
|
-
#
|
435
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
|
436
|
-
#
|
437
|
+
# Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored
|
438
|
+
# database. This field should be set only when
|
439
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} is
|
440
|
+
# `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
|
437
441
|
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
438
442
|
class RestoreDatabaseEncryptionConfig
|
439
443
|
include ::Google::Protobuf::MessageExts
|
@@ -445,8 +449,7 @@ module Google
|
|
445
449
|
ENCRYPTION_TYPE_UNSPECIFIED = 0
|
446
450
|
|
447
451
|
# This is the default option when
|
448
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig encryption_config}
|
449
|
-
# is not specified.
|
452
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig encryption_config} is not specified.
|
450
453
|
USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1
|
451
454
|
|
452
455
|
# Use Google default encryption.
|
@@ -486,8 +489,7 @@ module Google
|
|
486
489
|
# operation completed despite cancellation. On successful cancellation,
|
487
490
|
# the operation is not deleted; instead, it becomes an operation with
|
488
491
|
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
489
|
-
# {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to
|
490
|
-
# `Code.CANCELLED`.
|
492
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to `Code.CANCELLED`.
|
491
493
|
# @!attribute [rw] optimize_database_operation_name
|
492
494
|
# @return [::String]
|
493
495
|
# If exists, the name of the long-running operation that will be used to
|
@@ -497,10 +499,10 @@ module Google
|
|
497
499
|
# `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
|
498
500
|
# where the <database> is the name of database being created and restored to.
|
499
501
|
# The metadata type of the long-running operation is
|
500
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::OptimizeRestoredDatabaseMetadata OptimizeRestoredDatabaseMetadata}.
|
501
|
-
#
|
502
|
-
#
|
503
|
-
#
|
502
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::OptimizeRestoredDatabaseMetadata OptimizeRestoredDatabaseMetadata}. This long-running operation will be
|
503
|
+
# automatically created by the system after the RestoreDatabase long-running
|
504
|
+
# operation completes successfully. This operation will not be created if the
|
505
|
+
# restore was not successful.
|
504
506
|
class RestoreDatabaseMetadata
|
505
507
|
include ::Google::Protobuf::MessageExts
|
506
508
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|