CreateFirewallRule
CreateFirewallRule
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
paramsObjectRequiredRequest body parameter object.
ruleSetUuidStringRequiredThe ruleset UUID.
actionStringRequiredThe action taken against data packets.
protocolStringOptional. The protocol.
destPortStringOptional. The destination port.
sourcePortStringOptional. The source port.
sourceIpStringOptional. The source IP address.
destIpStringOptional. The destination IP address.
allowStatesStringOptional. The allow status of packets.
tcpFlagStringOptional. The TCP flag.
icmpTypeNameStringOptional. The ICMP type.
ruleNumberIntegerRequiredThe priority of the rule.
enableLogbooleanOptional. Specifies whether to enable logging.
stateStringRequiredThe action that changes the state of the rule.
descriptionStringOptional. The detailed description of the rule.
resourceUuidStringOptional. The rule UUID.
tagUuidsListOptional. The tag UUIDs.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/v1/vpcfirewalls/rules
/v1/vpcfirewalls/rules
Request Example
curl -X POST 'http://{host}/v1/vpcfirewalls/rules' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"ruleSetUuid":"<ruleSetUuid>","action":"<action>","protocol":"<protocol>","destPort":"<destPort>","sourcePort":"<sourcePort>","sourceIp":"<sourceIp>","destIp":"<destIp>","allowStates":"<allowStates>","tcpFlag":"<tcpFlag>","icmpTypeName":"<icmpTypeName>","ruleNumber":1,"enableLog":true,"state":"<state>","description":"<description>","resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "ruleSetUuid": "34db2df69d593f0b893a2cc9035bd2f3", "action": "accept", "protocol": "TCP", "destPort": "22", "sourcePort": "22", "sourceIp": "192.168.1.2", "destIp": "192.168.1.1", "ruleNumber": 1001.0, "allowStates": "invalid,new", "tcpFlag": "SYN", "icmpTypeName": "echo-reply", "enableLog": false, "isApplied": true, "expired": false, "state": "disable", "isDefault": false, "description": "example rule des" } }Change History
This API has no change history records yet.
