RequestOptions interface 
Options that can be specified for a requested issued to the Azure Cosmos DB servers.=
- Extends
 
Properties
| access | 
	Conditions Associated with the request.  | 
| content | 
	If set to false, service doesn't return payload in the response. It reduces networking and CPU load by not sending the payload back over the network. Default value is true. NOTE: Currently, this option is only supported for bulk and batch operations.  | 
| disable | 
	Disable automatic id generation (will cause creates to fail if id isn't on the definition)  | 
| enable | 
	Enables or disables logging in JavaScript stored procedures.  | 
| indexing | 
	Specifies indexing directives (index, do not index .. etc).  | 
| offer | 
	The offer throughput provisioned for a container in measurement of Requests-per-Unit.  | 
| offer | 
	Offer type when creating document containers. This option is only valid when creating a document container.  | 
| populate | 
	Enables/disables getting document container quota related stats for document container read requests.  | 
| post | 
	Indicates what is the post trigger to be invoked after the operation.  | 
| pre | 
	Indicates what is the pre trigger to be invoked before the operation.  | 
| resource | 
	Expiry time (in seconds) for resource token associated with permission (applicable only for requests on permissions).  | 
| url | 
	(Advanced use case) The url to connect to.  | 
Inherited 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.  | 
| excluded | 
	Excludes one or more Azure regions for the operation. This option is only applied when enableEndPointDiscovery is set to true.  | 
| 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
		accessCondition
	 
	Conditions Associated with the request.
accessCondition?: { condition: string, type: string }
				Property Value
{ condition: string, type: string }
		contentResponseOnWriteEnabled
	   
	If set to false, service doesn't return payload in the response. It reduces networking and CPU load by not sending the payload back over the network. Default value is true.
NOTE: Currently, this option is only supported for bulk and batch operations.
contentResponseOnWriteEnabled?: boolean
				Property Value
boolean
		disableAutomaticIdGeneration
	  
	Disable automatic id generation (will cause creates to fail if id isn't on the definition)
disableAutomaticIdGeneration?: boolean
				Property Value
boolean
		enableScriptLogging
	  
	Enables or disables logging in JavaScript stored procedures.
enableScriptLogging?: boolean
				Property Value
boolean
		indexingDirective
	 
	Specifies indexing directives (index, do not index .. etc).
indexingDirective?: string
				Property Value
string
		offerThroughput
	 
	The offer throughput provisioned for a container in measurement of Requests-per-Unit.
offerThroughput?: number
				Property Value
number
		offerType
	 
	Offer type when creating document containers.
This option is only valid when creating a document container.
offerType?: string
				Property Value
string
		populateQuotaInfo
	  
	Enables/disables getting document container quota related stats for document container read requests.
populateQuotaInfo?: boolean
				Property Value
boolean
		postTriggerInclude
	  
	Indicates what is the post trigger to be invoked after the operation.
postTriggerInclude?: string | string[]
				Property Value
string | string[]
		preTriggerInclude
	  
	Indicates what is the pre trigger to be invoked before the operation.
preTriggerInclude?: string | string[]
				Property Value
string | string[]
		resourceTokenExpirySeconds
	   
	Expiry time (in seconds) for resource token associated with permission (applicable only for requests on permissions).
resourceTokenExpirySeconds?: number
				Property Value
number
		urlConnection
	 
	(Advanced use case) The url to connect to.
urlConnection?: string
				Property Value
string
Inherited 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
import { CosmosClient } from "@azure/cosmos";
const endpoint = "https://your-account.documents.azure.com";
const key = "<database account masterkey>";
const client = new CosmosClient({ endpoint, key });
const { database } = await client.databases.createIfNotExists({ id: "Test Database" });
const { container } = await database.containers.createIfNotExists({ id: "Test Container" });
const controller = new AbortController();
const results = container.items.query("SELECT * from c", {
  abortSignal: controller.signal,
});
				abortSignal?: AbortSignal
				Property Value
AbortSignal
Inherited From SharedOptions.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
Inherited From SharedOptions.bypassIntegratedCache
		consistencyLevel
	 
	Consistency level required by the client.
consistencyLevel?: string
				Property Value
string
Inherited From SharedOptions.consistencyLevel
		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
Inherited From SharedOptions.disableRUPerMinuteUsage
		excludedLocations
	 
	Excludes one or more Azure regions for the operation.
This option is only applied when enableEndPointDiscovery is set to true.
excludedLocations?: string[]
				Property Value
string[]
Inherited From SharedOptions.excludedLocations
		initialHeaders
	 
	(Advanced use case) Initial headers to start with when sending requests to Cosmos
initialHeaders?: CosmosHeaders
				Property Value
Inherited From SharedOptions.initialHeaders
		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
Inherited From SharedOptions.maxIntegratedCacheStalenessInMs
		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
Inherited From SharedOptions.priorityLevel
		sessionToken
	 
	Enables/disables getting document container quota related stats for document container read requests.
sessionToken?: string
				Property Value
string
Inherited From SharedOptions.sessionToken
		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
Inherited From SharedOptions.throughputBucket