setLoadBalancerInstanceSubnet

Prev Next

Available in VPC

Set subnets of load balancers. It configures subnets including the subnets already set. You can add subnets in different zones from the existing subnets.

Syntax

The setLoadBalancerInstanceSubnet syntax is as follows:

./ncloud vloadbalancer setLoadBalancerInstanceSubnet \
    --loadBalancerInstanceNo <load-balancer-instance-no> \
    --subnetNoList <subnet-no-list> \
    [--loadBalancerSubnetList <lb-subnet-config>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running setLoadBalancerInstanceSubnet.

Required options

The following options are required for setLoadBalancerInstanceSubnet.

Options Type Required Description
--loadBalancerInstanceNo String Required Load balancer instance number
--subnetNoList List Required Subnet number list
  • When entered along with loadBalancerSubnetList, loadBalancerSubnetList is applied.
  • Select subnets located in the same VPC as the load balancer.
  • You can select one load balancer-dedicated subnet per zone, including existing subnets.
  • You can enter multiple items separated by spaces (e.g., --subnetNoList 23456790 23456791).
  • See getSubnetList.

Optional options

These are the optional options for setLoadBalancerInstanceSubnet. Options that are not specified will use their default values.

Options Type Required Description
--loadBalancerSubnetList List Optional List of subnets dedicated to load balancers
  • When entered along with subnetNoList, loadBalancerSubnetList is applied.
  • For each subnet, enter {field='value'} pairs enclosed in quotes and separated by commas.
    • subnetNo (conditional): Subnet number. Required when applying loadBalancerSubnetList. Select subnets located in the same VPC as the load balancer. SeegetSubnetList.
    • publicIpInstanceNo (optional): Public IP instance number. If left blank, a new public IP will be created and assigned. Can be set if the load balancer's network type is PUBLIC.
  • You can select one subnet per zone dedicated to the load balancer.

Common options

For information about the options common to all vloadbalancer subcommands, see Load Balancer (VPC) options.

Examples

If the request to configure the load balancer subnet is successful, the configuration information and status of the modified instance are returned.

Command

The command example is as follows:

./ncloud vloadbalancer setLoadBalancerInstanceSubnet \
    --loadBalancerInstanceNo 41112223 \
    --subnetNoList 23456790 23456791 \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
  "changeLoadBalancerInstanceConfigurationResponse": {
    "totalRows": 1,
    "loadBalancerInstanceList": [
      {
        "loadBalancerInstanceNo": "41112223",
        "loadBalancerInstanceStatus": {
          "code": "USED",
          "codeName": "LB USED state"
        },
        "loadBalancerInstanceOperation": {
          "code": "CHANG",
          "codeName": "LB CHANGE OP"
        },
        "loadBalancerInstanceStatusName": "Changing",
        "loadBalancerDescription": "Updated load balancer description",
        "createDate": "2026-07-07T17:12:11+0900",
        "loadBalancerName": "lb-test-01",
        "loadBalancerDomain": "lb-test-01-41112223-16dd7a5738c1.kr.lb.naverncp.com",
        "loadBalancerIpList": [
          "10.0.2.6"
        ],
        "loadBalancerType": {
          "code": "APPLICATION",
          "codeName": "Application Load Balancer"
        },
        "loadBalancerNetworkType": {
          "code": "PRIVATE",
          "codeName": "Private"
        },
        "throughputType": {
          "code": "SMALL",
          "codeName": "Small"
        },
        "idleTimeout": 120,
        "vpcNo": "12345678",
        "regionCode": "KR",
        "accessLogUseYn": "N",
        "subnetNoList": [
          "23456790",
          "23456791"
        ],
        "loadBalancerSubnetList": [
          {
            "zoneCode": "KR-1",
            "subnetNo": "23456790",
            "publicIpInstanceNo": ""
          },
          {
            "zoneCode": "KR-2",
            "subnetNo": "23456791",
            "publicIpInstanceNo": ""
          }
        ],
        "loadBalancerListenerNoList": [
          "60001111"
        ]
      }
    ],
    "requestId": "f6a7b8c9-d0e1-2345-fabc-678901234567",
    "returnCode": "0",
    "returnMessage": "success"
  }
}