Method: projects.locations.instances.list

列出位于给定位置的实例。

HTTP 请求

GET https://memcache.googleapis.com/v1beta2/{parent=projects/*/locations/*}/instances

网址采用 gRPC 转码语法。

路径参数

参数
parent

string

必需。实例位置的资源名称,格式为 projects/{projectId}/locations/{locationId},其中 locationId 表示 GCP 区域

查询参数

参数
pageSize

integer

要返回的最大项目数。

如果未指定,则服务将使用默认值 1000。无论 pageSize 值是多少,响应都可能包含部分列表,调用方应仅依赖于响应的 nextPageToken 来确定是否还有更多实例需要查询。

pageToken

string

从上一个 List 请求返回的 nextPageToken 值(如果有)。

filter

string

列出过滤条件。例如,通过指定 "name != my-instance" 排除名称为 my-instance 的所有 Memcached 实例。

orderBy

string

对结果排序。受支持的值包括 "name"、"name desc" 或 ""(未排序)。

请求正文

请求正文必须为空。

响应正文

instances.list 的响应。

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "resources": [
    {
      object (Instance)
    }
  ],
  "nextPageToken": string,
  "unreachable": [
    string
  ]
}
字段
resources[]

object (Instance)

项目中指定位置或所有位置的 Memcached 实例列表。

如果请求的父字段中的 locationId 为“-”,则查询项目可用的所有区域,并汇总结果。

nextPageToken

string

用于检索下一页结果的令牌。如果列表中没有更多结果,则为空。

unreachable[]

string

无法到达的位置。

授权范围

需要以下 OAuth 范围:

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

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