Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }
GET /v1/externalbackups
GetExternalBackups 返回所有外部备份配置。
代码 (Code) | 消息 (Message) | 数据类型 (Datatype) |
---|---|---|
200 |
成功的响应。(A successful response.) |
|
0 |
意外的错误响应。(An unexpected error response.) |
字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
code |
整数 (Integer) |
int32 |
|||
message |
字符串 (String) |
||||
details |
ProtobufAny 列表 (List of ProtobufAny) |
Any
包含任意序列化的协议缓冲区消息以及描述序列化消息类型的 URL。
Protobuf 库提供支持,以实用函数或 Any 类型的附加生成方法的形式打包/解包 Any 值。
示例 1:在 C++ 中打包和解包消息。(Example 1: Pack and unpack a message in C++.)
Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }
示例 2:在 Java 中打包和解包消息。(Example 2: Pack and unpack a message in 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"。
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 表示,则该表示将被嵌入,除了 @type
字段外,还会添加一个包含自定义 JSON 的 value
字段。示例(对于消息 [google.protobuf.Duration][])
{ "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
@type |
字符串 (String) |
唯一标识序列化协议缓冲区消息类型的 URL/资源名称。此字符串必须包含至少一个“/”字符。URL 路径的最后一部分必须表示类型的全限定名称(如 |
1 for 1st, 2 for 2nd .... 31 for 31st
字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
days |
|
int32 |
Sunday = 0, Monday = 1, .... Saturday = 6
字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
days |
|
int32 |
字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
day |
整数 (Integer) |
int32 |
Next available tag: 10
字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
id |
字符串 (String) |
||||
name |
字符串 (String) |
||||
type |
字符串 (String) |
||||
schedule |
|||||
backupsToKeep |
整数 (Integer) |
int32 |
|||
s3 |
|||||
gcs |
|||||
s3compatible |
|||||
includeCertificates |
布尔值 |
字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
bucket |
字符串 (String) |
||||
serviceAccount |
字符串 (String) |
存储集成的服务帐户。服务器将在响应和日志中屏蔽此凭据的值。 |
|||
objectPrefix |
字符串 (String) |
||||
useWorkloadId |
布尔值 |
S3Compatible 为与兼容 S3 的存储提供程序的备份集成配置。S3 兼容适用于非 AWS 提供商。对于 AWS S3,请使用 S3Config。
字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
bucket |
字符串 (String) |
||||
accessKeyId |
字符串 (String) |
要使用的访问密钥 ID。服务器将在响应和日志中屏蔽此凭据的值。 |
|||
secretAccessKey |
字符串 (String) |
要使用的秘密访问密钥。服务器将在响应和日志中屏蔽此凭据的值。 |
|||
region |
字符串 (String) |
||||
objectPrefix |
字符串 (String) |
||||
endpoint |
字符串 (String) |
||||
urlStyle |
S3_URL_STYLE_UNSPECIFIED, S3_URL_STYLE_VIRTUAL_HOSTED, S3_URL_STYLE_PATH, |
S3Config 为 AWS S3 配置备份集成。
字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
bucket |
字符串 (String) |
||||
useIam |
布尔值 |
||||
accessKeyId |
字符串 (String) |
存储集成的访问密钥 ID。服务器将在响应和日志中屏蔽此凭据的值。 |
|||
secretAccessKey |
字符串 (String) |
存储集成的秘密访问密钥。服务器将在响应和日志中屏蔽此凭据的值。 |
|||
region |
字符串 (String) |
||||
objectPrefix |
字符串 (String) |
||||
endpoint |
字符串 (String) |
字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
---|---|---|---|---|---|
intervalType |
UNSET, DAILY, WEEKLY, MONTHLY, |
||||
hour |
整数 (Integer) |
int32 |
|||
minute |
整数 (Integer) |
int32 |
|||
weekly |
|||||
daysOfWeek |
|||||
daysOfMonth |