vertx / io.vertx.kotlin.ext.mongo / io.vertx.ext.mongo.MongoClient / createIndexAwait

# createIndexAwait

`suspend fun MongoClient.createIndexAwait(collection: String, key: JsonObject): Unit`

Suspending version of method io.vertx.ext.mongo.MongoClient.createIndex

### Parameters

`collection` - the collection

`key` -

A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.

NOTE: This function has been automatically generated from io.vertx.ext.mongo.MongoClient using Vert.x codegen.