List Firewall Rule IDs
Lists all firewall rule IDs assigned to a computer.
ComputerFirewallRuleAssignmentsApi.listFirewallRuleIDsOnComputer([param1, param2, ...])
ComputerFirewallRuleAssignmentsApi.list_firewall_rule_ids_on_computer([param1, param2, ...])
ComputerFirewallRuleAssignmentsApi.listFirewallRuleIDsOnComputer([param1, param2, ...])
successful operation
Not authorized to view the computer.
- 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.ComputerFirewallRuleAssignmentsApi; import com.trendmicro.deepsecurity.model.FirewallAssignments; public class ListFirewallRuleIDsOnComputerExample { 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 ComputerFirewallRuleAssignmentsApi instance = new ComputerFirewallRuleAssignmentsApi(); Integer computerID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours FirewallAssignments result = instance.listFirewallRuleIDsOnComputer(computerID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling ComputerFirewallRuleAssignmentsApi.listFirewallRuleIDsOnComputer"); e.printStackTrace(); } } }
- 200
{- "assignedRuleIDs": [
- 0
]
}
Add Firewall Rule IDs
Assign firewall rule IDs to a computer.
ComputerFirewallRuleAssignmentsApi.addFirewallRuleIDsToComputer([param1, param2, ...])
ComputerFirewallRuleAssignmentsApi.add_firewall_rule_ids_to_computer([param1, param2, ...])
ComputerFirewallRuleAssignmentsApi.addFirewallRuleIDsToComputer([param1, param2, ...])
header Parameters
Request Body schema: application/json
The ID numbers of the firewall rules to add.
successful operation
Not authorized to modify the computer or the requested modification is not permitted.
The computer does not exist.
- Payload
- Java
- Python
- JavaScript
{- "ruleIDs": [
- 0
]
}
- 200
{- "assignedRuleIDs": [
- 0
]
}
Set Firewall Rule IDs
Set firewall rule IDs assigned to a computer.
ComputerFirewallRuleAssignmentsApi.setFirewallRuleIDsOnComputer([param1, param2, ...])
ComputerFirewallRuleAssignmentsApi.set_firewall_rule_ids_on_computer([param1, param2, ...])
ComputerFirewallRuleAssignmentsApi.setFirewallRuleIDsOnComputer([param1, param2, ...])
header Parameters
Request Body schema: application/json
The ID numbers of the firewall rules to set.
successful operation
Not authorized to modify the computer or the requested modification is not permitted.
The computer does not exist.
- Payload
- Java
- Python
- JavaScript
{- "ruleIDs": [
- 0
]
}
- 200
{- "assignedRuleIDs": [
- 0
]
}
Remove a Firewall Rule ID
Unassign a firewall rule ID from a computer.
ComputerFirewallRuleAssignmentsApi.removeFirewallRuleIDFromComputer([param1, param2, ...])
ComputerFirewallRuleAssignmentsApi.remove_firewall_rule_id_from_computer([param1, param2, ...])
ComputerFirewallRuleAssignmentsApi.removeFirewallRuleIDFromComputer([param1, param2, ...])
path Parameters
successful operation
Not authorized to modify the computer or the requested modification is not permitted.
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.ComputerFirewallRuleAssignmentsApi; import com.trendmicro.deepsecurity.model.FirewallAssignments; public class RemoveFirewallRuleIDFromComputerExample { 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 ComputerFirewallRuleAssignmentsApi instance = new ComputerFirewallRuleAssignmentsApi(); Integer computerID = 1; Integer firewallRuleID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours FirewallAssignments result = instance.removeFirewallRuleIDFromComputer(computerID, firewallRuleID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling ComputerFirewallRuleAssignmentsApi.removeFirewallRuleIDFromComputer"); e.printStackTrace(); } } }
- 200
{- "assignedRuleIDs": [
- 0
]
}