Resource Center/Network Service/Network Service Operations/VPC Firewall Operations
PUTVPC Firewall OperationsSince 4.0.0SynchronousAuth Required
UpdateFirewallRuleTemplate
UpdateFirewallRuleTemplate
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 UUID of the template.
Body Fields
theupdatefirewallruletemplateObjectRequiredtheupdatefirewallruletemplate request body object.
nameStringOptional. The name of the rule template.
actionStringRequired动作名称。
protocolStringOptional.
destPortStringOptional.
sourcePortStringOptional.
sourceIpStringOptional.
destIpStringOptional.
allowStatesStringOptional.
tcpFlagStringOptional.
icmpTypeNameStringOptional.
ruleNumberIntegerRequired规则数量。
enableLogbooleanOptional.
stateStringOptional.
descriptionStringOptional. The detailed description of the template.
resourceUuidStringOptional. The UUID of the template.
tagUuidsListOptional. The tag tags.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
PUT/zstack/v1/vpcfirewalls/rules/template/{uuid}/actions
/zstack/v1/vpcfirewalls/rules/template/{uuid}/actions
Request Example
curl -X PUT 'http://{host}/zstack/v1/vpcfirewalls/rules/template/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"theupdatefirewallruletemplate":{"name":"<name>","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": { "action": "accept", "protocol": "TCP", "destPort": "22", "sourcePort": "22", "sourceIp": "192.168.1.2", "destIp": "192.168.1.1", "allowStates": "invalid,new", "tcpFlag": "SYN", "icmpTypeName": "echo-reply", "ruleNumber": 1001.0, "enableLog": false, "state": "disable", "isDefault": false, "description": "example rule des" } }Change History
This API has no change history records yet.
