CreateIpv6EgressOnlyRule - 為IPv6地址添加僅主動出規則

更新時間:
Copy as MD

您可以通過建立僅主動出規則,使開通了IPv6網段的VPC中的ECS可以主動訪問用戶端的IPv6終端,但不允許用戶端的IPv6終端通過互連網訪問VPC網路中的ECS執行個體,調用CreateIpv6EgressOnlyRuleIPv6地址添加僅主動出規則。

介面說明

  • CreateIpv6EgressOnlyRule 介面屬於非同步介面,即系統返回一個執行個體 ID,但該 IPv6 地址的僅主動出規則尚未建立成功,系統背景建立任務仍在進行。您可以調用 DescribeIpv6EgressOnlyRules 查詢 IPv6 地址的僅主動出規則的建立狀態:
    • 當 IPv6 地址的僅主動出規則處於 Creating 狀態時,表示 IPv6 地址僅主動出規則正在建立中。

    • 當 IPv6 地址的僅主動出規則處於 Created 狀態時,表示 IPv6 地址僅主動出規則建立完成。

  • CreateIpv6EgressOnlyRule 介面不支援為同一個 IPv6 地址並發添加僅主動出規則。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

IPv6 網關的地區 ID。

您可以通過調用 DescribeRegions 介面擷取地區 ID。

cn-huhehaote

Ipv6GatewayId

string

IPv6 網關執行個體 ID。

ipv6gw-hp3c2paq0ywauasza****

InstanceId

string

需要設定僅主動出規則的 IPv6 地址 ID。

ipv6-hp3nxjkfxn5pnhgl5****

InstanceType

string

需要設定僅主動出規則的執行個體類型。

僅取值:Ipv6Address(預設值),表示為 IPv6 地址類型。

Ipv6Address

Name

string

僅主動出規則的名稱。

長度為 0-128 個字元,不能以http://https://開頭。

rulename

Description

string

僅主動出規則的描述。

長度為 0-256 個字元,不能以http://https://開頭。

ruledescription

ClientToken

string

用戶端 Token,用於保證請求的等冪性。

由用戶端產生該參數值,要保證在不同請求間唯一,最大值不超過 64 個 ASCII 字元。

說明

若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 不一樣。

0c593ea1-3bea-11e9-b96b-88e9fe637760

RegionId

string

IPv6 網關的地區 ID。

您可以通過調用 DescribeRegions 介面擷取地區 ID。

cn-huhehaote

DryRun

boolean

參數預檢,不實際運行

返回參數

名稱

類型

描述

樣本值

object

Ipv6EgressRuleId

string

僅主動出規則的 ID。

ipv6py-hp3w98rmlbqp01245****

RequestId

string

請求 ID。

9DFEDBEE-E5AB-49E8-A2DC-CC114C67AF75

樣本

正常返回樣本

JSON格式

{
  "Ipv6EgressRuleId": "ipv6py-hp3w98rmlbqp01245****",
  "RequestId": "9DFEDBEE-E5AB-49E8-A2DC-CC114C67AF75"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidIpv6Gateway.NotFound The specified IPv6 gateway was not found. 指定的IPv6網關未找到。
400 IllegalParam.Name The param of Name [%s] is illegal. 參數 Name 不合法,請根據請求參數規定重新輸入。
400 IllegalParam.Description The parameter of Description is illegal. 參數Description非法。
400 IllegalParam.InstanceType The parameter of InstanceType is illegal. 參數InstanceType非法。
400 OperationFailed.FinancialLocked The operation is forbidden because of financialLocked. 操作失敗,已欠費。
400 OperationUnsupported.EgressRuleVSwitch The specified VSwitch is not supported to create egress-only rule. 指定地區尚未支援交換粒度的僅主動出規則。
400 InvalidIpv6Instance.NotFound The specified resource of InvalidIpv6Instance is not found. 未找到指定的Ipv6Instance資源。
400 OperationFailed.NoInternetBandwidth Operation failed because the ipv6 instance has no internet bandwidth. 該操作不受支援,因為IPv6執行個體沒有公網頻寬。
400 OperationFailed.Ipv6EgressRuleExisted An egress-only rule already exists for the IPv6 address. ipv6執行個體已存在僅主動出規則。
400 OperationFailed.InternetBandwidthUnstable The operation is forbidden because of InternetBandwidthUnstable. 由於頻寬執行個體處於非穩態,該操作被禁止。
400 IncorrectStatus.Ipv6InternetBandwidth The status of the IPv6InternetBandwidth is incorrect. IPv6公網頻寬目前狀態不支援建立IPv6僅出規則。
400 OperationUnsupported.EgressRuleInDefaultSpec Egress-only rule is not supported. Please update the spec of IPv6 Gateway to Medium or Large. 免費版IPv6網關不支援建立僅主動出規則,請將IPv6網關升級為企業版或企業增強版。
400 QuotaExceeded.Ipv6EgressRules %s quota exceeded. Ipv6EgressRules數量配額超限
400 Mismatch.Ipv6AddressAndIpv6Gateway The %s and %s are mismatched. 指定的Ipv6AddressIpv6Gateway不在同一VPC
400 OperationUnsupported.EgressOnlyRuleOnFreeIpv6Instance Creating ipv6 egress only rule on ipv6 instance that not associated with any resource is unsupported. 不支援在未綁定資源的IPv6執行個體上建立僅主動出規則
400 MissingParam.InstanceId The parameter InstanceId is mandatory. 物理專線執行個體ID必須填寫。
400 InvalidRegionId.NotFound The specified RegionId does not exist in our records. 指定的RegionId不存在。
400 OperationUnsupported.ULA %s is unsupported. 當前操作不支援ULA地址
400 OperationUnsupported.PrivateGUA This operation does not support private GUA addresses. 當前操作不支援私網GUA地址。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情