// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response0 = await client.indices.create({
  index: 'test'
})
console.log(response0)

const response1 = await client.indices.create({
  index: 'test_2'
})
console.log(response1)

const response2 = await client.indices.updateAliases({
  body: {
    actions: [
      {
        add: {
          index: 'test_2',
          alias: 'test'
        }
      },
      {
        remove_index: {
          index: 'test'
        }
      }
    ]
  }
})
console.log(response2)
----

