CreateVirtualNode_弹性容器实例_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

  • 调用本接口创建虚拟节点时,系统将自动为您创建一个服务关联角色 AliyunServiceRoleForECIVnode,用于访问 ECI、ECS、VPC 等相关云服务。更多信息,请参见虚拟节点服务关联角色

  • 虚拟节点按个数计费。每个虚拟节点会有一个常驻节点,相当于 2 vCPU,8 GiB 的 ECI 实例,收取相关 ECI 实例费用。

流控信息

当前云产品API请求速率暂未透出。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
eci:CreateVirtualNode
Create
VirtualNode
acs:eci:{#regionId}:{#accountId}:virtualnode/*
eci:tag

请求参数

字段名称字段详情
RegionIdstring

地域 ID。

示例值:cn-hangzhou参考取值来源:
    DescribeRegions
ZoneIdstring

可用区 ID。

示例值:cn-hangzhou-b
SecurityGroupIdstring

安全组 ID。虚拟节点以及该虚拟节点下的 ECI 实例将加入到该安全组中。

示例值:sg-2ze81zoc3yl7a3we****参考取值来源:
    DescribeContainerGroups
VSwitchIdstring

交换机 ID。虚拟节点以及虚拟节点下的 ECI 实例所使用的交换机。 展开详情

示例值:vsw-2ze23nqzig8inprou****
VirtualNodeNamestring

虚拟节点的名称。长度为 2~128 个英文字符,可以包含小写英文字符、数字、半角句号(.)或者短划线(-)。

示例值:testNode参考取值来源:
    DescribeVirtualNodes
ResourceGroupIdstring

资源组 ID。

示例值:rg-uf66jeqopgqa9hdn****参考取值来源:
    DescribeContainerGroups
ClientTokenstring

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。只支持 ASCII 字符,且不能超过 64 个字符。更多详情,请参见如何保证幂等性

示例值:123e4567-e89b-12d3-a456-426655440000
EnablePublicNetworkboolean

是否支持公网。默认为 false。 展开详情

示例值:false
EipInstanceIdstring

弹性公网 IP 的 ID。

示例值:eip-uf66jeqopgqa9hdn****
KubeConfigstring

虚拟节点要连接的 Kubernetes 集群的 KubeConfig。需进行 Base64 编码后传入。

示例值:JTVDbmFwaVZlcnNpb24lM0ElMjB2MSU1Q25jbHVzdGVycyUzQSU1Q24tJTIwY2x1c3RlciUzQSU1Q24uLi******
CustomResourcesstring

虚拟节点支持的自定义资源。如果 ECI Pod 的 request 中声明了相应的自定义资源,则该 Pod 会被调度到 VNode。展开详情

示例值:example1.com=100,example2.com=200
ClusterDomainstring

集群的域名。配置后,除了主机的搜索域外,Kubelet 会配置所有容器来搜索该域名。

示例值:example.com
ClusterDNSstring

DNS 服务器的 IP 地址。如果 ECI Pod 中设置了dnsPolicy=ClusterFirst,则使用该配置值为容器提供 DNS 服务。展开详情

示例值:100.1.XX.XX
Tagarray<object>

虚拟节点标签信息。最多可以配置 20 个。

子级条数 <= 21
Taintarray<object>

虚拟节点污点信息。最多可以配置 20 个。

子级条数 <= 21
TlsBootstrapEnabledboolean

是否启用 TLS 启动引导。启用后,请使用 TLS 启动引导的 KubeConfig 证书。取值范围:展开详情

示例值:false

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:89164E78-FC82-4684-BE97-DCDD85D26546
VirtualNodeIdstring

虚拟节点 ID。

示例值:vnd-2ze960zkdqrldeaw****

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
Account.Arrearage
Your account has an outstanding payment.诊断
400
DryRunOperation
Request validation has been passed with DryRun flag set.诊断
400
InvalidParameter.CPU.Memory
The specified cpu and memory are not allowed诊断
400
InvalidParameter.DuplicatedName
The container group include containers with duplicate names.诊断
400
InvalidParameter.DuplicatedVolumeName
The container group includes volumes with duplicate names.诊断
400
IncorrectStatus
%s诊断
400
ServiceNotEnabled
%s诊断
400
ImageSnapshot.IncorrectStatus
%s诊断
400
ImageSnapshot.NotSupport
%s诊断
400
DiskVolume.NotSupport
The disk volume is not supported.诊断
400
RamRole.NotSupport
The RAM role is not supported.诊断
400
DiskNumber.LimitExceed
The maximum number of disks in an instance is exceeded.诊断
400
InvalidPaymentMethod.InsufficientBalance
No payment method is specified for your account. We recommend that you add a payment method or add funds to the prepayment balance.诊断
400
DiskVolume.NotInSameZone
The instance to be created and the disk are not in the same zone.诊断
400
NoPermission
You are not authorized to use the "Product on ECI" feature.诊断
400
HighCpuMemConfigRequired
You need to apply to be added to the whitelist of the specified CPU and memory.诊断
400
RecommendEmpty.InstanceTypeFamilyNotMatched
The recommended instance type is unavailable in the current zone. Try again later.诊断
400
LocalDiskAmountNotMatch
The number of local volumes does not match the instance type.诊断
400
Payfor.CreditPayInsufficientBalance
Your payment credit line is insufficient.诊断
400
InvalidOperation.KMS.InstanceTypeNotSupport
The specified instance is invalid. Only I/O optimized instances support KMS key.诊断
400
InvalidParameter.Encrypted.KmsNotEnabled
KMS must be enabled for encrypted disks.诊断
400
InvalidParameter.KMS.EncryptedIllegal
After configuring the parameter KmsKeyId, you must enable encryption.诊断
400
Ipv6AddressNotSupportVsw
IPv6 is not supported in the specified vSwitch.诊断
400
EipAddressPoolIpNotEnough
The ip address of specified PublicIpAddressPool is not enough.诊断
400
VnodeDedicatedHostIdAlreadyExist
DedicatedHostId:%s of Vnode:%s already exists.诊断
400
DedicatedHostQuotaExceeded
The quota of DedicatedHost is exceeded.诊断
403
OperationDenied.VswZoneMisMatch
The specified VSwitchId is not in the specified Zone.诊断
403
QuotaExceeded
%s quota exceeded.诊断
403
Zone.NotOnSale
The specified zone is not available for purchase.诊断
403
Forbidden.RiskControl
This operation has been identified as an abnormal operation and cannot be processed.诊断
403
Forbidden.SubUser
The specified action is not available for you.诊断
403
Forbidden.OnlyForInvitedTest
Eci create action is only open to invited users during public beta.诊断
403
OperationDenied.SecurityGroupMisMatch
The specified VSwitchId and SecurityGroupId are not in the same VPC.诊断
403
InvalidVSwitchId.IpNotEnough
The specified VSwitch does not have enough IP addresses.诊断
403
Forbidden.UserBussinessStatus
This operation is not allowed, because you have overdue bills. Pay the overdue bill and try again.诊断
403
Forbidden.UserNotRealNameAuthentication
This operation is not allowed, because you have not passed the real-name verification.诊断
403
InvalidUser.PassRoleForbidden
The RAM user is not authorized to assume a RAM role.诊断
403
NoPermission
The RAM role does not belong to ECS.诊断
403
OperationDenied.NoStock
Sales of this resource are temporarily suspended in the specified zone. We recommend that you use the multi-zone creation function to avoid the risk of insufficient resource. For more information, see https://help.aliyun.com/document_detail/157290.html诊断
403
InvalidParameter.KMS.KeyId.Forbidden
You are not authorized to access the specified KMSKeyId.诊断
403
Forbidden.AccountClosed
The operation is forbidden. Your account has been closed.诊断
403
InvalidOperation.ResourceManagedByCloudProduct
The operation is forbidden. The security group has been managed by another cloud product.诊断
403
Spot.NotMatched
%s. We recommend that you use the create multi-zone function to avoid insufficient inventory. For more information, see https://help.aliyun.com/document_detail/157290.html诊断
403
SecurityRisk.3DVerification
We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email.诊断
403
CreateServiceLinkedRole.Denied
Please make sure the account has ram:CreateServiceLinkedRole permission.诊断
404
ImageSnapshot.NotFound
The specified snapshot does not exist.诊断
404
InvalidDiskId.NotFound
The specified disk does not exist.诊断
404
InvalidParameter.KMS.KeyId.NotFound
The specified KMSKeyId does not exist.诊断

变更历史

变更时间变更内容概要操作
2023-07-03
删除请求参数RotateCertificateEnabled
2023-06-13
变更错误码400
删除返回参数
2022-06-24
变更错误码400
2021-09-15
新增请求参数RotateCertificateEnabled
2021-09-06
新增OpenAPI,创建一个虚拟节点

相关示例