CreateTrFirewallV2
Creates a VPC firewall for a transit router. Before you begin: (1) Purchase Cloud Firewall. (2) A CEN instance is created and an Enterprise Edition forward routing transit router is enabled. (3) The synchronization of the TR to Cloud Firewall is complete.
Operation description
Creates a virtual private cloud (VPC) firewall for an Enterprise Edition transit router (TR). Before calling this operation, you must create a CEN instance and an Enterprise Edition transit router in the CEN console, and synchronize the transit router to Cloud Firewall. Then, call this operation by using the CenId, 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 message. Valid values:
|
zh |
| FirewallName |
string |
No |
The name of the Cloud Firewall instance. |
vpc-firewall-test |
| RouteMode |
string |
No |
The routing mode. Valid values:
Note
Note: Although the required field in the schema is set to false, this parameter is actually required. If this parameter is not specified, the API returns ErrorParameters (400). |
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 the required field in the schema is set to false, this parameter is actually required. If this parameter is not specified, the API returns ErrorParameters (400). |
tr-m5etmb2q7e0mxcur**** |
| RegionNo |
string |
No |
The region ID of the Enterprise Edition transit router. Note
Note: Although the required field in the schema is set to false, this parameter is actually required. If this parameter is not specified, the API returns ErrorParameters (400). |
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 CIDR block of the subnet for the firewall elastic network interface (ENI) in the firewall VPC in automatic mode. |
10.0.1.0/24 |
TrAttachmentSlaveCidr
deprecated
|
string |
No |
The secondary CIDR block of the subnet used to connect to the transit router in the firewall VPC in automatic mode. |
10.0.0.16/28 |
TrAttachmentMasterCidr
deprecated
|
string |
No |
The primary CIDR block of the subnet used to connect to the transit router in the firewall VPC in automatic mode. |
10.0.3.0/24 |
| CenId |
string |
No |
The ID of the CEN instance. You must first create a CEN instance in the CEN console and ensure that an Enterprise Edition transit router is created. Note
Note: Although the required field in the schema is set to false, this parameter is actually required. If this parameter is not specified, the API returns ErrorParameters (400). |
cen-4xbjup276au29r**** |
| FirewallDescription |
string |
No |
The description of the firewall. |
vpc-firewall-description |
| FirewallVpcId |
string |
No |
The ID of the VPC where the firewall ENI is created in manual mode. |
vpc-wz9r5qvryn0lg3atb**** |
| FirewallVswitchId |
string |
No |
The ID of the vSwitch where 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 for the transit router connection. |
|
|
string |
No |
A single zone ID used for the transit router connection. |
cn-hangzhou-h |
|
| FirewallAttachmentZone |
string |
No |
The zone ID used for the firewall connection. |
cn-hangzhou-h |
| FirewallServiceMode |
string |
No |
The deployment mode of the firewall service. Valid values:
Note
Note: If this parameter is not specified, the system automatically selects a deployment mode based on the capabilities of the transit router. If the value is invalid, the API returns ErrorFwServiceMode (-360437). The MultiPrimary mode does not support specifying zones. |
PrimaryStandby |
| FirewallServiceZones |
array |
No |
The list of zone IDs used by the firewall service. |
|
|
string |
No |
A single zone ID used by the firewall service. |
cn-hangzhou-i |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| FirewallId |
string |
The instance ID of the border virtual private cloud (VPC) firewalls. |
vfw-tr-37e22bf0d9b34870**** |
| RequestId |
string |
The ID of the request. |
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. | |
| 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. |
| 400 | ErrorNotBuyUser | Not buy user. | Your account has not activated the Cloud Firewall and cannot call the API. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.