MCP Tools Reference: redis.googleapis.com

工具:create_cluster

在 Memorystore for Redis Cluster 中创建集群。

以下示例演示了如何使用 curl 调用 create_cluster MCP 工具。

Curl 请求
                  
curl --location 'https://redis.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "create_cluster",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

输入架构

CreateCluster 的请求。

CreateClusterRequest

JSON 表示法
{
  "parent": string,
  "clusterId": string,
  "cluster": {
    object (Cluster)
  },
  "requestId": string
}
字段
parent

string

必需。集群位置的资源名称,格式为 projects/{project_id}/locations/{location_id},其中 location_id 表示 Google Cloud 区域。

clusterId

string

必需。客户项目中 Redis 集群的逻辑名称,必须遵循以下限制:

  • 只能包含小写字母、数字和连字符。
  • 必须以字母开头。
  • 长度必须介于 1 到 63 个字符之间。
  • 必须以数字或字母结尾。
  • 在客户项目/位置中必须是唯一的
cluster

object (Cluster)

必需。要创建的集群。

requestId

string

可选。幂等请求 UUID。

集群

JSON 表示法
{
  "name": string,
  "createTime": string,
  "state": enum (State),
  "uid": string,
  "authorizationMode": enum (AuthorizationMode),
  "transitEncryptionMode": enum (TransitEncryptionMode),
  "pscConfigs": [
    {
      object (PscConfig)
    }
  ],
  "discoveryEndpoints": [
    {
      object (DiscoveryEndpoint)
    }
  ],
  "pscConnections": [
    {
      object (PscConnection)
    }
  ],
  "stateInfo": {
    object (StateInfo)
  },
  "nodeType": enum (NodeType),
  "persistenceConfig": {
    object (ClusterPersistenceConfig)
  },
  "redisConfigs": {
    string: string,
    ...
  },
  "zoneDistributionConfig": {
    object (ZoneDistributionConfig)
  },
  "crossClusterReplicationConfig": {
    object (CrossClusterReplicationConfig)
  },
  "pscServiceAttachments": [
    {
      object (PscServiceAttachment)
    }
  ],
  "clusterEndpoints": [
    {
      object (ClusterEndpoint)
    }
  ],
  "automatedBackupConfig": {
    object (AutomatedBackupConfig)
  },
  "encryptionInfo": {
    object (EncryptionInfo)
  },
  "availableMaintenanceVersions": [
    string
  ],
  "allowFewerZonesDeployment": boolean,
  "labels": {
    string: string,
    ...
  },
  "aclPolicy": string,

  // Union field import_sources can be only one of the following:
  "gcsSource": {
    object (GcsBackupSource)
  },
  "managedBackupSource": {
    object (ManagedBackupSource)
  }
  // End of list of possible types for union field import_sources.

  // Union field _replica_count can be only one of the following:
  "replicaCount": integer
  // End of list of possible types for union field _replica_count.

  // Union field _size_gb can be only one of the following:
  "sizeGb": integer
  // End of list of possible types for union field _size_gb.

  // Union field _shard_count can be only one of the following:
  "shardCount": integer
  // End of list of possible types for union field _shard_count.

  // Union field _precise_size_gb can be only one of the following:
  "preciseSizeGb": number
  // End of list of possible types for union field _precise_size_gb.

  // Union field _deletion_protection_enabled can be only one of the following:
  "deletionProtectionEnabled": boolean
  // End of list of possible types for union field _deletion_protection_enabled.

  // Union field _maintenance_policy can be only one of the following:
  "maintenancePolicy": {
    object (ClusterMaintenancePolicy)
  }
  // End of list of possible types for union field _maintenance_policy.

  // Union field _maintenance_schedule can be only one of the following:
  "maintenanceSchedule": {
    object (ClusterMaintenanceSchedule)
  }
  // End of list of possible types for union field _maintenance_schedule.

  // Union field _satisfies_pzs can be only one of the following:
  "satisfiesPzs": boolean
  // End of list of possible types for union field _satisfies_pzs.

  // Union field _satisfies_pzi can be only one of the following:
  "satisfiesPzi": boolean
  // End of list of possible types for union field _satisfies_pzi.

  // Union field _simulate_maintenance_event can be only one of the following:
  "simulateMaintenanceEvent": boolean
  // End of list of possible types for union field _simulate_maintenance_event.

  // Union field _backup_collection can be only one of the following:
  "backupCollection": string
  // End of list of possible types for union field _backup_collection.

  // Union field _kms_key can be only one of the following:
  "kmsKey": string
  // End of list of possible types for union field _kms_key.

  // Union field _ondemand_maintenance can be only one of the following:
  "ondemandMaintenance": boolean
  // End of list of possible types for union field _ondemand_maintenance.

  // Union field _async_cluster_endpoints_deletion_enabled can be only one of the
  // following:
  "asyncClusterEndpointsDeletionEnabled": boolean
  // End of list of possible types for union field
  // _async_cluster_endpoints_deletion_enabled.

  // Union field _maintenance_version can be only one of the following:
  "maintenanceVersion": string
  // End of list of possible types for union field _maintenance_version.

  // Union field _effective_maintenance_version can be only one of the following:
  "effectiveMaintenanceVersion": string
  // End of list of possible types for union field
  // _effective_maintenance_version.

  // Union field _server_ca_mode can be only one of the following:
  "serverCaMode": enum (ServerCaMode)
  // End of list of possible types for union field _server_ca_mode.

  // Union field _server_ca_pool can be only one of the following:
  "serverCaPool": string
  // End of list of possible types for union field _server_ca_pool.

  // Union field _rotate_server_certificate can be only one of the following:
  "rotateServerCertificate": boolean
  // End of list of possible types for union field _rotate_server_certificate.

  // Union field _acl_policy_in_sync can be only one of the following:
  "aclPolicyInSync": boolean
  // End of list of possible types for union field _acl_policy_in_sync.
}
字段
name

