Debian Codegraph @

ansible_collections/splunk/es/plugins/modules/splunk_response_plan_info.py

raw
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3
4 # Copyright 2026 Red Hat Inc.
5 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7
8 DOCUMENTATION = """
9 ---
10 module: splunk_response_plan_info
11 short_description: Gather information about Splunk Enterprise Security response plans
12 description:
13 - This module allows for querying information about Splunk Enterprise Security response plans.
14 - Use this module to retrieve response plan configurations without making changes.
15 - Query by C(name) to filter response plans by exact name match.
16 - If C(name) is not specified, returns all response plans.
17 - Returns complete response plan structure including all IDs (response plan ID, phase IDs, task IDs).
18 version_added: "5.1.0"
19 options:
20 name:
21 description:
22 - Name to filter response plans.
23 - Returns the response plan with an exact name match.
24 - If not specified, returns all response plans.
25 required: false
26 type: str
27 limit:
28 description:
29 - Maximum number of response plans to return.
30 - If not specified, returns all matching response plans.
31 - Useful for limiting results when querying large numbers of response plans.
32 required: false
33 type: int
34 api_namespace:
35 description:
36 - The namespace portion of the Splunk API path.
37 - Override this if your environment uses a different namespace.
38 type: str
39 default: servicesNS
40 api_user:
41 description:
42 - The user portion of the Splunk API path.
43 - Override this if your environment requires a different user context.
44 type: str
45 default: nobody
46 api_app:
47 description:
48 - The app portion of the Splunk API path for the response templates endpoint.
49 - Override this if your environment uses a different app name.
50 type: str
51 default: missioncontrol
52
53 author: Ron Gershburg (@rgershbu)
54 """
55
56 EXAMPLES = """
57 - name: Query all response plans
58 splunk.es.splunk_response_plan_info:
59 register: all_plans
60
61 - name: Query specific response plan by name
62 splunk.es.splunk_response_plan_info:
63 name: "Incident Response Plan"
64 register: result
65
66 - name: Query response plans with custom API path
67 splunk.es.splunk_response_plan_info:
68 api_namespace: "{{ es_namespace | default('servicesNS') }}"
69 api_user: "{{ es_user | default('nobody') }}"
70 api_app: "{{ es_app | default('missioncontrol') }}"
71 register: custom_plans
72 """
73
74 RETURN = """
75 response_plans:
76 description: List of response plans matching the query
77 returned: always
78 type: list
79 elements: dict
80 contains:
81 id:
82 description: The unique ID of the response plan
83 type: str
84 template_id:
85 description: The template ID of the response plan (used for investigation_type associations)
86 type: str
87 returned: when available
88 name:
89 description: Name of the response plan
90 type: str
91 description:
92 description: Description of the response plan
93 type: str
94 template_status:
95 description: Status of the response plan template (published or draft)
96 type: str
97 phases:
98 description: List of phases in the response plan
99 type: list
100 elements: dict
101 contains:
102 id:
103 description: The unique ID of the phase
104 type: str
105 name:
106 description: Name of the phase
107 type: str
108 tasks:
109 description: List of tasks in the phase
110 type: list
111 elements: dict
112 contains:
113 id:
114 description: The unique ID of the task
115 type: str
116 name:
117 description: Name of the task
118 type: str
119 description:
120 description: Description of the task
121 type: str
122 is_note_required:
123 description: Whether a note is required when completing the task
124 type: bool
125 owner:
126 description: Owner of the task
127 type: str
128 searches:
129 description: List of saved searches attached to the task
130 type: list
131 elements: dict
132 contains:
133 name:
134 description: Name of the search
135 type: str
136 description:
137 description: Description of the search
138 type: str
139 spl:
140 description: The SPL query
141 type: str
142 sample:
143 - id: "abc123-def456-ghi789"
144 template_id: "c4522c17-7f27-4569-a130-80ac31c46de8"
145 name: "Incident Response Plan"
146 description: "Standard incident response procedure"
147 template_status: "published"
148 phases:
149 - id: "phase-uuid-001"
150 name: "Investigation"
151 tasks:
152 - id: "task-uuid-001"
153 name: "Initial Triage"
154 description: "Perform initial assessment"
155 is_note_required: true
156 owner: "admin"
157 searches:
158 - name: "Access Over Time"
159 description: "Check access patterns"
160 spl: "| tstats count from datamodel=Authentication"
161 """