Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit 5fd4ec9

Browse files
authored
Merge pull request #248 from ashwinkumar12345/ism_snapshot
added ism snapshot option
2 parents 6696aae + 858e3de commit 5fd4ec9

File tree

1 file changed

+60
-1
lines changed

1 file changed

+60
-1
lines changed

docs/ism/policies.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ ISM supports the following operations:
9898
- [delete](#delete)
9999
- [rollover](#rollover)
100100
- [notification](#notification)
101+
- [snapshot](#notification)
101102

102103
### force_merge
103104

@@ -217,6 +218,10 @@ Parameter | Description | Type | Required
217218
`destination` | The destination URL. | `Slack, Amazon Chime, or webhook URL` | Yes
218219
`message_template` | The text of the message. You can add variables to your messages using [Mustache templates](https://mustache.github.io/mustache.5.html). | `object` | Yes
219220

221+
The destination system **must** return a response otherwise the notification operation throws an error.
222+
223+
#### Example 1: Chime notification
224+
220225
```json
221226
{
222227
"notification": {
@@ -226,7 +231,41 @@ Parameter | Description | Type | Required
226231
}
227232
},
228233
"message_template": {
229-
"source": "The index {% raw %}{{ctx.index}}{% endraw %} is being deleted."
234+
"source": "the index is {% raw %}{{ctx.index}}{% endraw %}"
235+
}
236+
}
237+
}
238+
```
239+
240+
#### Example 2: Custom webhook notification
241+
242+
```json
243+
{
244+
"notification": {
245+
"destination": {
246+
"custom_webhook": {
247+
"url": "https://<your_webhook>"
248+
}
249+
},
250+
"message_template": {
251+
"source": "the index is {% raw %}{{ctx.index}}{% endraw %}"
252+
}
253+
}
254+
}
255+
```
256+
257+
#### Example 3: Slack notification
258+
259+
```json
260+
{
261+
"notification": {
262+
"destination": {
263+
"slack": {
264+
"url": "https://hooks.slack.com/services/xxx/xxxxxx"
265+
}
266+
},
267+
"message_template": {
268+
"source": "the index is {% raw %}{{ctx.index}}{% endraw %}"
230269
}
231270
}
232271
}
@@ -244,6 +283,26 @@ Parameter | Description | Type
244283
`index_uuid` | The uuid of the index. | `string`
245284
`policy_id` | The name of the policy. | `string`
246285

286+
### snapshot
287+
288+
Backup your cluster’s indices and state. For more information about snapshots, see [Take and restore snapshots](../../elasticsearch/snapshot-restore/).
289+
290+
The `snapshot` operation has the following parameters:
291+
292+
Parameter | Description | Type | Required | Default
293+
:--- | :--- |:--- |:--- |
294+
`repository` | The repository name that you register through the native snapshot API operations. | `string` | Yes | -
295+
`snapshot` | The name of the snapshot. | `string` | Yes | -
296+
297+
```json
298+
{
299+
"snapshot": {
300+
"repository": "my_backup",
301+
"snapshot": "my_snapshot"
302+
}
303+
}
304+
```
305+
247306
---
248307

249308
## Transitions

0 commit comments

Comments
 (0)