Describe a firewall rule
Describe a firewall rule including computer-level overrides.
ComputerFirewallRuleDetailsApi.describeFirewallRuleOnComputer([param1, param2, ...])
ComputerFirewallRuleDetailsApi.describe_firewall_rule_on_computer([param1, param2, ...])
ComputerFirewallRuleDetailsApi.describeFirewallRuleOnComputer([param1, param2, ...])
path Parameters
successful operation
Not authorized to view the computer.
The computer does not exist.
- Java
- Python
- JavaScript
import com.trendmicro.deepsecurity.ApiClient; import com.trendmicro.deepsecurity.Configuration; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.ApiException; import com.trendmicro.deepsecurity.api.ComputerFirewallRuleDetailsApi; import com.trendmicro.deepsecurity.model.FirewallRule; public class DescribeFirewallRuleOnComputerExample { public static void main(String[] args) { // Setup ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("YOUR HOST"); // Authentication ApiKeyAuth Legacy API Key = (ApiKeyAuth) defaultClient.getAuthentication("Legacy API Key"); Legacy API Key.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } ApiKeyAuth Trend Micro Cloud One API Key = (ApiKeyAuth) defaultClient.getAuthentication("Trend Micro Cloud One API Key"); Trend Micro Cloud One API Key.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 ComputerFirewallRuleDetailsApi instance = new ComputerFirewallRuleDetailsApi(); Integer computerID = 1; Integer firewallRuleID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours FirewallRule result = instance.describeFirewallRuleOnComputer(computerID, firewallRuleID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling ComputerFirewallRuleDetailsApi.describeFirewallRuleOnComputer"); e.printStackTrace(); } } }
- 200
{- "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
Modify a firewall rule assigned to a computer. Any unset elements will be left unchanged.
ComputerFirewallRuleDetailsApi.modifyFirewallRuleOnComputer([param1, param2, ...])
ComputerFirewallRuleDetailsApi.modify_firewall_rule_on_computer([param1, param2, ...])
ComputerFirewallRuleDetailsApi.modifyFirewallRuleOnComputer([param1, param2, ...])
path Parameters
header Parameters
Request Body schema: application/json
The settings of the firewall rule to modify.
successful operation
Not authorized to modify the computer or the requested modification is not permitted.
The firewall rule does not exist or the computer does not exist.
- Payload
- Java
- Python
- JavaScript
{- "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
}
- 200
{- "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
}
Reset firewall rule overrides
Remove all overrides for a firewall rule from a computer.
ComputerFirewallRuleDetailsApi.resetFirewallRuleOnComputer([param1, param2, ...])
ComputerFirewallRuleDetailsApi.reset_firewall_rule_on_computer([param1, param2, ...])
ComputerFirewallRuleDetailsApi.resetFirewallRuleOnComputer([param1, param2, ...])
path Parameters
successful operation
Not authorized to modify the computer.
The computer does not exist.
- Java
- Python
- JavaScript
import com.trendmicro.deepsecurity.ApiClient; import com.trendmicro.deepsecurity.Configuration; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.ApiException; import com.trendmicro.deepsecurity.api.ComputerFirewallRuleDetailsApi; import com.trendmicro.deepsecurity.model.FirewallRule; public class ResetFirewallRuleOnComputerExample { public static void main(String[] args) { // Setup ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("YOUR HOST"); // Authentication ApiKeyAuth Legacy API Key = (ApiKeyAuth) defaultClient.getAuthentication("Legacy API Key"); Legacy API Key.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } ApiKeyAuth Trend Micro Cloud One API Key = (ApiKeyAuth) defaultClient.getAuthentication("Trend Micro Cloud One API Key"); Trend Micro Cloud One API Key.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 ComputerFirewallRuleDetailsApi instance = new ComputerFirewallRuleDetailsApi(); Integer computerID = 1; Integer firewallRuleID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours FirewallRule result = instance.resetFirewallRuleOnComputer(computerID, firewallRuleID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling ComputerFirewallRuleDetailsApi.resetFirewallRuleOnComputer"); e.printStackTrace(); } } }
- 200
{- "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
}
List firewall rules
Lists all firewall rules assigned to a computer.
ComputerFirewallRuleDetailsApi.listFirewallRulesOnComputer([param1, param2, ...])
ComputerFirewallRuleDetailsApi.list_firewall_rules_on_computer([param1, param2, ...])
ComputerFirewallRuleDetailsApi.listFirewallRulesOnComputer([param1, param2, ...])
successful operation
Not authorized to view the computer.
The computer does not exist.
- Java
- Python
- JavaScript
import com.trendmicro.deepsecurity.ApiClient; import com.trendmicro.deepsecurity.Configuration; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.ApiException; import com.trendmicro.deepsecurity.api.ComputerFirewallRuleDetailsApi; import com.trendmicro.deepsecurity.model.FirewallRules; public class ListFirewallRulesOnComputerExample { public static void main(String[] args) { // Setup ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("YOUR HOST"); // Authentication ApiKeyAuth Legacy API Key = (ApiKeyAuth) defaultClient.getAuthentication("Legacy API Key"); Legacy API Key.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } ApiKeyAuth Trend Micro Cloud One API Key = (ApiKeyAuth) defaultClient.getAuthentication("Trend Micro Cloud One API Key"); Trend Micro Cloud One API Key.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 ComputerFirewallRuleDetailsApi instance = new ComputerFirewallRuleDetailsApi(); Integer computerID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours FirewallRules result = instance.listFirewallRulesOnComputer(computerID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling ComputerFirewallRuleDetailsApi.listFirewallRulesOnComputer"); e.printStackTrace(); } } }
- 200
{- "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
}
]
}