CosmosClientOptions interface

Properties

agent

An optional custom http(s) Agent to be used in NodeJS enironments Use an agent such as https://github.com/TooTallNate/node-proxy-agent if you need to connect to Cosmos via a proxy

connectionPolicy

An instance of <xref:ConnectionPolicy> class. This parameter is optional and the default connectionPolicy will be used if omitted.

consistencyLevel

An optional parameter that represents the consistency level. It can take any value from <xref:ConsistencyLevel>.

defaultHeaders
endpoint

The service endpoint to use to create the client.

key

The account master or readonly key

permissionFeed

An array of <xref:Permission> objects.

resourceTokens

An object that contains resources tokens. Keys for the object are resource Ids and values are the resource tokens.

tokenProvider

A user supplied function for resolving header authorization tokens. Allows users to generating their own auth tokens, potentially using a separate service

userAgentSuffix

A custom string to append to the default SDK user agent.

Property Details

agent

An optional custom http(s) Agent to be used in NodeJS enironments Use an agent such as https://github.com/TooTallNate/node-proxy-agent if you need to connect to Cosmos via a proxy

agent?: Agent

Property Value

connectionPolicy

An instance of <xref:ConnectionPolicy> class. This parameter is optional and the default connectionPolicy will be used if omitted.

connectionPolicy?: ConnectionPolicy

Property Value

consistencyLevel

An optional parameter that represents the consistency level. It can take any value from <xref:ConsistencyLevel>.

consistencyLevel?: Object

Property Value

Object

defaultHeaders

defaultHeaders?: CosmosHeaders_2

Property Value

endpoint

The service endpoint to use to create the client.

endpoint: string

Property Value

string

key

The account master or readonly key

key?: string

Property Value

string

permissionFeed

An array of <xref:Permission> objects.

permissionFeed?: PermissionDefinition[]

Property Value

resourceTokens

An object that contains resources tokens. Keys for the object are resource Ids and values are the resource tokens.

resourceTokens?: [key: string]: string

Property Value

[key: string]: string

tokenProvider

A user supplied function for resolving header authorization tokens. Allows users to generating their own auth tokens, potentially using a separate service

tokenProvider?: TokenProvider

Property Value

userAgentSuffix

A custom string to append to the default SDK user agent.

userAgentSuffix?: string

Property Value

string