All Products
Search
Document Center

Cloud Firewall:CreateVpcFirewallControlPolicy

Last Updated:Aug 30, 2023

Creates an access control policy in a specified policy group for a virtual private cloud (VPC) firewall.

Operation Description

You can call the CreateVpcFirewallControlPolicy operation to create an access control policy in a specified policy group for a VPC firewall. Different access control policies are used when a VPC firewall is used to protect traffic between two VPCs that are connected by using a Cloud Enterprise Network (CEN) instance or an Express Connect circuit.

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

debugging

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:CreateVpcFirewallControlPolicyRead
  • CloudFirewall
    acs:yundun-cloudfirewall:*:{#accountId}:vpcfirewallcontrolpolicy/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

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

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

The action that Cloud Firewall performs on the traffic. Valid values:

  • accept: allows the traffic.
  • drop: blocks the traffic.
  • log: monitors the traffic.
accept
ApplicationNamestringYes

The type of the applications that the access control policy supports. Valid values:

  • FTP
  • HTTP
  • HTTPS
  • MySQL
  • SMTP
  • SMTPS
  • RDP
  • VNC
  • SSH
  • Redis
  • MQTT
  • MongoDB
  • Memcache
  • SSL
  • ANY: all types of applications
HTTP
DescriptionstringYes

The description of the access control policy.

test
DestPortstringNo

The destination port in the access control policy.

Note If DestPortType is set to port, you must specify this parameter.
80
DestinationstringYes

The destination address in the access control policy. Valid values:

  • If DestinationType is set to net, the value of Destination must be a CIDR block.
  • If DestinationType is set to group, the value of Destination must be an address book.
  • If DestinationType is set to domain, the value of Destination must be a domain name.
10.2.XX.XX/24
DestinationTypestringYes

The type of the destination address in the access control policy. Valid values:

  • net: CIDR block
  • group: address book
  • domain: domain name
net
VpcFirewallIdstringYes

The ID of the policy group in which you want to create the access control policy.

  • If a VPC firewall protects the traffic between two VPCs that are connected by using a CEN instance, the value of this parameter must be the ID of the CEN instance.
  • If a VPC firewall protects the traffic between two VPCs that are connected by using an Express Connect circuit, the value of this parameter must be the instance ID of the VPC firewall.
Note You can call the DescribeVpcFirewallAclGroupList operation to query the IDs.
vfw-a42bbb7b887148c9****
ProtostringYes

The type of the protocol in the access control policy. Valid values:

  • ANY (If you are not sure about the protocol type, you can set this parameter to ANY.)
  • TCP
  • UDP
  • ICMP
TCP
SourcestringYes

The source address in the access control policy.

  • If SourceType is set to net, the value of Source must be a CIDR block.
  • If SourceType is set to group, the value of Source must be an address book.
10.2.XX.XX/24
SourceTypestringYes

The type of the source address in the access control policy. Valid values:

  • net: CIDR block
  • group: address book
net
NewOrderstringYes

The priority of the access control policy.

The priority value starts from 1. A smaller priority value indicates a higher priority.

1
DestPortTypestringNo

The type of the destination port in the access control policy. Valid values:

  • port: port
  • group: port address book
port
DestPortGroupstringNo

The name of the destination port address book in the access control policy.

Note If DestPortType is set to group, you must specify this parameter.
my_port_group
MemberUidstringNo

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

258039427902****
ReleasestringNo

Specifies whether to enable the access control policy. By default, an access control policy is enabled after the policy is created. Valid values:

  • true: enables the access control policy.
  • false: disables the access control policy.
true

Response parameters

ParameterTypeDescriptionExample
object
AclUuidstring

The ID of the access control policy.

00281255-d220-4db1-8f4f-c4df221ad84c
RequestIdstring

The ID of the request.

CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D

Examples

Sample success responses

JSONformat

{
  "AclUuid": "00281255-d220-4db1-8f4f-c4df221ad84c",
  "RequestId": "CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D"
}

Error codes

HTTP status codeError codeError messageDescription
400ErrorParametersUidThe aliUid parameter is invalid.The aliUid parameter is invalid.
400ErrorUUIDNewThe UUID is invalid.The UUID is invalid.
400ErrorParametersSourceThe source is invalid.The source is invalid.
400ErrorParametersDestinationThe Destination parameter is invalid.The Destination parameter is invalid.
400ErrorParametersProtoThe protocol is invalid.The protocol is invalid.
400ErrorParametersDestPortThe dst_port is invalid.The dst_port is invalid.
400ErrorParametersActionThe action is invalid.The action is invalid.
400ErrorParametersAppIdThe AppId parameter is incorrect.The AppId parameter is invalid.
400ErrorDBSelectAn error occurred while querying database.An error occurred while querying database.
400ErrorParametersA parameter error occurred.A parameter error occurred.
400ErrorAddressCountExceedThe maximum number of addresses is exceeded.The maximum number of address is exceeded.
400ErrorParametersNewOrderThe newOrder is invalid.The newOrder is invalid.
400ErrorDBInsertAn error occurred while performing an insert operation in the database.An error occurred while performing an insert operation in the database.
400ErrorDBDeleteAn error occurred while deleting the database.An error occurred while deleting the database.
400ErrorRecordLogAn error occurred while updating the operation log.An error occurred while updating the operation log.

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