Search for firewall rules using optional filters.
FirewallRulesApi.searchFirewallRules([param1, param2, ...])
FirewallRulesApi.search_firewall_rules([param1, param2, ...])
FirewallRulesApi.searchFirewallRules([param1, param2, ...])
A collection of options used to filter the search results.
successful operation
Not authorized to view firewall rules.
{- "maxItems": 0,
- "searchCriteria": [
- {
- "fieldName": "string",
- "booleanTest": true,
- "numericTest": "less-than",
- "numericValue": 0,
- "stringTest": "equal",
- "stringValue": "string",
- "stringWildcards": true,
- "choiceTest": "equal",
- "choiceValue": "string",
- "firstDateValue": 0,
- "firstDateInclusive": true,
- "lastDateValue": 0,
- "lastDateInclusive": true,
- "nullTest": true,
- "idValue": 0,
- "idTest": "less-than"
}
], - "sortByObjectID": true
}
{- "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
}
]
}
Lists all firewall rules.
FirewallRulesApi.listFirewallRules([param1, param2, ...])
FirewallRulesApi.list_firewall_rules([param1, param2, ...])
FirewallRulesApi.listFirewallRules([param1, param2, ...])
successful operation
Not authorized to view firewall rules.
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.FirewallRulesApi; import com.trendmicro.deepsecurity.model.FirewallRules; public class ListFirewallRulesExample { 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 FirewallRulesApi instance = new FirewallRulesApi(); String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours FirewallRules result = instance.listFirewallRules(apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling FirewallRulesApi.listFirewallRules"); 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
}
]
}
Create a new firewall rule.
FirewallRulesApi.createFirewallRule([param1, param2, ...])
FirewallRulesApi.create_firewall_rule([param1, param2, ...])
FirewallRulesApi.createFirewallRule([param1, param2, ...])
The settings of the new firewall rule.
successful operation
Not authorized to create firewall rules.
{- "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
}
Describe a firewall rule by ID.
FirewallRulesApi.describeFirewallRule([param1, param2, ...])
FirewallRulesApi.describe_firewall_rule([param1, param2, ...])
FirewallRulesApi.describeFirewallRule([param1, param2, ...])
successful operation
Not authorized to view firewall rules.
The 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.FirewallRulesApi; import com.trendmicro.deepsecurity.model.FirewallRule; public class DescribeFirewallRuleExample { 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 FirewallRulesApi instance = new FirewallRulesApi(); Integer firewallRuleID = 1; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours FirewallRule result = instance.describeFirewallRule(firewallRuleID, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling FirewallRulesApi.describeFirewallRule"); 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 by ID.
FirewallRulesApi.modifyFirewallRule([param1, param2, ...])
FirewallRulesApi.modify_firewall_rule([param1, param2, ...])
FirewallRulesApi.modifyFirewallRule([param1, param2, ...])
The settings of the firewall rule to modify.
successful operation
Not authorized to modify API keys or the requested modification is not permitted.
The 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
}
Delete a firewall rule by ID.
FirewallRulesApi.deleteFirewallRule([param1, param2, ...])
FirewallRulesApi.delete_firewall_rule([param1, param2, ...])
FirewallRulesApi.deleteFirewallRule([param1, param2, ...])
Request is successful.
Not authorized to delete firewall rules.
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.FirewallRulesApi; public class DeleteFirewallRuleExample { 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 FirewallRulesApi instance = new FirewallRulesApi(); Integer firewallRuleID = 1; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours instance.deleteFirewallRule(firewallRuleID, apiVersion); } catch (ApiException e) { System.err.println("An exception occurred when calling FirewallRulesApi.deleteFirewallRule"); e.printStackTrace(); } } }