string

必需。标识符。此范围内资源采用以下形式的非重复名称,包括项目和位置:projects/{project_id}/locations/{location_id}/clusters/{cluster_id}

createTime

string (Timestamp format)

仅限输出。与集群创建请求相关联的时间戳。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

state

enum (State)

仅限输出。相应集群的当前状态。可以是 CREATING、READY、UPDATING、DELETING 和 SUSPENDED

uid

string

仅限输出。系统为集群分配的唯一标识符。

authorizationMode

enum (AuthorizationMode)

可选。Redis 集群的授权模式。如果未提供,则为集群停用身份验证功能。

transitEncryptionMode

enum (TransitEncryptionMode)

可选。Redis 集群的传输加密。如果未提供,则系统会为集群停用加密功能。

pscConfigs[]

object (PscConfig)

可选。每个 PscConfig 都会配置使用方网络,其中 IP 将指定给集群,以便通过 Private Service Connect 自动化功能进行客户端访问。目前,仅支持一个 PscConfig。

discoveryEndpoints[]

object (DiscoveryEndpoint)

仅限输出。在每个指定网络上创建的端点,供 Redis 客户端连接到集群。目前仅支持一个发现端点。

pscConnections[]

object (PscConnection)

仅限输出。通过服务连接自动化自动创建的 PSC 连接的列表。

stateInfo

object (StateInfo)

仅限输出。有关集群当前状态的其他信息。

nodeType

enum (NodeType)

可选。集群中 Redis 节点的类型。NodeType 决定了 Redis 节点的底层机器类型。

persistenceConfig

object (ClusterPersistenceConfig)

可选。集群的持久性配置(RDB、AOF)。

redisConfigs

map (key: string, value: string)

可选。可变 Redis 配置的客户替换项的键值对

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

zoneDistributionConfig

object (ZoneDistributionConfig)

可选。此配置将用于确定客户希望我们在区域内如何分配集群资源。

crossClusterReplicationConfig

object (CrossClusterReplicationConfig)

可选。跨集群复制配置。

pscServiceAttachments[]

object (PscServiceAttachment)

仅限输出。用于配置 PSC 连接的服务连接详情

clusterEndpoints[]

object (ClusterEndpoint)

可选。集群端点的列表。

automatedBackupConfig

object (AutomatedBackupConfig)

可选。集群的自动备份配置。

encryptionInfo

object (EncryptionInfo)

仅限输出。集群静态数据的加密信息。

availableMaintenanceVersions[]

string

仅限输出。此字段用于确定自助更新可用的维护版本。

allowFewerZonesDeployment
(deprecated)

boolean

可选。不可变。已弃用,请勿使用。

