Package version:

Interface SharedOptions

Options that can be specified for a requested issued to the Azure Cosmos DB servers.=

interface SharedOptions {
    abortSignal?: AbortSignal;
    bypassIntegratedCache?: boolean;
    consistencyLevel?: string;
    disableRUPerMinuteUsage?: boolean;
    initialHeaders?: CosmosHeaders;
    maxIntegratedCacheStalenessInMs?: number;
    priorityLevel?: PriorityLevel;
    sessionToken?: string;
    throughputBucket?: number;
}

Hierarchy (view full)

Properties

abortSignal?: AbortSignal

abortSignal to pass to all underlying network requests created by this method call. See https://developer.mozilla.org/en-US/docs/Web/API/AbortController

const controller = new AbortController()
const {result: item} = await items.query('SELECT * from c', { abortSignal: controller.signal});
controller.abort()
bypassIntegratedCache?: boolean

Sets if integrated cache should be bypassed or enabled for the request in Azure CosmosDB service.

Default value is false. By default integrated cache is enabled

consistencyLevel?: string

Consistency level required by the client.

disableRUPerMinuteUsage?: boolean

DisableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity to serve the request if regular provisioned RUs/second is exhausted.

initialHeaders?: CosmosHeaders

(Advanced use case) Initial headers to start with when sending requests to Cosmos

maxIntegratedCacheStalenessInMs?: number

Sets the staleness value associated with the request in the Azure CosmosDB service. For requests where the com.azure.cosmos.ConsistencyLevel is com.azure.cosmos.ConsistencyLevel#EVENTUAL or com.azure.cosmos.ConsistencyLevel#SESSION, responses from the integrated cache are guaranteed to be no staler than value indicated by this maxIntegratedCacheStaleness. When the consistency level is not set, this property is ignored.

Default value is null

Cache Staleness is supported in milliseconds granularity. Anything smaller than milliseconds will be ignored.

priorityLevel?: PriorityLevel

Priority Level (Low/High) for each request. Low priority requests are always throttled before any high priority requests.

Default value is null. By default all requests are of High priority

sessionToken?: string

Enables/disables getting document container quota related stats for document container read requests.

throughputBucket?: number

Throughput Bucket for a request.

Default value is null. In this case, the request can use 100% of the partition throughput.

For more information, visit [Cosmos DB throughput Bucketing](https://aka.ms/cosmsodb-bucketing).