You need to enable JavaScript to run this app.
文档中心
私有网络

私有网络

复制全文
下载 pdf
网卡
AssignIpv6Addresses - 分配私网IPv6地址
复制全文
下载 pdf
AssignIpv6Addresses - 分配私网IPv6地址
调用 AssignIpv6Addresses 接口,为指定网卡(主网卡/辅助网卡)分配私网IPv6地址。​
说明​
IPv6功能正在邀测中,暂仅支持完成 企业认证 的账号申请试用,如需试用,请联系客户经理。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:AssignIpv6Addresses​
接口名称。当前 API 的名称为AssignIpv6Addresses。​
​
Version String 必选 示例值:2020-04-01​
接口版本。当前 API 的版本为 2020-04-01。​
​
NetworkInterfaceId String 必选 示例值:eni-bp1fg655nh68xyz9****​
网卡的ID。​
您可以调用 DescribeNetworkInterfaces 接口,查询网卡的ID。​
​
Ipv6AddressCount Integer 可选 示例值:2​
为网卡分配私网IPv6地址的数量。传入该参数系统会自动从网卡所属子网中,分配相应数量的空闲IP地址作为网卡的私网IPv6地址。​
说明​
参数Ipv6Address.N和Ipv6AddressCount二者必须传入且只能传入一个。​
​
Ipv6Address.N String 可选 示例值:2408:4008:55b:XXXX:XXXX:922:96c4:e0​
为网卡指定私网IPv6地址。​
  • 参数 - N:表示私网IPv6地址的序号,取值范围由网卡状态决定。​
  • 当网卡处于未挂载(Available)状态时,取值范围为1~10。​
  • 当网卡处于已挂载(InUse)状态时,N的取值范围受到实例规格限制,更多详情请参见实例规格介绍。​
  • 多个私网IPv6地址之间用&分隔。​
  • 指定的私网IPv6地址必须为网卡所属子网中的空闲私网IPv6地址。​
说明​
参数Ipv6Address.N和Ipv6AddressCount二者必须传入且只能传入一个。​
​
ClientToken String 可选 示例值:123e4567-e89b-12d3-a456-42665544****​
客户端Token,用于保证请求幂等性。​
  • 由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。​
  • 仅支持ASCII字符,且不能超过64个字符。​
  • 若不传入ClientToken,则此次API调用不进行幂等校验。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId String 示例值:0ED8D006-F706-4D23-88ED-E11ED28D****​
请求ID。​
​
NetworkInterfaceId String 示例值:eni-bp1fg655nh68xyz9****​
网卡ID。​
​
Ipv6Set String[] 示例值:2408:4008:55b:XXXX:XXXX:922:96c4:e0​
IPv6地址列表。​
​
​
​
请求示例​
​
GET /?Action=AssignIpv6Addresses&Version=2020-04-01&NetworkInterfaceId=eni-bp1fg655nh68xyz9****&Ipv6AddressCount=2 HTTP/1.1​
Host: vpc.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/vpc/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "AssignIpv6Addresses",​
"Version": "2020-04-01",​
"Service": "vpc",​
"Region": "cn-beijing"​
},​
"Result": {​
"Ipv6Set": [​
""​
],​
"NetworkInterfaceId": "eni-bp1fg655nh68xyz9****",​
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28D****"​
}​
}​
​
错误码​
​
状态码​
错误码​
错误信息​
说明​
400​
InsufficientIpInSubnet​
The specified subnet does not contain enough free private IP addresses to fulfill your request.​
指定子网下可用IP不足。​
400​
InvalidEni.InvalidStatus​
The specified elastic network interface is not in the correct status for the request.​
指定的弹性网卡所处的状态无法响应该请求。​
400​
InvalidEni.InvalidType​
The type of specified elastic network interface is illegal for the request.​
指定类型的弹性网卡无法响应该请求。​
400​
InvalidEniIp.Malformed​
The specified elastic network interface ip is malformed. If you are specifying an IP of an elastic network interface, ensure it must fall into the range of the CIDR block of the subnet to which the elastic network interface belongs to.​
指定的弹性网卡IP不合法。请确保网卡IP必须从属于所在子网的网段。​
400​
InvalidEniIpPrefix.Malformed​
The specified elastic network interface IP prefix is malformed. ensure it must fall into the range of the CIDR block of the subnet.​
指定的弹性网卡IP前缀不合法。请确保网卡IP前缀必须从属于所在子网的网段。​
400​
InvalidInstance.InvalidStatus​
The specified instance is not in the correct status for the request.​
指定的ECS实例所处的状态无法响应该请求。​
400​
InvalidIp.Malformed​
The specified ip is malformed.​
指定的IP不合法。​
400​
InvalidIpv6.Malformed​
The specified IPv6 address is malformed.​
指定的IPv6地址不合法。​
400​
InvalidIpv6Prefix.Malformed​
The specified ipv6 prefix is malformed.​
指定的IPv6前缀不合法。​
400​
InvalidParameter.EnableIpv6​
The EnableIpv6 parameter is currently not supported.​
当前不支持EnableIpv6请求参数。​
400​
InvalidPrivateIp.Malformed​
The specified private ip is malformed.​
指定的私网IP不合法。​
400​
InvalidSubnet.DisableIpv6​
Specified subnet disable IPv6​
子网尚未开启IPv6。​
400​
LimitExceeded.Ipv6AddressesPerEni​
You've reached the limit on the number of IPv6 addresses per ENI that you can assign.​
已达到网卡可分配的IPv6地址的数量上限。​
400​
LimitExceeded.PrivateIpsPerEni​
You've reached the limit on the number of private IPs per ENI that you can assign.​
已达到网卡可分配的辅助IP的数量上限。​
400​
QuotaExceeded.SecurityGroupIp​
The number of IP addresses bound to the security group exceeded quota.​
已达到安全组可绑定IP地址的数量上限。​
403​
Forbidden.IpPrefix​
You are not authorized to allocate ip prefix.​
您无权限分配网卡前缀。​
403​
Forbidden​
You are not authorized to perform operations on the specified elastic network interface. The owner of the specified elastic network interface is not in sharing.​
无权限对指定弹性网卡进行操作。指定的弹性网卡归属用户不在共享中。​
403​
Forbidden​
You are not authorized to perform operations on the specified elastic network interface. The specified elastic network interface is a service-managed elastic network interface.​
无权限对指定弹性网卡进行操作。指定的弹性网卡为云产品托管的弹性网卡。​
404​
InvalidEniId.NotFound​
The specified elastic network interface does not exist.​
指定的弹性网卡不存在。​
409​
InvalidIPv4Prefix.Conflict​
The specified IPv4 prefix is in use.​
指定的IPv4前缀已被占用。​
409​
InvalidIPv6Prefix.Conflict​
The specified IPv6 prefix is in use.​
指定的IPv6前缀已被占用。​
409​
InvalidIpAddress.InUse​
The specified IP address is in use.​
指定的IP地址已被占用。​
409​
InvalidIpPrefix.Conflict​
The parameters for IP prefix number and IP prefixes cannot be specified at the same time.​
该请求不允许同时传入IP前缀数量以及IP前缀。​
409​
InvalidParameter.ParameterConflict​
The parameters for IP address number and IP addresses cannot be specified at the same time.​
该请求不允许同时传入IP地址数量以及IP地址。​
​
​
最近更新时间:2026.09.23 11:15:00
这个页面对您有帮助吗?
有用
有用
无用
无用