×

PATCH /v1/externalbackups/{externalBackup.id}

UpdateExternalBackup 修改给定的外部备份,并可以选择性地进行存储的凭据协调。

描述

参数

路径参数

名称 描述 必填 默认值 模式

externalBackup.id

null

主体参数

名称 描述 必填 默认值 模式

主体

ExternalBackupServiceUpdateExternalBackupBody

返回类型

内容类型

  • application/json

响应

表1. HTTP响应代码
代码 消息 数据类型

200

成功的响应。

StorageExternalBackup

0

意外的错误响应。

GooglerpcStatus

示例

公共对象引用

ExternalBackupServiceUpdateExternalBackupBody

字段名 必填 可为空 类型 描述 格式

externalBackup

NextAvailableTag10

updatePassword

布尔值

为false时,使用现有外部备份配置的存储凭据(根据其ID)。

GooglerpcStatus

字段名 必填 可为空 类型 描述 格式

代码

整数

int32

消息

字符串

详情

ProtobufAny列表

NextAvailableTag10

Next available tag: 10
字段名 必填 可为空 类型 描述 格式

名称

字符串

类型

字符串

计划

StorageSchedule

保留备份数

整数

int32

s3

StorageS3Config

gcs

StorageGCSConfig

s3兼容

StorageS3Compatible

包含证书

布尔值

ProtobufAny

Any包含任意序列化的协议缓冲区消息以及描述序列化消息类型的URL。

Protobuf库提供支持,以实用程序函数或Any类型的附加生成方法的形式打包/解包Any值。

示例1:在C++中打包和解包消息。

Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
  ...
}

示例2:在Java中打包和解包消息。

Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
  foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
  foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
any.Pack(foo)
...
if any.Is(Foo.DESCRIPTOR):
  any.Unpack(foo)
  ...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
  ...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
  ...
}

protobuf库提供的打包方法默认使用“type.googleapis.com/full.type.name”作为类型URL,解包方法只使用类型URL中最后一个“/”后的完全限定类型名称,例如“foo.bar.com/x/y.z”将产生类型名称“y.z”。

JSON表示

Any值的JSON表示使用反序列化、嵌入消息的常规表示,以及包含类型URL的附加字段@type。示例

package google.profile;
message Person {
  string first_name = 1;
  string last_name = 2;
}
{
  "@type": "type.googleapis.com/google.profile.Person",
  "firstName": <string>,
  "lastName": <string>
}

如果嵌入的消息类型是众所周知的并且具有自定义JSON表示,则该表示将被嵌入,添加一个字段value,该字段除了@type字段外还保存自定义JSON。示例(对于消息[google.protobuf.Duration][])

{
  "@type": "type.googleapis.com/google.protobuf.Duration",
  "value": "1.212s"
}
字段名 必填 可为空 类型 描述 格式

@type

字符串

一个 URL/资源名称,唯一标识序列化协议缓冲区消息的类型。此字符串必须包含至少一个“/”字符。URL 路径的最后一部分必须表示类型的完全限定名称(如path/google.protobuf.Duration)。名称应采用规范形式(例如,不接受前导“.”)。实际上,团队通常会预编译其在 Any 上下文中预期使用的所有类型到二进制文件中。但是,对于使用方案httphttps或无方案的 URL,可以选择设置一个类型服务器,用于将类型 URL 映射到消息定义,如下所示:* 如果未提供方案,则假定为https。* 对 URL 的 HTTP GET 必须产生二进制格式的 [google.protobuf.Type][] 值,否则会产生错误。* 应用程序允许基于 URL 缓存查找结果,或将其预编译到二进制文件中以避免任何查找。因此,需要在类型更改时保留二进制兼容性。(使用版本化的类型名称来管理重大更改。)注意:此功能当前在官方 protobuf 版本中不可用,并且不用于以 type.googleapis.com 开头的类型 URL。截至 2023 年 5 月,没有广泛使用的类型服务器实现,也没有计划实现一个。可能使用除httphttps(或空方案)之外的方案,并具有特定于实现的语义。

ScheduleDaysOfMonth

1 for 1st, 2 for 2nd .... 31 for 31st
字段名 必填 可为空 类型 描述 格式

days

integer 列表

int32

ScheduleDaysOfWeek

Sunday = 0, Monday = 1, .... Saturday =  6
字段名 必填 可为空 类型 描述 格式

days

integer 列表

int32

ScheduleIntervalType

枚举值

UNSET

DAILY

WEEKLY

MONTHLY

ScheduleWeeklyInterval

字段名 必填 可为空 类型 描述 格式

day

整数

int32

StorageExternalBackup

Next available tag: 10
字段名 必填 可为空 类型 描述 格式

id

字符串

名称

字符串

类型

字符串

计划

StorageSchedule

保留备份数

整数

int32

s3

StorageS3Config

gcs

StorageGCSConfig

s3兼容

StorageS3Compatible

包含证书

布尔值

StorageGCSConfig

字段名 必填 可为空 类型 描述 格式

bucket

字符串

serviceAccount

字符串

存储集成的服务帐户。服务器将在响应和日志中屏蔽此凭据的值。

objectPrefix

字符串

useWorkloadId

布尔值

StorageS3Compatible

StorageS3Compatible 配置与兼容 S3 的存储提供程序的备份集成。S3 兼容性适用于非 AWS 提供商。对于 AWS S3,请使用 S3Config。

字段名 必填 可为空 类型 描述 格式

bucket

字符串

accessKeyId

字符串

要使用的访问密钥 ID。服务器将在响应和日志中屏蔽此凭据的值。

secretAccessKey

字符串

要使用的密钥访问密钥。服务器将在响应和日志中屏蔽此凭据的值。

region

字符串

objectPrefix

字符串

endpoint

字符串

urlStyle

StorageS3URLStyle

S3_URL_STYLE_UNSPECIFIED, S3_URL_STYLE_VIRTUAL_HOSTED, S3_URL_STYLE_PATH,

StorageS3Config

S3Config 配置与 AWS S3 的备份集成。

字段名 必填 可为空 类型 描述 格式

bucket

字符串

useIam

布尔值

accessKeyId

字符串

存储集成的访问密钥 ID。服务器将在响应和日志中屏蔽此凭据的值。

secretAccessKey

字符串

存储集成的密钥访问密钥。服务器将在响应和日志中屏蔽此凭据的值。

region

字符串

objectPrefix

字符串

endpoint

字符串

StorageS3URLStyle

枚举值

S3_URL_STYLE_UNSPECIFIED

S3_URL_STYLE_VIRTUAL_HOSTED

S3_URL_STYLE_PATH

StorageSchedule

字段名 必填 可为空 类型 描述 格式

intervalType

ScheduleIntervalType

UNSET, DAILY, WEEKLY, MONTHLY,

hour

整数

int32

minute

整数

int32

weekly

ScheduleWeeklyInterval

daysOfWeek

ScheduleDaysOfWeek

daysOfMonth

ScheduleDaysOfMonth