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.
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.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 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 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(); } } }
{- "exceptionRules": [
- {
- "deviceID": 0,
- "createdTime": 0,
- "ID": 0,
- "action": "full-access"
}
]
}
Assign device exception rules to a policy.
PolicyDeviceControlExceptionRulesApi.addExceptionRulesOnPolicy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.add_exception_rules_on_policy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.addExceptionRulesOnPolicy([param1, param2, ...])
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.
{- "exceptionRules": [
- {
- "deviceID": 0,
- "action": "full-access"
}
]
}
{- "exceptionRules": [
- {
- "deviceID": 0,
- "createdTime": 0,
- "ID": 0,
- "action": "full-access"
}
]
}
Set device exception rules assigned to a policy.
PolicyDeviceControlExceptionRulesApi.setExceptionRulesOnPolicy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.set_exception_rules_on_policy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.setExceptionRulesOnPolicy([param1, param2, ...])
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.
{- "exceptionRules": [
- {
- "deviceID": 0,
- "action": "full-access"
}
]
}
{- "exceptionRules": [
- {
- "deviceID": 0,
- "createdTime": 0,
- "ID": 0,
- "action": "full-access"
}
]
}
Unassign a device exception rule from a policy.
PolicyDeviceControlExceptionRulesApi.removeExceptionRuleOnPolicy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.remove_exception_rule_on_policy([param1, param2, ...])
PolicyDeviceControlExceptionRulesApi.removeExceptionRuleOnPolicy([param1, param2, ...])
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.
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.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 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 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(); } } }
{- "exceptionRules": [
- {
- "deviceID": 0,
- "createdTime": 0,
- "ID": 0,
- "action": "full-access"
}
]
}