RequestOptions interface

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

Properties

accessCondition

Conditions Associated with the request.

consistencyLevel

Consistency level required by the client.

disableAutomaticIdGeneration

Disable automatic id generation (will cause creates to fail if id isn't on the definition)

disableRUPerMinuteUsage

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

enableScriptLogging

Enables or disables logging in JavaScript stored procedures.

indexingDirective

Specifies indexing directives (index, do not index .. etc).

initialHeaders

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

offerEnableRUPerMinuteThroughput

Represents Request Units(RU)/Minute throughput is enabled/disabled for a container.

offerThroughput

The offer throughput provisioned for a container in measurement of Requests-per-Unit.

offerType

Offer type when creating document containers. This option is only valid when creating a document container.

partitionKey

Specifies a partition key definition for a particular path in the Azure Cosmos DB database service.

populateQuotaInfo

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

postTriggerInclude

Indicates what is the post trigger to be invoked after the operation.

preTriggerInclude

Indicates what is the pre trigger to be invoked before the operation.

resourceTokenExpirySeconds

Expiry time (in seconds) for resource token associated with permission (applicable only for requests on permissions).

sessionToken

Token for use with Session consistency.

skipGetPartitionKeyDefinition

(Advanced use case) Skip getting info on the parititon key from the container.

urlConnection

(Advanced use case) The url to connect to.

Property Details

accessCondition

Conditions Associated with the request.

accessCondition?: Object

Property Value

Object

consistencyLevel

Consistency level required by the client.

consistencyLevel?: string

Property Value

string

disableAutomaticIdGeneration

Disable automatic id generation (will cause creates to fail if id isn't on the definition)

disableAutomaticIdGeneration?: boolean

Property Value

boolean

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

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

initialHeaders

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

initialHeaders?: IHeaders

Property Value

offerEnableRUPerMinuteThroughput

Represents Request Units(RU)/Minute throughput is enabled/disabled for a container.

offerEnableRUPerMinuteThroughput?: boolean

Property Value

boolean

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

partitionKey

Specifies a partition key definition for a particular path in the Azure Cosmos DB database service.

partitionKey?: PartitionKey | PartitionKey[]

Property Value

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

sessionToken

Token for use with Session consistency.

sessionToken?: string

Property Value

string

skipGetPartitionKeyDefinition

(Advanced use case) Skip getting info on the parititon key from the container.

skipGetPartitionKeyDefinition?: boolean

Property Value

boolean

urlConnection

(Advanced use case) The url to connect to.

urlConnection?: string

Property Value

string