cosmosdb_upsert_item
Insert or replace an item in a Cosmos DB container using id and partition key. Returns the stored item as JSON.
Instructions
Insert or replace an item in a Cosmos DB container.
The item must include an 'id' field. If an item with the same id and partition key already exists it will be replaced; otherwise a new item is created. Returns the stored item document (including system fields) as JSON.
key_env_var: name of the environment variable holding the Cosmos DB account key. If the variable is set, key-based auth is used; otherwise DefaultAzureCredential is used.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | ||
| database | Yes | ||
| container | Yes | ||
| item | Yes | ||
| key_env_var | No | AZURE_COSMOS_KEY |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |