Lists all firewall rules assigned to a policy.
PolicyFirewallRuleDetailsApi.listFirewallRulesOnPolicy([param1, param2, ...])
PolicyFirewallRuleDetailsApi.list_firewall_rules_on_policy([param1, param2, ...])
PolicyFirewallRuleDetailsApi.listFirewallRulesOnPolicy([param1, param2, ...])
successful operation
Not authorized to view the policy.
The policy does not exist.
import com.trendmicro.deepsecurity.ApiClient; import com.trendmicro.deepsecurity.Configuration; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.ApiException; import com.trendmicro.deepsecurity.api.PolicyFirewallRuleDetailsApi; import com.trendmicro.deepsecurity.model.FirewallRules; public class ListFirewallRulesOnPolicyExample { public static void main(String[] args) { // Setup ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("YOUR HOST"); // Authentication ApiKeyAuth DefaultAuthentication = (ApiKeyAuth) defaultClient.getAuthentication("DefaultAuthentication"); DefaultAuthentication.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } // Initialization // Set Any Required Values PolicyFirewallRuleDetailsApi instance = new PolicyFirewallRuleDetailsApi(); Integer policyID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours FirewallRules result = instance.listFirewallRulesOnPolicy(policyID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling PolicyFirewallRuleDetailsApi.listFirewallRulesOnPolicy"); e.printStackTrace(); } } }
{- "firewallRules": [
- {
- "name": "string",
- "description": "string",
- "action": "log-only",
- "priority": "0",
- "direction": "incoming",
- "frameType": "any",
- "frameNumber": 0,
- "frameNot": true,
- "protocol": "any",
- "protocolNumber": 0,
- "protocolNot": true,
- "sourceIPType": "any",
- "sourceIPValue": "string",
- "sourceIPMask": "string",
- "sourceIPRangeFrom": "string",
- "sourceIPRangeTo": "string",
- "sourceIPMultiple": [
- "string"
], - "sourceIPListID": 0,
- "sourceIPNot": true,
- "sourceMACType": "any",
- "sourceMACValue": "string",
- "sourceMACMultiple": [
- "string"
], - "sourceMACListID": 0,
- "sourceMACNot": true,
- "sourcePortType": "any",
- "sourcePortMultiple": [
- "string"
], - "sourcePortListID": 0,
- "sourcePortNot": true,
- "destinationIPType": "any",
- "destinationIPValue": "string",
- "destinationIPMask": "string",
- "destinationIPRangeFrom": "string",
- "destinationIPRangeTo": "string",
- "destinationIPMultiple": [
- "string"
], - "destinationIPListID": 0,
- "destinationIPNot": true,
- "destinationMACType": "any",
- "destinationMACValue": "string",
- "destinationMACMultiple": [
- "string"
], - "destinationMACListID": 0,
- "destinationMACNot": true,
- "destinationPortType": "any",
- "destinationPortMultiple": [
- "string"
], - "destinationPortListID": 0,
- "destinationPortNot": true,
- "anyFlags": true,
- "logDisabled": true,
- "includePacketData": true,
- "alertEnabled": true,
- "scheduleID": 0,
- "contextID": 0,
- "tcpflags": [
- "fin"
], - "ID": 0,
- "TCPNot": true,
- "ICMPType": 0,
- "ICMPCode": 0,
- "ICMPNot": true
}
]
}
Describe a firewall rule including policy-level overrides.
PolicyFirewallRuleDetailsApi.describeFirewallRuleOnPolicy([param1, param2, ...])
PolicyFirewallRuleDetailsApi.describe_firewall_rule_on_policy([param1, param2, ...])
PolicyFirewallRuleDetailsApi.describeFirewallRuleOnPolicy([param1, param2, ...])
successful operation
Not authorized to view the policy.
The policy or firewall rule does not exist.
import com.trendmicro.deepsecurity.ApiClient; import com.trendmicro.deepsecurity.Configuration; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.ApiException; import com.trendmicro.deepsecurity.api.PolicyFirewallRuleDetailsApi; import com.trendmicro.deepsecurity.model.FirewallRule; public class DescribeFirewallRuleOnPolicyExample { public static void main(String[] args) { // Setup ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("YOUR HOST"); // Authentication ApiKeyAuth DefaultAuthentication = (ApiKeyAuth) defaultClient.getAuthentication("DefaultAuthentication"); DefaultAuthentication.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } // Initialization // Set Any Required Values PolicyFirewallRuleDetailsApi instance = new PolicyFirewallRuleDetailsApi(); Integer policyID = 1; Integer firewallRuleID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours FirewallRule result = instance.describeFirewallRuleOnPolicy(policyID, firewallRuleID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling PolicyFirewallRuleDetailsApi.describeFirewallRuleOnPolicy"); e.printStackTrace(); } } }
{- "name": "string",
- "description": "string",
- "action": "log-only",
- "priority": "0",
- "direction": "incoming",
- "frameType": "any",
- "frameNumber": 0,
- "frameNot": true,
- "protocol": "any",
- "protocolNumber": 0,
- "protocolNot": true,
- "sourceIPType": "any",
- "sourceIPValue": "string",
- "sourceIPMask": "string",
- "sourceIPRangeFrom": "string",
- "sourceIPRangeTo": "string",
- "sourceIPMultiple": [
- "string"
], - "sourceIPListID": 0,
- "sourceIPNot": true,
- "sourceMACType": "any",
- "sourceMACValue": "string",
- "sourceMACMultiple": [
- "string"
], - "sourceMACListID": 0,
- "sourceMACNot": true,
- "sourcePortType": "any",
- "sourcePortMultiple": [
- "string"
], - "sourcePortListID": 0,
- "sourcePortNot": true,
- "destinationIPType": "any",
- "destinationIPValue": "string",
- "destinationIPMask": "string",
- "destinationIPRangeFrom": "string",
- "destinationIPRangeTo": "string",
- "destinationIPMultiple": [
- "string"
], - "destinationIPListID": 0,
- "destinationIPNot": true,
- "destinationMACType": "any",
- "destinationMACValue": "string",
- "destinationMACMultiple": [
- "string"
], - "destinationMACListID": 0,
- "destinationMACNot": true,
- "destinationPortType": "any",
- "destinationPortMultiple": [
- "string"
], - "destinationPortListID": 0,
- "destinationPortNot": true,
- "anyFlags": true,
- "logDisabled": true,
- "includePacketData": true,
- "alertEnabled": true,
- "scheduleID": 0,
- "contextID": 0,
- "tcpflags": [
- "fin"
], - "ID": 0,
- "TCPNot": true,
- "ICMPType": 0,
- "ICMPCode": 0,
- "ICMPNot": true
}
Modify a firewall rule assigned to a policy. Any unset elements will be left unchanged.
PolicyFirewallRuleDetailsApi.modifyFirewallRuleOnPolicy([param1, param2, ...])
PolicyFirewallRuleDetailsApi.modify_firewall_rule_on_policy([param1, param2, ...])
PolicyFirewallRuleDetailsApi.modifyFirewallRuleOnPolicy([param1, param2, ...])
The settings of the firewall rule to modify.
successful operation
Not authorized to modify the policy or the requested modification is not permitted.
The policy or firewall rule does not exist.
{- "name": "string",
- "description": "string",
- "action": "log-only",
- "priority": "0",
- "direction": "incoming",
- "frameType": "any",
- "frameNumber": 0,
- "frameNot": true,
- "protocol": "any",
- "protocolNumber": 0,
- "protocolNot": true,
- "sourceIPType": "any",
- "sourceIPValue": "string",
- "sourceIPMask": "string",
- "sourceIPRangeFrom": "string",
- "sourceIPRangeTo": "string",
- "sourceIPMultiple": [
- "string"
], - "sourceIPListID": 0,
- "sourceIPNot": true,
- "sourceMACType": "any",
- "sourceMACValue": "string",
- "sourceMACMultiple": [
- "string"
], - "sourceMACListID": 0,
- "sourceMACNot": true,
- "sourcePortType": "any",
- "sourcePortMultiple": [
- "string"
], - "sourcePortListID": 0,
- "sourcePortNot": true,
- "destinationIPType": "any",
- "destinationIPValue": "string",
- "destinationIPMask": "string",
- "destinationIPRangeFrom": "string",
- "destinationIPRangeTo": "string",
- "destinationIPMultiple": [
- "string"
], - "destinationIPListID": 0,
- "destinationIPNot": true,
- "destinationMACType": "any",
- "destinationMACValue": "string",
- "destinationMACMultiple": [
- "string"
], - "destinationMACListID": 0,
- "destinationMACNot": true,
- "destinationPortType": "any",
- "destinationPortMultiple": [
- "string"
], - "destinationPortListID": 0,
- "destinationPortNot": true,
- "anyFlags": true,
- "logDisabled": true,
- "includePacketData": true,
- "alertEnabled": true,
- "scheduleID": 0,
- "contextID": 0,
- "tcpflags": [
- "fin"
], - "TCPNot": true,
- "ICMPType": 0,
- "ICMPCode": 0,
- "ICMPNot": true
}
{- "name": "string",
- "description": "string",
- "action": "log-only",
- "priority": "0",
- "direction": "incoming",
- "frameType": "any",
- "frameNumber": 0,
- "frameNot": true,
- "protocol": "any",
- "protocolNumber": 0,
- "protocolNot": true,
- "sourceIPType": "any",
- "sourceIPValue": "string",
- "sourceIPMask": "string",
- "sourceIPRangeFrom": "string",
- "sourceIPRangeTo": "string",
- "sourceIPMultiple": [
- "string"
], - "sourceIPListID": 0,
- "sourceIPNot": true,
- "sourceMACType": "any",
- "sourceMACValue": "string",
- "sourceMACMultiple": [
- "string"
], - "sourceMACListID": 0,
- "sourceMACNot": true,
- "sourcePortType": "any",
- "sourcePortMultiple": [
- "string"
], - "sourcePortListID": 0,
- "sourcePortNot": true,
- "destinationIPType": "any",
- "destinationIPValue": "string",
- "destinationIPMask": "string",
- "destinationIPRangeFrom": "string",
- "destinationIPRangeTo": "string",
- "destinationIPMultiple": [
- "string"
], - "destinationIPListID": 0,
- "destinationIPNot": true,
- "destinationMACType": "any",
- "destinationMACValue": "string",
- "destinationMACMultiple": [
- "string"
], - "destinationMACListID": 0,
- "destinationMACNot": true,
- "destinationPortType": "any",
- "destinationPortMultiple": [
- "string"
], - "destinationPortListID": 0,
- "destinationPortNot": true,
- "anyFlags": true,
- "logDisabled": true,
- "includePacketData": true,
- "alertEnabled": true,
- "scheduleID": 0,
- "contextID": 0,
- "tcpflags": [
- "fin"
], - "ID": 0,
- "TCPNot": true,
- "ICMPType": 0,
- "ICMPCode": 0,
- "ICMPNot": true
}
Remove all overrides for a firewall rule from a policy.
PolicyFirewallRuleDetailsApi.resetFirewallRuleOnPolicy([param1, param2, ...])
PolicyFirewallRuleDetailsApi.reset_firewall_rule_on_policy([param1, param2, ...])
PolicyFirewallRuleDetailsApi.resetFirewallRuleOnPolicy([param1, param2, ...])
successful operation
Not authorized to modify the policy.
The policy does not exist.
import com.trendmicro.deepsecurity.ApiClient; import com.trendmicro.deepsecurity.Configuration; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.ApiException; import com.trendmicro.deepsecurity.api.PolicyFirewallRuleDetailsApi; import com.trendmicro.deepsecurity.model.FirewallRule; public class ResetFirewallRuleOnPolicyExample { public static void main(String[] args) { // Setup ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("YOUR HOST"); // Authentication ApiKeyAuth DefaultAuthentication = (ApiKeyAuth) defaultClient.getAuthentication("DefaultAuthentication"); DefaultAuthentication.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } // Initialization // Set Any Required Values PolicyFirewallRuleDetailsApi instance = new PolicyFirewallRuleDetailsApi(); Integer policyID = 1; Integer firewallRuleID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours FirewallRule result = instance.resetFirewallRuleOnPolicy(policyID, firewallRuleID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling PolicyFirewallRuleDetailsApi.resetFirewallRuleOnPolicy"); e.printStackTrace(); } } }
{- "name": "string",
- "description": "string",
- "action": "log-only",
- "priority": "0",
- "direction": "incoming",
- "frameType": "any",
- "frameNumber": 0,
- "frameNot": true,
- "protocol": "any",
- "protocolNumber": 0,
- "protocolNot": true,
- "sourceIPType": "any",
- "sourceIPValue": "string",
- "sourceIPMask": "string",
- "sourceIPRangeFrom": "string",
- "sourceIPRangeTo": "string",
- "sourceIPMultiple": [
- "string"
], - "sourceIPListID": 0,
- "sourceIPNot": true,
- "sourceMACType": "any",
- "sourceMACValue": "string",
- "sourceMACMultiple": [
- "string"
], - "sourceMACListID": 0,
- "sourceMACNot": true,
- "sourcePortType": "any",
- "sourcePortMultiple": [
- "string"
], - "sourcePortListID": 0,
- "sourcePortNot": true,
- "destinationIPType": "any",
- "destinationIPValue": "string",
- "destinationIPMask": "string",
- "destinationIPRangeFrom": "string",
- "destinationIPRangeTo": "string",
- "destinationIPMultiple": [
- "string"
], - "destinationIPListID": 0,
- "destinationIPNot": true,
- "destinationMACType": "any",
- "destinationMACValue": "string",
- "destinationMACMultiple": [
- "string"
], - "destinationMACListID": 0,
- "destinationMACNot": true,
- "destinationPortType": "any",
- "destinationPortMultiple": [
- "string"
], - "destinationPortListID": 0,
- "destinationPortNot": true,
- "anyFlags": true,
- "logDisabled": true,
- "includePacketData": true,
- "alertEnabled": true,
- "scheduleID": 0,
- "contextID": 0,
- "tcpflags": [
- "fin"
], - "ID": 0,
- "TCPNot": true,
- "ICMPType": 0,
- "ICMPCode": 0,
- "ICMPNot": true
}