SharedOptions interface
Options that can be specified for a requested issued to the Azure Cosmos DB servers.=
Properties
abort |
abortSignal to pass to all underlying network requests created by this method call. See https://developer.mozilla.org/en-US/docs/Web/API/AbortController Example Cancel a read request
|
bypass |
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 |
consistency |
Consistency level required by the client. |
disable |
DisableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity to serve the request if regular provisioned RUs/second is exhausted. |
initial |
(Advanced use case) Initial headers to start with when sending requests to Cosmos |
max |
Sets the staleness value associated with the request in the Azure CosmosDB service. For requests where the <xref:com.azure.cosmos.ConsistencyLevel> is <xref:com.azure.cosmos.ConsistencyLevel%23EVENTUAL> or <xref:com.azure.cosmos.ConsistencyLevel%23SESSION>, 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. |
priority |
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 |
session |
Enables/disables getting document container quota related stats for document container read requests. |
throughput |
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). |
Property Details
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
Example
Cancel a read request
const controller = new AbortController()
const {result: item} = await items.query('SELECT * from c', { abortSignal: controller.signal});
controller.abort()
abortSignal?: AbortSignal
Property Value
AbortSignal
bypassIntegratedCache
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
bypassIntegratedCache?: boolean
Property Value
boolean
consistencyLevel
Consistency level required by the client.
consistencyLevel?: string
Property Value
string
disableRUPerMinuteUsage
DisableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity to serve the request if regular provisioned RUs/second is exhausted.
disableRUPerMinuteUsage?: boolean
Property Value
boolean
initialHeaders
(Advanced use case) Initial headers to start with when sending requests to Cosmos
initialHeaders?: CosmosHeaders
Property Value
maxIntegratedCacheStalenessInMs
Sets the staleness value associated with the request in the Azure CosmosDB service. For requests where the <xref:com.azure.cosmos.ConsistencyLevel> is <xref:com.azure.cosmos.ConsistencyLevel%23EVENTUAL> or <xref:com.azure.cosmos.ConsistencyLevel%23SESSION>, 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.
maxIntegratedCacheStalenessInMs?: number
Property Value
number
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
priorityLevel?: PriorityLevel
Property Value
sessionToken
Enables/disables getting document container quota related stats for document container read requests.
sessionToken?: string
Property Value
string
throughputBucket
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).throughputBucket?: number
Property Value
number