List Device Exception Rules
Lists all device exception rules assigned to a policy.
PolicyDeviceControlExceptionRulesApi.listExceptionRulesOnPolicy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.list_exception_rules_on_policy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.listExceptionRulesOnPolicy([param1, param2, ...])
successful operation
User or API key is not authorized to view the policy.
- 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.PolicyDeviceControlExceptionRulesApi; import com.trendmicro.deepsecurity.model.ExceptionRules; public class ListExceptionRulesOnPolicyExample { 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 PolicyDeviceControlExceptionRulesApi instance = new PolicyDeviceControlExceptionRulesApi(); Integer policyID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours ExceptionRules result = instance.listExceptionRulesOnPolicy(policyID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling PolicyDeviceControlExceptionRulesApi.listExceptionRulesOnPolicy"); e.printStackTrace(); } } }
- 200
{- "exceptionRules": [
- {
- "deviceID": 0,
- "createdTime": 0,
- "ID": 0,
- "action": "full-access"
}
]
}
Add Device Exception Rules
Assign device exception rules to a policy.
PolicyDeviceControlExceptionRulesApi.addExceptionRulesOnPolicy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.add_exception_rules_on_policy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.addExceptionRulesOnPolicy([param1, param2, ...])
header Parameters
Request Body schema: application/json
Exception Rules for the device.
Array of objects (ExceptionRule) |
successful operation
User or API key is not authorized to modify the policy or the requested modification is not permitted.
The policy does not exist.
- Payload
- Java
- Python
- JavaScript
{- "exceptionRules": [
- {
- "deviceID": 0,
- "action": "full-access"
}
]
}
- 200
{- "exceptionRules": [
- {
- "deviceID": 0,
- "createdTime": 0,
- "ID": 0,
- "action": "full-access"
}
]
}
Set Device Exception Rules
Set device exception rules assigned to a policy.
PolicyDeviceControlExceptionRulesApi.setExceptionRulesOnPolicy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.set_exception_rules_on_policy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.setExceptionRulesOnPolicy([param1, param2, ...])
header Parameters
Request Body schema: application/json
Exception Rules for the device.
Array of objects (ExceptionRule) |
successful operation
User or API key is not authorized to modify the policy or the requested modification is not permitted.
The policy does not exist.
- Payload
- Java
- Python
- JavaScript
{- "exceptionRules": [
- {
- "deviceID": 0,
- "action": "full-access"
}
]
}
- 200
{- "exceptionRules": [
- {
- "deviceID": 0,
- "createdTime": 0,
- "ID": 0,
- "action": "full-access"
}
]
}
Remove a Device Exception Rule
Unassign a device exception rule from a policy.
PolicyDeviceControlExceptionRulesApi.removeExceptionRuleOnPolicy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.remove_exception_rule_on_policy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.removeExceptionRuleOnPolicy([param1, param2, ...])
path Parameters
successful operation
User or API key is not authorized to modify the policy or the requested modification is not permitted.
The policy 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.PolicyDeviceControlExceptionRulesApi; import com.trendmicro.deepsecurity.model.ExceptionRules; public class RemoveExceptionRuleOnPolicyExample { 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 PolicyDeviceControlExceptionRulesApi instance = new PolicyDeviceControlExceptionRulesApi(); Integer policyID = 1; Long exceptionRuleID = 1L; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours ExceptionRules result = instance.removeExceptionRuleOnPolicy(policyID, exceptionRuleID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling PolicyDeviceControlExceptionRulesApi.removeExceptionRuleOnPolicy"); e.printStackTrace(); } } }
- 200
{- "exceptionRules": [
- {
- "deviceID": 0,
- "createdTime": 0,
- "ID": 0,
- "action": "full-access"
}
]
}