labels

map (key: string, value: string)

可选。用于表示用户提供的元数据的标签。

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

aclPolicy

string

可选。要应用于集群的 ACL 政策。

联合字段 import_sources。要从中导入的来源。import_sources 只能是下列其中一项:
gcsSource

object (GcsBackupSource)

可选。存储在 Cloud Storage 存储分区中的备份。Cloud Storage 存储分区需要与集群位于同一区域。需要读取权限才能从提供的 Cloud Storage 对象导入数据。

managedBackupSource

object (ManagedBackupSource)

可选。由 Memorystore 服务生成和管理的备份。

联合字段 _replica_count

_replica_count 只能是下列其中一项:

replicaCount

integer

可选。每个分片的副本节点数。

联合字段 _size_gb

_size_gb 只能是下列其中一项:

sizeGb

integer

仅限输出。整个集群的 Redis 内存大小(以 GB 为单位),向上舍入为下一个整数。

联合字段 _shard_count

_shard_count 只能是下列其中一项:

shardCount

integer

可选。Redis 集群的分片数。

联合字段 _precise_size_gb

_precise_size_gb 只能是下列其中一项:

preciseSizeGb

number

仅限输出。整个集群的 Redis 内存大小(以 GB 为单位)的精确值。

联合字段 _deletion_protection_enabled

_deletion_protection_enabled 只能是下列其中一项:

deletionProtectionEnabled

boolean

可选。当该值设置为 true 时,删除操作将失败。

联合字段 _maintenance_policy

_maintenance_policy 只能是下列其中一项:

maintenancePolicy

object (ClusterMaintenancePolicy)

可选。ClusterMaintenancePolicy 决定了何时允许或拒绝更新。

联合字段 _maintenance_schedule

_maintenance_schedule 只能是下列其中一项:

maintenanceSchedule

object (ClusterMaintenanceSchedule)

仅限输出。ClusterMaintenanceSchedule 仅限输出已发布的维护时间表。

联合字段 _satisfies_pzs

_satisfies_pzs 只能是下列其中一项:

satisfiesPzs

boolean

可选。仅限输出。留待将来使用。

联合字段 _satisfies_pzi

_satisfies_pzi 只能是下列其中一项:

satisfiesPzi

boolean

可选。仅限输出。留待将来使用。

联合字段 _simulate_maintenance_event

_simulate_maintenance_event 只能是下列其中一项:

simulateMaintenanceEvent

boolean

可选。仅限输入。模拟维护事件。

联合字段 _backup_collection

_backup_collection 只能是下列其中一项:

backupCollection

string

可选。仅限输出。备份集合的完整资源名称。示例:projects/{project}/locations/{location}/backupCollections/{collection}

联合字段 _kms_key

_kms_key 只能是下列其中一项:

kmsKey

string

可选。用于加密集群静态数据的 KMS 密钥。

联合字段 _ondemand_maintenance

_ondemand_maintenance 只能是下列其中一项:

ondemandMaintenance
(deprecated)

boolean

可选。仅限输入。集群的按需维护。此字段可用于触发集群上的按需关键更新。

联合字段 _async_cluster_endpoints_deletion_enabled

_async_cluster_endpoints_deletion_enabled 只能是下列其中一项:

asyncClusterEndpointsDeletionEnabled

boolean

可选。如果为 true,则客户创建和注册的集群端点可以异步删除。也就是说,可以在删除集群端点中的转发规则之前,先取消注册此类集群端点。

联合字段 _maintenance_version

_maintenance_version 只能是下列其中一项:

maintenanceVersion

string

可选。此字段可用于触发自助更新,以指示所需的维护版本。此字段的输入可由 available_maintenance_versions 字段确定。

联合字段 _effective_maintenance_version

_effective_maintenance_version 只能是下列其中一项:

effectiveMaintenanceVersion

string

仅限输出。此字段表示集群的实际维护版本。

联合字段 _server_ca_mode

_server_ca_mode 只能是下列其中一项:

serverCaMode

enum (ServerCaMode)

可选。集群的服务器 CA 模式。

联合字段 _server_ca_pool

_server_ca_pool 只能是下列其中一项:

serverCaPool

string

可选。集群的客户管理的 CA 池。仅适用于 BYOCA,即当 server_ca_mode 为 SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA 时。格式:“projects/{project}/locations/区域/caPools/{ca_pool}”。

