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.

This is the response object from the SetSubnets operation.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.ElasticLoadBalancingV2.Model.SetSubnetsResponse

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

Syntax

C#
public class SetSubnetsResponse : AmazonWebServiceResponse

The SetSubnetsResponse type exposes the following members

Constructors

NameDescription
Public Method SetSubnetsResponse()

Properties

NameTypeDescription
Public Property AvailabilityZones System.Collections.Generic.List<Amazon.ElasticLoadBalancingV2.Model.AvailabilityZone>

Gets and sets the property AvailabilityZones.

Information about the subnets.

Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property EnablePrefixForIpv6SourceNat Amazon.ElasticLoadBalancingV2.EnablePrefixForIpv6SourceNatEnum

Gets and sets the property EnablePrefixForIpv6SourceNat.

[Network Load Balancers] Indicates whether to use an IPv6 prefix from each subnet for source NAT.

Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property IpAddressType Amazon.ElasticLoadBalancingV2.IpAddressType

Gets and sets the property IpAddressType.

The IP address type.

Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.

Examples

This example enables the Availability Zones for the specified subnets for the specified load balancer.

To enable Availability Zones for a load balancer


var client = new AmazonElasticLoadBalancingV2Client();
var response = client.SetSubnets(new SetSubnetsRequest 
{
    LoadBalancerArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188",
    Subnets = new List<string> {
        "subnet-8360a9e7",
        "subnet-b7d581c0"
    }
});

List<AvailabilityZone> availabilityZones = response.AvailabilityZones;

            

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5