UpdateFirewallRule
UpdateFirewallRule
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
uuidStringRequiredThe rule UUID.
Body Fields
updatefirewallruleObjectRequiredupdatefirewallrule request body 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.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
PUT/zstack/v1/vpcfirewalls/rules/{uuid}/actions
/zstack/v1/vpcfirewalls/rules/{uuid}/actions
Request Example
curl -X PUT 'http://{host}/zstack/v1/vpcfirewalls/rules/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"updatefirewallrule":{"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>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "ruleSetUuid": "52099ab881ba30a09589fa0040a1b6a2", "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.