联合字段 _rotate_server_certificate

_rotate_server_certificate 只能是下列其中一项:

rotateServerCertificate

boolean

可选。仅限输入。轮替服务器证书。

联合字段 _acl_policy_in_sync

_acl_policy_in_sync 只能是下列其中一项:

aclPolicyInSync

boolean

可选。仅限输出。指示应用于集群的 ACL 规则是否与最新的 ACL 政策规则同步。仅当为集群设置了 ACL 政策时,此字段才适用。

GcsBackupSource

JSON 表示法
{
  "uris": [
    string
  ]
}
字段
uris[]

string

可选。要导入的 Cloud Storage 对象的 URI。示例:gs://bucket1/object1、gs://bucket2/folder2/object2

ManagedBackupSource

JSON 表示法
{
  "backup": string
}
字段
backup

string

可选。示例://redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} 系统还支持较短版本的备份名称(不带前缀),例如 projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} 在这种情况下,系统会假定备份位于 redis.googleapis.com 下。

时间戳

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
字段
seconds

string (int64 format)

表示世界协调时间 (UTC) 的秒数(从 Unix 纪元 1970-01-01T00:00:00Z 开始算起)。必须介于 -62135596800 到 253402300799 之间(含边界值),对应于 0001-01-01T00:00:00Z 到 9999-12-31T23:59:59Z。

nanos

integer

秒数的非负小数部分(以纳秒为单位)。此字段是时长的纳秒部分,而不是秒的替代项。对于含小数部分的负秒数,仍必须包含按时间递升的非负纳秒值。必须在 0 到 999,999,999 之间(含边界值)。

PscConfig

JSON 表示法
{
  "network": string
}
字段
network

string

必需。将预留发现端点 IP 地址的网络,格式为 projects/{network_project}/global/networks/{network_id}。

DiscoveryEndpoint

JSON 表示法
{
  "address": string,
  "port": integer,
  "pscConfig": {
    object (PscConfig)
  }
}
字段
address

string

仅限输出。客户端用于连接到服务的公开 Redis 端点的地址。该地址可以是 IP 地址,也可以是主机名。

port

integer

仅限输出。公开 Redis 端点的端口号。

pscConfig

object (PscConfig)

仅限输出。客户配置,用于指定端点的创建位置和访问位置。

PscConnection

JSON 表示法
{
  "pscConnectionId": string,
  "address": string,
  "forwardingRule": string,
  "projectId": string,
  "network": string,
  "serviceAttachment": string,
  "pscConnectionStatus": enum (PscConnectionStatus),
  "connectionType": enum (ConnectionType),

  // Union field ports can be only one of the following:
  "port": integer
  // End of list of possible types for union field ports.
}
字段
pscConnectionId

string

必需。连接到服务连接的转发规则的 PSC 连接 ID。

address

string

必需。为 PSC 转发规则分配的使用方网络中的 IP。

forwardingRule

string

必需。使用方转发规则的 URI。示例:projects/{projectNumOrId}/区域/us-east1/forwardingRules/{resourceId}。

projectId

string

可选。创建转发规则的使用方项目的项目 ID。

network

string

必需。IP 地址所在的消费方网络,格式为 projects/{project_id}/global/networks/{network_id}。

serviceAttachment

string

必需。作为 PSC 连接的目标的服务连接,采用 projects/{project-id}/区域/区域/serviceAttachments/{service-attachment-id} 格式。

pscConnectionStatus

enum (PscConnectionStatus)

仅限输出。PSC 连接的状态。请注意,此值会定期更新。如需了解 PSC 连接的最新状态,请访问 https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details

connectionType

enum (ConnectionType)

仅限输出。PSC 连接的类型。

联合字段 ports。公开的发现端点的端口号。ports 只能是下列其中一项:
port

integer

仅限输出。端口仅会针对主/读取器或发现端点进行设置。

StateInfo

JSON 表示法
{

  // Union field info can be only one of the following:
  "updateInfo": {
    object (UpdateInfo)
  }
  // End of list of possible types for union field info.
}
字段

联合字段 info

info 只能是下列其中一项:

updateInfo

object (UpdateInfo)

当集群状态为 UPDATING 时,描述集群上正在进行的更新。

