Lists all intrusion prevention rule IDs assigned to a policy.
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.listIntrusionPreventionRuleIDsOnPolicy([param1, param2, ...])
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.list_intrusion_prevention_rule_ids_on_policy([param1, param2, ...])
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.listIntrusionPreventionRuleIDsOnPolicy([param1, param2, ...])
successful operation
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.PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi; import com.trendmicro.deepsecurity.model.IntrusionPreventionAssignments; public class ListIntrusionPreventionRuleIDsOnPolicyExample { 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 PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi instance = new PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi(); Integer policyID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours IntrusionPreventionAssignments result = instance.listIntrusionPreventionRuleIDsOnPolicy(policyID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.listIntrusionPreventionRuleIDsOnPolicy"); e.printStackTrace(); } } }
{- "assignedRuleIDs": [
- 0
], - "assignedApplicationTypeIDs": [
- 0
], - "recommendationScanStatus": "none",
- "lastRecommendationScanDate": 0,
- "recommendedToAssignRuleIDs": [
- 0
], - "recommendedToUnassignRuleIDs": [
- 0
]
}
Assign intrusion prevention rule IDs to a policy.
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.addIntrusionPreventionRuleIDsToPolicy([param1, param2, ...])
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.add_intrusion_prevention_rule_ids_to_policy([param1, param2, ...])
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.addIntrusionPreventionRuleIDsToPolicy([param1, param2, ...])
The ID numbers of the intrusion prevention rules to add.
successful operation
Not authorized to modify the policy or the requested modification is not permitted.
The policy does not exist.
{- "ruleIDs": [
- 0
]
}
{- "assignedRuleIDs": [
- 0
], - "assignedApplicationTypeIDs": [
- 0
], - "recommendationScanStatus": "none",
- "lastRecommendationScanDate": 0,
- "recommendedToAssignRuleIDs": [
- 0
], - "recommendedToUnassignRuleIDs": [
- 0
]
}
Set intrusion prevention rule IDs assigned to a policy.
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.setIntrusionPreventionRuleIDsOnPolicy([param1, param2, ...])
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.set_intrusion_prevention_rule_ids_on_policy([param1, param2, ...])
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.setIntrusionPreventionRuleIDsOnPolicy([param1, param2, ...])
The ID numbers of the intrusion prevention rules to set.
successful operation
Not authorized to modify the policy or the requested modification is not permitted.
The policy does not exist.
{- "ruleIDs": [
- 0
]
}
{- "assignedRuleIDs": [
- 0
], - "assignedApplicationTypeIDs": [
- 0
], - "recommendationScanStatus": "none",
- "lastRecommendationScanDate": 0,
- "recommendedToAssignRuleIDs": [
- 0
], - "recommendedToUnassignRuleIDs": [
- 0
]
}
Unassign an intrusion prevention rule ID from a policy.
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.removeIntrusionPreventionRuleIDFromPolicy([param1, param2, ...])
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.remove_intrusion_prevention_rule_id_from_policy([param1, param2, ...])
PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.removeIntrusionPreventionRuleIDFromPolicy([param1, param2, ...])
successful operation
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.PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi; import com.trendmicro.deepsecurity.model.IntrusionPreventionAssignments; public class RemoveIntrusionPreventionRuleIDFromPolicyExample { 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 PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi instance = new PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi(); Integer policyID = 1; Integer intrusionPreventionRuleID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours IntrusionPreventionAssignments result = instance.removeIntrusionPreventionRuleIDFromPolicy(policyID, intrusionPreventionRuleID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.removeIntrusionPreventionRuleIDFromPolicy"); e.printStackTrace(); } } }
{- "assignedRuleIDs": [
- 0
], - "assignedApplicationTypeIDs": [
- 0
], - "recommendationScanStatus": "none",
- "lastRecommendationScanDate": 0,
- "recommendedToAssignRuleIDs": [
- 0
], - "recommendedToUnassignRuleIDs": [
- 0
]
}