全部產品
Search
文件中心

Cloud Firewall:CreateTrFirewallV2 - 建立TR防火牆

更新時間:Jun 03, 2026

建立TR防火牆。

調試

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

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

yundun-cloudfirewall:CreateTrFirewallV2

create

*VpcCenTrFirewall

acs:yundun-cloudfirewall::{#accountId}:vpccentrfirewall/*

請求參數

名稱

類型

必填

描述

樣本值

Lang

string

接收訊息的語言類型。取值:

  • zh(預設):中文

  • en:英文

zh

FirewallName

string

Cloud Firewall的名稱。

vpc-firewall-test

RouteMode

string

路由模式。取值:

  • managed:表示自動模式

  • manual:表示手動模式

managed

TransitRouterId

string

轉寄路由器執行個體 ID。

tr-m5etmb2q7e0mxcur****

RegionNo

string

轉寄路由器執行個體 I 的地區 ID。

cn-hangzhou

FirewallVpcCidr

string

自動模式下防火牆 VPC 網段。

10.0.0.0/16

FirewallSubnetCidr

string

自動模式下防火牆 VPC 中存放防火牆 ENI 的子網網段。

10.0.1.0/24

TrAttachmentSlaveCidr

string

自動模式下防火牆 VPC 中用於串連 TR 的子網備用網段。

10.0.0.16/28

TrAttachmentMasterCidr

string

自動模式下防火牆 VPC 中用於串連 TR 的子網主用網段。

10.0.3.0/24

CenId

string

雲企業網執行個體 ID。

cen-4xbjup276au29r****

FirewallDescription

string

防火牆描述。

vpc-firewall-description

FirewallVpcId

string

手動模式下建立防火牆 ENI 的 VPC ID。

vpc-wz9r5qvryn0lg3atb****

FirewallVswitchId

string

手動模式下建立防火牆 ENI 的 VSW ID。

vsw-uf6ydz3vqj77mr5l6****

TrAttachmentSlaveZone

string

交換器備可用性區域。

cn-chengdu-b

TrAttachmentMasterZone

string

交換器主可用性區域。

cn-chengdu-a

返回參數

名稱

類型

描述

樣本值

object

FirewallId

string

VPC 邊界防火牆執行個體 ID。

vfw-tr-37e22bf0d9b34870****

RequestId

string

返回結果的請求 ID。

822B9125-6E1A-551C-8EAF-6E7AE7444B00

樣本

正常返回樣本

JSON格式

{
  "FirewallId": "vfw-tr-37e22bf0d9b34870****",
  "RequestId": "822B9125-6E1A-551C-8EAF-6E7AE7444B00"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 ErrorTrResourceNotReady Transit Router has not been detected by cloud firewall Cloud Firewall未同步到轉寄路由器
400 ErrorAliUid The aliuid is invalid. 無效的使用者id
400 ErrorParameters Error Parameters 參數錯誤
400 ErrorUserCenTrNotEnabled This account has not enabled CEN Transit Router Enterprise Edition Cloud Firewal. Please contact Cloud Firewall Support team. 此帳號暫時不支援雲企業網企業版Cloud Firewall,請聯絡Cloud Firewall服務團隊加白後再操作。
400 ErrorAuthentication authentication error 鑒權失敗
400 ErrorUserCredentials User credentials failed. 未授權,不可訪問,請先授權防火牆許可權。
400 ErrorCenTRAssociationNotFound CEN-TR attachment association not found. 找不到CEN-TR附件關聯。
400 ErrorUserNotFound User not found 使用者不存在.
400 ErrorDBSelectError A database select error occurred. 內部錯誤:資料庫查詢錯誤
400 ErrorCenNotSupportTREnterpriseAutoMode VPC firewall does not support TR Enterprise Edition auto mode protection, please use manual mode protection VPC 防火牆不支援 CEN-TR自動模式
400 ErrorVpcFirewallExist Vpc firewall already exist. 防火牆已配置,不能重複配置。
400 ErrorInvalidTrFirewallType Firewall type is invalid. 防火牆類型無法識別。
400 ErrorVpcDoNotSupportSubnetRouting The VPC for which the firewall is created does not support subnet routing. Create a custom route table for the VPC to enable subnet routing first. 建立防火牆的VPC不支援子網路由特性,請先去該VPC手動建立自訂路由表啟用特性。
400 ErrorVpcAndTrNotInTheSameAccount Vpc and transit router should in the account when create cloud firewall manual mode. 雲企業網手動模式建立Cloud Firewall時,為防火牆配置的VPC和轉寄路由器需要在同一帳號。
400 ErrorCidrFormat Network segment CIDR format error, please select again 網段CIDR格式錯誤, 請重新選擇
400 ErrorVswitchCidrIpNumNotEnough No enough private proxy IP in vswitch cidr. 防火牆交換器沒有足夠的私網IP。
400 ErrorTrFwVswCidrConflict Illegal tr firewall cidr configuration. Tr 防火牆配置網段不合法。
400 ErrorDBNoRow No rows in database. 沒有資料
400 ErrorRecordLog record operation log error. 更新動作記錄錯誤。
400 ErrorVpcFirewallZoneId VPC firewall zone error. VPC防火牆可用性區域選擇錯誤
400 ErrorInvalidMemberUidStatus invalid member uid status. 成員帳號狀態不合法, 不支援此操作
400 ErrorGeneralInstanceSpecFull Cloud Firewall instance specifications are full. Cloud Firewall執行個體規格已滿。
400 ErrorBandwidthPenalty Cloud Firewall bandwidth is being overused. Cloud Firewall頻寬超量使用處置中。
400 ErrorFirewallQuotaNotEmpty The quota for VPC firewalls is exceeded. 配額不足,無法配置VPC防火牆,請先增加配額
400 ErrorUserNotEnableTrService The user has not open transit router service. 轉寄路由器服務未開通

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

變更歷史

更多資訊,參考變更詳情