ItemDefinition interface

Items in Cosmos DB are simply JSON objects. Most of the Item operations allow for your to provide your own type that extends the very simple ItemDefinition.

You cannot use any reserved keys. You can see the reserved key list in <xref:ItemBody>

Properties

id

The id of the item. User settable property. Uniquely identifies the item along with the partition key

ttl

Time to live in seconds for collections with TTL enabled

Property Details

id

The id of the item. User settable property. Uniquely identifies the item along with the partition key

id?: string

Property Value

string

ttl

Time to live in seconds for collections with TTL enabled

ttl?: number

Property Value

number