Update docs to use async/await (#667)
* [docs] update readme and examples to use async/await * [apis] regenerate (including updated examples)
This commit is contained in:
@ -1,14 +1,12 @@
|
||||
.Perform an atomic alias swap, for a rotating index
|
||||
[source,js]
|
||||
---------
|
||||
client.indices.updateAliases({
|
||||
const response = await client.indices.updateAliases({
|
||||
body: {
|
||||
actions: [
|
||||
{ remove: { index: 'logstash-2014.04', alias: 'logstash-current' } },
|
||||
{ add: { index: 'logstash-2014.05', alias: 'logstash-current' } }
|
||||
]
|
||||
}
|
||||
}).then(function (response) {
|
||||
// ...
|
||||
}, errorHandler);
|
||||
---------
|
||||
});
|
||||
---------
|
||||
|
||||
Reference in New Issue
Block a user