Creates a virtual node (VNode).

Description

  • The VNode feature is in invitational preview. To use this feature, submit a ticket.
  • When you call this operation to create a VNode, the system automatically creates a service-linked role AliyunServiceRoleForECIVnode for you to access relevant cloud services such as Elastic Container Instance, Elastic Compute Service (ECS), and Virtual Private Cloud (VPC). For more information, see Virtual Node Service-linked role.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateVirtualNode

The operation that you want to perform. Set the value to CreateVirtualNode.

RegionId String Yes cn-hangzhou

The region ID of the image cache.

ZoneId String No cn-hangzhou-b

The zone ID of the VNode.

SecurityGroupId String Yes sg-2ze81zoc3yl7a3we****

The ID of the security group. The VNode and the elastic container instances in the VNode are added to the security group.

VSwitchId String Yes vsw-2ze23nqzig8inprou****

The ID of the vSwitch. The vSwitch is connected to the VNode and the elastic container instances in the VNode.

You can specify 1 to 10 vSwitches for a VPC.

VirtualNodeName String No testNode

The name of the VNode. The name must be 2 to 128 characters in length and can contain lowercase letters, digits, periods (.), and hyphens (-).

ResourceGroupId String No rg-uf66jeqopgqa9hdn****

The ID of the resource group.

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotency.

EnablePublicNetwork Boolean No false

Specifies whether the VNode can be accessed over the Internet. Default value: false.

If this parameter is set to true, the VNode provides a public IP address to allow external services to access the VNnode.

EipInstanceId String No eip-uf66jeqopgqa9hdn****

The ID of the elastic IP address (EIP).

KubeConfig String No JTVDbmFwaVZlcnNpb24lM0ElMjB2MSU1Q25jbHVzdGVycyUzQSU1Q24tJTIwY2x1c3RlciUzQSU1Q24uLi******

KubeConfig of the Kubernetes cluster to which the VNode is to be connected. The value must be Base64-encoded.

RotateCertificateEnabled Boolean No false

Specifies whether to enable certificate rotation. If you set the value to true, the system automatically applies for a new certificate for the VNode when the current certificate is about to expire. Valid values:

  • true
  • false

Default value: false.

TlsBootstrapEnabled Boolean No false

Specifies whether to enable TLS bootstrapping. If you set this parameter to true, use the KubeConfig certificate for TLS bootstrapping. Valid values:

  • true
  • false

Default value: false.

Tag.N.Key String No name

The key of tag N. Valid values of N: 1 to 20.

Tag.N.Value String No test

The value of tag N. Valid values of N: 1 to 20.

Taint.N.Key String No testKey

The key of taint N.

Taint.N.Value String No testValue

The value of taint N.

Taint.N.Effect String No NoSchedule

The Effect of taint N. Valid values:

  • NoSchedule: No pods are scheduled to the nodes that have the taint.
  • NoExecute: Pods in the node are evicted while no pods are scheduled to the nodes that have the taint.
  • PreferNoSchedule: Pods are not scheduled to the nodes that have the taint if possible.

Response parameters

Parameter Type Example Description
RequestId String 89164E78-FC82-4684-BE97-DCDD85D26546

The ID of the request.

VirtualNodeId String vnd-2ze960zkdqrldeaw****

The ID of the VNode.

Examples

Sample requests

https://eci.aliyuncs.com/?Action=CreateVirtualNode
&RegionId=cn-hangzhou
&SecurityGroupId=sg-2ze81zoc3yl7a3we****
&VirtualNodeName=testNode
&VSwitchId=vsw-2ze23nqzig8inprou****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateVirtualNodeResponse>
    <RequestId>89164E78-FC82-4684-BE97-DCDD85D26546</RequestId>
    <VirtualNodeId>vnd-2ze960zkdqrldeaw****</VirtualNodeId>
</CreateVirtualNodeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "89164E78-FC82-4684-BE97-DCDD85D26546",
  "VirtualNodeId" : "vnd-2ze960zkdqrldeaw****"
}

Error codes

