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

UpdateEdgeNodePoolConfig

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

Version

String

2022-05-12

公共参数。该参数表示接口版本。 本接口取值为2022-05-12

ClusterId

String

ccgr2an7*************

目标集群 ID。

Id

String

pci3e27fqto**********

目标节点池 ID。

Name

String

nodepool-12**

目标节点池新名称。

KubernetesConfig

EdgeNodePoolKubernetesConfig

{
    "Labels": [
      {
        "Key": "IDC",
        "Value": "BeiJing"
      },
      {
        "Key": "GPU",
        "Value": "true"
      }
    ],
    "Taints": [
      {
        "Value": "Error",
        "Key": "Status",
        "Effect": "NoSchedule"
      }
    ]
  }

更新目标节点池的Kubernets 相关配置。

ElasticConfig

ElasticConfig

{
    "CloudServerIdentity": "cloudserver-*******l99ctn",
    "AutoScaleConfig": {
      "Enabled": true,
      "MinReplicas": 1,
      "MaxReplicas": 10,
      "Priority": 10,
      "DesiredReplicas": 1
    },
    "InstanceArea": {
      "ClusterName": "bdcdn-hsct02",
      "DesiredReplicas": 1
    }
  }

更新目标节点池等弹性扩缩容配置。适用于弹性节点池。

CreateClientToken

String

"doigjalfajglaarf4tejyhsed234"

幂等创建token

请求示例

POST https://veecp.volcengineapi.com/?Action=UpdateEdgeNodePoolConfig&Version=2021-03-03
&<其他公共参数>
{
  "ClusterId": "ccfc8stfqto**********",
  "Id": "pchqok6fqto**********",
  "Name": "test2345",
  "KubernetesConfig": {
    "Labels": [],
    "Taints": []
  },
  "ElasticConfig": {
    "CloudServerConfig": {
      "storage_config": {
        "system_disk": {
          "capacity": ""
        },
        "data_disk_limit": 1000,
        "sys_disk_limit": 100,
        "data_disk_num_limit": 1,
        "data_disk_list": []
      },
      "network_config": {
        "bandwidth_peak": "5",
        "enable_ipv6": false,
        "disable_ipv4": false,
        "dns_type": "default"
      },
      "custom_data": {
        "is_base64": true,
        "data": ""
      }
    },
    "CloudServerIdentity": "cloudserver-********9ctn",
    "AutoScaleConfig": {
      "Enabled": false,
      "DesiredReplicas": 1,
      "MinReplicas": 0,
      "MaxReplicas": 0,
      "Priority": 0
    }
  },
  "NodePoolType": "edge-machine-pool"
}

返回参数


返回示例

{
    "ResponseMetadata": {
        "RequestId": "202306151443083E0DA6BBDC**********",
        "Action": "UpdateEdgeNodePoolConfig",
        "Version": "2021-03-03",
        "Service": "veecp_openapi",
        "Region": "cn-beijing"
    },
    "Result": {}
}

错误码

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

HTTP状态码

错误码

错误信息

描述

409

Conflict.Name

The specified name conflicts with existing {{resourceType}}.

指定地域存在同名实例,请更换实例名称再尝试

400

OperationDenied.ClusterStatus

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

指定集群的当前状态不支持该操作,状态限制详见接口文档

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.

指定的子网/安全组/实例/高性能计算集群与集群属于不同 VPC,请确保其与集群处于同一个 VPC 内

400

Mismatch.Replicas

The specified DesiredReplicas, MinReplicas and MaxReplicas are mismatched.

指定节点的最小节点数、最大节点数、期望节点数逻辑不匹配,三者关系详见接口文档

400

QuotaExceeded.Node

The number of nodes in the cluster has reached the limit.

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

400

LimitExceeded.NodeInCluster

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

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

400

UpdateNotAllowed.{{parameter}}

The update to the specified parameter {{parameter}} is not allowed due to {{resourceType}}.

默认节点池的 NameAutoScalingNodeConfig的部分属性不支持更新。
包年包月节点池的AutoScaling.Enabled等属性不支持更新。
按量计费节点池的NodeConfig中的PeriodAutoRenewAutoRenewPeriod等属性不支持更新。

400

QuotaExceeded.{{ResourceType}}

The quota of {{ResourceType}} has reached the limit.

指定资源的配额达到上限,如安全组、ENI、EIP、CLB、ECS等。

400

NotSupported.{{parameter}}

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

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

400

LimitExceeded.MaximumVolumes

You have reached the limit of the number of volumes that you can create.

云盘数量超过了单台云服务器实例所能挂载的云盘数量。云服务器使用限制,请参见约束限制

400

LimitExceeded.DataVolumeSize

You have reached the limit of the size of data volume that you can create.

数据盘容量超过上限。云服务器使用限制,请参见约束限制

400

LimitExceeded.SystemVolumeSize

You have reached the limit of the size of system volume that you can create.

系统盘容量超过上限。云服务器使用限制,请参见约束限制

400

InstanceTypeMismatch.VolumeType

The specified VolumeType {{volumeType}} and InstanceType {{instanceType}} are mismatched.

指定的实例规格族和云盘规格不匹配。请调用云服务的 DescribeInstanceTypes 接口获取云服务器实例规格与云盘规格的匹配关系,然后更新参数并重试。

400

ZoneMismatch.InstanceType

The specified InstanceType {{instanceType}} and subnet zones are mismatched.

子网所在的可用区不支持该实例规格。请调用云服务的 DescribeAvailableResource 接口获取各可用区支持的实例规格情况,然后更新参数并重试。

400

OutOfRange.DataVolumes

There is no data volume for additional container storage enabling.

启用了配置节点的第一块数据盘作为容器镜像和日志的存储目录(即AdditionalContainerStorageEnabled=true),但是 DataVolume 参数中并没有指定任何数据盘。请指定参数值后重试。

400

ZoneMismatch.Subnet

The specified Subnet {{subnetId}} is not in the cluster defined zones.

指定的子网所属的可用区不在集群支持的可用区内。请使用匹配集群可用区的子网。

400

ZoneMismatch.HpcCluster

The specified HpcCluster {{hpcClusterID}} and subnet zones are mismatched.

指定的高性能集群可用区与worker节点子网可用区不匹配

400

Insufficient.Balance

Your account has run out of balance.

账户余额不足。
(增加节点池期望节点数时,若账户余额不足报该错误码)