News Feeds

No results for 'undefined'
Powered by Algolia

Does not work Serverless Azure CosmosDB configuration


Author: Priyanjith

Originally Sourced from: https://stackoverflow.com/questions/63880383/does-not-work-serverless-azure-cosmosdb-configuration

functions:
  hello:
    handler: src/handlers/hello.sayHello
    events:
      - http: true
        x-azure-settings:
          methods:
            - POST
          authLevel: anonymous # can also be `function` or `admin`
      - cosmosDB: true
        x-azure-settings:
          direction: in
          leaseCollectionName: leases,
          name: documents # name of input parameter in function signature
          databaseName: SampleDB
          collectionName: Users
          connectionStringSetting: cosmos-sl-abc-dev_DOCUMENTDB # name of appsetting with the connection string
          createLeaseCollectionIfNotExists: true
          authLevel: anonymous

This is my Serverless.yml function code,After deploy this doesn't work function in Azure(Function code test)