google-cloud-metastore-v1 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/metastore/v1/dataproc_metastore.rb +2 -2
- data/lib/google/cloud/metastore/v1/dataproc_metastore/client.rb +477 -2
- data/lib/google/cloud/metastore/v1/dataproc_metastore/paths.rb +21 -0
- data/lib/google/cloud/metastore/v1/metastore_pb.rb +82 -0
- data/lib/google/cloud/metastore/v1/metastore_services_pb.rb +12 -2
- data/lib/google/cloud/metastore/v1/version.rb +1 -1
- data/proto_docs/google/cloud/metastore/v1/metastore.rb +280 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 392784d5b3f5dc4fccffe9cbbfd599e6a57afe1ea632be69ce58dcc997299f9b
|
4
|
+
data.tar.gz: 8d00d1efbc2986bad4ab62e8a9b5700f29312d89fa93c62cdcafd055b20a0dc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b3c274ffdb0c7b14099b7002ddfcfe0f46ad6cafb840a313b55a3700820e4a3f02c71f9ca5ced8fe0c844965d681f7b554a233027d4ef0345b26c251c1af71b
|
7
|
+
data.tar.gz: 4c469984519c40097dc03505d6e620762833825b933c7d059f08f313070c54d7515e9a00fe28d407fdfe69f47c0b855c389ed54b33215984bcf71fb3e1837eb7
|
@@ -33,8 +33,8 @@ module Google
|
|
33
33
|
module V1
|
34
34
|
##
|
35
35
|
# Configures and manages metastore services.
|
36
|
-
# Metastore services are fully managed, highly available,
|
37
|
-
#
|
36
|
+
# Metastore services are fully managed, highly available, autoscaled,
|
37
|
+
# autohealing, OSS-native deployments of technical metadata management
|
38
38
|
# software. Each metastore service exposes a network endpoint through which
|
39
39
|
# metadata queries are served. Metadata queries can originate from a variety
|
40
40
|
# of sources, including Apache Hive, Apache Presto, and Apache Spark.
|
@@ -28,8 +28,8 @@ module Google
|
|
28
28
|
# Client for the DataprocMetastore service.
|
29
29
|
#
|
30
30
|
# Configures and manages metastore services.
|
31
|
-
# Metastore services are fully managed, highly available,
|
32
|
-
#
|
31
|
+
# Metastore services are fully managed, highly available, autoscaled,
|
32
|
+
# autohealing, OSS-native deployments of technical metadata management
|
33
33
|
# software. Each metastore service exposes a network endpoint through which
|
34
34
|
# metadata queries are served. Metadata queries can originate from a variety
|
35
35
|
# of sources, including Apache Hive, Apache Presto, and Apache Spark.
|
@@ -97,6 +97,12 @@ module Google
|
|
97
97
|
|
98
98
|
default_config.rpcs.export_metadata.timeout = 60.0
|
99
99
|
|
100
|
+
default_config.rpcs.restore_service.timeout = 60.0
|
101
|
+
|
102
|
+
default_config.rpcs.create_backup.timeout = 60.0
|
103
|
+
|
104
|
+
default_config.rpcs.delete_backup.timeout = 60.0
|
105
|
+
|
100
106
|
default_config
|
101
107
|
end
|
102
108
|
yield @configure if block_given?
|
@@ -1064,6 +1070,440 @@ module Google
|
|
1064
1070
|
raise ::Google::Cloud::Error.from_error(e)
|
1065
1071
|
end
|
1066
1072
|
|
1073
|
+
##
|
1074
|
+
# Restores a service from a backup.
|
1075
|
+
#
|
1076
|
+
# @overload restore_service(request, options = nil)
|
1077
|
+
# Pass arguments to `restore_service` via a request object, either of type
|
1078
|
+
# {::Google::Cloud::Metastore::V1::RestoreServiceRequest} or an equivalent Hash.
|
1079
|
+
#
|
1080
|
+
# @param request [::Google::Cloud::Metastore::V1::RestoreServiceRequest, ::Hash]
|
1081
|
+
# A request object representing the call parameters. Required. To specify no
|
1082
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1083
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1084
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1085
|
+
#
|
1086
|
+
# @overload restore_service(service: nil, backup: nil, restore_type: nil, request_id: nil)
|
1087
|
+
# Pass arguments to `restore_service` via keyword arguments. Note that at
|
1088
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1089
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1090
|
+
#
|
1091
|
+
# @param service [::String]
|
1092
|
+
# Required. The relative resource name of the metastore service to run restore, in the
|
1093
|
+
# following form:
|
1094
|
+
#
|
1095
|
+
# `projects/{project_id}/locations/{location_id}/services/{service_id}`.
|
1096
|
+
# @param backup [::String]
|
1097
|
+
# Required. The relative resource name of the metastore service backup to restore
|
1098
|
+
# from, in the following form:
|
1099
|
+
#
|
1100
|
+
# `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
|
1101
|
+
# @param restore_type [::Google::Cloud::Metastore::V1::Restore::RestoreType]
|
1102
|
+
# Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
|
1103
|
+
# @param request_id [::String]
|
1104
|
+
# Optional. A request ID. Specify a unique request ID to allow the server to ignore the
|
1105
|
+
# request if it has completed. The server will ignore subsequent requests
|
1106
|
+
# that provide a duplicate request ID for at least 60 minutes after the first
|
1107
|
+
# request.
|
1108
|
+
#
|
1109
|
+
# For example, if an initial request times out, followed by another request
|
1110
|
+
# with the same request ID, the server ignores the second request to prevent
|
1111
|
+
# the creation of duplicate commitments.
|
1112
|
+
#
|
1113
|
+
# The request ID must be a valid
|
1114
|
+
# [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
|
1115
|
+
# A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
|
1116
|
+
#
|
1117
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1118
|
+
# @yieldparam response [::Gapic::Operation]
|
1119
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1120
|
+
#
|
1121
|
+
# @return [::Gapic::Operation]
|
1122
|
+
#
|
1123
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1124
|
+
#
|
1125
|
+
def restore_service request, options = nil
|
1126
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1127
|
+
|
1128
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1::RestoreServiceRequest
|
1129
|
+
|
1130
|
+
# Converts hash and nil to an options object
|
1131
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1132
|
+
|
1133
|
+
# Customize the options with defaults
|
1134
|
+
metadata = @config.rpcs.restore_service.metadata.to_h
|
1135
|
+
|
1136
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1137
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1138
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1139
|
+
gapic_version: ::Google::Cloud::Metastore::V1::VERSION
|
1140
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1141
|
+
|
1142
|
+
header_params = {
|
1143
|
+
"service" => request.service
|
1144
|
+
}
|
1145
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1146
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1147
|
+
|
1148
|
+
options.apply_defaults timeout: @config.rpcs.restore_service.timeout,
|
1149
|
+
metadata: metadata,
|
1150
|
+
retry_policy: @config.rpcs.restore_service.retry_policy
|
1151
|
+
|
1152
|
+
options.apply_defaults timeout: @config.timeout,
|
1153
|
+
metadata: @config.metadata,
|
1154
|
+
retry_policy: @config.retry_policy
|
1155
|
+
|
1156
|
+
@dataproc_metastore_stub.call_rpc :restore_service, request, options: options do |response, operation|
|
1157
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1158
|
+
yield response, operation if block_given?
|
1159
|
+
return response
|
1160
|
+
end
|
1161
|
+
rescue ::GRPC::BadStatus => e
|
1162
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1163
|
+
end
|
1164
|
+
|
1165
|
+
##
|
1166
|
+
# Lists backups in a service.
|
1167
|
+
#
|
1168
|
+
# @overload list_backups(request, options = nil)
|
1169
|
+
# Pass arguments to `list_backups` via a request object, either of type
|
1170
|
+
# {::Google::Cloud::Metastore::V1::ListBackupsRequest} or an equivalent Hash.
|
1171
|
+
#
|
1172
|
+
# @param request [::Google::Cloud::Metastore::V1::ListBackupsRequest, ::Hash]
|
1173
|
+
# A request object representing the call parameters. Required. To specify no
|
1174
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1175
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1176
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1177
|
+
#
|
1178
|
+
# @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1179
|
+
# Pass arguments to `list_backups` via keyword arguments. Note that at
|
1180
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1181
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1182
|
+
#
|
1183
|
+
# @param parent [::String]
|
1184
|
+
# Required. The relative resource name of the service whose backups to
|
1185
|
+
# list, in the following form:
|
1186
|
+
#
|
1187
|
+
# `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
|
1188
|
+
# @param page_size [::Integer]
|
1189
|
+
# Optional. The maximum number of backups to return. The response may contain less
|
1190
|
+
# than the maximum number. If unspecified, no more than 500 backups are
|
1191
|
+
# returned. The maximum value is 1000; values above 1000 are changed to 1000.
|
1192
|
+
# @param page_token [::String]
|
1193
|
+
# Optional. A page token, received from a previous {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups DataprocMetastore.ListBackups}
|
1194
|
+
# call. Provide this token to retrieve the subsequent page.
|
1195
|
+
#
|
1196
|
+
# To retrieve the first page, supply an empty page token.
|
1197
|
+
#
|
1198
|
+
# When paginating, other parameters provided to
|
1199
|
+
# {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups DataprocMetastore.ListBackups} must match the call that provided the
|
1200
|
+
# page token.
|
1201
|
+
# @param filter [::String]
|
1202
|
+
# Optional. The filter to apply to list results.
|
1203
|
+
# @param order_by [::String]
|
1204
|
+
# Optional. Specify the ordering of results as described in [Sorting
|
1205
|
+
# Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
|
1206
|
+
# If not specified, the results will be sorted in the default order.
|
1207
|
+
#
|
1208
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1209
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::Backup>]
|
1210
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1211
|
+
#
|
1212
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::Backup>]
|
1213
|
+
#
|
1214
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1215
|
+
#
|
1216
|
+
def list_backups request, options = nil
|
1217
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1218
|
+
|
1219
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1::ListBackupsRequest
|
1220
|
+
|
1221
|
+
# Converts hash and nil to an options object
|
1222
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1223
|
+
|
1224
|
+
# Customize the options with defaults
|
1225
|
+
metadata = @config.rpcs.list_backups.metadata.to_h
|
1226
|
+
|
1227
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1228
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1229
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1230
|
+
gapic_version: ::Google::Cloud::Metastore::V1::VERSION
|
1231
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1232
|
+
|
1233
|
+
header_params = {
|
1234
|
+
"parent" => request.parent
|
1235
|
+
}
|
1236
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1237
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1238
|
+
|
1239
|
+
options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
|
1240
|
+
metadata: metadata,
|
1241
|
+
retry_policy: @config.rpcs.list_backups.retry_policy
|
1242
|
+
|
1243
|
+
options.apply_defaults timeout: @config.timeout,
|
1244
|
+
metadata: @config.metadata,
|
1245
|
+
retry_policy: @config.retry_policy
|
1246
|
+
|
1247
|
+
@dataproc_metastore_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
1248
|
+
response = ::Gapic::PagedEnumerable.new @dataproc_metastore_stub, :list_backups, request, response, operation, options
|
1249
|
+
yield response, operation if block_given?
|
1250
|
+
return response
|
1251
|
+
end
|
1252
|
+
rescue ::GRPC::BadStatus => e
|
1253
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1254
|
+
end
|
1255
|
+
|
1256
|
+
##
|
1257
|
+
# Gets details of a single backup.
|
1258
|
+
#
|
1259
|
+
# @overload get_backup(request, options = nil)
|
1260
|
+
# Pass arguments to `get_backup` via a request object, either of type
|
1261
|
+
# {::Google::Cloud::Metastore::V1::GetBackupRequest} or an equivalent Hash.
|
1262
|
+
#
|
1263
|
+
# @param request [::Google::Cloud::Metastore::V1::GetBackupRequest, ::Hash]
|
1264
|
+
# A request object representing the call parameters. Required. To specify no
|
1265
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1266
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1267
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1268
|
+
#
|
1269
|
+
# @overload get_backup(name: nil)
|
1270
|
+
# Pass arguments to `get_backup` via keyword arguments. Note that at
|
1271
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1272
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1273
|
+
#
|
1274
|
+
# @param name [::String]
|
1275
|
+
# Required. The relative resource name of the backup to retrieve, in the
|
1276
|
+
# following form:
|
1277
|
+
#
|
1278
|
+
# `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
|
1279
|
+
#
|
1280
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1281
|
+
# @yieldparam response [::Google::Cloud::Metastore::V1::Backup]
|
1282
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1283
|
+
#
|
1284
|
+
# @return [::Google::Cloud::Metastore::V1::Backup]
|
1285
|
+
#
|
1286
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1287
|
+
#
|
1288
|
+
def get_backup request, options = nil
|
1289
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1290
|
+
|
1291
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1::GetBackupRequest
|
1292
|
+
|
1293
|
+
# Converts hash and nil to an options object
|
1294
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1295
|
+
|
1296
|
+
# Customize the options with defaults
|
1297
|
+
metadata = @config.rpcs.get_backup.metadata.to_h
|
1298
|
+
|
1299
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1300
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1301
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1302
|
+
gapic_version: ::Google::Cloud::Metastore::V1::VERSION
|
1303
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1304
|
+
|
1305
|
+
header_params = {
|
1306
|
+
"name" => request.name
|
1307
|
+
}
|
1308
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1309
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1310
|
+
|
1311
|
+
options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
|
1312
|
+
metadata: metadata,
|
1313
|
+
retry_policy: @config.rpcs.get_backup.retry_policy
|
1314
|
+
|
1315
|
+
options.apply_defaults timeout: @config.timeout,
|
1316
|
+
metadata: @config.metadata,
|
1317
|
+
retry_policy: @config.retry_policy
|
1318
|
+
|
1319
|
+
@dataproc_metastore_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
1320
|
+
yield response, operation if block_given?
|
1321
|
+
return response
|
1322
|
+
end
|
1323
|
+
rescue ::GRPC::BadStatus => e
|
1324
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1325
|
+
end
|
1326
|
+
|
1327
|
+
##
|
1328
|
+
# Creates a new backup in a given project and location.
|
1329
|
+
#
|
1330
|
+
# @overload create_backup(request, options = nil)
|
1331
|
+
# Pass arguments to `create_backup` via a request object, either of type
|
1332
|
+
# {::Google::Cloud::Metastore::V1::CreateBackupRequest} or an equivalent Hash.
|
1333
|
+
#
|
1334
|
+
# @param request [::Google::Cloud::Metastore::V1::CreateBackupRequest, ::Hash]
|
1335
|
+
# A request object representing the call parameters. Required. To specify no
|
1336
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1337
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1338
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1339
|
+
#
|
1340
|
+
# @overload create_backup(parent: nil, backup_id: nil, backup: nil, request_id: nil)
|
1341
|
+
# Pass arguments to `create_backup` via keyword arguments. Note that at
|
1342
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1343
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1344
|
+
#
|
1345
|
+
# @param parent [::String]
|
1346
|
+
# Required. The relative resource name of the service in which to create a backup
|
1347
|
+
# of the following form:
|
1348
|
+
#
|
1349
|
+
# `projects/{project_number}/locations/{location_id}/services/{service_id}`.
|
1350
|
+
# @param backup_id [::String]
|
1351
|
+
# Required. The ID of the backup, which is used as the final component of the
|
1352
|
+
# backup's name.
|
1353
|
+
#
|
1354
|
+
# This value must be between 1 and 64 characters long, begin with a letter,
|
1355
|
+
# end with a letter or number, and consist of alpha-numeric ASCII characters
|
1356
|
+
# or hyphens.
|
1357
|
+
# @param backup [::Google::Cloud::Metastore::V1::Backup, ::Hash]
|
1358
|
+
# Required. The backup to create. The `name` field is ignored. The ID of the created
|
1359
|
+
# backup must be provided in the request's `backup_id` field.
|
1360
|
+
# @param request_id [::String]
|
1361
|
+
# Optional. A request ID. Specify a unique request ID to allow the server to ignore the
|
1362
|
+
# request if it has completed. The server will ignore subsequent requests
|
1363
|
+
# that provide a duplicate request ID for at least 60 minutes after the first
|
1364
|
+
# request.
|
1365
|
+
#
|
1366
|
+
# For example, if an initial request times out, followed by another request
|
1367
|
+
# with the same request ID, the server ignores the second request to prevent
|
1368
|
+
# the creation of duplicate commitments.
|
1369
|
+
#
|
1370
|
+
# The request ID must be a valid
|
1371
|
+
# [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
|
1372
|
+
# A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
|
1373
|
+
#
|
1374
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1375
|
+
# @yieldparam response [::Gapic::Operation]
|
1376
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1377
|
+
#
|
1378
|
+
# @return [::Gapic::Operation]
|
1379
|
+
#
|
1380
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1381
|
+
#
|
1382
|
+
def create_backup request, options = nil
|
1383
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1384
|
+
|
1385
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1::CreateBackupRequest
|
1386
|
+
|
1387
|
+
# Converts hash and nil to an options object
|
1388
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1389
|
+
|
1390
|
+
# Customize the options with defaults
|
1391
|
+
metadata = @config.rpcs.create_backup.metadata.to_h
|
1392
|
+
|
1393
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1394
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1395
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1396
|
+
gapic_version: ::Google::Cloud::Metastore::V1::VERSION
|
1397
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1398
|
+
|
1399
|
+
header_params = {
|
1400
|
+
"parent" => request.parent
|
1401
|
+
}
|
1402
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1403
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1404
|
+
|
1405
|
+
options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
|
1406
|
+
metadata: metadata,
|
1407
|
+
retry_policy: @config.rpcs.create_backup.retry_policy
|
1408
|
+
|
1409
|
+
options.apply_defaults timeout: @config.timeout,
|
1410
|
+
metadata: @config.metadata,
|
1411
|
+
retry_policy: @config.retry_policy
|
1412
|
+
|
1413
|
+
@dataproc_metastore_stub.call_rpc :create_backup, request, options: options do |response, operation|
|
1414
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1415
|
+
yield response, operation if block_given?
|
1416
|
+
return response
|
1417
|
+
end
|
1418
|
+
rescue ::GRPC::BadStatus => e
|
1419
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1420
|
+
end
|
1421
|
+
|
1422
|
+
##
|
1423
|
+
# Deletes a single backup.
|
1424
|
+
#
|
1425
|
+
# @overload delete_backup(request, options = nil)
|
1426
|
+
# Pass arguments to `delete_backup` via a request object, either of type
|
1427
|
+
# {::Google::Cloud::Metastore::V1::DeleteBackupRequest} or an equivalent Hash.
|
1428
|
+
#
|
1429
|
+
# @param request [::Google::Cloud::Metastore::V1::DeleteBackupRequest, ::Hash]
|
1430
|
+
# A request object representing the call parameters. Required. To specify no
|
1431
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1432
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1433
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1434
|
+
#
|
1435
|
+
# @overload delete_backup(name: nil, request_id: nil)
|
1436
|
+
# Pass arguments to `delete_backup` via keyword arguments. Note that at
|
1437
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1438
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1439
|
+
#
|
1440
|
+
# @param name [::String]
|
1441
|
+
# Required. The relative resource name of the backup to delete, in the
|
1442
|
+
# following form:
|
1443
|
+
#
|
1444
|
+
# `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
|
1445
|
+
# @param request_id [::String]
|
1446
|
+
# Optional. A request ID. Specify a unique request ID to allow the server to ignore the
|
1447
|
+
# request if it has completed. The server will ignore subsequent requests
|
1448
|
+
# that provide a duplicate request ID for at least 60 minutes after the first
|
1449
|
+
# request.
|
1450
|
+
#
|
1451
|
+
# For example, if an initial request times out, followed by another request
|
1452
|
+
# with the same request ID, the server ignores the second request to prevent
|
1453
|
+
# the creation of duplicate commitments.
|
1454
|
+
#
|
1455
|
+
# The request ID must be a valid
|
1456
|
+
# [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
|
1457
|
+
# A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
|
1458
|
+
#
|
1459
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1460
|
+
# @yieldparam response [::Gapic::Operation]
|
1461
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1462
|
+
#
|
1463
|
+
# @return [::Gapic::Operation]
|
1464
|
+
#
|
1465
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1466
|
+
#
|
1467
|
+
def delete_backup request, options = nil
|
1468
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1469
|
+
|
1470
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1::DeleteBackupRequest
|
1471
|
+
|
1472
|
+
# Converts hash and nil to an options object
|
1473
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1474
|
+
|
1475
|
+
# Customize the options with defaults
|
1476
|
+
metadata = @config.rpcs.delete_backup.metadata.to_h
|
1477
|
+
|
1478
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1479
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1480
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1481
|
+
gapic_version: ::Google::Cloud::Metastore::V1::VERSION
|
1482
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1483
|
+
|
1484
|
+
header_params = {
|
1485
|
+
"name" => request.name
|
1486
|
+
}
|
1487
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1488
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1489
|
+
|
1490
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
|
1491
|
+
metadata: metadata,
|
1492
|
+
retry_policy: @config.rpcs.delete_backup.retry_policy
|
1493
|
+
|
1494
|
+
options.apply_defaults timeout: @config.timeout,
|
1495
|
+
metadata: @config.metadata,
|
1496
|
+
retry_policy: @config.retry_policy
|
1497
|
+
|
1498
|
+
@dataproc_metastore_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
1499
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1500
|
+
yield response, operation if block_given?
|
1501
|
+
return response
|
1502
|
+
end
|
1503
|
+
rescue ::GRPC::BadStatus => e
|
1504
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1505
|
+
end
|
1506
|
+
|
1067
1507
|
##
|
1068
1508
|
# Configuration class for the DataprocMetastore API.
|
1069
1509
|
#
|
@@ -1249,6 +1689,31 @@ module Google
|
|
1249
1689
|
# @return [::Gapic::Config::Method]
|
1250
1690
|
#
|
1251
1691
|
attr_reader :export_metadata
|
1692
|
+
##
|
1693
|
+
# RPC-specific configuration for `restore_service`
|
1694
|
+
# @return [::Gapic::Config::Method]
|
1695
|
+
#
|
1696
|
+
attr_reader :restore_service
|
1697
|
+
##
|
1698
|
+
# RPC-specific configuration for `list_backups`
|
1699
|
+
# @return [::Gapic::Config::Method]
|
1700
|
+
#
|
1701
|
+
attr_reader :list_backups
|
1702
|
+
##
|
1703
|
+
# RPC-specific configuration for `get_backup`
|
1704
|
+
# @return [::Gapic::Config::Method]
|
1705
|
+
#
|
1706
|
+
attr_reader :get_backup
|
1707
|
+
##
|
1708
|
+
# RPC-specific configuration for `create_backup`
|
1709
|
+
# @return [::Gapic::Config::Method]
|
1710
|
+
#
|
1711
|
+
attr_reader :create_backup
|
1712
|
+
##
|
1713
|
+
# RPC-specific configuration for `delete_backup`
|
1714
|
+
# @return [::Gapic::Config::Method]
|
1715
|
+
#
|
1716
|
+
attr_reader :delete_backup
|
1252
1717
|
|
1253
1718
|
# @private
|
1254
1719
|
def initialize parent_rpcs = nil
|
@@ -1272,6 +1737,16 @@ module Google
|
|
1272
1737
|
@update_metadata_import = ::Gapic::Config::Method.new update_metadata_import_config
|
1273
1738
|
export_metadata_config = parent_rpcs.export_metadata if parent_rpcs.respond_to? :export_metadata
|
1274
1739
|
@export_metadata = ::Gapic::Config::Method.new export_metadata_config
|
1740
|
+
restore_service_config = parent_rpcs.restore_service if parent_rpcs.respond_to? :restore_service
|
1741
|
+
@restore_service = ::Gapic::Config::Method.new restore_service_config
|
1742
|
+
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|
1743
|
+
@list_backups = ::Gapic::Config::Method.new list_backups_config
|
1744
|
+
get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
|
1745
|
+
@get_backup = ::Gapic::Config::Method.new get_backup_config
|
1746
|
+
create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
|
1747
|
+
@create_backup = ::Gapic::Config::Method.new create_backup_config
|
1748
|
+
delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
|
1749
|
+
@delete_backup = ::Gapic::Config::Method.new delete_backup_config
|
1275
1750
|
|
1276
1751
|
yield self if block_given?
|
1277
1752
|
end
|
@@ -24,6 +24,27 @@ module Google
|
|
24
24
|
module DataprocMetastore
|
25
25
|
# Path helper methods for the DataprocMetastore API.
|
26
26
|
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Backup resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/services/{service}/backups/{backup}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param service [String]
|
37
|
+
# @param backup [String]
|
38
|
+
#
|
39
|
+
# @return [::String]
|
40
|
+
def backup_path project:, location:, service:, backup:
|
41
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
42
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
43
|
+
raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/"
|
44
|
+
|
45
|
+
"projects/#{project}/locations/#{location}/services/#{service}/backups/#{backup}"
|
46
|
+
end
|
47
|
+
|
27
48
|
##
|
28
49
|
# Create a fully-qualified Location resource string.
|
29
50
|
#
|
@@ -75,12 +75,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
75
75
|
end
|
76
76
|
add_message "google.cloud.metastore.v1.MetadataManagementActivity" do
|
77
77
|
repeated :metadata_exports, :message, 1, "google.cloud.metastore.v1.MetadataExport"
|
78
|
+
repeated :restores, :message, 2, "google.cloud.metastore.v1.Restore"
|
78
79
|
end
|
79
80
|
add_message "google.cloud.metastore.v1.MetadataImport" do
|
80
81
|
optional :name, :string, 1
|
81
82
|
optional :description, :string, 2
|
82
83
|
optional :create_time, :message, 3, "google.protobuf.Timestamp"
|
83
84
|
optional :update_time, :message, 4, "google.protobuf.Timestamp"
|
85
|
+
optional :end_time, :message, 7, "google.protobuf.Timestamp"
|
84
86
|
optional :state, :enum, 5, "google.cloud.metastore.v1.MetadataImport.State"
|
85
87
|
oneof :metadata do
|
86
88
|
optional :database_dump, :message, 6, "google.cloud.metastore.v1.MetadataImport.DatabaseDump"
|
@@ -118,6 +120,43 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
118
120
|
value :FAILED, 3
|
119
121
|
value :CANCELLED, 4
|
120
122
|
end
|
123
|
+
add_message "google.cloud.metastore.v1.Backup" do
|
124
|
+
optional :name, :string, 1
|
125
|
+
optional :create_time, :message, 2, "google.protobuf.Timestamp"
|
126
|
+
optional :end_time, :message, 3, "google.protobuf.Timestamp"
|
127
|
+
optional :state, :enum, 4, "google.cloud.metastore.v1.Backup.State"
|
128
|
+
optional :service_revision, :message, 5, "google.cloud.metastore.v1.Service"
|
129
|
+
optional :description, :string, 6
|
130
|
+
repeated :restoring_services, :string, 7
|
131
|
+
end
|
132
|
+
add_enum "google.cloud.metastore.v1.Backup.State" do
|
133
|
+
value :STATE_UNSPECIFIED, 0
|
134
|
+
value :CREATING, 1
|
135
|
+
value :DELETING, 2
|
136
|
+
value :ACTIVE, 3
|
137
|
+
value :FAILED, 4
|
138
|
+
value :RESTORING, 5
|
139
|
+
end
|
140
|
+
add_message "google.cloud.metastore.v1.Restore" do
|
141
|
+
optional :start_time, :message, 1, "google.protobuf.Timestamp"
|
142
|
+
optional :end_time, :message, 2, "google.protobuf.Timestamp"
|
143
|
+
optional :state, :enum, 3, "google.cloud.metastore.v1.Restore.State"
|
144
|
+
optional :backup, :string, 4
|
145
|
+
optional :type, :enum, 5, "google.cloud.metastore.v1.Restore.RestoreType"
|
146
|
+
optional :details, :string, 6
|
147
|
+
end
|
148
|
+
add_enum "google.cloud.metastore.v1.Restore.State" do
|
149
|
+
value :STATE_UNSPECIFIED, 0
|
150
|
+
value :RUNNING, 1
|
151
|
+
value :SUCCEEDED, 2
|
152
|
+
value :FAILED, 3
|
153
|
+
value :CANCELLED, 4
|
154
|
+
end
|
155
|
+
add_enum "google.cloud.metastore.v1.Restore.RestoreType" do
|
156
|
+
value :RESTORE_TYPE_UNSPECIFIED, 0
|
157
|
+
value :FULL, 1
|
158
|
+
value :METADATA_ONLY, 2
|
159
|
+
end
|
121
160
|
add_message "google.cloud.metastore.v1.ListServicesRequest" do
|
122
161
|
optional :parent, :string, 1
|
123
162
|
optional :page_size, :int32, 2
|
@@ -174,6 +213,31 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
174
213
|
optional :metadata_import, :message, 2, "google.cloud.metastore.v1.MetadataImport"
|
175
214
|
optional :request_id, :string, 3
|
176
215
|
end
|
216
|
+
add_message "google.cloud.metastore.v1.ListBackupsRequest" do
|
217
|
+
optional :parent, :string, 1
|
218
|
+
optional :page_size, :int32, 2
|
219
|
+
optional :page_token, :string, 3
|
220
|
+
optional :filter, :string, 4
|
221
|
+
optional :order_by, :string, 5
|
222
|
+
end
|
223
|
+
add_message "google.cloud.metastore.v1.ListBackupsResponse" do
|
224
|
+
repeated :backups, :message, 1, "google.cloud.metastore.v1.Backup"
|
225
|
+
optional :next_page_token, :string, 2
|
226
|
+
repeated :unreachable, :string, 3
|
227
|
+
end
|
228
|
+
add_message "google.cloud.metastore.v1.GetBackupRequest" do
|
229
|
+
optional :name, :string, 1
|
230
|
+
end
|
231
|
+
add_message "google.cloud.metastore.v1.CreateBackupRequest" do
|
232
|
+
optional :parent, :string, 1
|
233
|
+
optional :backup_id, :string, 2
|
234
|
+
optional :backup, :message, 3, "google.cloud.metastore.v1.Backup"
|
235
|
+
optional :request_id, :string, 4
|
236
|
+
end
|
237
|
+
add_message "google.cloud.metastore.v1.DeleteBackupRequest" do
|
238
|
+
optional :name, :string, 1
|
239
|
+
optional :request_id, :string, 2
|
240
|
+
end
|
177
241
|
add_message "google.cloud.metastore.v1.ExportMetadataRequest" do
|
178
242
|
optional :service, :string, 1
|
179
243
|
optional :request_id, :string, 3
|
@@ -182,6 +246,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
182
246
|
optional :destination_gcs_folder, :string, 2
|
183
247
|
end
|
184
248
|
end
|
249
|
+
add_message "google.cloud.metastore.v1.RestoreServiceRequest" do
|
250
|
+
optional :service, :string, 1
|
251
|
+
optional :backup, :string, 2
|
252
|
+
optional :restore_type, :enum, 3, "google.cloud.metastore.v1.Restore.RestoreType"
|
253
|
+
optional :request_id, :string, 4
|
254
|
+
end
|
185
255
|
add_message "google.cloud.metastore.v1.OperationMetadata" do
|
186
256
|
optional :create_time, :message, 1, "google.protobuf.Timestamp"
|
187
257
|
optional :end_time, :message, 2, "google.protobuf.Timestamp"
|
@@ -203,6 +273,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
203
273
|
add_enum "google.cloud.metastore.v1.DatabaseDumpSpec.Type" do
|
204
274
|
value :TYPE_UNSPECIFIED, 0
|
205
275
|
value :MYSQL, 1
|
276
|
+
value :AVRO, 2
|
206
277
|
end
|
207
278
|
end
|
208
279
|
end
|
@@ -226,6 +297,11 @@ module Google
|
|
226
297
|
MetadataImport::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.MetadataImport.State").enummodule
|
227
298
|
MetadataExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.MetadataExport").msgclass
|
228
299
|
MetadataExport::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.MetadataExport.State").enummodule
|
300
|
+
Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Backup").msgclass
|
301
|
+
Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Backup.State").enummodule
|
302
|
+
Restore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Restore").msgclass
|
303
|
+
Restore::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Restore.State").enummodule
|
304
|
+
Restore::RestoreType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.Restore.RestoreType").enummodule
|
229
305
|
ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ListServicesRequest").msgclass
|
230
306
|
ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ListServicesResponse").msgclass
|
231
307
|
GetServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.GetServiceRequest").msgclass
|
@@ -237,7 +313,13 @@ module Google
|
|
237
313
|
GetMetadataImportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.GetMetadataImportRequest").msgclass
|
238
314
|
CreateMetadataImportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.CreateMetadataImportRequest").msgclass
|
239
315
|
UpdateMetadataImportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.UpdateMetadataImportRequest").msgclass
|
316
|
+
ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ListBackupsRequest").msgclass
|
317
|
+
ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ListBackupsResponse").msgclass
|
318
|
+
GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.GetBackupRequest").msgclass
|
319
|
+
CreateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.CreateBackupRequest").msgclass
|
320
|
+
DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.DeleteBackupRequest").msgclass
|
240
321
|
ExportMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.ExportMetadataRequest").msgclass
|
322
|
+
RestoreServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.RestoreServiceRequest").msgclass
|
241
323
|
OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.OperationMetadata").msgclass
|
242
324
|
LocationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.LocationMetadata").msgclass
|
243
325
|
LocationMetadata::HiveMetastoreVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.metastore.v1.LocationMetadata.HiveMetastoreVersion").msgclass
|
@@ -25,8 +25,8 @@ module Google
|
|
25
25
|
module V1
|
26
26
|
module DataprocMetastore
|
27
27
|
# Configures and manages metastore services.
|
28
|
-
# Metastore services are fully managed, highly available,
|
29
|
-
#
|
28
|
+
# Metastore services are fully managed, highly available, autoscaled,
|
29
|
+
# autohealing, OSS-native deployments of technical metadata management
|
30
30
|
# software. Each metastore service exposes a network endpoint through which
|
31
31
|
# metadata queries are served. Metadata queries can originate from a variety
|
32
32
|
# of sources, including Apache Hive, Apache Presto, and Apache Spark.
|
@@ -70,6 +70,16 @@ module Google
|
|
70
70
|
rpc :UpdateMetadataImport, ::Google::Cloud::Metastore::V1::UpdateMetadataImportRequest, ::Google::Longrunning::Operation
|
71
71
|
# Exports metadata from a service.
|
72
72
|
rpc :ExportMetadata, ::Google::Cloud::Metastore::V1::ExportMetadataRequest, ::Google::Longrunning::Operation
|
73
|
+
# Restores a service from a backup.
|
74
|
+
rpc :RestoreService, ::Google::Cloud::Metastore::V1::RestoreServiceRequest, ::Google::Longrunning::Operation
|
75
|
+
# Lists backups in a service.
|
76
|
+
rpc :ListBackups, ::Google::Cloud::Metastore::V1::ListBackupsRequest, ::Google::Cloud::Metastore::V1::ListBackupsResponse
|
77
|
+
# Gets details of a single backup.
|
78
|
+
rpc :GetBackup, ::Google::Cloud::Metastore::V1::GetBackupRequest, ::Google::Cloud::Metastore::V1::Backup
|
79
|
+
# Creates a new backup in a given project and location.
|
80
|
+
rpc :CreateBackup, ::Google::Cloud::Metastore::V1::CreateBackupRequest, ::Google::Longrunning::Operation
|
81
|
+
# Deletes a single backup.
|
82
|
+
rpc :DeleteBackup, ::Google::Cloud::Metastore::V1::DeleteBackupRequest, ::Google::Longrunning::Operation
|
73
83
|
end
|
74
84
|
|
75
85
|
Stub = Service.rpc_stub_class
|
@@ -235,6 +235,9 @@ module Google
|
|
235
235
|
# @!attribute [r] metadata_exports
|
236
236
|
# @return [::Array<::Google::Cloud::Metastore::V1::MetadataExport>]
|
237
237
|
# Output only. The latest metadata exports of the metastore service.
|
238
|
+
# @!attribute [r] restores
|
239
|
+
# @return [::Array<::Google::Cloud::Metastore::V1::Restore>]
|
240
|
+
# Output only. The latest restores of the metastore service.
|
238
241
|
class MetadataManagementActivity
|
239
242
|
include ::Google::Protobuf::MessageExts
|
240
243
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -254,10 +257,13 @@ module Google
|
|
254
257
|
# The description of the metadata import.
|
255
258
|
# @!attribute [r] create_time
|
256
259
|
# @return [::Google::Protobuf::Timestamp]
|
257
|
-
# Output only. The time when the metadata import was
|
260
|
+
# Output only. The time when the metadata import was started.
|
258
261
|
# @!attribute [r] update_time
|
259
262
|
# @return [::Google::Protobuf::Timestamp]
|
260
263
|
# Output only. The time when the metadata import was last updated.
|
264
|
+
# @!attribute [r] end_time
|
265
|
+
# @return [::Google::Protobuf::Timestamp]
|
266
|
+
# Output only. The time when the metadata import finished.
|
261
267
|
# @!attribute [r] state
|
262
268
|
# @return [::Google::Cloud::Metastore::V1::MetadataImport::State]
|
263
269
|
# Output only. The current state of the metadata import.
|
@@ -352,6 +358,114 @@ module Google
|
|
352
358
|
end
|
353
359
|
end
|
354
360
|
|
361
|
+
# The details of a backup resource.
|
362
|
+
# @!attribute [rw] name
|
363
|
+
# @return [::String]
|
364
|
+
# Immutable. The relative resource name of the backup, in the following form:
|
365
|
+
#
|
366
|
+
# `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
|
367
|
+
# @!attribute [r] create_time
|
368
|
+
# @return [::Google::Protobuf::Timestamp]
|
369
|
+
# Output only. The time when the backup was started.
|
370
|
+
# @!attribute [r] end_time
|
371
|
+
# @return [::Google::Protobuf::Timestamp]
|
372
|
+
# Output only. The time when the backup finished creating.
|
373
|
+
# @!attribute [r] state
|
374
|
+
# @return [::Google::Cloud::Metastore::V1::Backup::State]
|
375
|
+
# Output only. The current state of the backup.
|
376
|
+
# @!attribute [r] service_revision
|
377
|
+
# @return [::Google::Cloud::Metastore::V1::Service]
|
378
|
+
# Output only. The revision of the service at the time of backup.
|
379
|
+
# @!attribute [rw] description
|
380
|
+
# @return [::String]
|
381
|
+
# The description of the backup.
|
382
|
+
# @!attribute [r] restoring_services
|
383
|
+
# @return [::Array<::String>]
|
384
|
+
# Output only. Services that are restoring from the backup.
|
385
|
+
class Backup
|
386
|
+
include ::Google::Protobuf::MessageExts
|
387
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
388
|
+
|
389
|
+
# The current state of the backup.
|
390
|
+
module State
|
391
|
+
# The state of the backup is unknown.
|
392
|
+
STATE_UNSPECIFIED = 0
|
393
|
+
|
394
|
+
# The backup is being created.
|
395
|
+
CREATING = 1
|
396
|
+
|
397
|
+
# The backup is being deleted.
|
398
|
+
DELETING = 2
|
399
|
+
|
400
|
+
# The backup is active and ready to use.
|
401
|
+
ACTIVE = 3
|
402
|
+
|
403
|
+
# The backup failed.
|
404
|
+
FAILED = 4
|
405
|
+
|
406
|
+
# The backup is being restored.
|
407
|
+
RESTORING = 5
|
408
|
+
end
|
409
|
+
end
|
410
|
+
|
411
|
+
# The details of a metadata restore operation.
|
412
|
+
# @!attribute [r] start_time
|
413
|
+
# @return [::Google::Protobuf::Timestamp]
|
414
|
+
# Output only. The time when the restore started.
|
415
|
+
# @!attribute [r] end_time
|
416
|
+
# @return [::Google::Protobuf::Timestamp]
|
417
|
+
# Output only. The time when the restore ended.
|
418
|
+
# @!attribute [r] state
|
419
|
+
# @return [::Google::Cloud::Metastore::V1::Restore::State]
|
420
|
+
# Output only. The current state of the restore.
|
421
|
+
# @!attribute [r] backup
|
422
|
+
# @return [::String]
|
423
|
+
# Output only. The relative resource name of the metastore service backup to restore
|
424
|
+
# from, in the following form:
|
425
|
+
#
|
426
|
+
# `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
|
427
|
+
# @!attribute [r] type
|
428
|
+
# @return [::Google::Cloud::Metastore::V1::Restore::RestoreType]
|
429
|
+
# Output only. The type of restore.
|
430
|
+
# @!attribute [r] details
|
431
|
+
# @return [::String]
|
432
|
+
# Output only. The restore details containing the revision of the service to be restored
|
433
|
+
# to, in format of JSON.
|
434
|
+
class Restore
|
435
|
+
include ::Google::Protobuf::MessageExts
|
436
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
437
|
+
|
438
|
+
# The current state of the restore.
|
439
|
+
module State
|
440
|
+
# The state of the metadata restore is unknown.
|
441
|
+
STATE_UNSPECIFIED = 0
|
442
|
+
|
443
|
+
# The metadata restore is running.
|
444
|
+
RUNNING = 1
|
445
|
+
|
446
|
+
# The metadata restore completed successfully.
|
447
|
+
SUCCEEDED = 2
|
448
|
+
|
449
|
+
# The metadata restore failed.
|
450
|
+
FAILED = 3
|
451
|
+
|
452
|
+
# The metadata restore is cancelled.
|
453
|
+
CANCELLED = 4
|
454
|
+
end
|
455
|
+
|
456
|
+
# The type of restore. If unspecified, defaults to `METADATA_ONLY`.
|
457
|
+
module RestoreType
|
458
|
+
# The restore type is unknown.
|
459
|
+
RESTORE_TYPE_UNSPECIFIED = 0
|
460
|
+
|
461
|
+
# The service's metadata and configuration are restored.
|
462
|
+
FULL = 1
|
463
|
+
|
464
|
+
# Only the service's metadata is restored.
|
465
|
+
METADATA_ONLY = 2
|
466
|
+
end
|
467
|
+
end
|
468
|
+
|
355
469
|
# Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_services DataprocMetastore.ListServices}.
|
356
470
|
# @!attribute [rw] parent
|
357
471
|
# @return [::String]
|
@@ -648,6 +762,133 @@ module Google
|
|
648
762
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
649
763
|
end
|
650
764
|
|
765
|
+
# Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups DataprocMetastore.ListBackups}.
|
766
|
+
# @!attribute [rw] parent
|
767
|
+
# @return [::String]
|
768
|
+
# Required. The relative resource name of the service whose backups to
|
769
|
+
# list, in the following form:
|
770
|
+
#
|
771
|
+
# `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
|
772
|
+
# @!attribute [rw] page_size
|
773
|
+
# @return [::Integer]
|
774
|
+
# Optional. The maximum number of backups to return. The response may contain less
|
775
|
+
# than the maximum number. If unspecified, no more than 500 backups are
|
776
|
+
# returned. The maximum value is 1000; values above 1000 are changed to 1000.
|
777
|
+
# @!attribute [rw] page_token
|
778
|
+
# @return [::String]
|
779
|
+
# Optional. A page token, received from a previous {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups DataprocMetastore.ListBackups}
|
780
|
+
# call. Provide this token to retrieve the subsequent page.
|
781
|
+
#
|
782
|
+
# To retrieve the first page, supply an empty page token.
|
783
|
+
#
|
784
|
+
# When paginating, other parameters provided to
|
785
|
+
# {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups DataprocMetastore.ListBackups} must match the call that provided the
|
786
|
+
# page token.
|
787
|
+
# @!attribute [rw] filter
|
788
|
+
# @return [::String]
|
789
|
+
# Optional. The filter to apply to list results.
|
790
|
+
# @!attribute [rw] order_by
|
791
|
+
# @return [::String]
|
792
|
+
# Optional. Specify the ordering of results as described in [Sorting
|
793
|
+
# Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
|
794
|
+
# If not specified, the results will be sorted in the default order.
|
795
|
+
class ListBackupsRequest
|
796
|
+
include ::Google::Protobuf::MessageExts
|
797
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
798
|
+
end
|
799
|
+
|
800
|
+
# Response message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups DataprocMetastore.ListBackups}.
|
801
|
+
# @!attribute [rw] backups
|
802
|
+
# @return [::Array<::Google::Cloud::Metastore::V1::Backup>]
|
803
|
+
# The backups of the specified service.
|
804
|
+
# @!attribute [rw] next_page_token
|
805
|
+
# @return [::String]
|
806
|
+
# A token that can be sent as `page_token` to retrieve the next page. If this
|
807
|
+
# field is omitted, there are no subsequent pages.
|
808
|
+
# @!attribute [rw] unreachable
|
809
|
+
# @return [::Array<::String>]
|
810
|
+
# Locations that could not be reached.
|
811
|
+
class ListBackupsResponse
|
812
|
+
include ::Google::Protobuf::MessageExts
|
813
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
814
|
+
end
|
815
|
+
|
816
|
+
# Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#get_backup DataprocMetastore.GetBackup}.
|
817
|
+
# @!attribute [rw] name
|
818
|
+
# @return [::String]
|
819
|
+
# Required. The relative resource name of the backup to retrieve, in the
|
820
|
+
# following form:
|
821
|
+
#
|
822
|
+
# `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
|
823
|
+
class GetBackupRequest
|
824
|
+
include ::Google::Protobuf::MessageExts
|
825
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
826
|
+
end
|
827
|
+
|
828
|
+
# Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#create_backup DataprocMetastore.CreateBackup}.
|
829
|
+
# @!attribute [rw] parent
|
830
|
+
# @return [::String]
|
831
|
+
# Required. The relative resource name of the service in which to create a backup
|
832
|
+
# of the following form:
|
833
|
+
#
|
834
|
+
# `projects/{project_number}/locations/{location_id}/services/{service_id}`.
|
835
|
+
# @!attribute [rw] backup_id
|
836
|
+
# @return [::String]
|
837
|
+
# Required. The ID of the backup, which is used as the final component of the
|
838
|
+
# backup's name.
|
839
|
+
#
|
840
|
+
# This value must be between 1 and 64 characters long, begin with a letter,
|
841
|
+
# end with a letter or number, and consist of alpha-numeric ASCII characters
|
842
|
+
# or hyphens.
|
843
|
+
# @!attribute [rw] backup
|
844
|
+
# @return [::Google::Cloud::Metastore::V1::Backup]
|
845
|
+
# Required. The backup to create. The `name` field is ignored. The ID of the created
|
846
|
+
# backup must be provided in the request's `backup_id` field.
|
847
|
+
# @!attribute [rw] request_id
|
848
|
+
# @return [::String]
|
849
|
+
# Optional. A request ID. Specify a unique request ID to allow the server to ignore the
|
850
|
+
# request if it has completed. The server will ignore subsequent requests
|
851
|
+
# that provide a duplicate request ID for at least 60 minutes after the first
|
852
|
+
# request.
|
853
|
+
#
|
854
|
+
# For example, if an initial request times out, followed by another request
|
855
|
+
# with the same request ID, the server ignores the second request to prevent
|
856
|
+
# the creation of duplicate commitments.
|
857
|
+
#
|
858
|
+
# The request ID must be a valid
|
859
|
+
# [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
|
860
|
+
# A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
|
861
|
+
class CreateBackupRequest
|
862
|
+
include ::Google::Protobuf::MessageExts
|
863
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
864
|
+
end
|
865
|
+
|
866
|
+
# Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#delete_backup DataprocMetastore.DeleteBackup}.
|
867
|
+
# @!attribute [rw] name
|
868
|
+
# @return [::String]
|
869
|
+
# Required. The relative resource name of the backup to delete, in the
|
870
|
+
# following form:
|
871
|
+
#
|
872
|
+
# `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
|
873
|
+
# @!attribute [rw] request_id
|
874
|
+
# @return [::String]
|
875
|
+
# Optional. A request ID. Specify a unique request ID to allow the server to ignore the
|
876
|
+
# request if it has completed. The server will ignore subsequent requests
|
877
|
+
# that provide a duplicate request ID for at least 60 minutes after the first
|
878
|
+
# request.
|
879
|
+
#
|
880
|
+
# For example, if an initial request times out, followed by another request
|
881
|
+
# with the same request ID, the server ignores the second request to prevent
|
882
|
+
# the creation of duplicate commitments.
|
883
|
+
#
|
884
|
+
# The request ID must be a valid
|
885
|
+
# [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
|
886
|
+
# A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
|
887
|
+
class DeleteBackupRequest
|
888
|
+
include ::Google::Protobuf::MessageExts
|
889
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
890
|
+
end
|
891
|
+
|
651
892
|
# Request message for {::Google::Cloud::Metastore::V1::DataprocMetastore::Client#export_metadata DataprocMetastore.ExportMetadata}.
|
652
893
|
# @!attribute [rw] destination_gcs_folder
|
653
894
|
# @return [::String]
|
@@ -682,6 +923,41 @@ module Google
|
|
682
923
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
683
924
|
end
|
684
925
|
|
926
|
+
# Request message for [DataprocMetastore.Restore][].
|
927
|
+
# @!attribute [rw] service
|
928
|
+
# @return [::String]
|
929
|
+
# Required. The relative resource name of the metastore service to run restore, in the
|
930
|
+
# following form:
|
931
|
+
#
|
932
|
+
# `projects/{project_id}/locations/{location_id}/services/{service_id}`.
|
933
|
+
# @!attribute [rw] backup
|
934
|
+
# @return [::String]
|
935
|
+
# Required. The relative resource name of the metastore service backup to restore
|
936
|
+
# from, in the following form:
|
937
|
+
#
|
938
|
+
# `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
|
939
|
+
# @!attribute [rw] restore_type
|
940
|
+
# @return [::Google::Cloud::Metastore::V1::Restore::RestoreType]
|
941
|
+
# Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
|
942
|
+
# @!attribute [rw] request_id
|
943
|
+
# @return [::String]
|
944
|
+
# Optional. A request ID. Specify a unique request ID to allow the server to ignore the
|
945
|
+
# request if it has completed. The server will ignore subsequent requests
|
946
|
+
# that provide a duplicate request ID for at least 60 minutes after the first
|
947
|
+
# request.
|
948
|
+
#
|
949
|
+
# For example, if an initial request times out, followed by another request
|
950
|
+
# with the same request ID, the server ignores the second request to prevent
|
951
|
+
# the creation of duplicate commitments.
|
952
|
+
#
|
953
|
+
# The request ID must be a valid
|
954
|
+
# [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
|
955
|
+
# A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
|
956
|
+
class RestoreServiceRequest
|
957
|
+
include ::Google::Protobuf::MessageExts
|
958
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
959
|
+
end
|
960
|
+
|
685
961
|
# Represents the metadata of a long-running operation.
|
686
962
|
# @!attribute [r] create_time
|
687
963
|
# @return [::Google::Protobuf::Timestamp]
|
@@ -748,6 +1024,9 @@ module Google
|
|
748
1024
|
|
749
1025
|
# Database dump is a MySQL dump file.
|
750
1026
|
MYSQL = 1
|
1027
|
+
|
1028
|
+
# Database dump contains Avro files.
|
1029
|
+
AVRO = 2
|
751
1030
|
end
|
752
1031
|
end
|
753
1032
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-metastore-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|