google-cloud-spanner-admin-database-v1 0.2.0 → 0.5.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/LICENSE.md +188 -190
- data/README.md +66 -2
- data/lib/google/cloud/spanner/admin/database/v1.rb +3 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +147 -103
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +95 -10
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb +44 -0
- data/lib/google/cloud/spanner/admin/database/v1/version.rb +1 -1
- data/lib/google/spanner/admin/database/v1/backup_pb.rb +16 -1
- data/lib/google/spanner/admin/database/v1/common_pb.rb +18 -1
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +18 -0
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +16 -12
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/longrunning/operations.rb +17 -3
- data/proto_docs/google/protobuf/any.rb +5 -2
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- data/proto_docs/google/spanner/admin/database/v1/backup.rb +122 -41
- data/proto_docs/google/spanner/admin/database/v1/common.rb +45 -0
- data/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +128 -33
- metadata +13 -9
@@ -57,10 +57,13 @@ module Google
|
|
57
57
|
# Example 4: Pack and unpack a message in Go
|
58
58
|
#
|
59
59
|
# foo := &pb.Foo{...}
|
60
|
-
# any, err :=
|
60
|
+
# any, err := anypb.New(foo)
|
61
|
+
# if err != nil {
|
62
|
+
# ...
|
63
|
+
# }
|
61
64
|
# ...
|
62
65
|
# foo := &pb.Foo{}
|
63
|
-
# if err :=
|
66
|
+
# if err := any.UnmarshalTo(foo); err != nil {
|
64
67
|
# ...
|
65
68
|
# }
|
66
69
|
#
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A Duration represents a signed, fixed-length span of time represented
|
23
|
+
# as a count of seconds and fractions of seconds at nanosecond
|
24
|
+
# resolution. It is independent of any calendar and concepts like "day"
|
25
|
+
# or "month". It is related to Timestamp in that the difference between
|
26
|
+
# two Timestamp values is a Duration and it can be added or subtracted
|
27
|
+
# from a Timestamp. Range is approximately +-10,000 years.
|
28
|
+
#
|
29
|
+
# # Examples
|
30
|
+
#
|
31
|
+
# Example 1: Compute Duration from two Timestamps in pseudo code.
|
32
|
+
#
|
33
|
+
# Timestamp start = ...;
|
34
|
+
# Timestamp end = ...;
|
35
|
+
# Duration duration = ...;
|
36
|
+
#
|
37
|
+
# duration.seconds = end.seconds - start.seconds;
|
38
|
+
# duration.nanos = end.nanos - start.nanos;
|
39
|
+
#
|
40
|
+
# if (duration.seconds < 0 && duration.nanos > 0) {
|
41
|
+
# duration.seconds += 1;
|
42
|
+
# duration.nanos -= 1000000000;
|
43
|
+
# } else if (duration.seconds > 0 && duration.nanos < 0) {
|
44
|
+
# duration.seconds -= 1;
|
45
|
+
# duration.nanos += 1000000000;
|
46
|
+
# }
|
47
|
+
#
|
48
|
+
# Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
49
|
+
#
|
50
|
+
# Timestamp start = ...;
|
51
|
+
# Duration duration = ...;
|
52
|
+
# Timestamp end = ...;
|
53
|
+
#
|
54
|
+
# end.seconds = start.seconds + duration.seconds;
|
55
|
+
# end.nanos = start.nanos + duration.nanos;
|
56
|
+
#
|
57
|
+
# if (end.nanos < 0) {
|
58
|
+
# end.seconds -= 1;
|
59
|
+
# end.nanos += 1000000000;
|
60
|
+
# } else if (end.nanos >= 1000000000) {
|
61
|
+
# end.seconds += 1;
|
62
|
+
# end.nanos -= 1000000000;
|
63
|
+
# }
|
64
|
+
#
|
65
|
+
# Example 3: Compute Duration from datetime.timedelta in Python.
|
66
|
+
#
|
67
|
+
# td = datetime.timedelta(days=3, minutes=10)
|
68
|
+
# duration = Duration()
|
69
|
+
# duration.FromTimedelta(td)
|
70
|
+
#
|
71
|
+
# # JSON Mapping
|
72
|
+
#
|
73
|
+
# In JSON format, the Duration type is encoded as a string rather than an
|
74
|
+
# object, where the string ends in the suffix "s" (indicating seconds) and
|
75
|
+
# is preceded by the number of seconds, with nanoseconds expressed as
|
76
|
+
# fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
77
|
+
# encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
78
|
+
# be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
79
|
+
# microsecond should be expressed in JSON format as "3.000001s".
|
80
|
+
# @!attribute [rw] seconds
|
81
|
+
# @return [::Integer]
|
82
|
+
# Signed seconds of the span of time. Must be from -315,576,000,000
|
83
|
+
# to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
84
|
+
# 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
85
|
+
# @!attribute [rw] nanos
|
86
|
+
# @return [::Integer]
|
87
|
+
# Signed fractions of a second at nanosecond resolution of the span
|
88
|
+
# of time. Durations less than one second are represented with a 0
|
89
|
+
# `seconds` field and a positive or negative `nanos` field. For durations
|
90
|
+
# of one second or more, a non-zero value for the `nanos` field must be
|
91
|
+
# of the same sign as the `seconds` field. Must be from -999,999,999
|
92
|
+
# to +999,999,999 inclusive.
|
93
|
+
class Duration
|
94
|
+
include ::Google::Protobuf::MessageExts
|
95
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -70,7 +70,16 @@ module Google
|
|
70
70
|
# .setNanos((int) ((millis % 1000) * 1000000)).build();
|
71
71
|
#
|
72
72
|
#
|
73
|
-
# Example 5: Compute Timestamp from
|
73
|
+
# Example 5: Compute Timestamp from Java `Instant.now()`.
|
74
|
+
#
|
75
|
+
# Instant now = Instant.now();
|
76
|
+
#
|
77
|
+
# Timestamp timestamp =
|
78
|
+
# Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
79
|
+
# .setNanos(now.getNano()).build();
|
80
|
+
#
|
81
|
+
#
|
82
|
+
# Example 6: Compute Timestamp from current time in Python.
|
74
83
|
#
|
75
84
|
# timestamp = Timestamp()
|
76
85
|
# timestamp.GetCurrentTime()
|
@@ -26,14 +26,21 @@ 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
|
-
# Values are of the form
|
29
|
+
# Required for the
|
30
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
31
|
+
# operation. Name of the database from which this backup was created. This
|
32
|
+
# needs to be in the same instance as the backup. Values are of the form
|
33
33
|
# `projects/<project>/instances/<instance>/databases/<database>`.
|
34
|
+
# @!attribute [rw] version_time
|
35
|
+
# @return [::Google::Protobuf::Timestamp]
|
36
|
+
# The backup will contain an externally consistent copy of the database at
|
37
|
+
# the timestamp specified by `version_time`. If `version_time` is not
|
38
|
+
# specified, the system will set `version_time` to the `create_time` of the
|
39
|
+
# backup.
|
34
40
|
# @!attribute [rw] expire_time
|
35
41
|
# @return [::Google::Protobuf::Timestamp]
|
36
|
-
# Required for the
|
42
|
+
# Required for the
|
43
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
37
44
|
# operation. The expiration time of the backup, with microseconds
|
38
45
|
# granularity that must be at least 6 hours and at most 366 days
|
39
46
|
# from the time the CreateBackup request is processed. Once the `expire_time`
|
@@ -41,8 +48,11 @@ module Google
|
|
41
48
|
# Spanner to free the resources used by the backup.
|
42
49
|
# @!attribute [rw] name
|
43
50
|
# @return [::String]
|
44
|
-
# Output only for the
|
45
|
-
#
|
51
|
+
# Output only for the
|
52
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
53
|
+
# operation. Required for the
|
54
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}
|
55
|
+
# operation.
|
46
56
|
#
|
47
57
|
# A globally unique identifier for the backup which cannot be
|
48
58
|
# changed. Values are of the form
|
@@ -56,10 +66,10 @@ module Google
|
|
56
66
|
# `projects/<project>/instances/<instance>`.
|
57
67
|
# @!attribute [r] create_time
|
58
68
|
# @return [::Google::Protobuf::Timestamp]
|
59
|
-
# Output only. The
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
69
|
+
# Output only. The time the
|
70
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
71
|
+
# request is received. If the request does not specify `version_time`, the
|
72
|
+
# `version_time` of the backup will be equivalent to the `create_time`.
|
63
73
|
# @!attribute [r] size_bytes
|
64
74
|
# @return [::Integer]
|
65
75
|
# Output only. Size of the backup in bytes.
|
@@ -75,6 +85,9 @@ module Google
|
|
75
85
|
# any referencing database prevents the backup from being deleted. When a
|
76
86
|
# restored database from the backup enters the `READY` state, the reference
|
77
87
|
# to the backup is removed.
|
88
|
+
# @!attribute [r] encryption_info
|
89
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo]
|
90
|
+
# Output only. The encryption information for the backup.
|
78
91
|
class Backup
|
79
92
|
include ::Google::Protobuf::MessageExts
|
80
93
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -93,7 +106,8 @@ module Google
|
|
93
106
|
end
|
94
107
|
end
|
95
108
|
|
96
|
-
# The request for
|
109
|
+
# The request for
|
110
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}.
|
97
111
|
# @!attribute [rw] parent
|
98
112
|
# @return [::String]
|
99
113
|
# Required. The name of the instance in which the backup will be
|
@@ -110,6 +124,13 @@ module Google
|
|
110
124
|
# @!attribute [rw] backup
|
111
125
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup]
|
112
126
|
# Required. The backup to create.
|
127
|
+
# @!attribute [rw] encryption_config
|
128
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig]
|
129
|
+
# Optional. The encryption configuration used to encrypt the backup. If this
|
130
|
+
# field is not specified, the backup will use the same encryption
|
131
|
+
# configuration as the database by default, namely
|
132
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
|
133
|
+
# = `USE_DATABASE_ENCRYPTION`.
|
113
134
|
class CreateBackupRequest
|
114
135
|
include ::Google::Protobuf::MessageExts
|
115
136
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -126,7 +147,8 @@ module Google
|
|
126
147
|
# @!attribute [rw] progress
|
127
148
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress]
|
128
149
|
# The progress of the
|
129
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
150
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
151
|
+
# operation.
|
130
152
|
# @!attribute [rw] cancel_time
|
131
153
|
# @return [::Google::Protobuf::Timestamp]
|
132
154
|
# The time at which cancellation of this operation was received.
|
@@ -138,14 +160,16 @@ module Google
|
|
138
160
|
# other methods to check whether the cancellation succeeded or whether the
|
139
161
|
# operation completed despite cancellation. On successful cancellation,
|
140
162
|
# the operation is not deleted; instead, it becomes an operation with
|
141
|
-
# an
|
163
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
164
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
|
142
165
|
# corresponding to `Code.CANCELLED`.
|
143
166
|
class CreateBackupMetadata
|
144
167
|
include ::Google::Protobuf::MessageExts
|
145
168
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
146
169
|
end
|
147
170
|
|
148
|
-
# The request for
|
171
|
+
# The request for
|
172
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}.
|
149
173
|
# @!attribute [rw] backup
|
150
174
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup]
|
151
175
|
# Required. The backup to update. `backup.name`, and the fields to be updated
|
@@ -164,7 +188,8 @@ module Google
|
|
164
188
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
165
189
|
end
|
166
190
|
|
167
|
-
# The request for
|
191
|
+
# The request for
|
192
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup GetBackup}.
|
168
193
|
# @!attribute [rw] name
|
169
194
|
# @return [::String]
|
170
195
|
# Required. Name of the backup.
|
@@ -175,7 +200,8 @@ module Google
|
|
175
200
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
176
201
|
end
|
177
202
|
|
178
|
-
# The request for
|
203
|
+
# The request for
|
204
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup DeleteBackup}.
|
179
205
|
# @!attribute [rw] name
|
180
206
|
# @return [::String]
|
181
207
|
# Required. Name of the backup to delete.
|
@@ -186,7 +212,8 @@ module Google
|
|
186
212
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
187
213
|
end
|
188
214
|
|
189
|
-
# The request for
|
215
|
+
# The request for
|
216
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
|
190
217
|
# @!attribute [rw] parent
|
191
218
|
# @return [::String]
|
192
219
|
# Required. The instance to list backups from. Values are of the
|
@@ -201,13 +228,16 @@ module Google
|
|
201
228
|
# must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
|
202
229
|
# Colon `:` is the contains operator. Filter rules are not case sensitive.
|
203
230
|
#
|
204
|
-
# The following fields in the
|
231
|
+
# The following fields in the
|
232
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for
|
233
|
+
# filtering:
|
205
234
|
#
|
206
235
|
# * `name`
|
207
236
|
# * `database`
|
208
237
|
# * `state`
|
209
|
-
# * `create_time`
|
210
|
-
# * `expire_time`
|
238
|
+
# * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
239
|
+
# * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
240
|
+
# * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
211
241
|
# * `size_bytes`
|
212
242
|
#
|
213
243
|
# You can combine multiple expressions by enclosing each expression in
|
@@ -234,15 +264,17 @@ module Google
|
|
234
264
|
# @!attribute [rw] page_token
|
235
265
|
# @return [::String]
|
236
266
|
# If non-empty, `page_token` should contain a
|
237
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token}
|
238
|
-
#
|
239
|
-
#
|
267
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token}
|
268
|
+
# from a previous
|
269
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse}
|
270
|
+
# to the same `parent` and with the same `filter`.
|
240
271
|
class ListBackupsRequest
|
241
272
|
include ::Google::Protobuf::MessageExts
|
242
273
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
243
274
|
end
|
244
275
|
|
245
|
-
# The response for
|
276
|
+
# The response for
|
277
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
|
246
278
|
# @!attribute [rw] backups
|
247
279
|
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Backup>]
|
248
280
|
# The list of matching backups. Backups returned are ordered by `create_time`
|
@@ -250,8 +282,8 @@ module Google
|
|
250
282
|
# @!attribute [rw] next_page_token
|
251
283
|
# @return [::String]
|
252
284
|
# `next_page_token` can be sent in a subsequent
|
253
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}
|
254
|
-
# of the matching backups.
|
285
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}
|
286
|
+
# call to fetch more of the matching backups.
|
255
287
|
class ListBackupsResponse
|
256
288
|
include ::Google::Protobuf::MessageExts
|
257
289
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -279,7 +311,9 @@ module Google
|
|
279
311
|
# * `name` - The name of the long-running operation
|
280
312
|
# * `done` - False if the operation is in progress, else true.
|
281
313
|
# * `metadata.@type` - the type of metadata. For example, the type string
|
282
|
-
# for
|
314
|
+
# for
|
315
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
|
316
|
+
# is
|
283
317
|
# `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
|
284
318
|
# * `metadata.<field_name>` - any field in metadata.value.
|
285
319
|
# * `error` - Error associated with the long-running operation.
|
@@ -295,11 +329,12 @@ module Google
|
|
295
329
|
# * `done:true` - The operation is complete.
|
296
330
|
# * `metadata.database:prod` - The database the backup was taken from has
|
297
331
|
# a name containing the string "prod".
|
298
|
-
# * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND`
|
299
|
-
# `(metadata.name:howl) AND`
|
300
|
-
# `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND`
|
332
|
+
# * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
333
|
+
# `(metadata.name:howl) AND` \
|
334
|
+
# `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
|
301
335
|
# `(error:*)` - Returns operations where:
|
302
|
-
# * The operation's metadata type is
|
336
|
+
# * The operation's metadata type is
|
337
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
303
338
|
# * The backup name contains the string "howl".
|
304
339
|
# * The operation started before 2018-03-28T14:50:00Z.
|
305
340
|
# * The operation resulted in an error.
|
@@ -311,8 +346,9 @@ module Google
|
|
311
346
|
# @return [::String]
|
312
347
|
# If non-empty, `page_token` should contain a
|
313
348
|
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token}
|
314
|
-
# from a previous
|
315
|
-
#
|
349
|
+
# from a previous
|
350
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse}
|
351
|
+
# to the same `parent` and with the same `filter`.
|
316
352
|
class ListBackupOperationsRequest
|
317
353
|
include ::Google::Protobuf::MessageExts
|
318
354
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -326,11 +362,11 @@ module Google
|
|
326
362
|
# operations][google.longrunning.Operation]. Each operation's name will be
|
327
363
|
# prefixed by the backup's name and the operation's
|
328
364
|
# {::Google::Longrunning::Operation#metadata metadata} will be of type
|
329
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
330
|
-
#
|
331
|
-
# Operations returned are
|
332
|
-
# `operation.metadata.value.progress.start_time` in descending
|
333
|
-
# from the most recently started operation.
|
365
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
366
|
+
# Operations returned include those that are pending or have
|
367
|
+
# completed/failed/canceled within the last 7 days. Operations returned are
|
368
|
+
# ordered by `operation.metadata.value.progress.start_time` in descending
|
369
|
+
# order starting from the most recently started operation.
|
334
370
|
# @!attribute [rw] next_page_token
|
335
371
|
# @return [::String]
|
336
372
|
# `next_page_token` can be sent in a subsequent
|
@@ -345,10 +381,18 @@ module Google
|
|
345
381
|
# @!attribute [rw] backup
|
346
382
|
# @return [::String]
|
347
383
|
# Name of the backup.
|
348
|
-
# @!attribute [rw]
|
384
|
+
# @!attribute [rw] version_time
|
349
385
|
# @return [::Google::Protobuf::Timestamp]
|
350
386
|
# The backup contains an externally consistent copy of `source_database` at
|
351
|
-
# the timestamp specified by `
|
387
|
+
# the timestamp specified by `version_time`. If the
|
388
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
389
|
+
# request did not specify `version_time`, the `version_time` of the backup is
|
390
|
+
# equivalent to the `create_time`.
|
391
|
+
# @!attribute [rw] create_time
|
392
|
+
# @return [::Google::Protobuf::Timestamp]
|
393
|
+
# The time the
|
394
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
395
|
+
# request was received.
|
352
396
|
# @!attribute [rw] source_database
|
353
397
|
# @return [::String]
|
354
398
|
# Name of the database the backup was created from.
|
@@ -356,6 +400,43 @@ module Google
|
|
356
400
|
include ::Google::Protobuf::MessageExts
|
357
401
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
358
402
|
end
|
403
|
+
|
404
|
+
# Encryption configuration for the backup to create.
|
405
|
+
# @!attribute [rw] encryption_type
|
406
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig::EncryptionType]
|
407
|
+
# Required. The encryption type of the backup.
|
408
|
+
# @!attribute [rw] kms_key_name
|
409
|
+
# @return [::String]
|
410
|
+
# Optional. The Cloud KMS key that will be used to protect the backup.
|
411
|
+
# This field should be set only when
|
412
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
|
413
|
+
# is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
|
414
|
+
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
415
|
+
class CreateBackupEncryptionConfig
|
416
|
+
include ::Google::Protobuf::MessageExts
|
417
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
418
|
+
|
419
|
+
# Encryption types for the backup.
|
420
|
+
module EncryptionType
|
421
|
+
# Unspecified. Do not use.
|
422
|
+
ENCRYPTION_TYPE_UNSPECIFIED = 0
|
423
|
+
|
424
|
+
# Use the same encryption configuration as the database. This is the
|
425
|
+
# default option when
|
426
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig encryption_config}
|
427
|
+
# is empty. For example, if the database is using
|
428
|
+
# `Customer_Managed_Encryption`, the backup will be using the same Cloud
|
429
|
+
# KMS key as the database.
|
430
|
+
USE_DATABASE_ENCRYPTION = 1
|
431
|
+
|
432
|
+
# Use Google default encryption.
|
433
|
+
GOOGLE_DEFAULT_ENCRYPTION = 2
|
434
|
+
|
435
|
+
# Use customer managed encryption. If specified, `kms_key_name`
|
436
|
+
# must contain a valid Cloud KMS key.
|
437
|
+
CUSTOMER_MANAGED_ENCRYPTION = 3
|
438
|
+
end
|
439
|
+
end
|
359
440
|
end
|
360
441
|
end
|
361
442
|
end
|
@@ -40,6 +40,51 @@ module Google
|
|
40
40
|
include ::Google::Protobuf::MessageExts
|
41
41
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
42
42
|
end
|
43
|
+
|
44
|
+
# Encryption configuration for a Cloud Spanner database.
|
45
|
+
# @!attribute [rw] kms_key_name
|
46
|
+
# @return [::String]
|
47
|
+
# The Cloud KMS key to be used for encrypting and decrypting
|
48
|
+
# the database. Values are of the form
|
49
|
+
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
50
|
+
class EncryptionConfig
|
51
|
+
include ::Google::Protobuf::MessageExts
|
52
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
53
|
+
end
|
54
|
+
|
55
|
+
# Encryption information for a Cloud Spanner database or backup.
|
56
|
+
# @!attribute [r] encryption_type
|
57
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo::Type]
|
58
|
+
# Output only. The type of encryption.
|
59
|
+
# @!attribute [r] encryption_status
|
60
|
+
# @return [::Google::Rpc::Status]
|
61
|
+
# Output only. If present, the status of a recent encrypt/decrypt call on
|
62
|
+
# underlying data for this database or backup. Regardless of status, data is
|
63
|
+
# always encrypted at rest.
|
64
|
+
# @!attribute [r] kms_key_version
|
65
|
+
# @return [::String]
|
66
|
+
# Output only. A Cloud KMS key version that is being used to protect the
|
67
|
+
# database or backup.
|
68
|
+
class EncryptionInfo
|
69
|
+
include ::Google::Protobuf::MessageExts
|
70
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
71
|
+
|
72
|
+
# Possible encryption types.
|
73
|
+
module Type
|
74
|
+
# Encryption type was not specified, though data at rest remains encrypted.
|
75
|
+
TYPE_UNSPECIFIED = 0
|
76
|
+
|
77
|
+
# The data is encrypted at rest with a key that is
|
78
|
+
# fully managed by Google. No key version or status will be populated.
|
79
|
+
# This is the default state.
|
80
|
+
GOOGLE_DEFAULT_ENCRYPTION = 1
|
81
|
+
|
82
|
+
# The data is encrypted at rest with a key that is
|
83
|
+
# managed by the customer. The active version of the key. `kms_key_version`
|
84
|
+
# will be populated, and `encryption_status` may be populated.
|
85
|
+
CUSTOMER_MANAGED_ENCRYPTION = 2
|
86
|
+
end
|
87
|
+
end
|
43
88
|
end
|
44
89
|
end
|
45
90
|
end
|