prevention_policy_info
Returns details of Falcon prevention policies. Gets prevention policies by ID, by name, or searches for them with an FQL filter. With no option, returns every prevention policy. The module returns every match. It reads more pages when there are more
Added in version 4.15.0
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
filter | str | No | The FQL filter to search for prevention policies. C(platform_name:‘Windows’) matches the platform name exactly and is case-sensitive. The values are C(Windows), C(Windows_Legacy), C(Linux), C(Mac), C(iOS) and C(Android). C(platform_name:[‘Windows’,‘Mac’]) matches any of the platforms in the list. C(enabled:‘true’) and C(enabled:‘false’) match enabled or disabled policies. C(description: | |
name | str | No | The exact name of the prevention policies to get, compared without regard to case. A name is unique only for each platform, so more than one policy can match. Add I(filter) with C(platform_name:‘Windows’) to get the policy of one platform. Can be combined with I(filter). Mutually exclusive with I(policy_ids). | |
policy_ids | list | No | The IDs of the prevention policies to get. An empty list returns no prevention policies. The module fails when an ID does not exist. Then the failed result has the policies that were found in RV(prevention_policies), and the API errors. The IDs are compared without regard to case. Mutually exclusive with I(name), I(filter) and I(sort). | |
sort | str | No | The property and direction to sort the results by. C(name) sorts upper case letters before lower case letters. C(created_timestamp) and C(modified_timestamp) sort to the second. Mutually exclusive with I(policy_ids). name.asc name.desc created_timestamp.asc created_timestamp.desc modified_timestamp.asc modified_timestamp.desc enabled.asc enabled.desc created_by.asc created_by.desc modified_by.asc modified_by.desc |
Examples
Section titled “Examples”- name: Get all prevention policies crowdstrike.falcon.prevention_policy_info:
- name: Get prevention policies by ID crowdstrike.falcon.prevention_policy_info: policy_ids: - "12345678901234567890abcdef123456"
- name: Get the prevention policies with a name crowdstrike.falcon.prevention_policy_info: name: platform_default
- name: Get the prevention policy with a name for one platform crowdstrike.falcon.prevention_policy_info: name: platform_default filter: "platform_name:'Windows'"
- name: Get the enabled Windows prevention policies, sorted by name crowdstrike.falcon.prevention_policy_info: filter: "platform_name:'Windows'+enabled:'true'" sort: name.ascReturn Values
Section titled “Return Values”| Key | Type | Description |
|---|---|---|
prevention_policies | list | The prevention policies that match the IDs, the name or the filter. An empty list when nothing matches. |