列出云的集群
GET /accounts/{account_id}/topology/v1/clouds/{cloud_id}/clusters
返回集合中所有匹配资源的 JSON 数组。如果在请求中指定了单个字段,则项目 JSON 数组将包含按指定顺序为每个匹配资源请求的字段。
参数
| 名称 | Type | 在 | Required | Description |
|---|---|---|---|---|
account_id |
string |
path |
True |
包含帐户资源的 ID
|
cloud_id |
string |
path |
True |
包含的云资源的 ID |
包括 |
string |
查询 |
False |
指示列出集合时应返回哪些字段。 URL 示例:"include=id"、"include=id,name" OpenAPI 示例:"id"
|
limit |
string |
查询 |
False |
指示列出集合时要返回的最大资源数。 URL 示例:"limit=2" OpenAPI 示例:"2" |
筛选器 |
string |
查询 |
False |
指示在列出集合时应匹配哪些字段以返回资源。 支持的运算符有:
URL 示例:"filter=field%20eq%20%27value%27" OpenAPI 示例:"field eq 'value'" |
响应
Status: 200, Returns a JSON array of all matching resources in the collection. If individual fields are specified in the request, the items JSON array will contain the fields requested for each matching resource in the order specified.
| 名称 | Type | Required | Description |
|---|---|---|---|
个项 |
数组[任意以下之一:"cluster_1.7_get_response_body",数组[]] |
True |
|
元数据 |
True |
响应示例
{
"type": "application/astra-clusters",
"version": "1.7",
"items": [
[
"0f284377-e5dc-4dcd-bacd-3197f2b8a347",
"GKE-21",
"managed"
],
[
"04dc80fa-d1d8-4850-a49f-3b70d0ec1369",
"GKE-22",
"unmanaged"
]
],
"metadata": {
"labels": [],
"creationTimestamp": "2022-10-06T20:58:16.305662Z",
"modificationTimestamp": "2022-10-06T20:58:16.305662Z",
"createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
}
}
响应
Status: 401, Unauthorized
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
响应示例
{
"type": "https://astra.netapp.io/problems/3",
"title": "Missing bearer token",
"detail": "The request is missing the required bearer token.",
"status": "401"
}
响应
Status: 400, Bad request
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
|
invalidParams |
数组["invalidParams"] |
False |
无效查询参数列表 |
响应示例
{
"type": "https://astra.netapp.io/problems/5",
"title": "Invalid query parameters",
"detail": "The supplied query parameters are invalid.",
"status": "400"
}
响应
Status: 403, Forbidden
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
响应示例
{
"type": "https://astra.netapp.io/problems/11",
"title": "Operation not permitted",
"detail": "The requested operation isn't permitted.",
"status": "403"
}
错误
Status: 404, Not found
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
错误响应示例
{
"type": "https://astra.netapp.io/problems/2",
"title": "Collection not found",
"detail": "The collection specified in the request URI wasn't found.",
"status": "404"
}
定义
查看定义
additionalDetails
type_astra_stateDetail
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
additionalDetails |
False |
类型 Astra 标签
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
|
value |
string |
True |
type_astra_metadata_update
与资源关联的客户端和服务指定的元数据。定义的值为:
-
符合 Astra 元数据架构如果在创建时未指定,则将创建没有标签的元数据对象。如果在更新时未指定,则元数据对象的标签、creationTimestamp 和 createdBy 将保留而不进行修改。
| 名称 | Type | Required | Description |
|---|---|---|---|
labels |
数组["类型 Astra 标签"] |
False |
|
creationTimestamp |
string |
False |
|
modificationTimestamp |
string |
False |
|
已创建 |
string |
False |
|
modifiedBy |
string |
False |
cluster_1.7_get_response_body
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
资源的媒体类型。定义的值为:
|
version |
string |
True |
资源的版本。定义的值为:
|
id |
string |
True |
资源的全局唯一标识符。定义的值为:
|
name |
string |
True |
包含集群名称的 JSON 字符串。如果未指定,则将使用集群的 Kubernetes 名称。定义的值为:
|
状态 |
string |
True |
包含指示集群操作状态的值的 JSON 字符串。定义的值为:
|
stateUnready |
数组[string] |
True |
JSON 字符串的 JSON 数组,每个数组指示集群无法转换到"running"状态的原因,当处于"running"状态时出现问题的原因,或者它已转换到"failed"或"removed"状态的原因。定义的值为:
|
managedState |
string |
True |
包含指示群集管理状态的值的 JSON 字符串。定义的值为:
|
managedStateDetails |
False |
JSON 对象的 JSON 数组,其中列出有关当前状态的其他详细信息,包括达到当前状态的原因。如果没有可用的详细信息,则此数组将为空。定义的值为:
|
|
protectionState |
string |
True |
包含指示群集保护状态的值的 JSON 字符串。定义的值为:
|
protectionStateDetails |
True |
JSON 对象的 JSON 数组,其中列出有关当前保护状态的其他详细信息,包括达到当前状态的原因。如果没有可用的详细信息,此数组将为空。定义的值为:
|
|
restoreTargetSupported |
string |
False |
包含一个值的 JSON 字符串,该值指示集群能够成为应用程序数据管理操作的 target。定义的值为:
|
snapshotSupported |
string |
False |
包含指示集群执行类似应用程序数据管理备份操作的能力的值的 JSON 字符串。定义的值为:
|
managedStateUnready |
数组[string] |
True |
JSON 字符串的 JSON 数组,每个数组指示集群不符合管理资格的原因,或者集群被管理但在管理集群时遇到非致命错误。定义的值是:
|
managedTimestamp |
string |
False |
包含指示集群何时进行管理的时间戳的 JSON 字符串。定义的值为:
|
tridentVersion |
string |
False |
包含集群上安装的 Trident 版本的 JSON 字符串。定义的值是:
|
acpVersion |
string |
False |
包含集群上安装的 Astra Control Provisioner 版本的 JSON 字符串。定义的值是:
|
tridentManagedState |
string |
False |
包含一组枚举值之一的 JSON 字符串,指示此集群上 Trident 的管理状态。定义的值为:
|
tridentManagedStateDesired |
string |
False |
包含指示 Trident 所需管理状态值的 JSON 字符串。定义的值为:
|
tridentManagedStateDetails |
False |
JSON 对象的 JSON 数组,列出有关状态转换为"托管"或"非托管"的其他详细信息。+ 如果没有可用的详细信息,此数组将为空。
|
|
tridentManagedStateAllowed |
数组[string] |
False |
可以在给定 tridentManagedState 中请求的状态。可以在每个定义的状态下请求以下状态:
|
inUse |
string |
True |
包含指示群集是否具有任何托管应用程序的值的 JSON 字符串,因此无法删除。定义的值为:
|
accHost |
string |
False |
指示此群集承载当前正在访问的 Astra Control Center 实例的 JSON 字符串。定义的值为:
|
clusterType |
string |
True |
包含指示集群类型的值的 JSON 字符串。定义的值为:
|
clusterVersion |
string |
False |
包含指示集群环境的语义版本控制表示的值的 JSON 字符串。对于 Kubernetes 集群,这是 Kubernetes 版本。定义的值为:
|
clusterVersionString |
string |
False |
包含指示集群环境扩展版本控制信息的值的 JSON 字符串。对于 Kubernetes 集群,这是完整的 Kubernetes 版本。定义的值为:
|
clusterCreationTimestamp |
string |
False |
包含指示集群最初创建时间的时间戳的 JSON 字符串。定义的值为:
|
命名空间 |
数组[string] |
False |
JSON 字符串的 JSON 数组,每个表示集群内的命名空间。定义的值为:
|
defaultStorageClass |
string |
False |
包含与 Kubernetes 中设置的默认存储类对应的存储类 ID 的 JSON 字符串。定义的值为:
|
cloudID |
string |
True |
JSON 字符串,包含指示运行集群的云 ID 的值。定义的值为:
|
凭证 ID |
string |
False |
JSON 字符串包含一个值,该值指示包含集群的 kubeconfig 文件的凭据的 ID。定义的值为:
|
位置 |
string |
False |
包含运行集群的云提供的值的 JSON 字符串,指示集群的特定于云的位置。定义的值为:
|
isMultizonal |
string |
False |
包含运行集群的云提供的值的 JSON 字符串,指示集群是否跨越两个或多个可用区域。定义的值为:
|
privateRouteID |
string |
False |
包含专用集群位置 ID 的 JSON 字符串。
|
connectorCapabilities |
数组[string] |
False |
与此集群关联的连接器的功能。可选以实现向后兼容性。如果不存在,则假定的功能为代理。 |
apiServiceID |
string |
False |
包含来自 Kubernetes (k8s) API 服务对象的 UUID 的 JSON 字符串。用于唯一标识集群。 |
元数据 |
True |
与资源关联的客户端和服务指定的元数据。定义的值为:
|
type_astra_metadata_list
| 名称 | Type | Required | Description |
|---|---|---|---|
继续 |
string |
False |
|
count |
数字 |
False |
|
labels |
数组["类型 Astra 标签"] |
False |
|
creationTimestamp |
string |
False |
|
modificationTimestamp |
string |
False |
|
已创建 |
string |
False |
|
modifiedBy |
string |
False |
invalidParams
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
无效查询参数的名称 |
原因 |
string |
True |
查询参数无效的原因 |