HTTP status code Error code Error message Description
400 Account.Arrearage Your account has an outstanding payment. The error message returned because you have an overdue payment in your account.
400 DryRunOperation Request validation has been passed with DryRun flag set. The error message returned because the request is determined as valid in the dry run.
400 InvalidParameter.CPU.Memory The specified cpu and memory are not allowed The error message returned because the vCPU and memory specifications are invalid.
400 InvalidParameter.DuplicatedName The container group include containers with duplicate names. The error message returned because the container group contains containers with duplicate names.
400 InvalidParameter.DuplicatedVolumeName The container group includes volumes with duplicate names. The error message returned because the container group contains volumes with duplicate names.
400 IncorrectStatus %s The error message returned because the status of the specified instance is invalid.
400 ServiceNotEnabled %s The error message returned because the service that is required to call the operation is not activated. Activate the service and try again later.
400 ImageSnapshot.IncorrectStatus %s The error message returned because the status of the image cache snapshot is invalid.
400 ImageSnapshot.NotSupport %s The error message returned because the image cache feature based on data disk snapshots is not available to all users. If you need to use this feature, contact Alibaba Cloud technical support personnel.
400 DiskVolume.NotSupport The disk volume is not supported. The error message returned because the disk cannot be used as a volume. If you want to use the disk, contact Alibaba Cloud technical support personnel.
400 RamRole.NotSupport The RAM role is not supported. The error message returned because the specified Resource Access Management (RAM) role is not supported.
400 DiskNumber.LimitExceed The maximum number of disks in an instance is exceeded. The error message returned because the number of disks attached to the container group has reached the upper limit.
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. The error message returned because your Alibaba Cloud account does not have a valid payment method. Specify a valid payment method or top up the balance.
400 DiskVolume.NotInSameZone The instance to be created and the disk are not in the same zone. The error message returned because the container group that you want to create is not in the same zone as the disk.
400 NoPermission You are not authorized to use the "Product on ECI" feature. The error message returned because you are not authorized to use Alibaba Cloud services with Elastic Container Instance.
400 HighCpuMemConfigRequired You need to apply to be added to the whitelist of the specified CPU and memory. The error message returned because your account is not authorized to use the specified amount of CPU and memory resources.
400 RecommendEmpty.InstanceTypeFamilyNotMatched The recommended instance type is unavailable in the current zone. Try again later. The error message returned because no instance types meet the requirements in the current zone. Try again later or create the instance in other zones.
400 LocalDiskAmountNotMatch The number of local volumes does not match the instance type. The error message returned because the number of local disks does not match the instance type.
400 Payfor.CreditPayInsufficientBalance Your payment credit line is insufficient. The error message returned because the balance in your credit card is insufficient.
400 InvalidOperation.KMS.InstanceTypeNotSupport The specified instance is invalid. Only I/O optimized instances support KMS key. The error message returned because the specified instance is not supported. You can set Key Management Service (KMS) keys only for I/O optimized instances.
400 InvalidParameter.Encrypted.KmsNotEnabled KMS must be enabled for encrypted disks. The error message returned because KMS is not activated. You must activate KMS to encrypt disks.
400 InvalidParameter.KMS.EncryptedIllegal After configuring the parameter KmsKeyId, you must enable encryption. The error message returned because the encryption feature is not enabled after a KMS key ID is specified.
400 Ipv6AddressNotSupportVsw IPv6 is not supported in the specified vSwitch. The error message returned because the IPv6 service is not activated for the vSwitch.
403 OperationDenied.VswZoneMisMatch The specified VSwitchId is not in the specified Zone. The error message returned because the specified vSwitch is not deployed in the current zone.
403 QuotaExceeded %s quota exceeded. The error message returned because the maximum number of elastic container instances is reached.
403 Zone.NotOnSale The specified zone is not available for purchase. The error message returned because the specified zone is unavailable or because the vSwitches in the specified VPC are unavailable in the current zone. Specify another zone.
403 Forbidden.RiskControl This operation has been identified as an abnormal operation and cannot be processed. The error message returned because the operation is determined as abnormal and cannot be performed.
403 Forbidden.SubUser The specified action is not available for you. The error message returned because you do not have the permissions to perform the operation.
403 Forbidden.OnlyForInvitedTest Eci create action is only open to invited users during public beta. The error message returned because Elastic Container Instance is available only to invited users during the public preview period.
403 OperationDenied.SecurityGroupMisMatch The specified VSwitchId and SecurityGroupId are not in the same VPC. The error message returned because the specified vSwitch and security group are not deployed in the same VPC.
403 InvalidVSwitchId.IpNotEnough The specified VSwitch does not have enough IP addresses. The error message returned because the vSwitch does not have sufficient IP addresses.
403 Forbidden.UserBussinessStatus This operation is not allowed, because you have overdue bills. Pay the overdue bill and try again. The error message returned because you have an overdue payment. Settle the overdue payment and try again later.
403 Forbidden.UserNotRealNameAuthentication This operation is not allowed, because you have not passed the real-name verification. The error message returned because you have not completed real-name verification and the operation is not allowed.
403 InvalidUser.PassRoleForbidden The RAM user is not authorized to assume a RAM role. The error message returned because the RAM user is not authorized to assume a RAM role.
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 The error message returned because available resources are insufficient. Try other regions, zones or instance types. To ensure that available resources are sufficient, we recommend that you specify multiple zones and instance types. For more information, visit https://www.alibabacloud.com/help/doc-detail/157290.html.
403 InvalidParameter.KMS.KeyId.Forbidden You are not authorized to access the specified KMSKeyId. The error message returned because you are not authorized to access the specified KMS key ID.
403 NoPermission The RAM role AliyunECIContainerGroupRole does not belong to eci.aliyuncs.com. Please check and try again. The error message returned because the AliyunECIContainerGroupRole RAM role does not belong to eci.aliyuncs.com. Check and try again.
403 Forbidden.AccountClosed The operation is forbidden. Your account has been closed. The error message returned because the Alibaba Cloud account is unregistered and your operations are not allowed.
403 InvalidOperation.ResourceManagedByCloudProduct The operation is forbidden. The security group has been managed by another cloud product. The error message returned because the security group is managed by another Alibaba Cloud service and is not allowed to operate.
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 %s. The error message returned because the inventory of the resource is insufficient. We recommend that you specify multiple zones and instance types to prevent insufficient resources. For more information, visit https://www.alibabacloud.com/help/doc-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. The error message returned because risks are detected in your default credit card or debit card. Click the URL in the email for verification.
403 CreateServiceLinkedRole.Denied Please make sure the account has ram:CreateServiceLinkedRole permission. The error message returned because you do not have the ram:CreateServiceLinkedRole permission.
404 ImageSnapshot.NotFound The specified snapshot does not exist. The error message returned because the specified image cache snapshot does not exist.
404 InvalidDiskId.NotFound The specified disk does not exist. The error message returned because the specified disk does not exist.
404 InvalidParameter.KMS.KeyId.NotFound The specified KMSKeyId does not exist. The error message returned because the specified KMSKeyId parameter is invalid.

For a list of error codes, visit the API Error Center.