Creates a VPC firewall for a transit router (TR). Before you begin: (1) Purchase Cloud Firewall. (2) Create a Cloud Enterprise Network (CEN) instance and enable an Enterprise Edition forwarding router. (3) Synchronize the TR routing to Cloud Firewall.
Operation description
Creates a virtual private cloud (VPC) firewall for an Enterprise Edition transit router (TR). Before calling this operation, create a CEN instance and an Enterprise Edition transit router in the CEN console, and synchronize the TR to Cloud Firewall. Then call this operation with the CEN ID, TransitRouterId, RegionNo, and RouteMode parameters.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-cloudfirewall:CreateTrFirewallV2 |
create |
*VpcCenTrFirewall
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Lang |
string |
No |
The language of the response. Valid values:
|
zh |
| FirewallName |
string |
No |
The name of the Cloud Firewall instance. |
vpc-firewall-test |
| RouteMode |
string |
No |
The routing mode. Valid values: managed (automatic mode) and manual (manual mode). In managed mode, only FirewallVpcCidr is required. The FirewallSubnetCidr, TrAttachmentSlaveCidr, and TrAttachmentMasterCidr parameters are deprecated and do not need to be specified. In manual mode, specify FirewallVpcId, FirewallVswitchId, TrAttachmentSlaveZone, and TrAttachmentMasterZone. Note
Note: Although this parameter is marked as not required in the schema, it is actually required. If this parameter is not specified, the ErrorParameters (400) error is returned. |
managed |
| TransitRouterId |
string |
No |
The ID of the Enterprise Edition transit router instance. The transit router must belong to the CEN instance specified by CenId. Note
Note: Although this parameter is marked as not required in the schema, it is actually required. If this parameter is not specified, the ErrorParameters (400) error is returned. |
tr-m5etmb2q7e0mxcur**** |
| RegionNo |
string |
No |
The region ID of the Enterprise Edition transit router. Note
Note: Although this parameter is marked as not required in the schema, it is actually required. If this parameter is not specified, the ErrorParameters (400) error is returned. |
cn-hangzhou |
| FirewallVpcCidr |
string |
No |
The CIDR block of the firewall VPC in automatic mode. |
10.0.0.0/16 |
FirewallSubnetCidr
deprecated
|
string |
No |
The subnet CIDR block used to store the firewall elastic network interface (ENI) in the firewall VPC in automatic mode. |
10.0.1.0/24 |
TrAttachmentSlaveCidr
deprecated
|
string |
No |
The secondary subnet CIDR block used to connect to the TR in the firewall VPC in automatic mode. |
10.0.0.16/28 |
TrAttachmentMasterCidr
deprecated
|
string |
No |
The primary subnet CIDR block used to connect to the TR in the firewall VPC in automatic mode. |
10.0.3.0/24 |
| CenId |
string |
No |
The ID of the CEN instance. Create a CEN instance in the CEN console first and make sure that an Enterprise Edition transit router has been created. Note
Note: Although this parameter is marked as not required in the schema, it is actually required. If this parameter is not specified, the ErrorParameters (400) error is returned. |
cen-4xbjup276au29r**** |
| FirewallDescription |
string |
No |
The description of the firewall. |
vpc-firewall-description |
| FirewallVpcId |
string |
No |
The ID of the VPC in which the firewall ENI is created in manual mode. |
vpc-wz9r5qvryn0lg3atb**** |
| FirewallVswitchId |
string |
No |
The ID of the vSwitch in which the firewall ENI is created in manual mode. |
vsw-uf6ydz3vqj77mr5l6**** |
| TrAttachmentSlaveZone |
string |
No |
The secondary zone of the vSwitch. |
cn-chengdu-b |
| TrAttachmentMasterZone |
string |
No |
The primary zone of the vSwitch. |
cn-chengdu-a |
| TrAttachmentZones |
array |
No |
The list of zone IDs used by the TR connection. |
|
|
string |
No |
The zone ID used by the TR connection. |
cn-hangzhou-h |
|
| FirewallAttachmentZone |
string |
No |
The zone ID used by the firewall connection. |
cn-hangzhou-h |
| FirewallServiceMode |
string |
No |
The deployment mode of the firewall service. Valid values:
Note
If this parameter is not specified, the system automatically selects a deployment mode based on the capabilities of the transit router. If an invalid value is specified, the ErrorFwServiceMode (-360437) error is returned. The MultiPrimary mode does not support specifying zones. |
PrimaryStandby |
| FirewallServiceZones |
array |
No |
The list of zone IDs used by the firewall service. |
|
|
string |
No |
The zone ID used by the firewall service. |
cn-hangzhou-i |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| FirewallId |
string |
The instance ID of the virtual private cloud (VPC) firewall. |
vfw-tr-37e22bf0d9b34870**** |
| RequestId |
string |
The request ID. |
822B9125-6E1A-551C-8EAF-6E7AE7444B00 |
Examples
Success response
JSON format
{
"FirewallId": "vfw-tr-37e22bf0d9b34870****",
"RequestId": "822B9125-6E1A-551C-8EAF-6E7AE7444B00"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ErrorTrResourceNotReady | Transit Router has not been detected by cloud firewall | Transit Router has not been detected by cloud firewall |
| 400 | ErrorAliUid | The aliuid is invalid. | The aliuid is invalid. |
| 400 | ErrorParameters | Error Parameters | The parameter is invalid. |
| 400 | ErrorUserCenTrNotEnabled | This account has not enabled CEN Transit Router Enterprise Edition Cloud Firewal. Please contact Cloud Firewall Support team. | This account does not support CEN Enterprise Edition Cloud Firewall for the time being. Please contact the Cloud Firewall service team to add white before operation. |
| 400 | ErrorAuthentication | authentication error | The authentication failed. |
| 400 | ErrorUserCredentials | User credentials failed. | Unauthorized, not accessible, please first authorize firewall permissions. |
| 400 | ErrorCenTRAssociationNotFound | CEN-TR attachment association not found. | CEN-TR attachment association not found. |
| 400 | ErrorUserNotFound | User not found | The user does not exist. |
| 400 | ErrorDBSelectError | A database select error occurred. | The error message returned because an internal error has occurred in querying the database. |
| 400 | ErrorCenNotSupportTREnterpriseAutoMode | VPC firewall does not support TR Enterprise Edition auto mode protection, please use manual mode protection | VPC firewalls do not support the CEN-TR automatic mode. |
| 400 | ErrorVpcFirewallExist | Vpc firewall already exist. | The firewall is already configured and cannot be configured repeatedly. |
| 400 | ErrorInvalidTrFirewallType | Firewall type is invalid. | The firewall type cannot be identified. |
| 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. | 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. |
| 400 | ErrorVpcAndTrNotInTheSameAccount | Vpc and transit router should in the account when create cloud firewall manual mode. | When creating a cloud firewall in the cloud enterprise network manual mode, the VPC and forwarding router configured for the firewall must be under the same account. |
| 400 | ErrorCidrFormat | Network segment CIDR format error, please select again | The format of the specified CIDR block is invalid. Enter another value. |
| 400 | ErrorVswitchCidrIpNumNotEnough | No enough private proxy IP in vswitch cidr. | The firewall switch does not have enough private IP addresses. |
| 400 | ErrorTrFwVswCidrConflict | Illegal tr firewall cidr configuration. | Tr firewall configuration network segment is invalid. |
| 400 | ErrorDBNoRow | No rows in database. | No data found. |
| 400 | ErrorRecordLog | record operation log error. | Update operation log error. |
| 400 | ErrorVpcFirewallZoneId | VPC firewall zone error. | VPC firewall zone selection error |
| 400 | ErrorInvalidMemberUidStatus | invalid member uid status. | The status of the member account is invalid. This operation is not supported. |
| 400 | ErrorGeneralInstanceSpecFull | Cloud Firewall instance specifications are full. | Cloud Firewall instance specifications are full. |
| 400 | ErrorBandwidthPenalty | Cloud Firewall bandwidth is being overused. | Cloud Firewall bandwidth is being overused. |
| 400 | ErrorFirewallQuotaNotEmpty | The quota for VPC firewalls is exceeded. | The quota is insufficient. You cannot configure the VPC firewall. Increase the quota. |
| 400 | ErrorUserNotEnableTrService | The user has not open transit router service. | The forwarding router service is not enabled |
| 400 | ErrorFirewallZoneId | Firewall zone error. | Firewall zone selection error |
| 400 | ErrorTrAttachmentZoneId | TR attachment zone error. | The zone of the transit router connection is invalid. |
| 400 | TransitRouter.NotFound | The specified Transit Router does not exist. Create it using CreateTransitRouter (CBN API) before creating the TR firewall. | The specified Transit Router does not exist. Create it using CreateTransitRouter (CBN API) before creating the TR firewall. |
| 400 | TransitRouter.NotSynced | The Transit Router exists but has not been synced to Cloud Firewall. Wait for sync completion before creating the TR firewall. | The Transit Router exists but has not been synced to Cloud Firewall. Wait for sync completion before creating the TR firewall. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.