EC2 / Client / assign_ipv6_addresses
assign_ipv6_addresses#
- 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.
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 network interfaces in the Amazon EC2 User Guide.
See also: AWS API Documentation
Request Syntax
response = client.assign_ipv6_addresses( Ipv6PrefixCount=123, Ipv6Prefixes=[ 'string', ], NetworkInterfaceId='string', Ipv6Addresses=[ 'string', ], Ipv6AddressCount=123 )
- Parameters:
Ipv6PrefixCount (integer) – The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the
Ipv6Prefixes
option.Ipv6Prefixes (list) –
One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the
Ipv6PrefixCount
option.(string) –
NetworkInterfaceId (string) –
[REQUIRED]
The ID of the network interface.
Ipv6Addresses (list) –
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.
(string) –
Ipv6AddressCount (integer) – The number of additional IPv6 addresses to assign to the network interface. The specified number of IPv6 addresses are assigned in addition to the existing IPv6 addresses that are already assigned to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can’t use this option if specifying specific IPv6 addresses.
- Return type:
dict
- Returns:
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.
(string) –
AssignedIpv6Prefixes (list) –
The IPv6 prefixes that are assigned to the network interface.
(string) –
NetworkInterfaceId (string) –
The ID of the network interface.