List Log Inspection Rule IDs
Lists all log inspection rule IDs assigned to a policy.
PolicyLogInspectionRuleAssignmentsRecommendationsApi.listLogInspectionRuleIDsOnPolicy([param1, param2, ...])
PolicyLogInspectionRuleAssignmentsRecommendationsApi.list_log_inspection_rule_ids_on_policy([param1, param2, ...])
PolicyLogInspectionRuleAssignmentsRecommendationsApi.listLogInspectionRuleIDsOnPolicy([param1, param2, ...])
successful operation
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.PolicyLogInspectionRuleAssignmentsRecommendationsApi; import com.trendmicro.deepsecurity.model.LogInspectionAssignments; public class ListLogInspectionRuleIDsOnPolicyExample { 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 PolicyLogInspectionRuleAssignmentsRecommendationsApi instance = new PolicyLogInspectionRuleAssignmentsRecommendationsApi(); Integer policyID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours LogInspectionAssignments result = instance.listLogInspectionRuleIDsOnPolicy(policyID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling PolicyLogInspectionRuleAssignmentsRecommendationsApi.listLogInspectionRuleIDsOnPolicy"); e.printStackTrace(); } } }
- 200
{- "assignedRuleIDs": [
- 0
], - "recommendationScanStatus": "none",
- "lastRecommendationScanDate": 0,
- "recommendedToAssignRuleIDs": [
- 0
], - "recommendedToUnassignRuleIDs": [
- 0
]
}
Add Log Inspection Rule IDs
Assign log inspection rule IDs to a policy.
PolicyLogInspectionRuleAssignmentsRecommendationsApi.addLogInspectionRuleIDsToPolicy([param1, param2, ...])
PolicyLogInspectionRuleAssignmentsRecommendationsApi.add_log_inspection_rule_ids_to_policy([param1, param2, ...])
PolicyLogInspectionRuleAssignmentsRecommendationsApi.addLogInspectionRuleIDsToPolicy([param1, param2, ...])
header Parameters
Request Body schema: application/json
The ID numbers of the log inspection rules to add.
successful operation
Not authorized to modify the policy or the requested modification is not permitted.
The policy does not exist.
- Payload
- Java
- Python
- JavaScript
{- "ruleIDs": [
- 0
]
}
- 200
{- "assignedRuleIDs": [
- 0
], - "recommendationScanStatus": "none",
- "lastRecommendationScanDate": 0,
- "recommendedToAssignRuleIDs": [
- 0
], - "recommendedToUnassignRuleIDs": [
- 0
]
}
Set Log Inspection Rule IDs
Set log inspection rule IDs assigned to a policy.
PolicyLogInspectionRuleAssignmentsRecommendationsApi.setLogInspectionRuleIDsOnPolicy([param1, param2, ...])
PolicyLogInspectionRuleAssignmentsRecommendationsApi.set_log_inspection_rule_ids_on_policy([param1, param2, ...])
PolicyLogInspectionRuleAssignmentsRecommendationsApi.setLogInspectionRuleIDsOnPolicy([param1, param2, ...])
header Parameters
Request Body schema: application/json
The ID numbers of the log inspection rules to set.
successful operation
Not authorized to modify the policy or the requested modification is not permitted.
The policy does not exist.
- Payload
- Java
- Python
- JavaScript
{- "ruleIDs": [
- 0
]
}
- 200
{- "assignedRuleIDs": [
- 0
], - "recommendationScanStatus": "none",
- "lastRecommendationScanDate": 0,
- "recommendedToAssignRuleIDs": [
- 0
], - "recommendedToUnassignRuleIDs": [
- 0
]
}
Remove a Log Inspection Rule ID
Unassign a log inspection rule ID from a policy.
PolicyLogInspectionRuleAssignmentsRecommendationsApi.removeLogInspectionRuleIDFromPolicy([param1, param2, ...])
PolicyLogInspectionRuleAssignmentsRecommendationsApi.remove_log_inspection_rule_id_from_policy([param1, param2, ...])
PolicyLogInspectionRuleAssignmentsRecommendationsApi.removeLogInspectionRuleIDFromPolicy([param1, param2, ...])
path Parameters
successful operation
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.PolicyLogInspectionRuleAssignmentsRecommendationsApi; import com.trendmicro.deepsecurity.model.LogInspectionAssignments; public class RemoveLogInspectionRuleIDFromPolicyExample { 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 PolicyLogInspectionRuleAssignmentsRecommendationsApi instance = new PolicyLogInspectionRuleAssignmentsRecommendationsApi(); Integer policyID = 1; Integer logInspectionRuleID = 1; Boolean overrides = false; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours LogInspectionAssignments result = instance.removeLogInspectionRuleIDFromPolicy(policyID, logInspectionRuleID, overrides, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling PolicyLogInspectionRuleAssignmentsRecommendationsApi.removeLogInspectionRuleIDFromPolicy"); e.printStackTrace(); } } }
- 200
{- "assignedRuleIDs": [
- 0
], - "recommendationScanStatus": "none",
- "lastRecommendationScanDate": 0,
- "recommendedToAssignRuleIDs": [
- 0
], - "recommendedToUnassignRuleIDs": [
- 0
]
}