UpdateInfo

JSON 表示法
{

  // Union field _target_shard_count can be only one of the following:
  "targetShardCount": integer
  // End of list of possible types for union field _target_shard_count.

  // Union field _target_replica_count can be only one of the following:
  "targetReplicaCount": integer
  // End of list of possible types for union field _target_replica_count.

  // Union field _target_node_type can be only one of the following:
  "targetNodeType": enum (NodeType)
  // End of list of possible types for union field _target_node_type.
}
字段

联合字段 _target_shard_count

_target_shard_count 只能是下列其中一项:

targetShardCount

integer

Redis 集群的目标分片数

联合字段 _target_replica_count

_target_replica_count 只能是下列其中一项:

targetReplicaCount

integer

每个分片的副本节点的目标数量。

联合字段 _target_node_type

_target_node_type 只能是下列其中一项:

targetNodeType

enum (NodeType)

Redis 集群的目标节点类型。

ClusterPersistenceConfig

JSON 表示法
{
  "mode": enum (PersistenceMode),
  "rdbConfig": {
    object (RDBConfig)
  },
  "aofConfig": {
    object (AOFConfig)
  }
}
字段
mode

enum (PersistenceMode)

可选。持久性模式。

rdbConfig

object (RDBConfig)

可选。RDB 配置。如果模式不是 RDB,系统会忽略此字段。

aofConfig

object (AOFConfig)

可选。AOF 配置。如果模式不是 AOF,系统会忽略此字段。

RDBConfig

JSON 表示法
{
  "rdbSnapshotPeriod": enum (SnapshotPeriod),
  "rdbSnapshotStartTime": string
}
字段
rdbSnapshotPeriod

enum (SnapshotPeriod)

可选。RDB 快照之间的间隔时长。

rdbSnapshotStartTime

string (Timestamp format)

可选。首次尝试拍摄快照的时间,以及未来快照将对齐的时间。如果未提供,则使用当前时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

AOFConfig

JSON 表示法
{
  "appendFsync": enum (AppendFsync)
}
字段
appendFsync

enum (AppendFsync)

可选。fsync 配置。

RedisConfigsEntry

JSON 表示法
{
  "key": string,
  "value": string
}
字段
key

string

value

string

ZoneDistributionConfig

JSON 表示法
{
  "mode": enum (ZoneDistributionMode),
  "zone": string
}
字段
mode

enum (ZoneDistributionMode)

可选。可用区分布模式。如果未指定,则默认为 MULTI_ZONE。

zone

string

可选。选择“单可用区”分布后,系统会使用可用区字段在该可用区中分配所有资源。这不适用于 MULTI_ZONE,对于 MULTI_ZONE 集群,系统会忽略此字段。

CrossClusterReplicationConfig

JSON 表示法
{
  "clusterRole": enum (ClusterRole),
  "primaryCluster": {
    object (RemoteCluster)
  },
  "secondaryClusters": [
    {
      object (RemoteCluster)
    }
  ],
  "updateTime": string,
  "membership": {
    object (Membership)
  }
}
字段
clusterRole

enum (ClusterRole)

仅限输出。集群在跨集群复制中的角色。

primaryCluster

object (RemoteCluster)

用作相应次要集群的复制源的主要集群的详细信息。

此字段仅针对辅助集群设置。

secondaryClusters[]

object (RemoteCluster)

正在从此主要集群复制数据的次要集群的列表。

此字段仅针对主集群设置。

updateTime

string (Timestamp format)

仅限输出。上次更新跨集群复制配置的时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

membership

object (Membership)

仅限输出。仅显示参与跨集群复制的所有成员集群的输出视图。每个成员集群(无论其集群角色是主集群还是次要集群)都会提供此视图。

主集群可以提供有关从其复制数据的所有次要集群的信息。不过,次要集群只知道它正在复制的主集群。不过,在主集群不可用的情况下(例如区域性服务中断),可以将 GetCluster 请求发送到任何其他成员集群,并且此字段将列出参与跨集群复制的所有成员集群。

RemoteCluster

JSON 表示法
{
  "cluster": string,
  "uid": string
}
字段
cluster

string

仅限输出。远程集群的完整资源路径,格式为:projects//locations//clusters/

uid

string

仅限输出。远程集群的唯一标识符。

成员

JSON 表示法
{
  "primaryCluster": {
    object (RemoteCluster)
  },
  "secondaryClusters": [
    {
      object (RemoteCluster)
    }
  ]
}
字段
primaryCluster

object (RemoteCluster)

仅限输出。充当次要集群复制源的主要集群。

secondaryClusters[]

object (RemoteCluster)

仅限输出。从主集群复制数据的次要集群的列表。

ClusterMaintenancePolicy

JSON 表示法
{
  "createTime": string,
  "updateTime": string,
  "weeklyMaintenanceWindow": [
    {
      object (ClusterWeeklyMaintenanceWindow)
    }
  ]
}
字段
createTime

string (Timestamp format)

仅限输出。政策(即维护窗口或拒绝期)的创建时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

updateTime

string (Timestamp format)

仅限输出。政策(即维护窗口或拒绝期)的更新时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

weeklyMaintenanceWindow[]

object (ClusterWeeklyMaintenanceWindow)

可选。应用于相应政策所涵盖资源的维护窗口。最小值为 1。对于当前版本,weekly_maintenance_window 的最大数量应为 1。

ClusterWeeklyMaintenanceWindow

JSON 表示法
{
  "day": enum (google.type.DayOfWeek),
  "startTime": {
    object (TimeOfDay)
  }
}
字段
day

enum (google.type.DayOfWeek)

可选。允许定义在每周指定日期运行的时间表。

startTime

object (TimeOfDay)

可选。时间段的开始时间(以世界协调时间 [UTC] 表示)。

TimeOfDay

JSON 表示法
{
  "hours": integer,
  "minutes": integer,
  "seconds": integer,
  "nanos": integer
}
字段
hours

integer

一天中的小时(采用 24 小时制)。必须大于或等于 0,且通常必须小于或等于 23。对于业务结束时间等场景,API 可以选择允许“24:00:00”一值。

minutes

integer

一小时中的分钟数。必须大于或等于 0,且小于或等于 59。

seconds

integer

一分钟中的秒数。必须大于或等于 0,通常必须小于或等于 59。如果 API 允许闰秒,则 API 可以允许 60 一值。

nanos

integer

秒数的小数部分(以纳秒为单位)。必须大于或等于 0,且小于或等于 999,999,999。

ClusterMaintenanceSchedule

JSON 表示法
{
  "startTime": string,
  "endTime": string
}
字段
startTime

string (Timestamp format)

仅限输出。此实例的任何近期维护的开始时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

endTime

string (Timestamp format)

仅限输出。此实例的任何近期维护的结束时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

PscServiceAttachment

JSON 表示法
{
  "serviceAttachment": string,
  "connectionType": enum (ConnectionType)
}
字段
serviceAttachment

string

仅限输出。您自行创建的 PscConnection 应使用的服务连接 URI 作为目标

connectionType

enum (ConnectionType)

仅限输出。指向相应服务连接的 PSC 连接的类型。

ClusterEndpoint

JSON 表示法
{
  "connections": [
    {
      object (ConnectionDetail)
    }
  ]
}
字段
connections[]

object (ConnectionDetail)

必需。一组 PSC 连接。它们是在同一 VPC 网络中创建的,集群中的每个服务连接对应一个。

ConnectionDetail

JSON 表示法
{

  // Union field connection can be only one of the following:
  "pscAutoConnection": {
    object (PscAutoConnection)
  },
  "pscConnection": {
    object (PscConnection)
  }
  // End of list of possible types for union field connection.
}
字段
联合字段 connection。与集群的 PSC 连接可以在集群创建期间通过服务连接自动化功能(自动注册的连接)创建,也可以由客户自行创建(用户注册的连接)。connection 只能是下列其中一项:
pscAutoConnection

object (PscAutoConnection)

通过服务连接自动化功能创建的 PSC 连接的详细信息。

pscConnection

object (PscConnection)

由集群所有者客户创建的 PSC 连接的详细信息。

PscAutoConnection

JSON 表示法
{
  "pscConnectionId": string,
  "address": string,
  "forwardingRule": string,
  "projectId": string,
  "network": string,
  "serviceAttachment": string,
  "pscConnectionStatus": enum (PscConnectionStatus),
  "connectionType": enum (ConnectionType)
}
字段
pscConnectionId

string

