Index of Code Examples
This page provides a categorized list of samples that we provide in the Deep Security Automation Center SDK Samples GitHub repository. The samples demonstrate how to use the SDKs to automate Deep Security administration tasks. They typically implement multi-operation algorithms.
A series of links are provided for each item:
- The Python, JavaScript, and Java links open the samples in GitHub
- The Guide link opens a topic in an Automation Center guide that includes part of the sample in the discussion
The examples in the API Reference are not listed here. In the API Reference, for each operation, an example illustrates how to execute the operation using an SDK.
Anti-Malware
-
Set the real time Anti-Malware scan configuration [ Python | JavaScript | Java | Guide ]
-
Add a directory to a directory list [ Python | JavaScript | Java | Guide ]
-
Configure directory exclusions for a malware scan configuration [ Python | JavaScript | Java | Guide ]
-
Create a schedule for business hours only [ Python | JavaScript | Java | Guide ]
-
Report on module status [ Python | JavaScript | Java | Guide ]
-
Obtain the Anti-Malware configuration of all computers [ Python | JavaScript | Java | Guide ]
API Client
-
List Policies [ Python | JavaScript | Java | Guide ]
-
Search Firewall Rules by Name [ Python | JavaScript | Java | Guide ]
-
Obtain Intrusion Prevention states of tenant computers [ Python | JavaScript | Java | Guide ]
-
Configure policies for tenants [ Python | JavaScript | Java | Guide ]
-
Obtain Intrusion Prevention rules for all computers of active tenants [ Python | JavaScript | Java | ]
API keys
-
Create an API key for auditing [ Python | JavaScript | Java | Guide ]
-
Generate a secret for an API key [ Python | JavaScript | Java | Guide ]
-
Change the role for an API key [ Python | JavaScript | Java | Guide ]
-
Obtain Intrusion Prevention states of tenant computers [ Python | JavaScript | Java | Guide ]
-
Configure policies for tenants [ Python | JavaScript | Java | Guide ]
-
Obtain Intrusion Prevention rules for all computers of active tenants [ Python | JavaScript | Java | ]
Application Control
-
Turn on Application Control [ Python | JavaScript | Java | Guide ]
-
Block unrecognized software on a computer [ Python | JavaScript | Java | Guide ]
-
Report on module status [ Python | JavaScript | Java | Guide ]
-
Create a shared ruleset [ Python | JavaScript | Java | Guide ]
-
Add global rules [ Python | JavaScript | Java | Guide ]
-
Turn on maintenance mode for a timed duration [ Python | JavaScript | Java | Guide ]
Computers
-
Add a computer to Deep Security Manager [ Python | JavaScript | Java | Guide ]
-
Search for a policy and assign it to a computer [ Python | JavaScript | Java | Guide ]
-
Get the overrides for a computer [ Python | JavaScript | Java | Guide ]
-
Override reconnaissance scans for a computer [ Python | JavaScript | Java | Guide ]
-
Block unrecognized software on a computer [ Python | JavaScript | Java | Guide ]
-
Report on agent status [ Python | JavaScript | Java | Guide ]
-
Report on module status [ Python | JavaScript | Java | Guide ]
-
Obtain the Anti-Malware configuration of all computers [ Python | JavaScript | Java | Guide ]
-
Retrieve applied Intrusion Prevention rules for all computers [ Python | JavaScript | Java | Guide ]
-
Find computers that are not protected against a CVE [ Python | JavaScript | Java | Guide ]
-
Add Intrusion Prevention rules to computers' policies [ Python | JavaScript | Java | Guide ]
-
Get the date of the last recommendation scan[ Python | JavaScript | Java | Guide ]
-
Obtain recommendations for Intrusion Prevention [ Python | JavaScript | Java | Guide ]
-
Create a scheduled task that discovers computers [ Python | JavaScript | Java | Guide ]
-
Create, run, and delete a scheduled task that checks for security updates [ Python | JavaScript | Java | Guide ]
-
Run the discover computers scheduled task [ Python | JavaScript | Java | Guide ]
-
Search using multiple criteria [ Python | JavaScript | Java | Guide ]
-
Search computer sub objects [ Python | JavaScript | Java | Guide ]
-
Search for null values [ Python | JavaScript | Java | Guide ]
-
Paged results of a computer search [ Python | JavaScript | Java | Guide ]
-
Generate an agent deployment script [ Python | JavaScript | Java | Guide ]
-
Obtain Intrusion Prevention states of tenant computers [ Python | JavaScript | Java | Guide ]
-
Obtain Intrusion Prevention rules for all computers of active tenants [ Python | JavaScript | Java | ]
Firewall
-
Search Firewall Rules by Name [ Python | JavaScript | Java | Guide ]
-
Configure Firewall for a policy [ Python | JavaScript | Java | Guide ]
-
Create a schedule for business hours only [ Python | JavaScript | Java | Guide ]
-
Retrieve policy settings (Firewall network engine mode) [ Python | JavaScript | Java | Guide ]
- Configure a system setting for a policy (Firewall network engine mode) [ Python | JavaScript | Java | Guide ]
-
Report on module status [ Python | JavaScript | Java | Guide ]
Integrity Monitoring
-
Add integrity Monitoring rules to a policy [ Python | JavaScript | Java | Guide ]
-
Report on module status [ Python | JavaScript | Java | Guide ]
-
Get the date of the last recommendation scan[ Python | JavaScript | Java | Guide ]
Intrusion Prevention (IDS/IPS)
-
Configure Intrusion Prevention settings [ Python | JavaScript | Java | Guide ]
-
Report on module status [ Python | JavaScript | Java | Guide ]
-
Retrieve applied Intrusion Prevention rules for all computers [ Python | JavaScript | Java | Guide ]
-
Find the Intrusion Prevention rules for a CVE [ Python | JavaScript | Java | Guide ]
-
Find computers that are not protected against a CVE [ Python | JavaScript | Java | Guide ]
-
Add Intrusion Prevention rules to computers' policies [ Python | JavaScript | Java | Guide ]
-
Get the date of the last recommendation scan[ Python | JavaScript | Java | Guide ]
-
Obtain recommendations for Intrusion Prevention [ Python | JavaScript | Java | Guide ]
-
Search Intrusion Prevention rules based on date updated [ Python | JavaScript | Java | Guide ]
-
Obtain Intrusion Prevention states of tenant computers [ Python | JavaScript | Java | Guide ]
-
Obtain Intrusion Prevention rules for all computers of active tenants [ Python | JavaScript | Java | ]
Lists
- Add a directory to a directory list [ Python | JavaScript | Java | Guide ]
Log Inspection
-
Add a Log Inspection rule to a policy [ Python | JavaScript | Java | Guide ]
-
Create a basic Log Inspection rule [ Python | JavaScript | Java | Guide ]
-
Create a Log Inspection rule using XML [ Python | JavaScript | Java | Guide ]
-
Report on module status [ Python | JavaScript | Java | Guide ]
-
Get the date of the last recommendation scan[ Python | JavaScript | Java | Guide ]
-
Reset a subset of rule overrides for a policy [ Python | JavaScript | Java | Guide ]
Policies
-
List Policies [ Python | JavaScript | Java | Guide ]
-
Create a policy below Base Policy [ Python | JavaScript | Java | Guide ]
-
Configure Firewall for a policy [ Python | JavaScript | Java | Guide ]
-
Configure Intrusion Prevention settings [ Python | JavaScript | Java | Guide ]
-
Set the real time Anti-Malware scan configuration [ Python | JavaScript | Java | Guide ]
-
Turn on Web Reputation and configure settings [ Python | JavaScript | Java | Guide ]
-
Add integrity Monitoring rules to a policy [ Python | JavaScript | Java | Guide ]
-
Add a Log Inspection rule to a policy [ Python | JavaScript | Java | Guide ]
-
Turn on Application Control [ Python | JavaScript | Java | Guide ]
-
Search for a policy and assign it to a computer [ Python | JavaScript | Java | Guide ]
-
Retrieve policy settings (Firewall network engine mode) [ Python | JavaScript | Java | Guide ]
-
Configure a system setting for a policy (Firewall network engine mode) [ Python | JavaScript | Java | Guide ]
-
Add Intrusion Prevention rules to computers' policies [ Python | JavaScript | Java | Guide ]
-
Search for policies by name [ Python | JavaScript | Java | Guide ]
-
Search using multiple criteria [ Python | JavaScript | Java | Guide ]
-
Search for null values [ Python | JavaScript | Java | Guide ]
-
Reset a subset of rule overrides for a policy [ Python | JavaScript | Java | Guide ]
-
Configure policies for tenants [ Python | JavaScript | Java | Guide ]
Recommendations
-
Get the date of the last recommendation scan[ Python | JavaScript | Java | Guide ]
-
Obtain recommendations for Intrusion Prevention [ Python | JavaScript | Java | Guide ]
Reporting
-
Report on agent status [ Python | JavaScript | Java | Guide ]
-
Report on module status [ Python | JavaScript | Java | Guide ]
-
Get the date of the last recommendation scan [ Python | JavaScript | Java | Guide ]
-
Obtain the Anti-Malware configuration of all computers [ Python | JavaScript | Java | Guide ]
Roles
-
Create a role with specific rights [ Python | JavaScript | Java | Guide ]
-
Search for a role [ Python | JavaScript | Java | Guide ]
-
Change the role for an API key [ Python | JavaScript | Java | Guide ]
-
Retrieve applied Intrusion Prevention rules for all computers [ Python | JavaScript | Java | Guide ]
Rules
-
Add integrity Monitoring rules to a policy [ Python | JavaScript | Java | Guide ]
-
Search Firewall Rules by Name [ Python | JavaScript | Java | Guide ]
-
Add a Log Inspection rule to a policy [ Python | JavaScript | Java | Guide ]
-
Create a basic Log Inspection rule [ Python | JavaScript | Java | Guide ]
-
Create a Log Inspection rule using XML [ Python | JavaScript | Java | Guide ]
-
Create a schedule for business hours only [ Python | JavaScript | Java | Guide ]
-
Retrieve applied Intrusion Prevention rules for all computers [ Python | JavaScript | Java | Guide ]
-
Find the Intrusion Prevention rules for a CVE [ Python | JavaScript | Java | Guide ]
-
Find computers that are not protected against a CVE [ Python | JavaScript | Java | Guide ]
-
Add Intrusion Prevention rules to computers' policies [ Python | JavaScript | Java | Guide ]
- Get the date of the last recommendation scan [ Python | JavaScript | Java | Guide ]
-
Obtain recommendations for Intrusion Prevention [ Python | JavaScript | Java | Guide ]
-
Search Intrusion Prevention rules based on date updated [ Python | JavaScript | Java | Guide ]
-
Reset a subset of rule overrides for a policy [ Python | JavaScript | Java | Guide ]
-
Add global Application Control rules [ Python | JavaScript | Java | Guide ]
Scheduled Tasks
-
Create a daily schedule for a scheduled task [ Python | JavaScript | Java | Guide ]
-
Create a monthly schedule for a scheduled task [ Python | JavaScript | Java | Guide ]
-
Create a scheduled task that discovers computers [ Python | JavaScript | Java | Guide ]
-
Create, run, and delete a scheduled task that checks for security updates [ Python | JavaScript | Java | Guide ]
-
Run the discover computers scheduled task [ Python | JavaScript | Java | Guide ]
Schedules
- Create a schedule for business hours only [ Python | JavaScript | Java | Guide ]
Security Updates
- Create, run, and delete a scheduled task that checks for security updates [ Python | JavaScript | Java | Guide ]
Search
-
Search Firewall Rules by Name [ Python | JavaScript | Java | Guide ]
-
Create a policy below Base Policy [ Python | JavaScript | Java | Guide ]
-
Search for a policy and assign it to a computer [ Python | JavaScript | Java | Guide ]
-
Find the Intrusion Prevention rules for a CVE [ Python | JavaScript | Java | Guide ]
-
Search for policies by name [ Python | JavaScript | Java | Guide ]
-
Search using multiple criteria [ Python | JavaScript | Java | Guide ]
-
Search Intrusion Prevention rules based on date updated [ Python | JavaScript | Java | Guide ]
-
Search computer sub objects [ Python | JavaScript | Java | Guide ]
-
Paged results of a computer search [ Python | JavaScript | Java | Guide ]
-
Search for a role [ Python | JavaScript | Java | Guide ]
-
Search for null values [ Python | JavaScript | Java | Guide ]
-
Block unrecognized software on a computer [ Python | JavaScript | Java | Guide ]
-
Obtain Intrusion Prevention rules for all computers of active tenants [ Python | JavaScript | Java | ]
Settings
-
Set the maximum number of sessions for users [ Python | JavaScript | Java | Guide ]
-
Configure Firewall for a policy [ [ Python | JavaScript | Java | Guide ]
-
Configure Intrusion Prevention settings [ [ Python | JavaScript | Java | Guide ]
-
Turn on Web Reputation and configure settings [ Python | JavaScript | Java | Guide ]
-
Retrieve policy settings (Firewall network engine mode) [ Python | JavaScript | Java | Guide ]
-
Configure a system setting for a policy (Firewall network engine mode) [ Python | JavaScript | Java | Guide ]
-
Override reconnaissance scans for a computer [ Python | JavaScript | Java | Guide ]
Tenants
-
Create a tenant [ Python | JavaScript | Java |Guide ]
-
Obtain Intrusion Prevention states of tenant computers [ Python | JavaScript | Java | Guide ]
-
Configure policies for tenants [ Python | JavaScript | Java |Guide ]
-
Obtain Intrusion Prevention rules for all computers of active tenants [ Python | JavaScript | Java | Guide ]
Web Reputation
-
Turn on Web Reputation and configure settings [ Python | JavaScript | Java | Guide ]
-
Report on module status [ Python | JavaScript | Java | Guide ]