dcloud ec2 instances change-networkMove an instance to another VPC or subnet, running or stopped
The instance joins the new network and waits until its new address is up before leaving the old one; when the two ranges overlap, or for another subnet of the same VPC, it leaves first and has no private address for about 16 seconds. When the new interface appears, the operating system renews every address, so public traffic pauses for about 150 ms. Its old private address stops answering.
Synopsis
dcloud ec2 instances change-network id --vpc-id vpcId [flags]Arguments
<id>Requiredstring
Also accepted as
--id. Constraints: /^i-[0-9a-f]{6,32}$/
Flags
--vpc-idRequiredstring
The VPC to move the instance to (the same VPC with a subnet moves it there)
Constraints: uuid
--subnet-idOptionalstring
A subnet of that VPC in the instance’s zone; an address is chosen inside it
Constraints: uuid
--private-ipOptionalstring
A free address to take; omitted, one is chosen for you
Constraints: ipv4
Example
dcloud ec2 instances change-network id --vpc-id 00000000-0000-0000-0000-000000000000Generated from the API description, the same one the API checks requests against and the CLI is built from.