仅限输出。连接到服务连接的转发规则的 PSC 连接 ID。

address

string

仅限输出。为 PSC 转发规则分配的使用方网络中的 IP。

forwardingRule

string

仅限输出。使用方转发规则的 URI。示例:projects/{projectNumOrId}/区域/us-east1/forwardingRules/{resourceId}。

projectId

string

必需。创建转发规则的使用方项目 ID。

network

string

必需。IP 地址所在的消费方网络,格式为 projects/{project_id}/global/networks/{network_id}。

serviceAttachment

string

仅限输出。作为 PSC 连接的目标的服务连接,采用 projects/{project-id}/区域/区域/serviceAttachments/{service-attachment-id} 格式。

pscConnectionStatus

enum (PscConnectionStatus)

仅限输出。PSC 连接的状态。请注意,此值会定期更新。请使用 Private Service Connect API 获取最新状态。

connectionType

enum (ConnectionType)

仅限输出。PSC 连接的类型。

AutomatedBackupConfig

JSON 表示法
{
  "automatedBackupMode": enum (AutomatedBackupMode),

  // Union field schedule can be only one of the following:
  "fixedFrequencySchedule": {
    object (FixedFrequencySchedule)
  }
  // End of list of possible types for union field schedule.

  // Union field _retention can be only one of the following:
  "retention": string
  // End of list of possible types for union field _retention.
}
字段
automatedBackupMode

enum (AutomatedBackupMode)

可选。自动备份模式。如果该模式处于停用状态,系统会忽略其他字段。

联合字段 schedule。自动备份的时间表。schedule 只能是下列其中一项:
fixedFrequencySchedule

object (FixedFrequencySchedule)

可选。以固定频率触发自动备份。

联合字段 _retention

_retention 只能是下列其中一项:

retention

string (Duration format)

可选。自动备份在被删除之前的保留时长。该值应介于 1 天到 365 天之间。如果未指定,则默认值为 35 天。

该时长以秒为单位,最多包含九个小数位,以“s”结尾。示例:"3.5s"

FixedFrequencySchedule

JSON 表示法
{

  // Union field _start_time can be only one of the following:
  "startTime": {
    object (TimeOfDay)
  }
  // End of list of possible types for union field _start_time.
}
字段

联合字段 _start_time

_start_time 只能是下列其中一项:

startTime

object (TimeOfDay)

必需。每次自动备份的开始时间(以世界协调时间 [UTC] 表示)。必须设置为某个小时的开始时间。此字段是必填字段。

时长

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
字段
seconds

string (int64 format)

时间段的带符号秒数。必须介于 -315,576,000,000 到 +315,576,000,000 之间(含边界值)。注意:这些界限的计算依据是:60 秒/分钟 * 60 分钟/小时 * 24 小时/天 * 365.25 天/年 * 10000 年

nanos

integer

时间跨度的有符号秒数小数部分(以纳秒为单位)。小于 1 秒的时长用 0 seconds 字段和正或负 nanos 字段表示。对于时长为 1 秒或更长时间的情况,nanos 字段的非零值必须与 seconds 字段的符号相同。必须介于 -999,999,999 到 +999,999,999 之间(含边界值)。

EncryptionInfo

JSON 表示法
{
  "encryptionType": enum (Type),
  "kmsKeyVersions": [
    string
  ],
  "kmsKeyPrimaryState": enum (KmsKeyState),
  "lastUpdateTime": string
}
字段
encryptionType

enum (Type)

仅限输出。加密类型。

kmsKeyVersions[]

string

仅限输出。用于保护静态数据的 KMS 密钥版本。

kmsKeyPrimaryState

enum (KmsKeyState)

仅限输出。系统感知到的 KMS 密钥主要版本状态。此字段不会填充在备份中。

lastUpdateTime

string (Timestamp format)

仅限输出。加密信息最近一次更新的时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

LabelsEntry

JSON 表示法
{
  "key": string,
  "value": string
}
字段
key

string

value

string

输出架构

此资源表示由网络 API 调用引发的长时间运行的操作。

操作

JSON 表示法
{
  "name": string,
  "metadata": {
    "@type": string,
    field1: ...,
    ...
  },
  "done": boolean,

  // Union field result can be only one of the following:
  "error": {
    object (Status)
  },
  "response": {
    "@type": string,
    field1: ...,
    ...
  }
  // End of list of possible types for union field result.
}
字段
name

