Creates a virtual private cloud (VPC) firewall to control traffic between two VPCs that are connected by using an Express Connect circuit.

Description

You can call the CreateVpcFirewallConfigure operation to create a VPC firewall. The VPC firewall controls traffic between two VPCs that are connected by using an Express Connect circuit. The VPC firewall does not control the mutual access traffic between VPCs that reside in different regions or belong to different Alibaba Cloud accounts. The firewall also does not control the mutual access traffic between VPCs and virtual border routers (VBRs). For more information, see Limits on VPC firewalls.

Limits

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateVpcFirewallConfigure

The operation that you want to perform. Set the value to CreateVpcFirewallConfigure.

Lang String No zh

The natural language of the request and response. Valid values:

  • zh: Chinese (default)
  • en: English
VpcFirewallName String Yes Test firewall

The instance name of the VPC firewall.

LocalVpcId String Yes vpc-8vbwbo90rq0anm6t****

The ID of the local VPC.

LocalVpcRegion String Yes cn-hangzhou

The region ID of the local VPC.

Note For more information about regions in which Cloud Firewall is supported, see Supported regions.
PeerVpcId String Yes vpc-wb8vbo90rq0anm6t****

The ID of the peer VPC.

PeerVpcRegion String Yes cn-shanghai

The region ID of the peer VPC.

Note For more information about regions in which Cloud Firewall is supported, see Supported regions.
FirewallSwitch String Yes open

The status of the VPC firewall after you create the firewall. Valid values:

  • open: After you create the VPC firewall, the firewall is automatically enabled. This is the default value.
  • close: After you create the VPC firewall, the firewall is not automatically enabled. To enable the firewall, you can call the ModifyVpcFirewallSwitchStatus operation.
LocalVpcCidrTableList String Yes [{"RouteTableId":"vtb-1234","RouteEntryList":[{"DestinationCidr":"192.168.XX.XX/24","NextHopInstanceId":"vrt-m5eb5me6c3l5sezae****"}]},{"RouteTableId":"vtb-1235","RouteEntryList":[{"DestinationCidr":"192.168.XX.XX/24","NextHopInstanceId":"vrt-m5eb5me6c3l5sezae****"}]}]

The CIDR blocks of the local VPC. The value is a JSON string that contains the following parameters:

  • RouteTableId: the ID of the route table for the local VPC.
  • RouteEntryList: The value is a JSON string that contains the DestinationCidr and NextHopInstanceId parameters. The DestinationCidr parameter indicates the destination CIDR block of the local VPC. The NextHopInstanceId parameter indicates the instance ID of the next hop for the local VPC.
PeerVpcCidrTableList String Yes [{"RouteTableId":"vtb-1234","RouteEntryList":[{"DestinationCidr":"192.168.XX.XX/24","NextHopInstanceId":"vrt-m5eb5me6c3l5sezae****"}]},{"RouteTableId":"vtb-1235","RouteEntryList":[{"DestinationCidr":"192.168.XX.XX/24","NextHopInstanceId":"vrt-m5eb5me6c3l5sezae****"}]}]

The CIDR blocks of the peer VPC. The value is a JSON string that contains the following parameters:

  • RouteTableId: the ID of the route table for the peer VPC.
  • RouteEntryList: The value is a JSON string that contains the DestinationCidr and NextHopInstanceId parameters. The DestinationCidr parameter indicates the destination CIDR block of the peer VPC. The NextHopInstanceId parameter indicates the instance ID of the next hop for the peer VPC.
MemberUid String No 258039427902****

The UID of the member that is managed by your Alibaba Cloud account.

Response parameters

Parameter Type Example Description
VpcFirewallId String vfw-m5e7dbc4y****

The instance ID of the VPC firewall.

RequestId String 850A84D6-0DE4-4797-A1E8-00090125h4j6

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateVpcFirewallConfigure
&Lang=zh
&VpcFirewallName=Test firewall
&LocalVpcId=vpc-8vbwbo90rq0anm6t****
&LocalVpcRegion=cn-hangzhou
&PeerVpcId=vpc-wb8vbo90rq0anm6t****
&PeerVpcRegion=cn-shanghai
&FirewallSwitch=open
&LocalVpcCidrTableList=[{"RouteTableId":"vtb-1234","RouteEntryList":[{"DestinationCidr":"192.168.XX.XX/24","NextHopInstanceId":"vrt-m5eb5me6c3l5sezae****"}]},{"RouteTableId":"vtb-1235","RouteEntryList":[{"DestinationCidr":"192.168.XX.XX/24","NextHopInstanceId":"vrt-m5eb5me6c3l5sezae****"}]}]
&PeerVpcCidrTableList=[{"RouteTableId":"vtb-1234","RouteEntryList":[{"DestinationCidr":"192.168.XX.XX/24","NextHopInstanceId":"vrt-m5eb5me6c3l5sezae****"}]},{"RouteTableId":"vtb-1235","RouteEntryList":[{"DestinationCidr":"192.168.XX.XX/24","NextHopInstanceId":"vrt-m5eb5me6c3l5sezae****"}]}]
&MemberUid=258039427902****
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateVpcFirewallConfigureResponse>
    <VpcFirewallId>vfw-m5e7dbc4y****</VpcFirewallId>
    <RequestId>850A84D6-0DE4-4797-A1E8-00090125h4j6</RequestId>
</CreateVpcFirewallConfigureResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "VpcFirewallId" : "vfw-m5e7dbc4y****",
  "RequestId" : "850A84D6-0DE4-4797-A1E8-00090125h4j6"
}