AllocateIpv6Address
呼叫 AllocateIpv6Address 介面分配一個游離的 IPv6 地址或 IPv6 Prefix 地址段。該地址不關聯至任何資源執行個體(如彈性網卡、網路型負載平衡等),僅作為獨立的 IPv6 地址存在於 VPC 中。
介面說明
使用場景:為游離 IPv6 地址開通公網頻寬後,在 IPv6 閘道路由表中配置入方向路由,將公網 IPv6 流量通過專線導向 IDC 側,實現 IDC 資源通過阿里雲 IPv6 地址對外提供服務。
如果需要為 ECS 執行個體的彈性網卡分配 IPv6 地址,請呼叫 ECS 的 AssignIpv6Addresses 。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:AllocateIpv6Address |
create |
*Ipv6Address
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
地域 ID。 |
cn-hangzhou |
| VSwitchId |
string |
是 |
IPv6 地址所在的交換機的 ID。 |
vsw-asdfjlnaue4g**** |
| Ipv6Address |
string |
否 |
指定要申請的 IPv6 地址。指定的 IPv6 地址必須是在所屬交換機的地址段內的空閒地址。 |
2408:XXXX:153:3921:851c:c435:7b12:1c5f |
| Ipv6AddressName |
string |
否 |
IPv6 地址的執行個體名稱。 長度為 0~128 個字元,不能以 |
ipv6-name |
| Ipv6AddressDescription |
string |
否 |
IPv6 地址的執行個體描述。 長度為 0~256 個字元,不能以 |
ipv6-description |
| AddressType |
string |
否 |
IPv6 地址的類型,取值:
|
IPv6Address |
| ResourceGroupId |
string |
否 |
資源群組 ID。關於資源群組的更多資訊,請參見什麼是資源群組。 |
rg-bp67acfmxazb4ph**** |
| Tag |
array<object> |
否 |
資源的標籤列表。 |
|
|
object |
否 |
資源的標籤。 |
||
| Key |
string |
否 |
資源的標籤鍵。最多支援輸入 20 個標籤鍵。如需傳入該值,請勿輸入空字串。 一個標籤鍵最多支援 128 個字元,不能以 |
FinanceDept |
| Value |
string |
否 |
資源的標籤值。最多支援輸入 20 個標籤值。如需傳入該值,可以輸入空字串。 最多支援 128 個字元,不能以 aliyun 和 acs:開頭,不能包含 http://或者 https://。 |
FinanceJoshua |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的冪等性。從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元。 說明
若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 不一樣。 |
02fb3da4-130e-11e9-8e44-0016e04**** |
| DryRun |
boolean |
否 |
是否只預檢此次請求,取值:
|
false |
| RegionId |
string |
是 |
地域 ID。 |
cn-hangzhou |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| Ipv6AddressId |
string |
IPv6 地址的執行個體 ID。 |
ipv6-2zen5j4axcp5l5qyy**** |
| Ipv6Address |
string |
IPv6 地址。 |
2408:XXXX:153:3921:851c:c435:7b12:1c5f |
| ResourceGroupId |
string |
資源群組 ID。 |
rg-acfmxazdjdhd**** |
| RequestId |
string |
請求 ID。 |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
樣本
正常返回樣本
JSON格式
{
"Ipv6AddressId": "ipv6-2zen5j4axcp5l5qyy****",
"Ipv6Address": "2408:XXXX:153:3921:851c:c435:7b12:1c5f",
"ResourceGroupId": "rg-acfmxazdjdhd****",
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | OperationFailed.IPv6AddressAlreadyAllocated | The operation is failed because of the ipv6 address specified was allocated. | |
| 400 | OperationFailed.AddressNotInVSwitchCidr | The operation is failed because of %s. | |
| 400 | IllegalParam.IpAddress | The param of %s is illegal. | |
| 400 | OperationFailed.IPv6Disabled | Operation failed because IPv6 is not enabled for the vSwitch. | |
| 400 | OperationFailed.IpPrefixMustInVSwitchCidrReservation | The specified ip prefix must in reserved segment the VSwitch. | |
| 400 | Forbidden.OperateShareResource | You cannot operate shared resources. | |
| 400 | QuotaExceeded.IPv6PrefixMask | The quota of specifed ipv6 prefix mask is exceeded. | |
| 400 | OperationUnsupported.Ipv6Feature | The IPv6 feature is not supported in the region. | |
| 400 | IllegalParam.Ipv6Prefix | The param of Ipv6Prefix is illegal. | |
| 400 | OperationFailed.ExistIPv6Used | The operation is failed because of some ipv6 in the ipv6 prefix is already in use. | |
| 400 | OperationUnsupported.UnboundIpv6PrefixFeature | The region does not support creating IPv6 prefix that are not bound to any resources. | |
| 400 | OperationUnsupported.UnboundIpv6Feature | The region does not support creating IPv6 addresses that are not bound to any resources. | |
| 400 | OperationUnsupported.FreePrivateIpv6 | This operation does not support free private IPv6 addresses. | |
| 404 | ResourceNotFound.VSwitch | The specified resource of %s is not found. | |
| 404 | ResourceNotFound.VSwitchCidrReservation | The dependent vswitch cidr reservation is not found. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。