All Products
Search
Document Center

Cloud Firewall:CreateTrFirewallV2

Last Updated:Sep 02, 2024

Creates a virtual private cloud (VPC) firewall for a transit router.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-cloudfirewall:CreateTrFirewallV2create
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

The language of the content within the response. Valid values:

  • zh: Chinese (default)
  • en: English
zh
FirewallNamestringNo

The name of the firewall.

cfw_test2
RouteModestringNo

The routing mode of the VPC firewall. Valid values:

  • managed: automatic mode
  • manual: manual mode
managed
TransitRouterIdstringNo

The ID of the transit router.

tr-m5etmb2q7e0mxcur****
RegionNostringNo

The region ID of the route router.

cn-hangzhou
FirewallVpcCidrstringNo

The CIDR block that is allocated to the VPC created for the VPC firewall in automatic mode.

10.0.0.0/16
FirewallSubnetCidrstringNo

The subnet CIDR block of the VPC in which the ENI of the firewall is stored in automatic mode.

10.0.1.0/24
TrAttachmentSlaveCidrstringNo

The secondary subnet CIDR block that the VPC uses to connect to the transit router in automatic mode.

10.0.0.16/28
TrAttachmentMasterCidrstringNo

The primary subnet CIDR block that the VPC uses to connect to the transit router in automatic mode.

10.0.3.0/24
CenIdstringNo

The ID of the Cloud Enterprise Network (CEN) instance.

cen-4xbjup276au29r****
FirewallDescriptionstringNo

The description of the firewall.

vfw-sz
FirewallVpcIdstringNo

The ID of the VPC in which the ENI associated with the VPC firewall is created in manual mode.

vpc-wz9r5qvryn0lg3atb****
FirewallVswitchIdstringNo

The ID of the vSwitch that is used to create the ENI in manual mode.

vsw-uf6ydz3vqj77mr5l6****
TrAttachmentSlaveZonestringNo

The secondary zone for the vSwitch.

cn-chengdu-b
TrAttachmentMasterZonestringNo

The primary zone for the vSwitch.

cn-chengdu-a

Response parameters

ParameterTypeDescriptionExample
object
FirewallIdstring

The instance ID of the VPC firewall.

vfw-tr-37e22bf0d9b34870****
RequestIdstring

The request ID.

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

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400ErrorTrResourceNotReadyTransit Router has not been detected by cloud firewall-
400ErrorAliUidThe aliuid is invalid.The aliuid is invalid.
400ErrorParametersError ParametersThe parameter is invalid.
400ErrorUserCenTrNotEnabledThis 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.
400ErrorAuthenticationauthentication errorThe authentication failed.
400ErrorUserCredentialsUser credentials failed.Unauthorized, not accessible, please first authorize firewall permissions.
400ErrorCenTRAssociationNotFoundCEN-TR attachment association not found.CEN-TR attachment association not found.
400ErrorUserNotFoundUser not foundThe user does not exist.
400ErrorDBSelectErrorA database select error occurred.The error message returned because an internal error has occurred in querying the database.
400ErrorCenNotSupportTREnterpriseAutoModeVPC firewall does not support TR Enterprise Edition auto mode protection, please use manual mode protectionVPC firewalls do not support the CEN-TR automatic mode.
400ErrorVpcFirewallExistVpc firewall already exist.The firewall is already configured and cannot be configured repeatedly.
400ErrorInvalidTrFirewallTypeFirewall type is invalid.The firewall type cannot be identified.
400ErrorVpcDoNotSupportSubnetRoutingThe 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.
400ErrorVpcAndTrNotInTheSameAccountVpc 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 the forwarding router must be under the same account.
400ErrorCidrFormatNetwork segment CIDR format error, please select againThe format of the specified CIDR block is invalid. Enter another value.
400ErrorVswitchCidrIpNumNotEnoughNo enough private proxy IP in vswitch cidr.The firewall switch does not have enough private IP addresses.
400ErrorTrFwVswCidrConflictIllegal tr firewall cidr configuration.Tr firewall configuration network segment is invalid.
400ErrorDBNoRowNo rows in database.No data found.
400ErrorRecordLogrecord operation log error.Update operation log error.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-08API Description Update. The Error code has changedView Change Details
2023-10-18The Error code has changed. The request parameters of the API has changedView Change Details
2023-07-21The Error code has changedView Change Details