Method: projects.locations.services.exportMetadata

从服务导出元数据。

HTTP 请求

POST https://metastore.googleapis.com/v1/{service}:exportMetadata

路径参数

参数
service

string

必需。要运行导出的 Metastore 服务的相对资源名称,格式如下:

projects/{projectId}/locations/{locationId}/services/{serviceId}

必须对指定的资源 service 具有以下 IAM 权限才能进行授权:

  • metastore.services.export

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{
  "requestId": string,
  "databaseDumpType": enum (Type),

  // Union field destination can be only one of the following:
  "destinationGcsFolder": string
  // End of list of possible types for union field destination.
}
字段
requestId

string

可选。请求 ID。您可以指定一个唯一的请求 ID,以允许服务器在请求完成后忽略该请求。在第一次请求后的至少 60 分钟内,服务器会忽略提供重复请求 ID 的后续请求。

例如,如果初始请求超时,紧随其后又发出了一个具有相同请求 ID 的请求,服务器会忽略第二个请求,以防止创建重复的提交。

请求 ID 必须是有效的 UUID。不支持全部由零组成的 UUID(即 00000000-0000-0000-0000-000000000000)。

databaseDumpType

enum (Type)

可选。数据库转储的类型。如果未指定,则默认为 MYSQL

联合字段 destination。必需。元数据的导出目标位置。destination 只能是下列其中一项:
destinationGcsFolder

string

文件夹的 Cloud Storage URI,格式为 gs://<bucket_name>/<path_inside_bucket>。系统会在该文件夹下创建一个包含导出文件的子文件夹 <export_folder>

响应正文

如果成功,则响应正文包含一个 Operation 实例。

授权范围

需要以下 OAuth 范围:

  • https://www.googleapis.com/auth/cloud-platform

如需了解详情,请参阅身份验证概览