.. _splunk.es.splunk_response_plan_module:
******************************
splunk.es.splunk_response_plan
******************************
**Manage Splunk Enterprise Security response plans**
Version added: 5.1.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module allows for creation, update, and deletion of Splunk Enterprise Security response plans (response templates).
- Response plan names are unique in Splunk ES, so ``name`` is used as the identifier.
- When ``state=present``, the module creates or updates the response plan.
- When ``state=absent``, the module deletes the response plan.
- Phases and tasks are matched by name for updates - existing IDs are preserved for items with matching names, and new IDs are generated for new items.
- **IMPORTANT - Declarative Approach:** This module uses a declarative approach where the playbook defines the complete desired state. Whatever you define is exactly what will exist after the module runs. Any existing phases, tasks, or searches that are NOT included in your playbook will be REMOVED. This is not a merge operation - it is a full replacement of the response plan structure.
- For example, if a response plan has phases A, B, C and you only define phase A in your playbook, phases B and C will be deleted. The same applies to tasks within phases and searches within tasks.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
api_app
string
|
Default:
"missioncontrol"
|
The app portion of the Splunk API path for the response templates endpoint.
Override this if your environment uses a different app name.
|
|
api_namespace
string
|
Default:
"servicesNS"
|
The namespace portion of the Splunk API path.
Override this if your environment uses a different namespace.
|
|
api_user
string
|
Default:
"nobody"
|
The user portion of the Splunk API path.
Override this if your environment requires a different user context.
|
|
description
string
|
|
The description of the response plan.
|
|
name
string
/ required
|
|
The name of the response plan.
This is the unique identifier and is always required.
Used to look up existing response plans for update or delete operations.
|
|
phases
list
/ elements=dictionary
|
|
List of phases in the response plan.
Required when state=present.
Phases are matched by name for updates.
Note: Only phases defined here will exist after update. Any existing phases not included in this list will be removed from the response plan.
|
|
name
string
/ required
|
|
The name of the phase.
Used as identifier for matching during updates.
|
|
tasks
list
/ elements=dictionary
|
|
List of tasks in the phase.
Tasks are matched by name within their parent phase for updates.
Note: Only tasks defined here will exist in the phase after update. Any existing tasks not included in this list will be removed.
|
|
|
description
string
|
|
The description of the task.
|
|
|
is_note_required
boolean
|
|
Whether a note is required when completing the task.
|
|
|
name
string
/ required
|
|
The name of the task.
Used as identifier for matching during updates.
|
|
|
owner
string
|
Default:
"unassigned"
|
The owner of the task.
Use admin for the administrator user.
Use unassigned to leave the task unassigned.
|
|
|
searches
list
/ elements=dictionary
|
|
List of saved searches to attach to the task.
Searches are replaced entirely on update (not merged).
|
|
|
|
description
string
|
|
The description of the search.
|
|
|
|
name
string
/ required
|
|
The name of the search.
|
|
|
|
spl
string
/ required
|
|
The SPL (Search Processing Language) query.
|
|
state
string
|
Choices:
present ←
- absent
|
The desired state of the response plan.
Use present to create or update the response plan.
Use absent to delete the response plan.
|
|
template_status
string
|
Choices:
- published
draft ←
|
The status of the response plan template.
Use draft for work-in-progress plans.
Use published for plans ready for use.
|