indices.updateAliasesedit

client.indices.updateAliases([params, [callback]])

Update specified aliases.

Check the API Conventions and the elasticsearch docs for more information pertaining to this method.

Perform an atomic alias swap, for a rotating index.

const response = await client.indices.updateAliases({
  body: {
    actions: [
      { remove: { index: 'logstash-2014.04', alias: 'logstash-current' } },
      { add:    { index: 'logstash-2014.05', alias: 'logstash-current' } }
    ]
  }
});

Params

timeout

DurationString — Request timeout

masterTimeout

DurationString — Specify timeout for connection to master

body

Object, JSON — The request body, as either JSON or a JSON serializable object. See the elasticsearch docs for details about what can be specified here.

back to top