google-cloud-spanner-admin-database-v1 0.4.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +5 -5
- data/README.md +3 -3
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +79 -133
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +8 -8
- 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 +13 -17
- 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
- metadata +18 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0738039c436177ef6f5027fc55097b623b9648dc0fa82dfb7fd25ea86590d178'
|
4
|
+
data.tar.gz: a6f0117e6c8ecec00fcc366889a735e4b0d48c197b3d0a0a467b4a40294b454c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19427feac4c0a0bbd69cfc420b5701ce455da3bbb9873a2ed3d2baf1caf4d1a42060134c7c0be27be4ca6be5ec3dc00419f086a78006639580ea7f6d22236078
|
7
|
+
data.tar.gz: 63ad789c583f2710f033d41e3e8de3975805d84a5a793cf177f4c435da1eb4da40deadc81315da09abb4dc4d7fe08dc3390405f03b73dfe7bd9840452ef4c142
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-spanner-admin-database-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `SPANNER_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `SPANNER_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/spanner/admin/database/v1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/spanner/admin/database/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.list_databases request
|
38
38
|
```
|
39
39
|
|
@@ -71,11 +71,11 @@ end
|
|
71
71
|
|
72
72
|
## Supported Ruby Versions
|
73
73
|
|
74
|
-
This library is supported on Ruby 2.
|
74
|
+
This library is supported on Ruby 2.5+.
|
75
75
|
|
76
76
|
Google provides official support for Ruby versions that are actively supported
|
77
77
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
78
|
-
in security maintenance, and not end of life. Currently, this means Ruby 2.
|
78
|
+
in security maintenance, and not end of life. Currently, this means Ruby 2.5
|
79
79
|
and later. Older versions of Ruby _may_ still work, but are unsupported and not
|
80
80
|
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
81
81
|
about the Ruby support schedule.
|
@@ -67,61 +67,43 @@ module Google
|
|
67
67
|
parent_config = while namespace.any?
|
68
68
|
parent_name = namespace.join "::"
|
69
69
|
parent_const = const_get parent_name
|
70
|
-
break parent_const.configure if parent_const
|
70
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
71
71
|
namespace.pop
|
72
72
|
end
|
73
73
|
default_config = Client::Configuration.new parent_config
|
74
74
|
|
75
75
|
default_config.rpcs.list_databases.timeout = 3600.0
|
76
76
|
default_config.rpcs.list_databases.retry_policy = {
|
77
|
-
initial_delay: 1.0,
|
78
|
-
max_delay: 32.0,
|
79
|
-
multiplier: 1.3,
|
80
|
-
retry_codes: [14, 4]
|
77
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
81
78
|
}
|
82
79
|
|
83
80
|
default_config.rpcs.create_database.timeout = 3600.0
|
84
81
|
|
85
82
|
default_config.rpcs.get_database.timeout = 3600.0
|
86
83
|
default_config.rpcs.get_database.retry_policy = {
|
87
|
-
initial_delay: 1.0,
|
88
|
-
max_delay: 32.0,
|
89
|
-
multiplier: 1.3,
|
90
|
-
retry_codes: [14, 4]
|
84
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
91
85
|
}
|
92
86
|
|
93
87
|
default_config.rpcs.update_database_ddl.timeout = 3600.0
|
94
88
|
default_config.rpcs.update_database_ddl.retry_policy = {
|
95
|
-
initial_delay: 1.0,
|
96
|
-
max_delay: 32.0,
|
97
|
-
multiplier: 1.3,
|
98
|
-
retry_codes: [14, 4]
|
89
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
99
90
|
}
|
100
91
|
|
101
92
|
default_config.rpcs.drop_database.timeout = 3600.0
|
102
93
|
default_config.rpcs.drop_database.retry_policy = {
|
103
|
-
initial_delay: 1.0,
|
104
|
-
max_delay: 32.0,
|
105
|
-
multiplier: 1.3,
|
106
|
-
retry_codes: [14, 4]
|
94
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
107
95
|
}
|
108
96
|
|
109
97
|
default_config.rpcs.get_database_ddl.timeout = 3600.0
|
110
98
|
default_config.rpcs.get_database_ddl.retry_policy = {
|
111
|
-
initial_delay: 1.0,
|
112
|
-
max_delay: 32.0,
|
113
|
-
multiplier: 1.3,
|
114
|
-
retry_codes: [14, 4]
|
99
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
115
100
|
}
|
116
101
|
|
117
102
|
default_config.rpcs.set_iam_policy.timeout = 30.0
|
118
103
|
|
119
104
|
default_config.rpcs.get_iam_policy.timeout = 30.0
|
120
105
|
default_config.rpcs.get_iam_policy.retry_policy = {
|
121
|
-
initial_delay: 1.0,
|
122
|
-
max_delay: 32.0,
|
123
|
-
multiplier: 1.3,
|
124
|
-
retry_codes: [14, 4]
|
106
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
125
107
|
}
|
126
108
|
|
127
109
|
default_config.rpcs.test_iam_permissions.timeout = 30.0
|
@@ -130,52 +112,34 @@ module Google
|
|
130
112
|
|
131
113
|
default_config.rpcs.get_backup.timeout = 3600.0
|
132
114
|
default_config.rpcs.get_backup.retry_policy = {
|
133
|
-
initial_delay: 1.0,
|
134
|
-
max_delay: 32.0,
|
135
|
-
multiplier: 1.3,
|
136
|
-
retry_codes: [14, 4]
|
115
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
137
116
|
}
|
138
117
|
|
139
118
|
default_config.rpcs.update_backup.timeout = 3600.0
|
140
119
|
default_config.rpcs.update_backup.retry_policy = {
|
141
|
-
initial_delay: 1.0,
|
142
|
-
max_delay: 32.0,
|
143
|
-
multiplier: 1.3,
|
144
|
-
retry_codes: [14, 4]
|
120
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
145
121
|
}
|
146
122
|
|
147
123
|
default_config.rpcs.delete_backup.timeout = 3600.0
|
148
124
|
default_config.rpcs.delete_backup.retry_policy = {
|
149
|
-
initial_delay: 1.0,
|
150
|
-
max_delay: 32.0,
|
151
|
-
multiplier: 1.3,
|
152
|
-
retry_codes: [14, 4]
|
125
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
153
126
|
}
|
154
127
|
|
155
128
|
default_config.rpcs.list_backups.timeout = 3600.0
|
156
129
|
default_config.rpcs.list_backups.retry_policy = {
|
157
|
-
initial_delay: 1.0,
|
158
|
-
max_delay: 32.0,
|
159
|
-
multiplier: 1.3,
|
160
|
-
retry_codes: [14, 4]
|
130
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
161
131
|
}
|
162
132
|
|
163
133
|
default_config.rpcs.restore_database.timeout = 3600.0
|
164
134
|
|
165
135
|
default_config.rpcs.list_database_operations.timeout = 3600.0
|
166
136
|
default_config.rpcs.list_database_operations.retry_policy = {
|
167
|
-
initial_delay: 1.0,
|
168
|
-
max_delay: 32.0,
|
169
|
-
multiplier: 1.3,
|
170
|
-
retry_codes: [14, 4]
|
137
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
171
138
|
}
|
172
139
|
|
173
140
|
default_config.rpcs.list_backup_operations.timeout = 3600.0
|
174
141
|
default_config.rpcs.list_backup_operations.retry_policy = {
|
175
|
-
initial_delay: 1.0,
|
176
|
-
max_delay: 32.0,
|
177
|
-
multiplier: 1.3,
|
178
|
-
retry_codes: [14, 4]
|
142
|
+
initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
|
179
143
|
}
|
180
144
|
|
181
145
|
default_config
|
@@ -244,9 +208,9 @@ module Google
|
|
244
208
|
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
245
209
|
@config.endpoint == Client.configure.endpoint &&
|
246
210
|
!@config.endpoint.split(".").first.include?("-")
|
247
|
-
credentials ||= Credentials.default scope:
|
211
|
+
credentials ||= Credentials.default scope: @config.scope,
|
248
212
|
enable_self_signed_jwt: enable_self_signed_jwt
|
249
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
213
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
250
214
|
credentials = Credentials.new credentials, scope: @config.scope
|
251
215
|
end
|
252
216
|
@quota_project_id = @config.quota_project
|
@@ -301,9 +265,8 @@ module Google
|
|
301
265
|
# defaults to the server's maximum allowed page size.
|
302
266
|
# @param page_token [::String]
|
303
267
|
# If non-empty, `page_token` should contain a
|
304
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token}
|
305
|
-
#
|
306
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
|
268
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} from a
|
269
|
+
# previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
|
307
270
|
#
|
308
271
|
# @yield [response, operation] Access the result along with the RPC operation
|
309
272
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>]
|
@@ -357,8 +320,8 @@ module Google
|
|
357
320
|
# have a name of the format `<database_name>/operations/<operation_id>` and
|
358
321
|
# can be used to track preparation of the database. The
|
359
322
|
# {::Google::Longrunning::Operation#metadata metadata} field type is
|
360
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}.
|
361
|
-
#
|
323
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}. The
|
324
|
+
# {::Google::Longrunning::Operation#response response} field type is
|
362
325
|
# {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful.
|
363
326
|
#
|
364
327
|
# @overload create_database(request, options = nil)
|
@@ -391,8 +354,8 @@ module Google
|
|
391
354
|
# statements execute atomically with the creation of the database:
|
392
355
|
# if there is an error in any statement, the database is not created.
|
393
356
|
# @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig, ::Hash]
|
394
|
-
# Optional. The encryption configuration for the database. If this field is
|
395
|
-
#
|
357
|
+
# Optional. The encryption configuration for the database. If this field is not
|
358
|
+
# specified, Cloud Spanner will encrypt/decrypt all data at rest using
|
396
359
|
# Google default encryption.
|
397
360
|
#
|
398
361
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -515,8 +478,7 @@ module Google
|
|
515
478
|
# the format `<database_name>/operations/<operation_id>` and can be used to
|
516
479
|
# track execution of the schema change(s). The
|
517
480
|
# {::Google::Longrunning::Operation#metadata metadata} field type is
|
518
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}.
|
519
|
-
# The operation has no response.
|
481
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}. The operation has no response.
|
520
482
|
#
|
521
483
|
# @overload update_database_ddl(request, options = nil)
|
522
484
|
# Pass arguments to `update_database_ddl` via a request object, either of type
|
@@ -545,20 +507,18 @@ module Google
|
|
545
507
|
#
|
546
508
|
# Specifying an explicit operation ID simplifies determining
|
547
509
|
# whether the statements were executed in the event that the
|
548
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
|
549
|
-
#
|
550
|
-
#
|
551
|
-
# and `operation_id` fields can be combined to form the
|
510
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} call is replayed,
|
511
|
+
# or the return value is otherwise lost: the {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} and
|
512
|
+
# `operation_id` fields can be combined to form the
|
552
513
|
# {::Google::Longrunning::Operation#name name} of the resulting
|
553
|
-
# {::Google::Longrunning::Operation longrunning.Operation}:
|
554
|
-
# `<database>/operations/<operation_id>`.
|
514
|
+
# {::Google::Longrunning::Operation longrunning.Operation}: `<database>/operations/<operation_id>`.
|
555
515
|
#
|
556
516
|
# `operation_id` should be unique within the database, and must be
|
557
517
|
# a valid identifier: `[a-z][a-z0-9_]*`. Note that
|
558
518
|
# automatically-generated operation IDs always begin with an
|
559
519
|
# underscore. If the named operation already exists,
|
560
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
|
561
|
-
#
|
520
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} returns
|
521
|
+
# `ALREADY_EXISTS`.
|
562
522
|
#
|
563
523
|
# @yield [response, operation] Access the result along with the RPC operation
|
564
524
|
# @yieldparam response [::Gapic::Operation]
|
@@ -987,12 +947,12 @@ module Google
|
|
987
947
|
# `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
|
988
948
|
# and can be used to track creation of the backup. The
|
989
949
|
# {::Google::Longrunning::Operation#metadata metadata} field type is
|
990
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
991
|
-
#
|
992
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful.
|
993
|
-
#
|
994
|
-
#
|
995
|
-
#
|
950
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. The
|
951
|
+
# {::Google::Longrunning::Operation#response response} field type is
|
952
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. Cancelling the returned operation will stop the
|
953
|
+
# creation and delete the backup.
|
954
|
+
# There can be only one pending backup creation per database. Backup creation
|
955
|
+
# of different databases can run concurrently.
|
996
956
|
#
|
997
957
|
# @overload create_backup(request, options = nil)
|
998
958
|
# Pass arguments to `create_backup` via a request object, either of type
|
@@ -1023,11 +983,11 @@ module Google
|
|
1023
983
|
# @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash]
|
1024
984
|
# Required. The backup to create.
|
1025
985
|
# @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig, ::Hash]
|
1026
|
-
# Optional. The encryption configuration used to encrypt the backup. If this
|
1027
|
-
#
|
1028
|
-
# configuration as the database by default, namely
|
1029
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
|
1030
|
-
#
|
986
|
+
# Optional. The encryption configuration used to encrypt the backup. If this field is
|
987
|
+
# not specified, the backup will use the same
|
988
|
+
# encryption configuration as the database by default, namely
|
989
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} =
|
990
|
+
# `USE_DATABASE_ENCRYPTION`.
|
1031
991
|
#
|
1032
992
|
# @yield [response, operation] Access the result along with the RPC operation
|
1033
993
|
# @yieldparam response [::Gapic::Operation]
|
@@ -1076,8 +1036,7 @@ module Google
|
|
1076
1036
|
end
|
1077
1037
|
|
1078
1038
|
##
|
1079
|
-
# Gets metadata on a pending or completed
|
1080
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
|
1039
|
+
# Gets metadata on a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
|
1081
1040
|
#
|
1082
1041
|
# @overload get_backup(request, options = nil)
|
1083
1042
|
# Pass arguments to `get_backup` via a request object, either of type
|
@@ -1145,8 +1104,7 @@ module Google
|
|
1145
1104
|
end
|
1146
1105
|
|
1147
1106
|
##
|
1148
|
-
# Updates a pending or completed
|
1149
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
|
1107
|
+
# Updates a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
|
1150
1108
|
#
|
1151
1109
|
# @overload update_backup(request, options = nil)
|
1152
1110
|
# Pass arguments to `update_backup` via a request object, either of type
|
@@ -1221,8 +1179,7 @@ module Google
|
|
1221
1179
|
end
|
1222
1180
|
|
1223
1181
|
##
|
1224
|
-
# Deletes a pending or completed
|
1225
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
|
1182
|
+
# Deletes a pending or completed {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}.
|
1226
1183
|
#
|
1227
1184
|
# @overload delete_backup(request, options = nil)
|
1228
1185
|
# Pass arguments to `delete_backup` via a request object, either of type
|
@@ -1321,9 +1278,7 @@ module Google
|
|
1321
1278
|
# must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
|
1322
1279
|
# Colon `:` is the contains operator. Filter rules are not case sensitive.
|
1323
1280
|
#
|
1324
|
-
# The following fields in the
|
1325
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for
|
1326
|
-
# filtering:
|
1281
|
+
# The following fields in the {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for filtering:
|
1327
1282
|
#
|
1328
1283
|
# * `name`
|
1329
1284
|
# * `database`
|
@@ -1355,10 +1310,9 @@ module Google
|
|
1355
1310
|
# less, defaults to the server's maximum allowed page size.
|
1356
1311
|
# @param page_token [::String]
|
1357
1312
|
# If non-empty, `page_token` should contain a
|
1358
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token}
|
1359
|
-
#
|
1360
|
-
#
|
1361
|
-
# to the same `parent` and with the same `filter`.
|
1313
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} from a
|
1314
|
+
# previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} to the same `parent` and with the same
|
1315
|
+
# `filter`.
|
1362
1316
|
#
|
1363
1317
|
# @yield [response, operation] Access the result along with the RPC operation
|
1364
1318
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>]
|
@@ -1455,12 +1409,12 @@ module Google
|
|
1455
1409
|
# Name of the backup from which to restore. Values are of the form
|
1456
1410
|
# `projects/<project>/instances/<instance>/backups/<backup>`.
|
1457
1411
|
# @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig, ::Hash]
|
1458
|
-
# Optional. An encryption configuration describing the encryption type and
|
1459
|
-
#
|
1460
|
-
#
|
1461
|
-
# encryption configuration as the backup by default, namely
|
1462
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
|
1463
|
-
#
|
1412
|
+
# Optional. An encryption configuration describing the encryption type and key
|
1413
|
+
# resources in Cloud KMS used to encrypt/decrypt the database to restore to.
|
1414
|
+
# If this field is not specified, the restored database will use
|
1415
|
+
# the same encryption configuration as the backup by default, namely
|
1416
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} =
|
1417
|
+
# `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
|
1464
1418
|
#
|
1465
1419
|
# @yield [response, operation] Access the result along with the RPC operation
|
1466
1420
|
# @yieldparam response [::Gapic::Operation]
|
@@ -1551,9 +1505,7 @@ module Google
|
|
1551
1505
|
# * `name` - The name of the long-running operation
|
1552
1506
|
# * `done` - False if the operation is in progress, else true.
|
1553
1507
|
# * `metadata.@type` - the type of metadata. For example, the type string
|
1554
|
-
# for
|
1555
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}
|
1556
|
-
# is
|
1508
|
+
# for {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} is
|
1557
1509
|
# `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
|
1558
1510
|
# * `metadata.<field_name>` - any field in metadata.value.
|
1559
1511
|
# * `error` - Error associated with the long-running operation.
|
@@ -1573,8 +1525,7 @@ module Google
|
|
1573
1525
|
# `(metadata.name:restored_howl) AND` \
|
1574
1526
|
# `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
|
1575
1527
|
# `(error:*)` - Return operations where:
|
1576
|
-
# * The operation's metadata type is
|
1577
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
|
1528
|
+
# * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
|
1578
1529
|
# * The database is restored from a backup.
|
1579
1530
|
# * The backup name contains "backup_howl".
|
1580
1531
|
# * The restored database's name contains "restored_howl".
|
@@ -1586,9 +1537,8 @@ module Google
|
|
1586
1537
|
# @param page_token [::String]
|
1587
1538
|
# If non-empty, `page_token` should contain a
|
1588
1539
|
# {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token}
|
1589
|
-
# from a previous
|
1590
|
-
#
|
1591
|
-
# to the same `parent` and with the same `filter`.
|
1540
|
+
# from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} to the
|
1541
|
+
# same `parent` and with the same `filter`.
|
1592
1542
|
#
|
1593
1543
|
# @yield [response, operation] Access the result along with the RPC operation
|
1594
1544
|
# @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
|
@@ -1682,9 +1632,7 @@ module Google
|
|
1682
1632
|
# * `name` - The name of the long-running operation
|
1683
1633
|
# * `done` - False if the operation is in progress, else true.
|
1684
1634
|
# * `metadata.@type` - the type of metadata. For example, the type string
|
1685
|
-
# for
|
1686
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
|
1687
|
-
# is
|
1635
|
+
# for {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} is
|
1688
1636
|
# `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
|
1689
1637
|
# * `metadata.<field_name>` - any field in metadata.value.
|
1690
1638
|
# * `error` - Error associated with the long-running operation.
|
@@ -1704,8 +1652,7 @@ module Google
|
|
1704
1652
|
# `(metadata.name:howl) AND` \
|
1705
1653
|
# `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
|
1706
1654
|
# `(error:*)` - Returns operations where:
|
1707
|
-
# * The operation's metadata type is
|
1708
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
1655
|
+
# * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
1709
1656
|
# * The backup name contains the string "howl".
|
1710
1657
|
# * The operation started before 2018-03-28T14:50:00Z.
|
1711
1658
|
# * The operation resulted in an error.
|
@@ -1715,9 +1662,8 @@ module Google
|
|
1715
1662
|
# @param page_token [::String]
|
1716
1663
|
# If non-empty, `page_token` should contain a
|
1717
1664
|
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token}
|
1718
|
-
# from a previous
|
1719
|
-
#
|
1720
|
-
# to the same `parent` and with the same `filter`.
|
1665
|
+
# from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} to the
|
1666
|
+
# same `parent` and with the same `filter`.
|
1721
1667
|
#
|
1722
1668
|
# @yield [response, operation] Access the result along with the RPC operation
|
1723
1669
|
# @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
|
@@ -1858,7 +1804,7 @@ module Google
|
|
1858
1804
|
config_attr :scope, nil, ::String, ::Array, nil
|
1859
1805
|
config_attr :lib_name, nil, ::String, nil
|
1860
1806
|
config_attr :lib_version, nil, ::String, nil
|
1861
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
1807
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
1862
1808
|
config_attr :interceptors, nil, ::Array, nil
|
1863
1809
|
config_attr :timeout, nil, ::Numeric, nil
|
1864
1810
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -1879,7 +1825,7 @@ module Google
|
|
1879
1825
|
def rpcs
|
1880
1826
|
@rpcs ||= begin
|
1881
1827
|
parent_rpcs = nil
|
1882
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
1828
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1883
1829
|
Rpcs.new parent_rpcs
|
1884
1830
|
end
|
1885
1831
|
end
|
@@ -1990,39 +1936,39 @@ module Google
|
|
1990
1936
|
|
1991
1937
|
# @private
|
1992
1938
|
def initialize parent_rpcs = nil
|
1993
|
-
list_databases_config = parent_rpcs
|
1939
|
+
list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases
|
1994
1940
|
@list_databases = ::Gapic::Config::Method.new list_databases_config
|
1995
|
-
create_database_config = parent_rpcs
|
1941
|
+
create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database
|
1996
1942
|
@create_database = ::Gapic::Config::Method.new create_database_config
|
1997
|
-
get_database_config = parent_rpcs
|
1943
|
+
get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database
|
1998
1944
|
@get_database = ::Gapic::Config::Method.new get_database_config
|
1999
|
-
update_database_ddl_config = parent_rpcs
|
1945
|
+
update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl
|
2000
1946
|
@update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config
|
2001
|
-
drop_database_config = parent_rpcs
|
1947
|
+
drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database
|
2002
1948
|
@drop_database = ::Gapic::Config::Method.new drop_database_config
|
2003
|
-
get_database_ddl_config = parent_rpcs
|
1949
|
+
get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl
|
2004
1950
|
@get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config
|
2005
|
-
set_iam_policy_config = parent_rpcs
|
1951
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
2006
1952
|
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
2007
|
-
get_iam_policy_config = parent_rpcs
|
1953
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
2008
1954
|
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
2009
|
-
test_iam_permissions_config = parent_rpcs
|
1955
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
2010
1956
|
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
2011
|
-
create_backup_config = parent_rpcs
|
1957
|
+
create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
|
2012
1958
|
@create_backup = ::Gapic::Config::Method.new create_backup_config
|
2013
|
-
get_backup_config = parent_rpcs
|
1959
|
+
get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
|
2014
1960
|
@get_backup = ::Gapic::Config::Method.new get_backup_config
|
2015
|
-
update_backup_config = parent_rpcs
|
1961
|
+
update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup
|
2016
1962
|
@update_backup = ::Gapic::Config::Method.new update_backup_config
|
2017
|
-
delete_backup_config = parent_rpcs
|
1963
|
+
delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
|
2018
1964
|
@delete_backup = ::Gapic::Config::Method.new delete_backup_config
|
2019
|
-
list_backups_config = parent_rpcs
|
1965
|
+
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|
2020
1966
|
@list_backups = ::Gapic::Config::Method.new list_backups_config
|
2021
|
-
restore_database_config = parent_rpcs
|
1967
|
+
restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database
|
2022
1968
|
@restore_database = ::Gapic::Config::Method.new restore_database_config
|
2023
|
-
list_database_operations_config = parent_rpcs
|
1969
|
+
list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations
|
2024
1970
|
@list_database_operations = ::Gapic::Config::Method.new list_database_operations_config
|
2025
|
-
list_backup_operations_config = parent_rpcs
|
1971
|
+
list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations
|
2026
1972
|
@list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config
|
2027
1973
|
|
2028
1974
|
yield self if block_given?
|