lb.load-balancers.change-network

Move a network or private dedicated load balancer to another VPC

POST /lb/api/load-balancers/{id}/actions/change-networkIAM lb:ModifyLoadBalancerNetworkChanges stateDestructive

lb11/lb21/lb31: a load balancer is in one network at a time, so it leaves its VPC before joining the new one, then adds its targets reached by private address again: those are unreachable for about half a minute; its public addresses, listeners and public targets are not affected. Its address in the VPC changes. When joining fails it goes back to its old network and the reason is in reconcileError. Private dedicated: it stops serving in its old VPC at once and serves in the new one within about 2 minutes (several minutes when its nodes must start there first); its name stays and its addresses change.

Request syntax

POST /lb/api/load-balancers/{id}/actions/change-network
{
  "vpcId": "string"
}

Path parameters

  • idRequired

    string

    Constraints: uuid

Request body

  • vpcIdRequired

    string

    The VPC to move to; null leaves its VPC (lb11/lb21/lb31 only, and only without targets reached by private address; 400 for a private dedicated load balancer, which is always in a VPC). Required: a missing field is 400, never a detach

    Constraints: uuid

    May be null.

Response

202: `data` is the plan as in network-move-plan; `vpcId` names the new VPC at once and the move runs in the background, recorded in the load balancer’s events (`networkMove` is set until it ends). 200 with the plan (path `none`) when it is in that VPC already. 409 with the plan when it cannot run: a target reached by private address whose instance is not in the new VPC (named, with the ways out; a private dedicated one: any target outside the new VPC), a move still running, 5 private load balancers in the new VPC already, a VPC without its network, or one another service owns; 400 for application and public dedicated load balancers, which are in no VPC.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow lb:ModifyLoadBalancerNetwork on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud lb load-balancers change-network id --vpc-id 00000000-0000-0000-0000-000000000000

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_lb_load-balancers_change-network.