创建新的托管集群
POST /accounts/{account_id}/topology/v1/managedClusters
指示要创建的 Managed Cluster API 资源的所需值。
参数
| 名称 | Type | 在 | Required | Description |
|---|---|---|---|---|
account_id |
string |
path |
True |
包含帐户资源的 ID
|
请求正文
指示要创建的 Managed Cluster API 资源的所需值。
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
资源的媒体类型。定义的值为:
|
version |
string |
True |
资源的版本。定义的值为:
|
id |
string |
True |
资源的全局唯一标识符。定义的值为:
|
tridentManagedStateDesired |
string |
False |
包含指示 Trident 所需管理状态值的 JSON 字符串。定义的值为:
|
defaultStorageClass |
string |
False |
包含与默认存储类对应的存储类 ID 的 JSON 字符串,如 Kubernetes 中设置的。定义的值为:
|
元数据 |
False |
与资源关联的客户端和服务指定的元数据。定义的值为:
|
请求示例
{
"type": "application/astra-managedCluster",
"version": "1.3",
"id": "b82af145-054d-5f0d-bf47-3d22457a8b99",
"defaultStorageClass": "e280ff62-be35-4f31-a31b-a210a1ad1b33",
"tridentManagedStateDesired": "managed"
}
响应
Status: 201, Returns the newly created managedCluster resource in the JSON response body.
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
资源的媒体类型。定义的值为:
|
version |
string |
True |
资源的版本。定义的值为:
|
id |
string |
True |
资源的全局唯一标识符。定义的值为:
|
name |
string |
True |
包含集群名称的 JSON 字符串。定义的值为:
|
状态 |
string |
True |
包含指示集群操作状态的值的 JSON 字符串。定义的值为:
|
restoreTargetSupported |
string |
False |
JSON 字符串包含一个值,该值指示托管集群能够成为应用程序数据管理操作的 target。定义的值为:
|
snapshotSupported |
string |
False |
包含一个值的 JSON 字符串,该值指示托管集群执行类似于应用程序数据管理备份的操作的能力。定义的值为:
|
stateUnready |
数组[string] |
True |
JSON 字符串的 JSON 数组,每个指示集群无法转换到"运行"状态的原因,当处于"运行"状态时出现问题的原因,或者它已转换到"失败"或"已删除"状态的原因。定义的值为:
|
managedState |
string |
True |
包含指示群集管理状态的值的 JSON 字符串。定义的值为:
|
protectionState |
string |
True |
包含指示群集保护状态的值的 JSON 字符串。定义的值为:
|
protectionStateDetails |
True |
JSON 对象的 JSON 数组,列出有关当前保护状态的其他详细信息,包括达到当前状态的原因。如果没有可用的详细信息,此数组将为空。定义的值为:
|
|
managedStateUnready |
数组[string] |
True |
JSON 字符串的 JSON 数组,每个字符串指示集群不符合管理条件的原因。定义的值为:
|
managedTimestamp |
string |
True |
包含指示集群何时进行管理的时间戳的 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 数组,列出有关"state"转换为"managed"或"unmanaged"的其他详细信息。+ 如果没有可用的详细信息,此数组将为空。
|
|
tridentManagedStateAllowed |
数组[string] |
False |
可以在给定 tridentManagedState 中请求的状态。可以在每个定义的状态下请求以下状态:
|
inUse |
string |
True |
包含指示群集是否具有任何托管应用程序的值的 JSON 字符串,因此无法删除。定义的值为:
|
accHost |
string |
False |
指示此群集承载当前正在访问的 Astra Control Center 实例的 JSON 字符串。定义的值为:
|
clusterType |
string |
True |
包含指示集群类型的值的 JSON 字符串。定义的值为:
|
clusterVersion |
string |
True |
包含集群环境的语义版本控制表示形式的 JSON 字符串。对于 Kubernetes 集群,这是 Kubernetes 版本。定义的值为:
|
clusterVersionString |
string |
True |
包含指示集群环境扩展版本控制信息的值的 JSON 字符串。对于 Kubernetes 集群,这是完整的 Kubernetes 版本。定义的值为:
|
clusterCreationTimestamp |
string |
False |
包含指示集群最初创建时间的时间戳的 JSON 字符串。定义的值为:
|
命名空间 |
数组[string] |
False |
JSON 字符串的 JSON 数组,每个表示集群内的命名空间。定义的值为:
|
defaultStorageClass |
string |
False |
包含与默认存储类对应的存储类 ID 的 JSON 字符串,如 Kubernetes 中设置的。定义的值为:
|
cloudID |
string |
True |
JSON 字符串,包含指示运行集群的云 ID 的值。定义的值为:
|
凭证 ID |
string |
False |
JSON 字符串包含一个值,该值指示包含集群的 kubeconfig 文件的凭据的 ID。定义的值为:
|
位置 |
string |
False |
包含运行集群的云提供的值的 JSON 字符串,指示集群的特定于云的位置。定义的值为:
|
isMultizonal |
string |
True |
包含运行集群的云提供的值的 JSON 字符串,指示集群是否跨越两个或多个可用区域。定义的值为:
|
privateRouteID |
string |
False |
包含专用集群 locationID 的 JSON 字符串。
|
apiServiceID |
string |
False |
包含来自 Kubernetes (k8s) api 服务对象的 UUID 的 JSON 字符串。用于唯一标识集群。 |
元数据 |
True |
与资源关联的客户端和服务指定的元数据。定义的值为:
|
响应示例
{
"type": "application/astra-managedCluster",
"version": "1.3",
"id": "b82af145-054d-5f0d-bf47-3d22457a8b99",
"name": "GKE-22",
"state": "running",
"stateUnready": [],
"managedState": "managed",
"managedStateUnready": [],
"managedTimestamp": "2020-08-06T12:24:52.256624Z",
"protectionState": "full",
"protectionStateDetails": [],
"tridentVersion": "23.10.0",
"acpVersion": "23.10.0",
"tridentManagedState": "managed",
"tridentManagedStateDesired": "managed",
"tridentManagedStateDetails": [],
"inUse": "false",
"clusterType": "kubernetes",
"clusterVersion": "1.91.1",
"clusterVersionString": "1.19.1",
"clusterCreationTimestamp": "2020-08-06T12:24:52.256624Z",
"namespaces": [
"kube-system",
"kube-public",
"my-app-1"
],
"defaultStorageClass": "e280ff62-be35-4f31-a31b-a210a1ad1b33",
"cloudID": "548bdc1f-f00e-4a23-a062-83265d224d46",
"credentialID": "055e365a-2215-40de-aecb-a4070a7e6f1e",
"location": "europe-west4",
"isMultizonal": "false",
"apiServiceID": "6bf33af2-872a-4553-a891-26b510c3edbe",
"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 |
|
invalidFields |
数组["invalidFields"] |
False |
无效请求正文字段列表 |
响应示例
{
"type": "https://astra.netapp.io/problems/5",
"title": "Invalid query parameters",
"detail": "The supplied query parameters are invalid.",
"status": "400"
}
响应
Status: 409, Conflict
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
|
invalidFields |
数组["invalidFields"] |
False |
无效请求正文字段列表 |
响应示例
{
"type": "https://astra.netapp.io/problems/10",
"title": "JSON resource conflict",
"detail": "The request body JSON contains a field that conflicts with an idempotent value.",
"status": "409"
}
响应
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"
}
定义
查看定义
类型 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 |
additionalDetails
type_astra_stateDetail
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
additionalDetails |
False |
invalidParams
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
无效查询参数的名称 |
原因 |
string |
True |
查询参数无效的原因 |
invalidFields
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
无效请求正文字段的名称 |
原因 |
string |
True |
请求正文字段无效的原因 |