Global

Members

ConnectionPolicy

Properties:
Name Type Description
MediaReadMode string Attachment content (aka media) download mode. Should be one of the values of MediaReadMode
MediaRequestTimeout number Time to wait for response from network peer for attachment content (aka media) operations. Represented in milliseconds.
RequestTimeout number Request timeout (time to wait for response from network peer). Represented in milliseconds.
Source:

(readonly) ConsistencyLevel :string

Represents the consistency levels supported for DocumentDB client operations.
The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. Consistency levels.
Consistency levels by order of strength are Strong, BoundedStaleness, Session and Eventual.

Type:
  • string
Properties:
Name Type Description
Strong Strong Consistency guarantees that read operations always return the value that was last written.
BoundedStaleness Bounded Staleness guarantees that reads are not too out-of-date. This can be configured based on number of operations (MaxStalenessPrefix) or time (MaxStalenessIntervalInSeconds).
Session Session Consistency guarantees monotonic reads (you never read old data, then new, then old again), monotonic writes (writes are ordered) and read your writes (your writes are immediately visible to your reads) within any single session.
Eventual Eventual Consistency guarantees that reads will return a subset of writes. All writes will be eventually be available for reads.
Source:

DatabaseAccount

Represents a DatabaseAccount. A DatabaseAccount is the container for databases.
Properties:
Name Type Description
DatabasesLink string The self-link for Databases in the databaseAccount.
MediaLink string The self-link for Media in the databaseAccount.
MaxMediaStorageUsageInMB number Attachment content (media) storage quota in MBs ( Retrieved from gateway ).
CurrentMediaStorageUsageInMB number

Current attachment content (media) usage in MBs (Retrieved from gateway )
Value is returned from cached information updated periodically and is not guaranteed to be real time.

ConsistencyPolicy object Gets the UserConsistencyPolicy settings.
Properties
Name Type Description
defaultConsistencyLevel string The default consistency level and it's of type ConsistencyLevel.
maxStalenessPrefix number In bounded staleness consistency, the maximum allowed staleness in terms difference in sequence numbers (aka version).
maxStalenessIntervalInSeconds number In bounded staleness consistency, the maximum allowed staleness in terms time interval.
Source:

(readonly) IndexingMode :string

Specifies the supported indexing modes.
Type:
  • string
Properties:
Name Type Description
Consistent

Index is updated synchronously with a create or update operation.
With consistent indexing, query behavior is the same as the default consistency level for the collection. The index is always kept up to date with the data.

Lazy

Index is updated asynchronously with respect to a create or update operation.
With lazy indexing, queries are eventually consistent. The index is updated when the collection is idle.

Source:

(readonly) IndexKind :string

Specifies the supported Index types.
Type:
  • string
Properties:
Name Type Description
Hash This is supplied for a path which has no sorting requirement. This kind of an index has better precision than corresponding range index.
Range This is supplied for a path which requires sorting.
Source:

(readonly) MediaReadMode :sting

Enum for media read mode values.
Type:
  • sting
Properties:
Name Type Description
Buffered Content is buffered at the client and not directly streamed from the content store.

Use Buffered to reduce the time taken to read and write media files.

Streamed Content is directly streamed from the content store without any buffering at the client.

Use Streamed to reduce the client memory overhead of reading and writing media files.

Source:

(readonly) PermissionMode :string

Enum for permission mode values.
Type:
  • string
Properties:
Name Type Description
None Permission not valid.
Read Permission applicable for read operations only.
All Permission applicable for all operations.
Source:

(readonly) TriggerOperation :string

Enum for trigger operation values. specifies the operations on which a trigger should be executed.
Type:
  • string
Properties:
Name Type Description
All All operations.
Create Create operations only.
Update Update operations only.
Delete Delete operations only.
Replace Replace operations only.
Source:

(readonly) TriggerType :string

Enum for trigger type values. Specifies the type of the trigger.
Type:
  • string
Properties:
Name Type Description
Pre Trigger should be executed before the associated operation(s).
Post Trigger should be executed after the associated operation(s).
Source:

(readonly) UserDefinedFunctionType :string

Enum for udf type values. Specifies the types of user defined functions.
Type:
  • string
Properties:
Name Type Description
Javascript Javascript type.
Source:

Type Definitions

ExcludedPath

Excluded path.

Type:
  • Object
Properties:
Name Type Description
Path string Path to be indexed.
Source:

FeedOptions

The feed options
Type:
  • Object
Properties:
Name Type Attributes Description
maxItemCount number <optional>
Max number of items to be returned in the enumeration operation.
continuation string <optional>
Opaque token for continuing the enumeration.
sessionToken string <optional>
Token for use with Session consistency.
EnableScanInQuery boolean <optional>
Allow scan on the queries which couldn't be served as indexing was opted out on the requested paths.
Source:

IncludedPath

Included path.

Type:
  • Object
Properties:
Name Type Description
Indexes Array An array of Indexes.
Path string Path to be indexed.
Source:

Indexes

Index specification.

Type:
  • Object
Properties:
Name Type Description
Kind string The index kind IndexKind.
DataType string The data type DataType.
Precision number The precision.
Source:

IndexingPolicy

The Indexing Policy represents the indexing policy configuration for a collection.
Type:
  • Object
Properties:
Name Type Description
automatic boolean Specifies whether automatic indexing is enabled for a collection.

In automatic indexing, documents can be explicitly excluded from indexing using RequestOptions. In manual indexing, documents can be explicitly included.

indexingMode string The indexing mode (consistent or lazy) IndexingMode.
IncludedPaths Array An array of IncludedPath represents the paths to be included for indexing.
ExcludedPaths Array An array of ExcludedPath represents the paths to be excluded from indexing.
Source:

MediaOptions

The media options
Type:
  • Object
Properties:
Name Type Attributes Default Description
slug string <optional>
HTTP Slug header value.
contentType string <optional>
application/octet-stream HTTP ContentType header value.
Source:

RequestCallback(error, resource, responseHeaders)

The callback to execute after the request execution.
Parameters:
Name Type Description
error object Will contain error information if an error occurs, undefined otherwise.
Properties
Name Type Description
code number The response code corresponding to the error.
body string A string represents the error information.
resource Object An object that represents the requested resource (Db, collection, document ... etc) if no error happens.
responseHeaders object An object that contain the response headers.
Source:

RequestOptions

The request options
Type:
  • Object
Properties:
Name Type Attributes Description
preTriggerInclude string <optional>
Indicates what is the pre trigger to be invoked before the operation.
postTriggerInclude string <optional>
Indicates what is the post trigger to be invoked after the operation.
accessCondition object <optional>
Conditions Associated with the request.
Properties
Name Type Description
type string Conditional HTTP method header type.
condition string Conditional HTTP method header value.
indexingDirective string <optional>
Specifies indexing directives (index, do not index .. etc).
consistencyLevel string <optional>
Consistency level required by the client.
sessionToken string <optional>
Token for use with Session consistency.
resourceTokenExpirySeconds number <optional>
Expiry time (in seconds) for resource token associated with permission (applicable only for requests on permissions).
offerType string <optional>
Offer type when creating document collections.
Source:

SqlParameter

The Sql query parameter.
Type:
  • Object
Properties:
Name Type Description
name string The name of the parameter.
value string The value of the parameter.
Source:

SqlQuerySpec

The Sql query specification.
Type:
  • Object
Properties:
Name Type Description
query string The body of the query.
parameters Array.<SqlParameter> The array of SqlParameter.
Source: