SetIpAddressType - Elastic Load Balancing

SetIpAddressType

Sets the type of IP addresses used by the subnets of the specified load balancer.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

IpAddressType

Note: Internal load balancers must use the ipv4 IP address type.

[Application Load Balancers] The IP address type. The possible values are ipv4 (for only IPv4 addresses), dualstack (for IPv4 and IPv6 addresses), and dualstack-without-public-ipv4 (for IPv6 only public addresses, with private IPv4 and IPv6 addresses).

Note: Application Load Balancer authentication only supports IPv4 addresses when connecting to an Identity Provider (IdP) or Amazon Cognito endpoint. Without a public IPv4 address the load balancer cannot complete the authentication process, resulting in HTTP 500 errors.

[Network Load Balancers] The IP address type. The possible values are ipv4 (for only IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). You can’t specify dualstack for a load balancer with a UDP or TCP_UDP listener.

[Gateway Load Balancers] The IP address type. The possible values are ipv4 (for only IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses).

Type: String

Valid Values: ipv4 | dualstack | dualstack-without-public-ipv4

Required: Yes

LoadBalancerArn

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

Type: String

Required: Yes

Response Elements

The following element is returned by the service.

IpAddressType

The IP address type.

Type: String

Valid Values: ipv4 | dualstack | dualstack-without-public-ipv4

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidConfigurationRequest

The requested configuration is not valid.

HTTP Status Code: 400

InvalidSubnet

The specified subnet is out of available addresses.

HTTP Status Code: 400

LoadBalancerNotFound

The specified load balancer does not exist.

HTTP Status Code: 400

Examples

Set the IP address type of a load balancer

This example sets the IP address type of the specified load balancer to dualstack to support IPv4 and IPv6 addresses. The load balancer subnets must have associated IPv6 CIDR blocks.

Sample Request

https://elasticloadbalancing.amazonaws.com/?Action=SetIpAddressType &LoadBalancerArn=arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188 &IpAddressType=dualstack &Version=2015-12-01 &AUTHPARAMS

Sample Response

<SetIpAddressTypeResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/"> <SetIpAddressTypeResult> <IpAddressType>dualstack</IpAddressType> </SetIpAddressTypeResult> <ResponseMetadata> <RequestId>a127426b-f3ab-11e5-9192-3fff33344cfa</RequestId> </ResponseMetadata> </SetIpAddressTypeResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: