AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the EnableAvailabilityZonesForLoadBalancer operation. Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer.

The load balancer evenly distributes requests across all its registered Availability Zones that contain instances.

For more information, see Add or Remove Availability Zones in the Classic Load Balancer Guide.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.ElasticLoadBalancing.AmazonElasticLoadBalancingRequest
      Amazon.ElasticLoadBalancing.Model.EnableAvailabilityZonesForLoadBalancerRequest

Namespace: Amazon.ElasticLoadBalancing.Model
Assembly: AWSSDK.ElasticLoadBalancing.dll
Version: 3.x.y.z

Syntax

C#
public class EnableAvailabilityZonesForLoadBalancerRequest : AmazonElasticLoadBalancingRequest
         IAmazonWebServiceRequest

The EnableAvailabilityZonesForLoadBalancerRequest type exposes the following members

Constructors

NameDescription
Public Method EnableAvailabilityZonesForLoadBalancerRequest()

Empty constructor used to set properties independently even when a simple constructor is available

Public Method EnableAvailabilityZonesForLoadBalancerRequest(string, List<String>)

Instantiates EnableAvailabilityZonesForLoadBalancerRequest with the parameterized properties

Properties

NameTypeDescription
Public Property AvailabilityZones System.Collections.Generic.List<System.String>

Gets and sets the property AvailabilityZones.

The Availability Zones. These must be in the same region as the load balancer.

Public Property LoadBalancerName System.String

Gets and sets the property LoadBalancerName.

The name of the load balancer.

Examples

This example adds the specified Availability Zone to the specified load balancer.

To enable an Availability Zone for a load balancer


var response = client.EnableAvailabilityZonesForLoadBalancer(new EnableAvailabilityZonesForLoadBalancerRequest 
{
    AvailabilityZones = new List {
        "us-west-2b"
    },
    LoadBalancerName = "my-load-balancer"
});

List availabilityZones = response.AvailabilityZones;

            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms