EC2.Client.
assign_ipv6_addresses
(**kwargs)¶Assigns one or more IPv6 addresses to the specified network interface. You can specify one or more specific IPv6 addresses, or you can specify the number of IPv6 addresses to be automatically assigned from within the subnet's IPv6 CIDR block range. You can assign as many IPv6 addresses to a network interface as you can assign private IPv4 addresses, and the limit varies per instance type. For information, see IP Addresses Per Network Interface Per Instance Type in the Amazon Elastic Compute Cloud User Guide .
You must specify either the IPv6 addresses or the IPv6 address count in the request.
You can optionally use Prefix Delegation on the network interface. You must specify either the IPV6 Prefix Delegation prefixes, or the IPv6 Prefix Delegation count. For information, see Assigning prefixes to Amazon EC2 network interfaces in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
Request Syntax
response = client.assign_ipv6_addresses(
Ipv6AddressCount=123,
Ipv6Addresses=[
'string',
],
Ipv6PrefixCount=123,
Ipv6Prefixes=[
'string',
],
NetworkInterfaceId='string'
)
The IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 addresses.
Ipv6Prefixes
option.One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount
option.
[REQUIRED]
The ID of the network interface.
dict
Response Syntax
{
'AssignedIpv6Addresses': [
'string',
],
'AssignedIpv6Prefixes': [
'string',
],
'NetworkInterfaceId': 'string'
}
Response Structure
(dict) --
AssignedIpv6Addresses (list) --
The new IPv6 addresses assigned to the network interface. Existing IPv6 addresses that were assigned to the network interface before the request are not included.
AssignedIpv6Prefixes (list) --
The IPv6 prefixes that are assigned to the network interface.
NetworkInterfaceId (string) --
The ID of the network interface.