You need to enable JavaScript to run this app.
导航

生成边缘节点池的纳管脚本

最近更新时间2023.10.08 19:44:29

首次发布时间2023.08.24 19:59:30

本接口用于生成边缘节点池的纳管脚本。

请求方法

POST

请求参数

下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数

名称

类型

是否必选

示例值

描述

Action

String

CreateBatchEdgeMachine

公共参数。该参数表示接口名称。本接口取值为
CreateBatchEdgeMachine

Version

String

2021-03-03

公共参数。该参数表示接口版本。 本接口取值为2021-03-03

ClusterId

String

ccd17msvqtofo********

集群的 ID。
可以调用获取集群列表及详情接口,获取集群 ID。

说明

集群必须处于{Running,[*]}{Updating,[Progressing]}状态。可调用获取集群列表及详情接口获取集群当前的状态。

NodePoolId

String

pcd7a3l7qtof*********

节点池 ID。

TTLHours

int64

2

有效时间

CreateClientToken

String

"doigjalfajglaarf4tejyhsed234"

幂等创建token

请求示例

POST https://veecp.volcengineapi.com/?Action=CreateBatchEdgeMachine&Version=2021-03-03&<其他公共参数>
{
  "ClusterId": "ccd17msvqtofo********",
  "NodePoolId": "pcd7a3l7qtof*********",
  "TTLHours": 2
}

返回参数

名称

类型

示例值

描述

Id

string

"nci5bdn7qtofk******"

纳管脚本的 ID

返回示例

{
    "ResponseMetadata": {
        "RequestId": "2023061514594*********",
        "Action": "CreateBatchEdgeMachine",
        "Version": "2021-03-03",
        "Service": "veecp_openapi",
        "Region": "cn-beijing"
    },
    "Result": {
        "Ids": [
            "nci5bdn7qtofk******"
        ]
    }
}

错误码

本接口错误码如下表所示,其他错误码请参见错误码

HTTP 状态码

错误码

错误信息

描述

400

NotFound.DefaultNodePool

The default node pool is not found.

默认节点池不存在,请先创建默认节点池。

400

QuotaExceeded.Node

The number of nodes in cluster has reached the limit.

您当前集群所要创建的节点数量超出系统限额,您可以选择其他集群,也可以提交工单申请提高限额。

400

OperationDenied.NodePoolStatus

The action has been forbidden due to wrong node pool status {{statusPhase}} and [{{statusConditions}}].

节点池当前状态不支持该操作。请确认该接口依赖的节点池状态后重试。

400

ClusterVpcMismatch.{{parameter}}

The specified {{resourceType}} {{resourceId}} is not in the VPC of cluster.

指定的云服务器实例与集群不属于同一个私有网络,请确保两者属于同一私有网络。

400

LimitExceeded.NodeInCluster

The number of nodes exceeds the cluster defined pods config limit.

Flannel 容器网络类型下,当前集群节点数超出了集群支持的最大节点数。
支持的最大节点数取决于 PodsConfig.FlannelConfig.PodCidrsMaxPodsPerNode。集群创建完成后不支持修改,请合理规划集群设置

409

AlreadyExists.{{parameter}}

The specified {{resourceType}} {{resourceId}} has already been included.

指定的云服务器实例已加入默认节点池

400

AlreadyInUse.{{parameter}}

The specified {{resourceType}} {{resourceId}} has already been used in another cluster.

指定的云服务器实例已加入其他集群,请更换其他实例或者将该实例移除其当前所在集群。

400

OperationDenied.InstanceStatus

The operation has been denied due to the wrong status of the specified ECS instance {{instanceId}}.

云服务器实例当前状态不支持该操作。请确认调用该接口时的云服务器实例状态要求后重试。

400

ZoneMismatch.Instance

The specified ECS instance {{instanceId}} is not in the cluster defined zones.

云服务器实例不在集群支持的可用区内。当前不支持修改集群可用区配置,请使用匹配集群可用区的云服务器实例。

400

OperationDenied.ClusterStatus

The action has been denied due to wrong cluster status {{statusPhase}} and [{{statusConditions}}].

指定集群的当前状态不支持该操作。请确认该接口依赖的集群状态后重试。

400

NotSupported.{{parameter}}

The specified {{resourceType}} {{resourceContent}} is not supported.

指定参数不支持,如 InstanceType、ImageId 等。请确认参数后重试。