SetSubnets#

Description#

Request to add subnets to an existing Elastic Load Balancer (ELB).

To add a subnet to the network load balancer, the relevant request must first list all existing ELB subnets and only then the subnets to be added.

Request Parameters#

Required parameters#

  • LoadBalancerArn — The Amazon Resource Name (ARN) of the load balancer.

    • Type: String

    • Required: Yes

Optional parameters#

  • Subnets.N — The subnets in which ELB will run. You can specify subnets from one or more availability zones.

    • Type: Array of strings

    • Required: No

    • Constraints: Cannot be used with the SubnetMappings option. You can only specify one subnet for each availability zone

  • SubnetMappings.N — Subnets in which the ELB will run. You can specify subnets from one or more availability zones.

    • Type: List of SubnetMapping objects

    • Required: No

    • Constraints: Cannot be used with the Subnets option. You can only specify one subnet for each availability zone

Examples#

c2-elb SetSubnets LoadBalancerArn "elb_arn" Subnets.0 "subnet-xxxxxxxx" Subnets.1 "subnet-yyyyyyyy"

c2-elb SetSubnets LoadBalancerArn "elb_arn" SubnetMappings.0.SubnetId "subnet-xxxxxxxx" SubnetMappings.0.AllocationId "eipalloc-xxxxxxxx" SubnetMappings.1.SubnetId "subnet-yyyyyyyy"