List PolicyImportTasks
List all policy import tasks.
PolicyImportTasksApi.listPolicyImportTasks([param1, param2, ...])
PolicyImportTasksApi.list_policy_import_tasks([param1, param2, ...])
PolicyImportTasksApi.listPolicyImportTasks([param1, param2, ...])
successful operation
Not authorized to import poilcy.
- 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.PolicyImportTasksApi; import com.trendmicro.deepsecurity.model.PolicyImportTasks; public class ListPolicyImportTasksExample { 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 PolicyImportTasksApi instance = new PolicyImportTasksApi(); String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours PolicyImportTasks result = instance.listPolicyImportTasks(apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling PolicyImportTasksApi.listPolicyImportTasks"); e.printStackTrace(); } } }
- 200
{- "policyImportTask": [
- {
- "policyContent": "string",
- "status": "requested",
- "created": 0,
- "lastUpdated": 0,
- "policyMappings": [
- {
- "importTo": {
- "policyID": 0,
- "policyName": "string"
}, - "importFrom": {
- "policyID": 0,
- "policyName": "string"
}
}
], - "errorCode": 0,
- "ID": 0,
- "taskGUID": "string",
- "sourceHostName": "string"
}
]
}
Create a PolicyImportTask
Create a task to import policy
PolicyImportTasksApi.createPolicyImportTask([param1, param2, ...])
PolicyImportTasksApi.create_policy_import_task([param1, param2, ...])
PolicyImportTasksApi.createPolicyImportTask([param1, param2, ...])
header Parameters
Request Body schema: application/json
Policy import task to create
successful operation
Not authorized to import poilcy.
- Payload
- Java
- Python
- JavaScript
{- "policyContent": "string",
- "sourceHostName": "string"
}
- 200
{- "policyContent": "string",
- "status": "requested",
- "created": 0,
- "lastUpdated": 0,
- "policyMappings": [
- {
- "importTo": {
- "policyID": 0,
- "policyName": "string"
}, - "importFrom": {
- "policyID": 0,
- "policyName": "string"
}
}
], - "errorCode": 0,
- "ID": 0,
- "taskGUID": "string",
- "sourceHostName": "string"
}
Describe a PolicyImportTask
Describe a policy import task by ID.
PolicyImportTasksApi.describePolicyImportTask([param1, param2, ...])
PolicyImportTasksApi.describe_policy_import_task([param1, param2, ...])
PolicyImportTasksApi.describePolicyImportTask([param1, param2, ...])
successful operation
Not authorized to import poilcy.
The policy import task 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.PolicyImportTasksApi; import com.trendmicro.deepsecurity.model.PolicyImportTask; public class DescribePolicyImportTaskExample { 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 PolicyImportTasksApi instance = new PolicyImportTasksApi(); Integer policyImportTaskID = 1; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours PolicyImportTask result = instance.describePolicyImportTask(policyImportTaskID, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling PolicyImportTasksApi.describePolicyImportTask"); e.printStackTrace(); } } }
- 200
{- "policyContent": "string",
- "status": "requested",
- "created": 0,
- "lastUpdated": 0,
- "policyMappings": [
- {
- "importTo": {
- "policyID": 0,
- "policyName": "string"
}, - "importFrom": {
- "policyID": 0,
- "policyName": "string"
}
}
], - "errorCode": 0,
- "ID": 0,
- "taskGUID": "string",
- "sourceHostName": "string"
}
Search PolicyImportTasks
Search for PolicyImportTasks using optional filters.
PolicyImportTasksApi.searchPolicyImportTasks([param1, param2, ...])
PolicyImportTasksApi.search_policy_import_tasks([param1, param2, ...])
PolicyImportTasksApi.searchPolicyImportTasks([param1, param2, ...])
header Parameters
Request Body schema: application/json
A collection of options used to filter the search results.
successful operation
Not authorized to import poilcy.
- Payload
- Java
- Python
- JavaScript
{- "maxItems": 0,
- "searchCriteria": [
- {
- "fieldName": "string",
- "booleanTest": true,
- "numericTest": "less-than",
- "numericValue": 0,
- "numericValueList": [
- 0
], - "stringTest": "equal",
- "stringValue": "string",
- "stringWildcards": true,
- "choiceTest": "equal",
- "choiceValue": "string",
- "firstDateValue": 0,
- "firstDateInclusive": true,
- "lastDateValue": 0,
- "lastDateInclusive": true,
- "nullTest": true,
- "versionTest": "less-than",
- "versionValue": "string",
- "idValue": 0,
- "idTest": "less-than",
- "idValueList": [
- 0
]
}
], - "sortByObjectID": true
}
- 200
{- "policyImportTask": [
- {
- "policyContent": "string",
- "status": "requested",
- "created": 0,
- "lastUpdated": 0,
- "policyMappings": [
- {
- "importTo": {
- "policyID": 0,
- "policyName": "string"
}, - "importFrom": {
- "policyID": 0,
- "policyName": "string"
}
}
], - "errorCode": 0,
- "ID": 0,
- "taskGUID": "string",
- "sourceHostName": "string"
}
]
}