async def METHOD_NAME():
    # create an index
    index_name = "async-indexer-hotels"
    fields = [
        SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True),
        SimpleField(name="baseRate", type=SearchFieldDataType.Double),
    ]
    index = SearchIndex(name=index_name, fields=fields)
    ind_client = SearchIndexClient(service_endpoint, AzureKeyCredential(key))
    async with ind_client:
        await ind_client.create_index(index)
    # [START create_indexer_async]
    # create a datasource
    container = SearchIndexerDataContainer(name="searchcontainer")
    data_source_connection = SearchIndexerDataSourceConnection(
        name="async-indexer-datasource", type="azureblob", connection_string=connection_string, container=container
    )
    data_source = await indexers_client.create_data_source_connection(data_source_connection)
    # create an indexer
    indexer = SearchIndexer(
        name="async-sample-indexer",
        data_source_name="async-indexer-datasource",
        target_index_name="async-indexer-hotels",
    )
    result = await indexers_client.METHOD_NAME(indexer)
    print("Create new Indexer - async-sample-indexer")
    # [END create_indexer_async]