Policy Intrusion Prevention Rule Assignments & Recommendations

Remove an Intrusion Prevention Rule ID

delete/policies/{policyID}/intrusionprevention/assignments/{intrusionPreventionRuleID}

Unassign an intrusion prevention rule ID from a policy.

Related SDK Methods:
Java

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.removeIntrusionPreventionRuleIDFromPolicy([param1, param2, ...])

Python

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.remove_intrusion_prevention_rule_id_from_policy([param1, param2, ...])

JavaScript

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.removeIntrusionPreventionRuleIDFromPolicy([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
path Parameters
intrusionPreventionRuleID
required
integer <int32> \d+

The ID number of the intrusion prevention rule to delete.

Example: 1
policyID
required
integer <int32> \d+

The ID number of the policy.

Example: 1
query Parameters
overrides
boolean

Return only rule IDs assigned directly to the current policy.

header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

successful operation

403

Not authorized to modify the policy or the requested modification is not permitted.

404

The policy does not exist.

Request samples
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.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 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
		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();
		}
	}
}

Response samples
application/json
{
  • "assignedRuleIDs": [
    ],
  • "assignedApplicationTypeIDs": [
    ],
  • "recommendationScanStatus": "none",
  • "lastRecommendationScanDate": 0,
  • "recommendedToAssignRuleIDs": [
    ],
  • "recommendedToUnassignRuleIDs": [
    ]
}

List Intrusion Prevention Rule IDs

get/policies/{policyID}/intrusionprevention/assignments

Lists all intrusion prevention rule IDs assigned to a policy.

Related SDK Methods:
Java

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.listIntrusionPreventionRuleIDsOnPolicy([param1, param2, ...])

Python

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.list_intrusion_prevention_rule_ids_on_policy([param1, param2, ...])

JavaScript

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.listIntrusionPreventionRuleIDsOnPolicy([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
path Parameters
policyID
required
integer <int32> \d+

The ID number of the policy.

Example: 1
query Parameters
overrides
boolean

Return only rule IDs assigned directly to the current policy.

header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

successful operation

403

Not authorized to view the policy.

Request samples
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.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 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
		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();
		}
	}
}

Response samples
application/json
{
  • "assignedRuleIDs": [
    ],
  • "assignedApplicationTypeIDs": [
    ],
  • "recommendationScanStatus": "none",
  • "lastRecommendationScanDate": 0,
  • "recommendedToAssignRuleIDs": [
    ],
  • "recommendedToUnassignRuleIDs": [
    ]
}

Add Intrusion Prevention Rule IDs

post/policies/{policyID}/intrusionprevention/assignments

Assign intrusion prevention rule IDs to a policy.

Related SDK Methods:
Java

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.addIntrusionPreventionRuleIDsToPolicy([param1, param2, ...])

Python

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.add_intrusion_prevention_rule_ids_to_policy([param1, param2, ...])

JavaScript

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.addIntrusionPreventionRuleIDsToPolicy([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
path Parameters
policyID
required
integer <int32> \d+

The ID number of the policy.

Example: 1
query Parameters
overrides
boolean

Return only rule IDs assigned directly to the current policy.

header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json

The ID numbers of the intrusion prevention rules to add.

ruleIDs
Array of integers <int32>
Responses
200

successful operation

403

Not authorized to modify the policy or the requested modification is not permitted.

404

The policy does not exist.

Request samples
application/json
{
  • "ruleIDs": [
    ]
}
Response samples
application/json
{
  • "assignedRuleIDs": [
    ],
  • "assignedApplicationTypeIDs": [
    ],
  • "recommendationScanStatus": "none",
  • "lastRecommendationScanDate": 0,
  • "recommendedToAssignRuleIDs": [
    ],
  • "recommendedToUnassignRuleIDs": [
    ]
}

Set Intrusion Prevention Rule IDs

put/policies/{policyID}/intrusionprevention/assignments

Set intrusion prevention rule IDs assigned to a policy.

Related SDK Methods:
Java

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.setIntrusionPreventionRuleIDsOnPolicy([param1, param2, ...])

Python

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.set_intrusion_prevention_rule_ids_on_policy([param1, param2, ...])

JavaScript

PolicyIntrusionPreventionRuleAssignmentsRecommendationsApi.setIntrusionPreventionRuleIDsOnPolicy([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
path Parameters
policyID
required
integer <int32> \d+

The ID number of the policy.

Example: 1
query Parameters
overrides
boolean

Return only rule IDs assigned directly to the current policy.

header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json

The ID numbers of the intrusion prevention rules to set.

ruleIDs
Array of integers <int32>
Responses
200

successful operation

403

Not authorized to modify the policy or the requested modification is not permitted.

404

The policy does not exist.

Request samples
application/json
{
  • "ruleIDs": [
    ]
}
Response samples
application/json
{
  • "assignedRuleIDs": [
    ],
  • "assignedApplicationTypeIDs": [
    ],
  • "recommendationScanStatus": "none",
  • "lastRecommendationScanDate": 0,
  • "recommendedToAssignRuleIDs": [
    ],
  • "recommendedToUnassignRuleIDs": [
    ]
}