string

由服务器分配的名称,该名称仅在最初返回它的那项服务中是唯一的。如果您使用默认 HTTP 映射,则 name 应是以 operations/{unique_id} 结尾的资源名称。

metadata

object

{

createTime:操作的创建时间。

endTime:操作完成运行的时间。

target:由服务器定义的操作目标的资源路径。

verb:操作执行的谓词的名称。

statusDetail:人类可读的操作状态(如果有)。

cancelRequested:标识用户是否已请求取消操作。已成功取消的操作具有 Operation.error 值,且 google.rpc.Status.code 为 1(对应于 Code.CANCELLED)。

apiVersion:用于启动操作的 API 版本。

}

此对象可以包含任意类型的字段。附加字段 "@type" 包含用于标示相应类型的 URI。示例:{ "id": 1234, "@type": "types.example.com/standard/id" }

done

boolean

如果值为 false,则表示操作仍在进行中。如果为 true,则表示操作已完成,其结果不是 error 就是 response

联合字段 result。操作结果,可以是 error,也可以是有效的 response。如果 done == false,则既不会设置 error,也不会设置 response。如果 done == true,则只能设置 errorresponse 中的一项。部分服务可能不会提供结果。result 只能是下列其中一项:
error

object (Status)

操作失败或被取消时表示有错误发生的结果。

response

object

操作的常规成功响应。如果原始方法在成功时不返回任何数据(如 Delete),则响应为 google.protobuf.Empty。如果原始方法为标准 Get/Create/Update 方法,则响应应该为资源。对于其他方法,响应类型应为 XxxResponse,其中 Xxx 是原始方法的名称。例如,如果原始方法名称为 TakeSnapshot(),则推断的响应类型为 TakeSnapshotResponse

此对象可以包含任意类型的字段。附加字段 "@type" 包含用于标示相应类型的 URI。示例:{ "id": 1234, "@type": "types.example.com/standard/id" }

不限

JSON 表示法
{
  "typeUrl": string,
  "value": string
}
字段
typeUrl

string

通过 URI 引用(包含以斜杠结尾的前缀和完全限定的类型名称)来标识序列化 Protobuf 消息的类型。

示例:type.googleapis.com/google.protobuf.StringValue

此字符串必须包含至少一个 / 字符,并且最后一个 / 之后的内容必须是规范形式的完全限定名,不含前导点。请勿在这些 URI 引用中写入方案,以免客户端尝试联系它们。

前缀是任意的,Protobuf 实现应仅剥离最后一个 / 之前(包括最后一个 /)的所有内容,以标识类型。type.googleapis.com/ 是某些旧版实现所需的常见默认前缀。此前缀并不表示类型的来源,包含该前缀的 URI 不应响应任何请求。

所有类型网址字符串都必须是合法的 URI 引用,并且(对于文本格式)还必须满足以下额外限制:引用的内容只能包含字母数字字符、百分号编码的转义字符以及以下集合中的字符(不包括外侧的反引号):/-.~_!$&()*+,;=。尽管我们允许使用百分比编码,但实现不应将其转义,以免与现有解析器混淆。例如,应拒绝 type.googleapis.com%2FFoo

Any 的原始设计中,曾考虑过在这些类型网址上启动类型解析服务的可能性,但 Protobuf 从未实现过此类服务,并且认为联系这些网址存在问题,可能会导致安全问题。不尝试联系人类型网址。

value

string (bytes format)

包含由 type_url 描述的类型的 Protobuf 序列化。

使用 base64 编码的字符串。

状态

JSON 表示法
{
  "code": integer,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
字段
code

integer

状态代码,应为 google.rpc.Code 的枚举值。

message

string

面向开发者的错误消息(应采用英语)。任何向用户显示的错误消息都应进行本地化并通过 google.rpc.Status.details 字段发送,或者由客户端进行本地化。

details[]

object

包含错误详细信息的消息列表。有一组通用的消息类型可供 API 使用。

可以包含任意类型字段的对象。附加字段 "@type" 包含用于标示相应类型的 URI。示例:{ "id": 1234, "@type": "types.example.com/standard/id" }

工具注释

破坏性提示:❌ | 等幂性提示:❌ | 只读提示:❌ | 开放世界提示:❌