google-cloud-spanner-admin-database-v1 0.1.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- 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 +19 -0
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +33 -29
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/api/resource.rb +50 -14
- 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 +133 -33
- metadata +11 -7
@@ -54,6 +54,12 @@ module Google
|
|
54
54
|
# This indicates that the field may be set once in a request to create a
|
55
55
|
# resource, but may not be changed thereafter.
|
56
56
|
IMMUTABLE = 5
|
57
|
+
|
58
|
+
# Denotes that a (repeated) field is an unordered list.
|
59
|
+
# This indicates that the service may provide the elements of the list
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
|
+
# provided. Additionally, the list's order may or may not be stable.
|
62
|
+
UNORDERED_LIST = 6
|
57
63
|
end
|
58
64
|
end
|
59
65
|
end
|
@@ -43,12 +43,12 @@ module Google
|
|
43
43
|
#
|
44
44
|
# The ResourceDescriptor Yaml config will look like:
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/{project}"
|
52
52
|
#
|
53
53
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
54
|
# live under multiple parents.
|
@@ -183,15 +183,24 @@ module Google
|
|
183
183
|
# }
|
184
184
|
# @!attribute [rw] plural
|
185
185
|
# @return [::String]
|
186
|
-
# The plural name used in the resource name, such as
|
187
|
-
# the name of 'projects/\\{project}'
|
188
|
-
#
|
186
|
+
# The plural name used in the resource name and permission names, such as
|
187
|
+
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
188
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
|
189
|
+
# concept of the `plural` field in k8s CRD spec
|
189
190
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
191
|
+
#
|
192
|
+
# Note: The plural form is required even for singleton resources. See
|
193
|
+
# https://aip.dev/156
|
190
194
|
# @!attribute [rw] singular
|
191
195
|
# @return [::String]
|
192
196
|
# The same concept of the `singular` field in k8s CRD spec
|
193
197
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
194
198
|
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
199
|
+
# @!attribute [rw] style
|
200
|
+
# @return [::Array<::Google::Api::ResourceDescriptor::Style>]
|
201
|
+
# Style flag(s) for this resource.
|
202
|
+
# These indicate that a resource is expected to conform to a given
|
203
|
+
# style. See the specific style flags for additional information.
|
195
204
|
class ResourceDescriptor
|
196
205
|
include ::Google::Protobuf::MessageExts
|
197
206
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -211,6 +220,22 @@ module Google
|
|
211
220
|
# that from being necessary once there are multiple patterns.)
|
212
221
|
FUTURE_MULTI_PATTERN = 2
|
213
222
|
end
|
223
|
+
|
224
|
+
# A flag representing a specific style that a resource claims to conform to.
|
225
|
+
module Style
|
226
|
+
# The unspecified value. Do not use.
|
227
|
+
STYLE_UNSPECIFIED = 0
|
228
|
+
|
229
|
+
# This resource is intended to be "declarative-friendly".
|
230
|
+
#
|
231
|
+
# Declarative-friendly resources must be more strictly consistent, and
|
232
|
+
# setting this to true communicates to tools that this resource should
|
233
|
+
# adhere to declarative-friendly expectations.
|
234
|
+
#
|
235
|
+
# Note: This is used by the API linter (linter.aip.dev) to enable
|
236
|
+
# additional checks.
|
237
|
+
DECLARATIVE_FRIENDLY = 1
|
238
|
+
end
|
214
239
|
end
|
215
240
|
|
216
241
|
# Defines a proto annotation that describes a string field that refers to
|
@@ -226,6 +251,17 @@ module Google
|
|
226
251
|
# type: "pubsub.googleapis.com/Topic"
|
227
252
|
# }];
|
228
253
|
# }
|
254
|
+
#
|
255
|
+
# Occasionally, a field may reference an arbitrary resource. In this case,
|
256
|
+
# APIs use the special value * in their resource reference.
|
257
|
+
#
|
258
|
+
# Example:
|
259
|
+
#
|
260
|
+
# message GetIamPolicyRequest {
|
261
|
+
# string resource = 2 [(google.api.resource_reference) = {
|
262
|
+
# type: "*"
|
263
|
+
# }];
|
264
|
+
# }
|
229
265
|
# @!attribute [rw] child_type
|
230
266
|
# @return [::String]
|
231
267
|
# The resource type of a child collection that the annotated field
|
@@ -234,11 +270,11 @@ module Google
|
|
234
270
|
#
|
235
271
|
# Example:
|
236
272
|
#
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
273
|
+
# message ListLogEntriesRequest {
|
274
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
275
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
276
|
+
# };
|
277
|
+
# }
|
242
278
|
class ResourceReference
|
243
279
|
include ::Google::Protobuf::MessageExts
|
244
280
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @return [::String]
|
26
26
|
# The server-assigned name, which is only unique within the same service that
|
27
27
|
# originally returns it. If you use the default HTTP mapping, the
|
28
|
-
# `name` should
|
28
|
+
# `name` should be a resource name ending with `operations/{unique_id}`.
|
29
29
|
# @!attribute [rw] metadata
|
30
30
|
# @return [::Google::Protobuf::Any]
|
31
31
|
# Service-specific metadata associated with the operation. It typically
|
@@ -35,7 +35,7 @@ module Google
|
|
35
35
|
# @!attribute [rw] done
|
36
36
|
# @return [::Boolean]
|
37
37
|
# If the value is `false`, it means the operation is still in progress.
|
38
|
-
# If true
|
38
|
+
# If `true`, the operation is completed, and either `error` or `response` is
|
39
39
|
# available.
|
40
40
|
# @!attribute [rw] error
|
41
41
|
# @return [::Google::Rpc::Status]
|
@@ -67,7 +67,7 @@ module Google
|
|
67
67
|
# The request message for Operations.ListOperations.
|
68
68
|
# @!attribute [rw] name
|
69
69
|
# @return [::String]
|
70
|
-
# The name of the operation
|
70
|
+
# The name of the operation's parent resource.
|
71
71
|
# @!attribute [rw] filter
|
72
72
|
# @return [::String]
|
73
73
|
# The standard list filter.
|
@@ -112,6 +112,20 @@ module Google
|
|
112
112
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
113
113
|
end
|
114
114
|
|
115
|
+
# The request message for Operations.WaitOperation.
|
116
|
+
# @!attribute [rw] name
|
117
|
+
# @return [::String]
|
118
|
+
# The name of the operation resource to wait on.
|
119
|
+
# @!attribute [rw] timeout
|
120
|
+
# @return [::Google::Protobuf::Duration]
|
121
|
+
# The maximum duration to wait before timing out. If left blank, the wait
|
122
|
+
# will be at most the time permitted by the underlying HTTP/RPC protocol.
|
123
|
+
# If RPC context deadline is also specified, the shorter one will be used.
|
124
|
+
class WaitOperationRequest
|
125
|
+
include ::Google::Protobuf::MessageExts
|
126
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
127
|
+
end
|
128
|
+
|
115
129
|
# A message representing the message types used by a long-running operation.
|
116
130
|
#
|
117
131
|
# Example:
|
@@ -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
|