@azure/cosmos package
Classes
ChangeFeedIterator |
Provides iterator for change feed.
Use |
ChangeFeedResponse |
A single response page from the Azure Cosmos DB Change Feed |
ClientSideMetrics | |
Conflict |
Use to read or delete a given Conflict by id. See Conflicts to query or read all conflicts. |
ConflictResponse | |
Conflicts |
Use to query or read all conflicts. |
Container |
Operations for reading, replacing, or deleting a specific, existing container by id. See Containers for creating new containers, and reading/querying all containers; use Note: all these operations make calls against a fixed budget.
You should design your system such that these calls scale sublinearly with your application.
For instance, do not call |
ContainerResponse |
Response object for Container operations |
Containers |
Operations for creating new containers, and reading/querying all containers See Container for reading, replacing, or deleting an existing container; use Note: all these operations make calls against a fixed budget.
You should design your system such that these calls scale sublinearly with your application.
For instance, do not call |
CosmosClient |
Provides a client-side logical representation of the Azure Cosmos DB database account. This client is used to configure and execute requests in the Azure Cosmos DB database service. Example Instantiate a client and create a new database
Example Instantiate a client with custom Connection Policy
|
Database |
Operations for reading or deleting an existing database. See Databases for creating new databases, and reading/querying all databases; use Note: all these operations make calls against a fixed budget.
You should design your system such that these calls scale sublinearly with your application.
For instance, do not call |
DatabaseAccount |
Represents a DatabaseAccount in the Azure Cosmos DB database service. |
DatabaseResponse |
Response object for Database operations |
Databases |
Operations for creating new databases, and reading/querying all databases See Database for reading or deleting an existing database; use Note: all these operations make calls against a fixed budget.
You should design your system such that these calls scale sublinearly with your application.
For instance, do not call |
FeedResponse | |
Item |
Used to perform operations on a specific item. See Items for operations on all items; see |
ItemResponse | |
Items |
Operations for creating new items, and reading/querying all items See Item for reading, replacing, or deleting an existing container; use |
Offer |
Use to read or replace an existing Offer by id. See Offers to query or read all offers. |
OfferResponse | |
Offers |
Use to query or read all Offers. |
Permission |
Use to read, replace, or delete a given Permission by id. See <xref:Permissions> to create, upsert, query, or read all Permissions. |
PermissionResponse | |
Permissions_2 |
Use to create, replace, query, and read all Permissions. See Permission to read, replace, or delete a specific permission by id. |
QueryIterator |
Represents a QueryIterator Object, an implementation of feed or query response that enables traversal and iterating over the response in the Azure Cosmos DB database service. |
QueryMetrics | |
QueryPreparationTimes | |
ResourceResponse | |
RuntimeExecutionTimes | |
SasTokenProperties | |
Scripts | |
StoredProcedure |
Operations for reading, replacing, deleting, or executing a specific, existing stored procedure by id. For operations to create, read all, or query Stored Procedures, |
StoredProcedureResponse | |
StoredProcedures |
Operations for creating, upserting, or reading/querying all Stored Procedures.
For operations to read, replace, delete, or execute a specific, existing stored procedure by id, see |
Trigger |
Operations to read, replace, or delete a Trigger.
Use |
TriggerResponse | |
Triggers |
Operations to create, upsert, query, and read all triggers.
Use |
User |
Used to read, replace, and delete Users.
Additionally, you can access the permissions for a given user via See Users to create, upsert, query, or read all. |
UserDefinedFunction |
Used to read, replace, or delete a specified User Definied Function by id. See UserDefinedFunction to create, upsert, query, read all User Defined Functions. |
UserDefinedFunctionResponse | |
UserDefinedFunctions |
Used to create, upsert, query, or read all User Defined Functions. See UserDefinedFunction to read, replace, or delete a given User Defined Function by id. |
UserResponse | |
Users |
Used to create, upsert, query, and read all users. See User to read, replace, or delete a specific User by id. |
Interfaces
Agent | |
BulkOptions |
Options object used to modify bulk execution. continueOnError (Default value: false) - Continues bulk execution when an operation fails ** NOTE THIS WILL DEFAULT TO TRUE IN the 4.0 RELEASE |
ChangeFeedOptions |
Specifies options for the change feed Some of these options control where and when to start reading from the change feed. The order of precedence is:
If none of those options are set, it will start reading changes from the first |
ConflictDefinition | |
ConflictResolutionPolicy |
Represents the conflict resolution policy configuration for specifying how to resolve conflicts in case writes from different regions result in conflicts on documents in the collection in the Azure Cosmos DB service. |
ConnectionPolicy |
Represents the Connection policy associated with a CosmosClient in the Azure Cosmos DB database service. |
ContainerDefinition | |
ContainerRequest | |
CosmosClientOptions | |
CosmosHeaders | |
CosmosHeaders_2 | |
CreateOperationInput | |
DatabaseDefinition | |
DatabaseRequest | |
DeleteOperationInput | |
ErrorBody | |
ErrorResponse | |
FeedOptions |
The feed options and query methods. |
GroupByAliasToAggregateType | |
IndexedPath | |
IndexingPolicy | |
ItemDefinition |
Items in Cosmos DB are simply JSON objects. Most of the Item operations allow for your to provide your own type that extends the very simple ItemDefinition. You cannot use any reserved keys. You can see the reserved key list in <xref:ItemBody> |
JSONArray | |
JSONObject | |
Location_2 |
Used to specify the locations that are available, read is index 1 and write is index 0. |
OfferDefinition | |
OperationBase | |
OperationResponse | |
PartitionKeyDefinition | |
PartitionKeyRangePropertiesNames | |
PatchOperationInput | |
PermissionBody | |
PermissionDefinition | |
ReadOperationInput | |
ReplaceOperationInput | |
RequestOptions |
Options that can be specified for a requested issued to the Azure Cosmos DB servers.= |
Resource | |
RetryOptions |
Represents the Retry policy assocated with throttled requests in the Azure Cosmos DB database service. |
SharedOptions |
Options that can be specified for a requested issued to the Azure Cosmos DB servers.= |
SpatialIndex | |
SqlParameter |
Represents a parameter in a Parameterized SQL query, specified in SqlQuerySpec |
SqlQuerySpec |
Represents a SQL query in the Azure Cosmos DB service. Queries with inputs should be parameterized to protect against SQL injection. Example Parameterized SQL Query
|
StoredProcedureDefinition | |
TriggerDefinition | |
UniqueKey |
Interface for a single unique key passed as part of UniqueKeyPolicy |
UniqueKeyPolicy |
Interface for setting unique keys on container creation |
UpsertOperationInput | |
UserDefinedFunctionDefinition | |
UserDefinition |
Type Aliases
Enums
ConflictResolutionMode | |
ConnectionMode |
Determines the connection behavior of the CosmosClient. Note, we currently only support Gateway Mode. |
ConsistencyLevel |
Represents the consistency levels supported for Azure Cosmos DB client operations. See https://aka.ms/cosmos-consistency for more detailed documentation on Consistency Levels. |
DataType |
Defines a target data type of an index path specification in the Azure Cosmos DB service. |
GeospatialType | |
IndexKind |
Specifies the supported Index types. |
IndexingMode |
Specifies the supported indexing modes. |
PermissionMode |
Enum for permission mode values. |
SpatialType | |
TriggerOperation |
Enum for trigger operation values. specifies the operations on which a trigger should be executed. |
TriggerType |
Enum for trigger type values. Specifies the type of the trigger. |
UserDefinedFunctionType |
Enum for udf type values. Specifies the types of user defined functions. |
Functions
create |
Experimental internal only Generates the payload representing the permission configuration for the sas token. |
Function Details
createAuthorizationSasToken(string, SasTokenProperties)
Experimental internal only Generates the payload representing the permission configuration for the sas token.
function createAuthorizationSasToken(masterKey: string, sasTokenProperties: SasTokenProperties): Promise<string>
Parameters
- masterKey
-
string
- sasTokenProperties
- SasTokenProperties
Returns
Promise<string>