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.
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.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 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 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(); } } }
{- "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 new trust rule.
TrustRulesApi.createTrustRule([param1, param2, ...])
TrustRulesApi.create_trust_rule([param1, param2, ...])
TrustRulesApi.createTrustRule([param1, param2, ...])
Settings of the new trust rule.
successful operation
Not authorized to create trust rules.
{- "type": "allowFromSourceTarget",
- "name": "string",
- "description": "string",
- "attributes": [
- {
- "name": "string",
- "value": "string"
}
]
}
{- "type": "allowFromSourceTarget",
- "name": "string",
- "description": "string",
- "isAssigned": true,
- "createdTime": 0,
- "lastUpdatedTime": 0,
- "rulesetIDs": [
- 0
], - "attributes": [
- {
- "name": "string",
- "value": "string"
}
], - "ID": 0
}
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.
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.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 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 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(); } } }
{- "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 by ID.
TrustRulesApi.modifyTrustRule([param1, param2, ...])
TrustRulesApi.modify_trust_rule([param1, param2, ...])
TrustRulesApi.modifyTrustRule([param1, param2, ...])
The attributes of the trust rule to modify.
successful operation
Not authorized to modify trust ruleset.
The trust rule does not exist.
{- "name": "string",
- "description": "string",
- "attributes": [
- {
- "name": "string",
- "value": "string"
}
]
}
{- "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 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.
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.TrustRulesApi; public class DeleteTrustRuleExample { 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 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(); } } }