Create a policy
Create a policy that defines the behavior of the Deep Security modules that you are using, and that configures policy settings such as agent-manager communication, scanning behavior, logging, event retention, and network engine settings. After you create a policy you can assign it to one or more computers.
To create a policy you create a Policy object, set its properties to define
behaviors, and then use the PoliciesApi class to add it to Deep Security
Manager. Because policies are hierarchical, when creating a policy you need to indicate the ID of
the parent policy. (Use an ID of 0 to create a top-level policy.)
The Policy object provides access to many policy properties:
- The ID of the parent policy
- The interfaces to which the policy applies rules
- Whether to perform ongoing recommendation scans
- Whether to automatically send policy changes to computers (AutoRequiresUpdate)
- Policy settings
To see the available policy properties, expand the 200 response to the Describe a Policy operation in the API Reference.
This example creates a policy below Base Policy. A search obtains Base Policy to obtain its ID, which is used as the parent of a new policy. (The creation of the search criteria and search filter is not shown.)
|
Language |
Code |
|---|---|
|
Python |
|
|
JavaScript |
|
|
Java |
|
The Policy object that is created contains no module configurations or setting
values. When the configurations and settings are omitted, the values are inherited from the
parent policy. Therefore, the policy that is created inherits almost all behavior from the Base
Policy. Also note that policy ID's are immutable, so if you know the ID of the policy you can
just use it instead of searching.
To use the API to interact with policies, use the /api/policies endpoint. (See
the Policies group of operations in the API Reference.)
For information about searching, see Search for Resources. For information about authenticating API calls, see Authenticate with Deep Security Manager.
