Create or update a policy

Auth

Create or update a snapshot lifecycle policy. If the policy already exists, this request increments the policy version. Only the latest version of a policy is stored.

Required privileges

Index privileges manage
Cluster privileges manage_slm

Path parameters

policy_id string required

The identifier for the snapshot lifecycle policy you want to create or update.

Query parameters

master_timeout union oneOf · default: 30s

The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. To indicate that the request should never timeout, set it to -1.

Values: -1 0
timeout union oneOf · default: 30s

The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. To indicate that the request should never timeout, set it to -1.

Values: -1 0

Request body

name string

Name automatically assigned to each snapshot created by the policy. Date math is supported. To prevent conflicting snapshot names, a UUID is automatically appended to each snapshot name.

repository string

Repository used to store snapshots created by this policy. This repository must exist prior to the policy’s creation. You can create a repository using the snapshot repository API.

schedule string

Periodic or absolute schedule at which the policy creates snapshots. SLM applies schedule changes immediately.

Response

application/json
acknowledged boolean required

For a successful response, this value is always true. On failure, an exception is returned instead.