All Products
Search
Document Center

Elastic Container Instance:Assign an IPv6 address to an elastic container instance

Last Updated:Feb 27, 2026

Elastic Container Instance supports IPv4 and IPv6 addresses. When you create a container group through the CreateContainerGroup API operation, you can assign an IPv6 address to enable IPv6 connectivity for the elastic container instance.

Prerequisites

Before you begin, make sure that you have:

  • A VPC with IPv6 CIDR blocks enabled. For more information, see Enable IPv6 for a VPC

  • A vSwitch with IPv6 CIDR blocks enabled. For more information, see Enable IPv6 for a vSwitch

  • (Conditional) If you create elastic container instances by specifying Elastic Compute Service (ECS) instance types, the specified instance types must support IPv6 addresses. For more information, see Overview of instance families

All elastic container instances created by specifying the number of vCPUs and memory size support IPv6 addresses. If you create elastic container instances by specifying vCPUs and memory, IPv6 is always supported.

Limitations

Only one IPv6 address can be assigned to each elastic container instance.

Assign an IPv6 address through the API

Call the CreateContainerGroup API operation and set the following parameters:

ParameterTypeExampleDescription
Ipv6AddressCountInteger1The number of IPv6 addresses to assign. Set this to 1. Only one IPv6 address can be assigned per elastic container instance.
Ipv6GatewayBandwidthEnableBooleantrueSpecifies whether to enable Internet access over IPv6 for the elastic container instance.
Ipv6GatewayBandwidthInteger100The maximum Internet bandwidth of the IPv6 address, in Mbit/s. Takes effect only when Ipv6GatewayBandwidthEnable is set to true. For valid values, see the bandwidth range table below. Default: the maximum value in the bandwidth range of the IPv6 gateway.

Bandwidth ranges by billing method

The valid range for Ipv6GatewayBandwidth depends on the billing method of the Internet bandwidth for the IPv6 Gateway:

Billing methodBandwidth range
pay-by-bandwidth1 to 2,000 Mbit/s
pay-by-traffic1 to 1,000 Mbit/s

If Ipv6GatewayBandwidth is not specified, the default value is the maximum value in the bandwidth range of the IPv6 gateway.

Verify the IPv6 address

After you create the elastic container instance, call the DescribeContainerGroups API operation to query the instance details. The assigned IPv6 address appears in the Ipv6Address field of the response.

References