Describe a Trust Rule
Describe a trust rule by ID.
TrustRulesApi.describeTrustRule([param1, param2, ...])
TrustRulesApi.describe_trust_rule([param1, param2, ...])
TrustRulesApi.describeTrustRule([param1, param2, ...])
successful operation
Not authorized to view trust rules.
The trust rule 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.TrustRulesApi; import com.trendmicro.deepsecurity.model.ApplicationControlTrustRule; public class DescribeTrustRuleExample { 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 TrustRulesApi instance = new TrustRulesApi(); Long acTrustRuleID = 1L; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours ApplicationControlTrustRule result = instance.describeTrustRule(acTrustRuleID, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling TrustRulesApi.describeTrustRule"); e.printStackTrace(); } } }
- 200
{- "type": "allowFromSourceTarget",
- "name": "string",
- "description": "string",
- "isAssigned": true,
- "createdTime": 0,
- "lastUpdatedTime": 0,
- "rulesetIDs": [
- 0
], - "attributes": [
- {
- "name": "string",
- "value": "string"
}
], - "ID": 0
}
Modify a Trust Rule
Modify a trust rule by ID.
TrustRulesApi.modifyTrustRule([param1, param2, ...])
TrustRulesApi.modify_trust_rule([param1, param2, ...])
TrustRulesApi.modifyTrustRule([param1, param2, ...])
path Parameters
header Parameters
Request Body schema: application/json
The attributes of the trust rule to modify.
successful operation
Not authorized to modify trust ruleset.
The trust rule does not exist.
- Payload
- Java
- Python
- JavaScript
{- "name": "string",
- "description": "string",
- "attributes": [
- {
- "name": "string",
- "value": "string"
}
]
}
- 200
{- "type": "allowFromSourceTarget",
- "name": "string",
- "description": "string",
- "isAssigned": true,
- "createdTime": 0,
- "lastUpdatedTime": 0,
- "rulesetIDs": [
- 0
], - "attributes": [
- {
- "name": "string",
- "value": "string"
}
], - "ID": 0
}
Delete a Trust Rule.
Delete a trust rule by ID.
TrustRulesApi.deleteTrustRule([param1, param2, ...])
TrustRulesApi.delete_trust_rule([param1, param2, ...])
TrustRulesApi.deleteTrustRule([param1, param2, ...])
Request is successful.
Not authorized to delete a trust rule.
The trust rule 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.TrustRulesApi; public class DeleteTrustRuleExample { 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 TrustRulesApi instance = new TrustRulesApi(); Long acTrustRuleID = 1L; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours instance.deleteTrustRule(acTrustRuleID, apiVersion); } catch (ApiException e) { System.err.println("An exception occurred when calling TrustRulesApi.deleteTrustRule"); e.printStackTrace(); } } }
List all Trust Rules
List all trust rules.
TrustRulesApi.listTrustRules([param1, param2, ...])
TrustRulesApi.list_trust_rules([param1, param2, ...])
TrustRulesApi.listTrustRules([param1, param2, ...])
successful operation
Not authorized to list trust rules.
- 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.TrustRulesApi; import com.trendmicro.deepsecurity.model.TrustRules; public class ListTrustRulesExample { 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 TrustRulesApi instance = new TrustRulesApi(); String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours TrustRules result = instance.listTrustRules(apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling TrustRulesApi.listTrustRules"); e.printStackTrace(); } } }
- 200
{- "trustRuleCount": 0,
- "applicationControlTrustRules": [
- {
- "type": "allowFromSourceTarget",
- "name": "string",
- "description": "string",
- "isAssigned": true,
- "createdTime": 0,
- "lastUpdatedTime": 0,
- "rulesetIDs": [
- 0
], - "attributes": [
- {
- "name": "string",
- "value": "string"
}
], - "ID": 0
}
]
}
Create a Trust Rule
Create a new trust rule.
TrustRulesApi.createTrustRule([param1, param2, ...])
TrustRulesApi.create_trust_rule([param1, param2, ...])
TrustRulesApi.createTrustRule([param1, param2, ...])
header Parameters
Request Body schema: application/json
Settings of the new trust rule.
successful operation
Not authorized to create trust rules.
- Payload
- Java
- Python
- JavaScript
{- "type": "allowFromSourceTarget",
- "name": "string",
- "description": "string",
- "attributes": [
- {
- "name": "string",
- "value": "string"
}
]
}
- 200
{- "type": "allowFromSourceTarget",
- "name": "string",
- "description": "string",
- "isAssigned": true,
- "createdTime": 0,
- "lastUpdatedTime": 0,
- "rulesetIDs": [
- 0
], - "attributes": [
- {
- "name": "string",
- "value": "string"
}
], - "ID": 0
}