# mulesoft Azure Cosmos DB Connector - Full Documentation
---
product: Azure Cosmos DB Connector
version: 1.0
---
# Azure Cosmos DB Connector 1.0
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
> [!NOTE] Where possible, we changed noninclusive terms to align with our company value of Equality.
> We maintained certain terms to avoid any effect on customer implementations.
Anypoint Connector for Azure Cosmos DB (Azure Cosmos DB Connector) enables you to use basic Azure
Cosmos DB operations to create and access objects in the Azure Cosmos DB system.
For information about compatibility and fixed issues, refer to the Azure Cosmos DB Connector Release
Notes.
## Before You Begin
To use this connector, you must be familiar with:
- The Azure Cosmos DB API
- Anypoint Connectors
- Mule runtime engine (Mule)
- Elements and global elements in a Mule flow
- How to create a Mule app using Anypoint Studio
Before creating an app, you must have:
- Credentials to access the Azure Cosmos DB target resource
- Anypoint Platform
- Anypoint Studio or Anypoint Code Builder
## Common Use Cases for the Connector
Some common use cases for Azure Cosmos DB Connector include:
- Support for documents
- Creating or updating a document
- Deleting a document
- Getting a document or getting all documents
- Replacing a document
- Querying documents
- Support for stored procedures
- Creating a stored procedure
- Deleting a stored procedure
- Executing a stored procedure
- Getting (listing) a stored procedure
- Replacing a stored procedure
- Support for permissions
- Creating a permission
- Deleting a permission
- Getting a permission
- Listing a permission
- Replacing a permission
## Connection Types
Azure Cosmos DB connections use the following authentication types:
- Key Token authentication
Provides an all access key token.
- Resource Token authentication
Provides temporary (1-5 hours), limited access to resources in your account without providing
direct access to the master key.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange)
- [Azure Cosmos DB Connector Reference](https://docs.mulesoft.com/azure-cosmos-db-connector/1.0/azure-cosmos-db-connector-reference)
- [Salesforce Help](https://help.salesforce.com)
---
product: Azure Cosmos DB Connector
version: 1.0
---
# Azure Cosmos DB Connector 1.0 Examples
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
The following examples show several Mule flows for Azure Cosmos DB Connector:
- [Create Document](#create-document)
- [Get Document](#get-document)
- [Replace Document](#replace-document)
- [List Documents](#list-documents)
- [Query Documents](#query-documents)
- [Delete Document](#delete-document)
- [Create Stored Procedure](#create-stored-procedure)
- [Execute Stored Procedure](#execute-stored-procedure)
- [Replace Stored Procedure](#replace-stored-procedure)
- [List Stored Procedures](#list-stored-procedures)
- [Delete Stored Procedure](#delete-stored-procedure)
- [Create Permission](#create-permission)
- [Get Permission](#get-permission)
- [Replace Permission](#replace-permission)
- [List Permissions](#list-permissions)
- [Delete Permission](#delete-permission)
- [List Documents Resource Token](#list-documents-resource-token)
- [List Stored Procedures Resource Token](#list-stored-procedures-resource-token)
> [!NOTE] Some operations require existing documents, stored procedures, or permissions, which can
> be created with their respective flows.
## Create Document
This Mule flow creates a new document or replaces an existing one.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Create Document**
Creates a new document in a collection
- **Transform Message**
Outputs the results of the **Create Document** operation in JSON format
- **Logger**
Shows the HTTP response from the **Create Document** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/create-document](http://localhost:8081/create-document)`.
## Get Document
This Mule flow retrieves an existing document.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Get Document**
Retrieves a document by its partition key and document key
- **Transform Message**
Outputs the results of the **Get Document** operation in JSON format
- **Logger**
Shows the HTTP response from the **Get Document** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/get-document](http://localhost:8081/get-document)`.
## Replace Document
This Mule flow replaces an existing document with a new document that contains the specified
content.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Replace Document**
Replaces the entire content of a document
- **Transform Message**
Outputs the results of the **Replace Document** operation in JSON format
- **Logger**
Shows the HTTP response from the **Replace Document** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/replace-document](http://localhost:8081/replace-document)`.
## List Documents
This Mule flow obtains a list of existing documents based on the specified query, with pagination
support handled internally by the connector.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **List Documents**
Returns a list of documents under the collection
- **Transform Message**
Outputs the results of the **List Documents** operation in JSON format
- **Logger**
Shows the HTTP response from the **List Documents** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/list-documents](http://localhost:8081/list-documents)`.
## Query Documents
This Mule flow obtains a list of existing documents based on the specified query, with pagination
support handled internally by the connector.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Query Documents**
Queries documents
- **Transform Message**
Outputs the results of the **Query Documents** operation in JSON format
- **Logger**
Shows the HTTP response from the **Query Documents** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/query-documents](http://localhost:8081/query-documents)`.
## Delete Document
This Mule flow deletes an existing document.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Delete Document**
Deletes an existing document from a collection
- **Logger**
Shows the HTTP response from the **Delete Document** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/delete-document](http://localhost:8081/delete-document)`.
## Create Stored Procedure
This Mule flow creates a stored procedure with the specified content.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Transform Message**
Transforms the HTTP input
- **Create Stored Procedure**
Creates a new stored procedure in a collection
- **Transform Message**
Outputs the results of the **Create Stored Procedure** operation in JSON format
- **Logger**
Shows the HTTP response from the **Create Stored Procedure** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/create-stored-procedure](http://localhost:8081/create-stored-procedure)`.
## Execute Stored Procedure
This Mule flow executes an existing stored procedure.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Transform Message**
Transforms the HTTP input
- **Execute Stored Procedure**
Executes a stored procedure by performing a POST on a stored procedure resource
- **Transform Message**
Outputs the results of the **Execute Stored Procedure** operation in JSON format
- **Logger**
Shows the HTTP response from the **Execute Stored Procedure** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/execute-stored-procedure](http://localhost:8081/execute-stored-procedure)`.
## Replace Stored Procedure
This Mule flow replaces an existing stored procedure.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Transform Message**
Transforms the HTTP input
- **Replace Stored Procedure**
Replaces the entire stored procedure resource
- **Transform Message**
Outputs the results of the **Replace Stored Procedure** operation in JSON format
- **Logger**
Shows the HTTP response from the **Replace Stored Procedure** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/replace-stored-procedure](http://localhost:8081/replace-stored-procedure)`.
## List Stored Procedures
This Mule flow obtains a list of existing stored procedures.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **List Stored Procedures**
Returns a list of the stored procedures in the collection
- **Transform Message**
Outputs the results of the **List Stored Procedures** operation in JSON format
- **Logger**
Shows the HTTP response from the **List Stored Procedures** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/list-stored-procedures](http://localhost:8081/list-stored-procedures)`.
## Delete Stored Procedure
This Mule flow deletes an existing stored procedure.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Delete Stored Procedure**
Deletes an existing stored procedure from a collection
- **Logger**
Shows the HTTP response from the **Delete Stored Procedure** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/delete-stored-procedure](http://localhost:8081/delete-stored-procedure)`.
## Create Permission
This Mule flow creates a user permission to access a resource.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Create Permission**
Creates a new permission in a database
- **Transform Message**
Outputs the results of the **Create Permission** operation in JSON format
- **Logger**
Shows the HTTP response from the **Create Permission** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/create-permission](http://localhost:8081/create-permission)`.
## Get Permission
This Mule flow retrieves an existing permission.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Get Permission**
Gets a permission from a database
- **Transform Message**
Outputs the results of the **Get Permission** operation in JSON format
- **Logger**
Shows the HTTP response from the **Get Permission** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/get-permission](http://localhost:8081/get-permission)`.
## Replace Permission
This Mule flow replaces an existing permission to access a resource for a user with another
permission.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Replace Permission**
Replaces a permission from a database
- **Transform Message**
Outputs the results of the **Replace Permission** operation in JSON format
- **Logger**
Shows the HTTP response from the **Replace Permission** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/replace-permission](http://localhost:8081/replace-permission)`.
## List Permissions
This Mule flow obtains a list of existing permissions.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **List Permissions**
Lists permissions of a user from a database
- **Transform Message**
Outputs the results of the **List Permissions** operation in JSON format
- **Logger**
Shows the HTTP response from the **List Permissions** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/list-permissions](http://localhost:8081/list-permissions)`.
## Delete Permission
This Mule flow deletes an existing permission.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Delete Permission**
Deletes a permission from a database
- **Logger**
Shows the HTTP response from the **Delete Permission** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/delete-permission](http://localhost:8081/delete-permission)`.
## List Documents Resource Token
This Mule flow obtains a list of existing documents, with pagination support handled internally by
the connector, and uses the short-lived tokens from the Resource Token authorization.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Flow Reference**
Obtains the resource token
- **List Documents**
Returns a list of documents under the collection
- **Transform Message**
Outputs the results of the **List Documents** operation in JSON format
- **Flow Reference**
Clears the permissions
- **Logger**
Shows the HTTP response from the **List Documents** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/list-documents-resource-token](http://localhost:8081/list-documents-resource-token)`.
## List Stored Procedures Resource Token
This Mule flow obtains a list of existing stored procedures using short-lived tokens from the
Resource Token authorization.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Flow Reference**
Obtains the resource token
- **List Stored Procedures**
Returns a list of the stored procedures in the collection
- **Transform Message**
Outputs the results of the **List Stored Procedures** operation in JSON format
- **Flow Reference**
Clears the permissions
- **Logger**
Shows the HTTP response from the **List Stored Procedures** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/list-stored-procedures-resource-token](http://localhost:8081/list-stored-procedures-resource-token)`.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: Azure Cosmos DB Connector
version: 1.0
---
# Azure Cosmos DB Connector 1.0 Reference
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
## Configurations
---
### Key Token Config
#### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Name | String | Name for this configuration. Connectors reference the configuration with this name. | | x |
Connection | | Connection types for this configuration. | | x |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | 60 | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | SECONDS | |
Streaming Type | | How the connector streams request content to the remote service: AUTO (default)
Connector automatically uses the best streaming strategy based on the request content. ALWAYS
Connector always streams the request content. NEVER
Connector does not stream the request content.
| AUTO | |
Name | | ID used to reference this configuration. | | x |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
#### Connection Types
##### Key Token Auth Connection Provider
###### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Proxy Config | | Configures a proxy for outbound connections. | | |
Default Headers | | | | |
Query Parameters | | | | |
Connection Timeout | | How long the connector waits before timing out when establishing a connection to the remote service. | 30 | |
Connection Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Timeout field. | SECONDS | |
Use Persistent Connections | | Indicates whether to use persistent connections: true
Mule uses persistent connections. false
Mule closes the connection after the first request completes.
| true | |
Max Connections | | Maximum number of connections to open to the backend. HTTP requests are sent in parallel over multiple connections. Setting this value too high can impact latency and consume additional resources without increasing throughput. | -1 | |
Connection Idle Timeout | | When persistent connections are enabled, how long a connection can remain idle before Mule closes it. | 30 | |
Connection Idle Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Idle Timeout field. | SECONDS | |
Stream Response | | If this value is true, Mule streams received responses. | false | |
Response Buffer Size | | Size of the buffer that stores the HTTP response, in bytes. | -1 | |
Database account url | | Database account URL. | | x |
Key token | | All access key token that enables users to have full control of the Cosmos DB resources. | | x |
Version | | Version of the Cosmos DB REST service. | | x |
TLS configuration | | If HTTPS is configured as a protocol, the user must configure at least the keystore configuration. | | |
Reconnection | | What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy: true
Allow the deployment to fail. false
Ignore the results of the connectivity test.
| | |
## Supported Operations
- [Create Document](#CreateDocument)
- [Create Permission](#CreatePermission)
- [Create Stored Procedure](#CreateStoredProcedure)
- [Delete Document](#DeleteDocument)
- [Delete Permission](#DeletePermission)
- [Delete Stored Procedure](#DeleteStoredProcedure)
- [Execute Stored Procedure](#ExecuteStoredProcedure)
- [Get Document](#GetDocument)
- [Get Permission](#GetPermission)
- [List Documents](#ListDocuments)
- [List Permissions](#ListPermissions)
- [List Stored Procedures](#ListStoredProcedures)
- [Query Documents](#QueryDocuments)
- [Replace Document](#ReplaceDocument)
- [Replace Permission](#ReplacePermission)
- [Replace Stored Procedure](#ReplaceStoredProcedure)
---
### Resource Token Config
#### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Name | String | Name for this configuration. Connectors reference the configuration with this name. | | x |
Connection | | Connection types for this configuration. | | x |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | 60 | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | SECONDS | |
Streaming Type | | How the connector streams request content to the remote service: AUTO (default)
Connector automatically uses the best streaming strategy based on the request content. ALWAYS
Connector always streams the request content. NEVER
Connector does not stream the request content.
| AUTO | |
Name | | ID used to reference this configuration. | | x |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
#### Connection Types
##### Resource Token Auth Connection Provider
###### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Proxy Config | | Configures a proxy for outbound connections. | | |
Default Headers | | | | |
Query Parameters | | | | |
Connection Timeout | | How long the connector waits before timing out when establishing a connection to the remote service. | 30 | |
Connection Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Timeout field. | SECONDS | |
Use Persistent Connections | | Indicates whether to use persistent connections: true
Mule uses persistent connections. false
Mule closes the connection after the first request completes.
| true | |
Max Connections | | Maximum number of connections to open to the backend. HTTP requests are sent in parallel over multiple connections. Setting this value too high can impact latency and consume additional resources without increasing throughput. | -1 | |
Connection Idle Timeout | | When persistent connections are enabled, how long a connection can remain idle before Mule closes it. | 30 | |
Connection Idle Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Idle Timeout field. | SECONDS | |
Stream Response | | If this value is true, Mule streams received responses. | false | |
Response Buffer Size | | Size of the buffer that stores the HTTP response, in bytes. | -1 | |
Database account url | | Database account URL. | | x |
Resource token | | Resource token. | | x |
Version | | Version of the Cosmos DB REST service. | | x |
TLS configuration | | If HTTPS is configured as a protocol, the user must configure at least the keystore configuration. | | |
Reconnection | | What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy: true
Allow the deployment to fail. false
Ignore the results of the connectivity test.
| | |
## Supported Operations
- [Create Document](#CreateDocument)
- [Create Stored Procedure](#CreateStoredProcedure)
- [Delete Document](#DeleteDocument)
- [Delete Stored Procedure](#DeleteStoredProcedure)
- [Execute Stored Procedure](#ExecuteStoredProcedure)
- [Get Document](#GetDocument)
- [List Documents](#ListDocuments)
- [List Stored Procedures](#ListStoredProcedures)
- [Query Documents](#QueryDocuments)
- [Replace Document](#ReplaceDocument)
- [Replace Stored Procedure](#ReplaceStoredProcedure)
## Operations
## Create Document
``
Creates a new document in a collection. This operation makes an HTTP POST request to the
/dbs/{dbId}/colls/{collId}/docs endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
X ms documentdb is upsert | | If set to true, Cosmos DB does the following: * Creates the document with the ID (and partition key value, if applicable), if the document doesn’t exist. * Updates the document, if it exists. | false | |
X ms indexing directive | | The default for indexing behavior is determined by the automatic property’s value in the indexing policy for the collection. | | |
X ms documentdb partitionkey | | Partition key value for the document to create. Must be specified only if the collection is created with a partitionKey definition, for example, ["partitionKey"]. | | |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Create Permission
``
Creates a new permission in a database. This operation makes an HTTP POST request to the
/dbs/{dbId}/users/{userName}/permissions endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the permission is created. | | x |
Username | | Name of the user that owns the permission. | | x |
X ms documentdb expiry seconds | | Validity period of the resource token returned by the operation. | | |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Create Stored Procedure
``
Creates a new stored procedure in a collection. This operation makes an HTTP POST request to the
/dbs/{dbId}/colls/{collId}/sprocs endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Delete Document
``
Deletes an existing document from a collection. This operation makes an HTTP DELETE request to the
/dbs/{dbId}/colls/{collId}/docs/{doc-id} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Doc ID | | ID of the document to delete. | | x |
X ms documentdb partitionkey | | Partition key value for the document to delete. Must be specified only if the collection is created with a partitionKey definition, for example, ["partitionKey"]. | | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
Type | String |
Attributes Type | |
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Delete Permission
``
Deletes a permission from a database. This operation makes an HTTP DELETE request to the
/dbs/{dbId}/users/{userName}/permissions/{permissionId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the permission is deleted. | | x |
Username | | Name of the user that owns the permission. | | x |
Permission Id | | ID of the permission to delete. | | x |
Config Ref | | Name of the configuration used to execute this component. | | x |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
Type | String |
Attributes Type | |
### For Configurations
- [Key Token Config](#KeyTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Delete Stored Procedure
``
Deletes an existing stored procedure from a collection. This operation makes an HTTP DELETE request
to the /dbs/{dbId}/colls/{collId}/sprocs/{sprocId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Sproc Id | | ID of the stored procedure to delete. | | x |
Config Ref | | Name of the configuration used to execute this component. | | x |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
Type | String |
Attributes Type | |
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Execute Stored Procedure
``
Executes a stored procedure by performing a POST on a stored procedure resource. This operation
makes an HTTP POST request to the /dbs/{dbId}/colls/{collId}/sprocs/{sprocId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User generated name or ID of the database in which the stored procedure is executed. | | x |
Coll Id | | Name of the collection in which the stored procedure is executed. | | x |
Sproc Id | | ID of the stored procedure to execute. | | x |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Get Document
``
Retrieves a document by its partition key and document key. This operation makes an HTTP GET request
to the /dbs/{dbId}/colls/{collId}/docs/{doc-id} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Doc ID | | Name of the document to replace. | | x |
If None Match | | Indicates whether the operation is conditional, which means if the response includes a body, the value in the database is different from the specified value in the header. The value must be the ETag of the resource. | | |
X ms documentdb partitionkey | | Partition key value for the document to read. Must be specified only if the collection is created with a partitionKey definition, for example, ["partitionKey"]. | | |
X ms consistency level | STRONG BOUNDED SESSION EVENTUAL
| Consistency level override. The valid values are listed in order of strongest to weakest. The override must be the same or weaker than the account’s configured consistency level. | | |
X ms session token | | String token used with session level consistency. Clients must echo the latest read value of this header during read requests for session consistency. | | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Get Permission
``
Gets a permission from the specified database. This operation makes an HTTP GET request to the
/dbs/{dbId}/users/{userName}/permissions/{permissionId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the permission is retrieved. | | x |
Username | | Name of the user that owns the permission. | | x |
Permission Id | | ID of the permission to retrieve. | | x |
X ms documentdb expiry seconds | | Validity period of the resource token returned by the operation. | | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## List Documents
``
Returns a list of documents under the collection. This operation makes an HTTP GET request to the
/dbs/{dbId}/colls/{collId}/docs endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
X ms consistency level | STRONG BOUNDED SESSION EVENTUAL
| Consistency level override. The valid values are listed in order of strongest to weakest. The override must be the same or weaker than the account’s configured consistency level. | | |
X ms session token | | String token used with session level consistency. Clients must echo the latest read value of this header during read requests for session consistency. | | |
A im | | Must be set to Incremental feed, or omitted otherwise. Available for REST API version 2016-07-11 and later. | | |
If None Match | | Available for REST API version 2016-07-11 and later. No header Returns all changes from the beginning (collection creation). "*" Returns all new changes to data within the collection. A collection ETag Returns all changes made since that logical timestamp.
| | |
X ms documentdb partitionkeyrangeid | | Partition key range ID for reading data. Available for REST API version 2016-07-11 and later. | | |
Output Mime Type | | MIME type of the payload that this operation outputs. | | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## List Permissions
``
Lists permissions of a user from a database. This operation makes an HTTP GET request to the
/dbs/{dbId}/users/{userName}/permissions endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the permission is retrieved. | | x |
Username | | Name of the user that owns the permission. | | x |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## List Stored Procedures
``
Returns a list of the stored procedures in the collection. This operation makes an HTTP GET request
to the /dbs/{dbId}/colls/{collId}/sprocs endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Query Documents
``
Queries documents. This operation makes an HTTP POST request to the /dbs/{dbId}/colls/{collId}/docs
endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
X ms documentdb query enablecrosspartition | | If the collection is partitioned, this parameter must be set to true to enable execution across multiple partitions. Queries that filter against a single partition key, or against single-partitioned collections do not need to set the header. | false | |
X ms consistency level | STRONG BOUNDED SESSION EVENTUAL
| Consistency level override. The valid values are listed in order of strongest to weakest. The override must be the same or weaker than the account’s configured consistency level. | | |
X ms session token | | String token used with session level consistency. Clients must echo the latest read value of this header during read requests for session consistency. | | |
Body | | Content to use. | #[payload] | |
Output Mime Type | | MIME type of the payload that this operation outputs. | | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Replace Document
``
Replaces the entire content of a document. This operation makes an HTTP PUT request to the
/dbs/{dbId}/colls/{collId}/docs/{doc-id} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Doc ID | | Name of the document to replace. | | x |
If Match | | Indicates whether an operation is conditional for optimistic concurrency, which means the document is updated only if the specified ETag matches the current version in the database. The value must be set to the ETag value of the resource. | | |
X ms indexing directive | | The default for indexing behavior is determined by the automatic property’s value in the indexing policy for the collection. | | |
X ms documentdb partitionkey | | Partition key value for the document to replace. Must be specified only if the collection is created with a partitionKey definition, for example, ["partitionKey"]. | | |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Replace Permission
``
Replaces a permission from a database. This operation makes an HTTP PUT request to the
/dbs/{dbId}/users/{userName}/permissions/{permissionId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the permission is replaced. | | x |
Username | | Name of the user that owns the permission. | | x |
Permission Id | | ID of the permission to replace. | | x |
X ms documentdb expiry seconds | | Validity period of the resource token returned by the operation. | | |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Replace Stored Procedure
``
Replaces the entire stored procedure resource. All user settable properties, including the ID and
the body, must be submitted in the body to perform the replacement. This operation makes an HTTP PUT
request to the /dbs/{dbId}/colls/{collId}/sprocs/{sprocId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is replaced. | | x |
Coll Id | | Name of the collection in which the stored procedure is replaced. | | x |
Sproc Id | | ID of the stored procedure to replace. | | x |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Types
### Proxy
Configures a proxy for outbound connections.
| Field | Type | Description | Default Value | Required |
|---|
Host | | Hostname or IP address of the proxy server. | | |
Port | | Port of the proxy server. | | |
Username | | Username to authenticate against the proxy server. | | |
Password | | Password to authenticate against the proxy server. | | |
Non Proxy Hosts | | Comma-separated list of hosts that the proxy must not be used against. | | |
### Default Header
Headers automatically added to every outbound request.
| Field | Type | Description | Default Value | Required |
|---|
Key | | | | |
Value | | | | |
### Default Query Param
Query parameters automatically added to every outbound request.
| Field | Type | Description | Default Value | Required |
|---|
Key | | | | |
Value | | | | |
### TLS
Configures TLS to provide secure communications for the Mule app.
| Field | Type | Description | Default Value | Required |
|---|
Enabled Protocols | | Comma-separated list of protocols enabled for this context. | | |
Enabled Cipher Suites | | Comma-separated list of cipher suites enabled for this context. | | |
Trust Store | | Configures the TLS truststore. | | |
Key Store | | Configures the TLS keystore. | | |
Revocation Check | | Configures a revocation checking mechanism. | | |
### Truststore
Configures the truststore for TLS.
| Field | Type | Description | Default Value | Required |
|---|
Path | | Path to the truststore. Mule resolves the path relative to the current classpath and file system. | | |
Password | | Password used to protect the truststore. | | |
Type | | | | |
Algorithm | | Encryption algorithm that the truststore uses. | | |
Insecure | | If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks. | | |
### Keystore
Configures the keystore for the TLS protocol. The keystore you generate contains a private key and a
public certificate.
| Field | Type | Description | Default Value | Required |
|---|
Path | | Path to the keystore. Mule resolves the path relative to the current classpath and file system. | | |
Type | | | | |
Alias | | Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file. | | |
Key Password | | Password used to protect the private key. | | |
Password | | Password used to protect the keystore. | | |
Algorithm | | Encryption algorithm that the keystore uses. | | |
### Standard Revocation Check
Configures standard revocation checks for TLS certificates.
| Field | Type | Description | Default Value | Required |
|---|
Only End Entities | | Which elements to verify in the certificate chain: true
Verify only the last element in the certificate chain. false
Verify all elements in the certificate chain.
| | |
Prefer Crls | | How to check certificate validity: true
Check the Certification Revocation List (CRL) for certificate validity. false
Use the Online Certificate Status Protocol (OCSP) to check certificate validity.
| | |
No Fallback | | Whether to use the secondary method to check certificate validity: true
Use the method that wasn’t specified in the Prefer Crls field (the secondary method) to check certificate validity. false
Do not use the secondary method to check certificate validity.
| | |
Soft Fail | | What to do if the revocation server can’t be reached or is busy: true
Avoid verification failure. false
Allow the verification to fail.
| | |
### Custom OCSP Responder
Configures a custom OCSP responder for certification revocation checks.
| Field | Type | Description | Default Value | Required |
|---|
Url | | URL of the OCSP responder. | | |
Cert Alias | | Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore. | | |
### CRL File
Specifies the location of the certification revocation list (CRL) file.
| Field | Type | Description | Default Value | Required |
|---|
Path | | | | |
### Reconnection
Configures a reconnection strategy for an operation.
| Field | Type | Description | Default Value | Required |
|---|
Fails Deployment | | What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy: true
Allow the deployment to fail. false
Ignore the results of the connectivity test.
| | |
Reconnection Strategy | | Reconnection strategy to use. | | |
### Reconnect
Configures a standard reconnection strategy, which specifies how often to reconnect and how many
reconnection attempts the connector source or operation can make.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
Count | | How many reconnection attempts the Mule app can make. | | |
### Reconnect Forever
Configures a forever reconnection strategy by which the connector source or operation attempts to
reconnect at a specified frequency for as long as the Mule app runs.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
### Expiration Policy
Configures an expiration policy strategy.
| Field | Type | Description | Default Value | Required |
|---|
Max Idle Time | | Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
Time Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Max Idle Time field. | | |
### HTTP Response Attributes
Configures HTTP response attributes for the configuration.
| Field | Type | Description | Default Value | Required |
|---|
Status Code | | HTTP status code of the response. | | |
Headers | | Map of HTTP headers in the message. | | |
Reason Phrase | | HTTP reason phrase of the response. | | |
### Repeatable In Memory Stream
Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX
buffer size. Always run performance tests to find the optimal buffer size for your specific use
case.
| Field | Type | Description | Default Value | Required |
|---|
Initial Buffer Size | | Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max In Memory Size value. | | |
Buffer Size Increment | | Amount by which the buffer size expands if it exceeds its initial size. Setting a value of 0 or lower specifies that the buffer can’t expand. | | |
Max Buffer Size | | The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit. | | |
Buffer Unit | | Unit for the Initial Buffer Size, Buffer Size Increment, and Buffer Unit fields. | | |
### Repeatable File Store Stream
Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream
content in memory. If the stream content is larger than the configured buffer size, Mule backs up
the buffer’s content to disk and then clears the memory.
| Field | Type | Description | Default Value | Required |
|---|
In Memory Size | | Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance: Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory. Configure a smaller buffer size to decrease memory load at the expense of response time.
| | |
Buffer Unit | | Unit for the In Memory Size field. | | |
### Repeatable In Memory Iterable
| Field | Type | Description | Default Value | Required |
|---|
Initial Buffer Size | | The amount of instances that is initially be allowed to be kept in memory to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, then the buffer expands according to the Buffer Size Increment attribute, with an upper limit of Max In Memory Size. The default value is 100 instances. | | |
Buffer Size Increment | | This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full. The default value is 100 instances. | | |
Max Buffer Size | | The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit. | | |
### Repeatable File Store Iterable
| Field | Type | Description | Default Value | Required |
|---|
In Memory Objects | | The maximum amount of instances to keep in memory. If more than that is required, content on the disk is buffered. | | |
Buffer Unit | | Unit for the In Memory Size field. | | |
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: Azure Cosmos DB Connector
version: 1.0
---
# Azure Cosmos DB Connector 1.0 XML and Maven Support
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio:
- If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML
editor or from a text editor, you can access the connector from your app by adding reference
statements to both your XML Mule flow and the Apache Maven `pom.xml` file.
- If you add the connector in Studio, Studio automatically populates the XML code with the
connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file.
## Add a Namespace for the Connector
Paste the following code inside the `` tag of the header of your configuration XML:
```xml
http://www.mulesoft.org/schema/mule/azure-cosmos-db
http://www.mulesoft.org/schema/mule/azure-cosmos-db/current/mule-azure-cosmos-db.xsd
```
This example shows how the namespace statements are placed in the XML block:
```xml
```
## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app.
When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access
to this connector:
```xml
com.mulesoft.connectors
mule4-azure-cosmos-db-connector
x.x.x
mule-plugin
```
Replace `x.x.x` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information:
1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/).
2. In Exchange, click **Login** and supply your Anypoint Platform username and password.
3. In Exchange, search for `azure cosmos db`.
4. Select the connector.
5. Click **Dependency Snippets** near the upper right of the screen.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: Azure Cosmos DB Connector
version: 1.1
is-latest-version: true
---
# Azure Cosmos DB Connector 1.1
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
> [!NOTE] Where possible, we changed noninclusive terms to align with our company value of Equality.
> We maintained certain terms to avoid any effect on customer implementations.
Anypoint Connector for Azure Cosmos DB (Azure Cosmos DB Connector) enables you to use basic Azure
Cosmos DB operations to create and access objects in the Azure Cosmos DB system.
For information about compatibility and fixed issues, refer to the Azure Cosmos DB Connector Release
Notes.
## Before You Begin
To use this connector, you must be familiar with:
- The Azure Cosmos DB API
- Anypoint Connectors
- Mule runtime engine (Mule)
- Elements and global elements in a Mule flow
- How to create a Mule app using Anypoint Studio
Before creating an app, you must have:
- Credentials to access the Azure Cosmos DB target resource
- Anypoint Platform
- Anypoint Studio or Anypoint Code Builder
## Common Use Cases for the Connector
Some common use cases for Azure Cosmos DB Connector include:
- Support for documents
- Creating or updating a document
- Deleting a document
- Getting a document or getting all documents
- Replacing a document
- Querying documents
- Support for stored procedures
- Creating a stored procedure
- Deleting a stored procedure
- Executing a stored procedure
- Getting (listing) a stored procedure
- Replacing a stored procedure
- Support for permissions
- Creating a permission
- Deleting a permission
- Getting a permission
- Listing a permission
- Replacing a permission
## Connection Types
Azure Cosmos DB connections use the following authentication types:
- Key Token authentication
Provides an all access key token.
- Resource Token authentication
Provides temporary (1-5 hours), limited access to resources in your account without providing
direct access to the master key.
- Service Principal authentication
Authenticates using a Microsoft Entra ID service principal with a client ID, client secret, and
tenant ID.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange)
- [Azure Cosmos DB Connector Reference](https://docs.mulesoft.com/azure-cosmos-db-connector/latest/azure-cosmos-db-connector-reference)
- [Salesforce Help](https://help.salesforce.com)
---
product: Azure Cosmos DB Connector
version: 1.1
is-latest-version: true
---
# Azure Cosmos DB Connector 1.1 Examples
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
The following examples show several Mule flows for Azure Cosmos DB Connector:
- [Create Document](#create-document)
- [Get Document](#get-document)
- [Replace Document](#replace-document)
- [List Documents](#list-documents)
- [Query Documents](#query-documents)
- [Delete Document](#delete-document)
- [Create Stored Procedure](#create-stored-procedure)
- [Execute Stored Procedure](#execute-stored-procedure)
- [Replace Stored Procedure](#replace-stored-procedure)
- [List Stored Procedures](#list-stored-procedures)
- [Delete Stored Procedure](#delete-stored-procedure)
- [Create Permission](#create-permission)
- [Get Permission](#get-permission)
- [Replace Permission](#replace-permission)
- [List Permissions](#list-permissions)
- [Delete Permission](#delete-permission)
- [List Documents Resource Token](#list-documents-resource-token)
- [List Stored Procedures Resource Token](#list-stored-procedures-resource-token)
> [!NOTE] Some operations require existing documents, stored procedures, or permissions, which can
> be created with their respective flows.
## Create Document
This Mule flow creates a new document or replaces an existing one.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Create Document**
Creates a new document in a collection
- **Transform Message**
Outputs the results of the **Create Document** operation in JSON format
- **Logger**
Shows the HTTP response from the **Create Document** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/create-document](http://localhost:8081/create-document)`.
## Get Document
This Mule flow retrieves an existing document.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Get Document**
Retrieves a document by its partition key and document key
- **Transform Message**
Outputs the results of the **Get Document** operation in JSON format
- **Logger**
Shows the HTTP response from the **Get Document** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/get-document](http://localhost:8081/get-document)`.
## Replace Document
This Mule flow replaces an existing document with a new document that contains the specified
content.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Replace Document**
Replaces the entire content of a document
- **Transform Message**
Outputs the results of the **Replace Document** operation in JSON format
- **Logger**
Shows the HTTP response from the **Replace Document** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/replace-document](http://localhost:8081/replace-document)`.
## List Documents
This Mule flow obtains a list of existing documents based on the specified query, with pagination
support handled internally by the connector.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **List Documents**
Returns a list of documents under the collection
- **Transform Message**
Outputs the results of the **List Documents** operation in JSON format
- **Logger**
Shows the HTTP response from the **List Documents** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/list-documents](http://localhost:8081/list-documents)`.
## Query Documents
This Mule flow obtains a list of existing documents based on the specified query, with pagination
support handled internally by the connector.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Query Documents**
Queries documents
- **Transform Message**
Outputs the results of the **Query Documents** operation in JSON format
- **Logger**
Shows the HTTP response from the **Query Documents** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/query-documents](http://localhost:8081/query-documents)`.
## Delete Document
This Mule flow deletes an existing document.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Delete Document**
Deletes an existing document from a collection
- **Logger**
Shows the HTTP response from the **Delete Document** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/delete-document](http://localhost:8081/delete-document)`.
## Create Stored Procedure
This Mule flow creates a stored procedure with the specified content.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Transform Message**
Transforms the HTTP input
- **Create Stored Procedure**
Creates a new stored procedure in a collection
- **Transform Message**
Outputs the results of the **Create Stored Procedure** operation in JSON format
- **Logger**
Shows the HTTP response from the **Create Stored Procedure** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/create-stored-procedure](http://localhost:8081/create-stored-procedure)`.
## Execute Stored Procedure
This Mule flow executes an existing stored procedure.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Transform Message**
Transforms the HTTP input
- **Execute Stored Procedure**
Executes a stored procedure by performing a POST on a stored procedure resource
- **Transform Message**
Outputs the results of the **Execute Stored Procedure** operation in JSON format
- **Logger**
Shows the HTTP response from the **Execute Stored Procedure** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/execute-stored-procedure](http://localhost:8081/execute-stored-procedure)`.
## Replace Stored Procedure
This Mule flow replaces an existing stored procedure.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Transform Message**
Transforms the HTTP input
- **Replace Stored Procedure**
Replaces the entire stored procedure resource
- **Transform Message**
Outputs the results of the **Replace Stored Procedure** operation in JSON format
- **Logger**
Shows the HTTP response from the **Replace Stored Procedure** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/replace-stored-procedure](http://localhost:8081/replace-stored-procedure)`.
## List Stored Procedures
This Mule flow obtains a list of existing stored procedures.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **List Stored Procedures**
Returns a list of the stored procedures in the collection
- **Transform Message**
Outputs the results of the **List Stored Procedures** operation in JSON format
- **Logger**
Shows the HTTP response from the **List Stored Procedures** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/list-stored-procedures](http://localhost:8081/list-stored-procedures)`.
## Delete Stored Procedure
This Mule flow deletes an existing stored procedure.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Delete Stored Procedure**
Deletes an existing stored procedure from a collection
- **Logger**
Shows the HTTP response from the **Delete Stored Procedure** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/delete-stored-procedure](http://localhost:8081/delete-stored-procedure)`.
## Create Permission
This Mule flow creates a user permission to access a resource.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Create Permission**
Creates a new permission in a database
- **Transform Message**
Outputs the results of the **Create Permission** operation in JSON format
- **Logger**
Shows the HTTP response from the **Create Permission** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/create-permission](http://localhost:8081/create-permission)`.
## Get Permission
This Mule flow retrieves an existing permission.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Get Permission**
Gets a permission from a database
- **Transform Message**
Outputs the results of the **Get Permission** operation in JSON format
- **Logger**
Shows the HTTP response from the **Get Permission** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/get-permission](http://localhost:8081/get-permission)`.
## Replace Permission
This Mule flow replaces an existing permission to access a resource for a user with another
permission.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Replace Permission**
Replaces a permission from a database
- **Transform Message**
Outputs the results of the **Replace Permission** operation in JSON format
- **Logger**
Shows the HTTP response from the **Replace Permission** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/replace-permission](http://localhost:8081/replace-permission)`.
## List Permissions
This Mule flow obtains a list of existing permissions.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **List Permissions**
Lists permissions of a user from a database
- **Transform Message**
Outputs the results of the **List Permissions** operation in JSON format
- **Logger**
Shows the HTTP response from the **List Permissions** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/list-permissions](http://localhost:8081/list-permissions)`.
## Delete Permission
This Mule flow deletes an existing permission.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Delete Permission**
Deletes a permission from a database
- **Logger**
Shows the HTTP response from the **Delete Permission** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/delete-permission](http://localhost:8081/delete-permission)`.
## List Documents Resource Token
This Mule flow obtains a list of existing documents, with pagination support handled internally by
the connector, and uses the short-lived tokens from the Resource Token authorization.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Flow Reference**
Obtains the resource token
- **List Documents**
Returns a list of documents under the collection
- **Transform Message**
Outputs the results of the **List Documents** operation in JSON format
- **Flow Reference**
Clears the permissions
- **Logger**
Shows the HTTP response from the **List Documents** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/list-documents-resource-token](http://localhost:8081/list-documents-resource-token)`.
## List Stored Procedures Resource Token
This Mule flow obtains a list of existing stored procedures using short-lived tokens from the
Resource Token authorization.
This example uses the following operations:
- **HTTP Listener**
Accepts data from HTTP requests
- **Flow Reference**
Obtains the resource token
- **List Stored Procedures**
Returns a list of the stored procedures in the collection
- **Transform Message**
Outputs the results of the **List Stored Procedures** operation in JSON format
- **Flow Reference**
Clears the permissions
- **Logger**
Shows the HTTP response from the **List Stored Procedures** operation

### XML for This Example
Paste this code into the Studio XML editor to quickly load the flow for this example into your Mule
app:
```xml
```
### Steps for Running This Example
1. Verify that your connector is configured.
2. Save the project.
3. From a web browser, test the application by entering
`[http://localhost:8081/list-stored-procedures-resource-token](http://localhost:8081/list-stored-procedures-resource-token)`.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: Azure Cosmos DB Connector
version: 1.1
is-latest-version: true
---
# Azure Cosmos DB Connector 1.1 Reference
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
## Configurations
---
### Key Token Config
#### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Name | String | Name for this configuration. Connectors reference the configuration with this name. | | x |
Connection | | Connection types for this configuration. | | x |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | 60 | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | SECONDS | |
Streaming Type | | How the connector streams request content to the remote service: AUTO (default)
Connector automatically uses the best streaming strategy based on the request content. ALWAYS
Connector always streams the request content. NEVER
Connector does not stream the request content.
| AUTO | |
Name | | ID used to reference this configuration. | | x |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
#### Connection Types
##### Key Token Auth Connection Provider
###### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Proxy Config | | Configures a proxy for outbound connections. | | |
Default Headers | | | | |
Query Parameters | | | | |
Connection Timeout | | How long the connector waits before timing out when establishing a connection to the remote service. | 30 | |
Connection Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Timeout field. | SECONDS | |
Use Persistent Connections | | Indicates whether to use persistent connections: true
Mule uses persistent connections. false
Mule closes the connection after the first request completes.
| true | |
Max Connections | | Maximum number of connections to open to the backend. HTTP requests are sent in parallel over multiple connections. Setting this value too high can impact latency and consume additional resources without increasing throughput. | -1 | |
Connection Idle Timeout | | When persistent connections are enabled, how long a connection can remain idle before Mule closes it. | 30 | |
Connection Idle Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Idle Timeout field. | SECONDS | |
Stream Response | | If this value is true, Mule streams received responses. | false | |
Response Buffer Size | | Size of the buffer that stores the HTTP response, in bytes. | -1 | |
Database account url | | Database account URL. | | x |
Key token | | All access key token that enables users to have full control of the Cosmos DB resources. | | x |
Version | | Version of the Cosmos DB REST service. | | x |
TLS configuration | | If HTTPS is configured as a protocol, the user must configure at least the keystore configuration. | | |
Reconnection | | What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy: true
Allow the deployment to fail. false
Ignore the results of the connectivity test.
| | |
## Supported Operations
- [Create Document](#CreateDocument)
- [Create Permission](#CreatePermission)
- [Create Stored Procedure](#CreateStoredProcedure)
- [Delete Document](#DeleteDocument)
- [Delete Permission](#DeletePermission)
- [Delete Stored Procedure](#DeleteStoredProcedure)
- [Execute Stored Procedure](#ExecuteStoredProcedure)
- [Get Document](#GetDocument)
- [Get Permission](#GetPermission)
- [List Documents](#ListDocuments)
- [List Permissions](#ListPermissions)
- [List Stored Procedures](#ListStoredProcedures)
- [Query Documents](#QueryDocuments)
- [Replace Document](#ReplaceDocument)
- [Replace Permission](#ReplacePermission)
- [Replace Stored Procedure](#ReplaceStoredProcedure)
---
### Resource Token Config
#### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Name | String | Name for this configuration. Connectors reference the configuration with this name. | | x |
Connection | | Connection types for this configuration. | | x |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | 60 | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | SECONDS | |
Streaming Type | | How the connector streams request content to the remote service: AUTO (default)
Connector automatically uses the best streaming strategy based on the request content. ALWAYS
Connector always streams the request content. NEVER
Connector does not stream the request content.
| AUTO | |
Name | | ID used to reference this configuration. | | x |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
#### Connection Types
##### Resource Token Auth Connection Provider
###### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Proxy Config | | Configures a proxy for outbound connections. | | |
Default Headers | | | | |
Query Parameters | | | | |
Connection Timeout | | How long the connector waits before timing out when establishing a connection to the remote service. | 30 | |
Connection Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Timeout field. | SECONDS | |
Use Persistent Connections | | Indicates whether to use persistent connections: true
Mule uses persistent connections. false
Mule closes the connection after the first request completes.
| true | |
Max Connections | | Maximum number of connections to open to the backend. HTTP requests are sent in parallel over multiple connections. Setting this value too high can impact latency and consume additional resources without increasing throughput. | -1 | |
Connection Idle Timeout | | When persistent connections are enabled, how long a connection can remain idle before Mule closes it. | 30 | |
Connection Idle Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Idle Timeout field. | SECONDS | |
Stream Response | | If this value is true, Mule streams received responses. | false | |
Response Buffer Size | | Size of the buffer that stores the HTTP response, in bytes. | -1 | |
Database account url | | Database account URL. | | x |
Resource token | | Resource token. | | x |
Version | | Version of the Cosmos DB REST service. | | x |
TLS configuration | | If HTTPS is configured as a protocol, the user must configure at least the keystore configuration. | | |
Reconnection | | What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy: true
Allow the deployment to fail. false
Ignore the results of the connectivity test.
| | |
## Supported Operations
- [Create Document](#CreateDocument)
- [Create Stored Procedure](#CreateStoredProcedure)
- [Delete Document](#DeleteDocument)
- [Delete Stored Procedure](#DeleteStoredProcedure)
- [Execute Stored Procedure](#ExecuteStoredProcedure)
- [Get Document](#GetDocument)
- [List Documents](#ListDocuments)
- [List Stored Procedures](#ListStoredProcedures)
- [Query Documents](#QueryDocuments)
- [Replace Document](#ReplaceDocument)
- [Replace Stored Procedure](#ReplaceStoredProcedure)
---
### Service Principal Config
#### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Name | String | Name for this configuration. Connectors reference the configuration with this name. | | x |
Connection | | Connection types for this configuration. | | x |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | 60 | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | SECONDS | |
Streaming Type | | How the connector streams request content to the remote service: AUTO (default)
Connector automatically uses the best streaming strategy based on the request content. ALWAYS
Connector always streams the request content. NEVER
Connector does not stream the request content.
| AUTO | |
Name | | ID used to reference this configuration. | | x |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
#### Connection Types
##### Service Principal Auth Connection Provider
###### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Proxy Config | | Configures a proxy for outbound connections. | | |
Default Headers | | | | |
Query Parameters | | | | |
Connection Timeout | | How long the connector waits before timing out when establishing a connection to the remote service. | 30 | |
Connection Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Timeout field. | SECONDS | |
Use Persistent Connections | | Indicates whether to use persistent connections: true
Mule uses persistent connections. false
Mule closes the connection after the first request completes.
| true | |
Max Connections | | Maximum number of connections to open to the backend. HTTP requests are sent in parallel over multiple connections. Setting this value too high can impact latency and consume additional resources without increasing throughput. | -1 | |
Connection Idle Timeout | | When persistent connections are enabled, how long a connection can remain idle before Mule closes it. | 30 | |
Connection Idle Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Connection Idle Timeout field. | SECONDS | |
Stream Response | | If this value is true, Mule streams received responses. | false | |
Response Buffer Size | | Size of the buffer that stores the HTTP response, in bytes. | -1 | |
Database account url | | Database account URL. | | x |
Client ID | | Application (client) ID of the Microsoft Entra ID service principal. | | x |
Client secret | | Client secret of the Microsoft Entra ID service principal. | | x |
Tenant ID | | Microsoft Entra ID tenant the service principal belongs to. | | x |
Version | | Version of the Cosmos DB REST service. | | x |
TLS configuration | | If HTTPS is configured as a protocol, the user must configure at least the keystore configuration. | | |
Reconnection | | What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy: true
Allow the deployment to fail. false
Ignore the results of the connectivity test.
| | |
## Supported Operations
- [Create Document](#CreateDocument)
- [Delete Document](#DeleteDocument)
- [Execute Stored Procedure](#ExecuteStoredProcedure)
- [Get Document](#GetDocument)
- [List Documents](#ListDocuments)
- [Query Documents](#QueryDocuments)
- [Replace Document](#ReplaceDocument)
## Operations
## Create Document
``
Creates a new document in a collection. This operation makes an HTTP POST request to the
/dbs/{dbId}/colls/{collId}/docs endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
X ms documentdb is upsert | | If set to true, Cosmos DB does the following: Creates the document with the ID (and partition key value, if applicable), if the document doesn’t exist. Updates the document, if it exists.
| false | |
X ms indexing directive | | The default for indexing behavior is determined by the automatic property’s value in the indexing policy for the collection. | | |
X ms documentdb partitionkey | | Partition key value for the document to create. Must be specified only if the collection is created with a partitionKey definition, for example, ["partitionKey"]. | | |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
- [Service Principal Config](#ServicePrincipalConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Create Permission
``
Creates a new permission in a database. This operation makes an HTTP POST request to the
/dbs/{dbId}/users/{userName}/permissions endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the permission is created. | | x |
Username | | Name of the user that owns the permission. | | x |
X ms documentdb expiry seconds | | Validity period of the resource token returned by the operation. By default, a resource token is valid for one hour. To override the default, set this header with the desired validity period in seconds. The max override value is 18000, which is five hours. | | |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Create Stored Procedure
``
Creates a new stored procedure in a collection. This operation makes an HTTP POST request to the
/dbs/{dbId}/colls/{collId}/sprocs endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Delete Document
``
Deletes an existing document from a collection. This operation makes an HTTP DELETE request to the
/dbs/{dbId}/colls/{collId}/docs/{doc-id} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Doc ID | | ID of the document to delete. | | x |
X ms documentdb partitionkey | | Partition key value for the document to delete. Must be specified only if the collection is created with a partitionKey definition, for example, ["partitionKey"]. | | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
Type | String |
Attributes Type | |
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
- [Service Principal Config](#ServicePrincipalConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Delete Permission
``
Deletes a permission from a database. This operation makes an HTTP DELETE request to the
/dbs/{dbId}/users/{userName}/permissions/{permissionId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the permission is deleted. | | x |
Username | | Name of the user that owns the permission. | | x |
Permission Id | | ID of the permission to delete. | | x |
Config Ref | | Name of the configuration used to execute this component. | | x |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
Type | String |
Attributes Type | |
### For Configurations
- [Key Token Config](#KeyTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Delete Stored Procedure
``
Deletes an existing stored procedure from a collection. This operation makes an HTTP DELETE request
to the /dbs/{dbId}/colls/{collId}/sprocs/{sprocId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Sproc Id | | ID of the stored procedure to delete. | | x |
Config Ref | | Name of the configuration used to execute this component. | | x |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
Type | String |
Attributes Type | |
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Execute Stored Procedure
``
Executes a stored procedure by performing a POST on a stored procedure resource. This operation
makes an HTTP POST request to the /dbs/{dbId}/colls/{collId}/sprocs/{sprocId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User generated name or ID of the database in which the stored procedure is executed. | | x |
Coll Id | | Name of the collection in which the stored procedure is executed. | | x |
Sproc Id | | ID of the stored procedure to execute. | | x |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
- [Service Principal Config](#ServicePrincipalConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Get Document
``
Retrieves a document by its partition key and document key. This operation makes an HTTP GET request
to the /dbs/{dbId}/colls/{collId}/docs/{doc-id} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Doc ID | | Name of the document to replace. | | x |
If None Match | | Indicates whether the operation is conditional, which means if the response includes a body, the value in the database is different from the specified value in the header. The value must be the ETag of the resource. | | |
X ms documentdb partitionkey | | Partition key value for the document to read. Must be specified only if the collection is created with a partitionKey definition, for example, ["partitionKey"]. | | |
X ms consistency level | STRONG BOUNDED SESSION EVENTUAL
| Consistency level override. The valid values are listed in order of strongest to weakest. The override must be the same or weaker than the account’s configured consistency level. | | |
X ms session token | | String token used with session level consistency. Clients must echo the latest read value of this header during read requests for session consistency. | | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
- [Service Principal Config](#ServicePrincipalConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Get Permission
``
Gets a permission from the specified database. This operation makes an HTTP GET request to the
/dbs/{dbId}/users/{userName}/permissions/{permissionId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the permission is retrieved. | | x |
Username | | Name of the user that owns the permission. | | x |
Permission Id | | ID of the permission to retrieve. | | x |
X ms documentdb expiry seconds | | Validity period of the resource token returned by the operation. By default, a resource token is valid for one hour. To override the default, set this header with the desired validity period in seconds. The max override value is 18000, which is five hours. | | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## List Documents
``
Returns a list of documents under the collection. This operation makes an HTTP GET request to the
/dbs/{dbId}/colls/{collId}/docs endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
X ms consistency level | STRONG BOUNDED SESSION EVENTUAL
| Consistency level override. The valid values are listed in order of strongest to weakest. The override must be the same or weaker than the account’s configured consistency level. | | |
X ms session token | | String token used with session level consistency. Clients must echo the latest read value of this header during read requests for session consistency. | | |
A im | | Must be set to Incremental feed, or omitted otherwise. Available for REST API version 2016-07-11 and later. | | |
If None Match | | Available for REST API version 2016-07-11 and later. No header Returns all changes from the beginning (collection creation). "*" Returns all new changes to data within the collection. A collection ETag Returns all changes made since that logical timestamp.
| | |
X ms documentdb partitionkeyrangeid | | Partition key range ID for reading data. Available for REST API version 2016-07-11 and later. | | |
Output Mime Type | | MIME type of the payload that this operation outputs. | | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
- [Service Principal Config](#ServicePrincipalConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
## List Permissions
``
Lists permissions of a user from a database. This operation makes an HTTP GET request to the
/dbs/{dbId}/users/{userName}/permissions endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the permission is listed. | | x |
Username | | Name of the user that owns the permission. | | x |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## List Stored Procedures
``
Returns a list of the stored procedures in the collection. This operation makes an HTTP GET request
to the /dbs/{dbId}/colls/{collId}/sprocs endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | #[null] | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Query Documents
``
Queries documents. This operation makes an HTTP POST request to the /dbs/{dbId}/colls/{collId}/docs
endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
X ms documentdb query enablecrosspartition | | If the collection is partitioned, this parameter must be set to true to enable execution across multiple partitions. Queries that filter against a single partition key, or against single-partitioned collections do not need to set the header. | false | |
X ms consistency level | STRONG BOUNDED SESSION EVENTUAL
| Consistency level override. The valid values are listed in order of strongest to weakest. The override must be the same or weaker than the account’s configured consistency level. | | |
X ms session token | | String token used with session level consistency. Clients must echo the latest read value of this header during read requests for session consistency. | | |
Body | | Content to use. | #[payload] | |
Output Mime Type | | MIME type of the payload that this operation outputs. | | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
- [Service Principal Config](#ServicePrincipalConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Replace Document
``
Replaces the entire content of a document. This operation makes an HTTP PUT request to the
/dbs/{dbId}/colls/{collId}/docs/{doc-id} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is created. | | x |
Coll Id | | Name of the collection in which the stored procedure is created. | | x |
Doc ID | | Name of the document to replace. | | x |
If Match | | Indicates whether an operation is conditional for optimistic concurrency, which means the document is updated only if the specified ETag matches the current version in the database. The value must be set to the ETag value of the resource. | | |
X ms indexing directive | | The default for indexing behavior is determined by the automatic property’s value in the indexing policy for the collection. | | |
X ms documentdb partitionkey | | Partition key value for the document to replace. Must be specified only if the collection is created with a partitionKey definition, for example, ["partitionKey"]. | | |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
- [Service Principal Config](#ServicePrincipalConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Replace Permission
``
Replaces a permission from a database. This operation makes an HTTP PUT request to the
/dbs/{dbId}/users/{userName}/permissions/{permissionId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the permission is replaced. | | x |
Username | | Name of the user that owns the permission. | | x |
Permission Id | | ID of the permission to replace. | | x |
X ms documentdb expiry seconds | | Validity period of the resource token returned by the operation. By default, a resource token is valid for one hour. To override the default, set this header with the desired validity period in seconds. The max override value is 18000, which is five hours. | | |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Replace Stored Procedure
``
Replaces the entire stored procedure resource. All user settable properties, including the ID and
the body, must be submitted in the body to perform the replacement. This operation makes an HTTP PUT
request to the /dbs/{dbId}/colls/{collId}/sprocs/{sprocId} endpoint.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Db Id | | User-generated name or ID of the database in which the stored procedure is replaced. | | x |
Coll Id | | Name of the collection in which the stored procedure is replaced. | | x |
Sproc Id | | ID of the stored procedure to replace. | | x |
Body | | Content to use. | #[payload] | |
Config Ref | | Name of the configuration used to execute this component. | | x |
Streaming Strategy | | Configures how Mule processes streams. Repeatable streams are the default behavior. | | |
Custom Query Parameters | | Custom query parameters to include in the request. The specified query parameters are merged with the default query parameters that are specified in the configuration. | | |
Custom Headers | | Custom headers to include in the request. The specified custom headers are merged with the default headers that are specified in the configuration. | | |
Response Timeout | | How long Mule waits for a response to complete before the request times out. | | |
Response Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Response Timeout field. | | |
Streaming Type | | How the connector streams request content to the remote service: Connector automatically uses the best streaming strategy based on the request content. Connector always streams the request content. Connector does not stream the request content. | | |
Target Variable | | Name of the variable that stores the operation’s output. | | |
Target Value | | Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field. | #[payload] | |
Error Mappings | | Maps error types thrown by this operation to custom error types. | | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Key Token Config](#KeyTokenConfig)
- [Resource Token Config](#ResourceTokenConfig)
### Throws
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:BAD\_REQUEST
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CLIENT\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:CONNECTIVITY
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:INTERNAL\_SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:NOT\_FOUND
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:RETRY\_EXHAUSTED
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVER\_ERROR
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:SERVICE\_UNAVAILABLE
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TIMEOUT
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:TOO\_MANY\_REQUESTS
- AZURE-COSMOS-DB-CONNECTOR-MULE-4:UNAUTHORIZED
## Types
### Proxy
Configures a proxy for outbound connections.
| Field | Type | Description | Default Value | Required |
|---|
Host | | Hostname or IP address of the proxy server. | | |
Port | | Port of the proxy server. | | |
Username | | Username to authenticate against the proxy server. | | |
Password | | Password to authenticate against the proxy server. | | |
Non Proxy Hosts | | Comma-separated list of hosts that the proxy must not be used against. | | |
### Default Header
Headers automatically added to every outbound request.
| Field | Type | Description | Default Value | Required |
|---|
Key | | | | |
Value | | | | |
### Default Query Param
Query parameters automatically added to every outbound request.
| Field | Type | Description | Default Value | Required |
|---|
Key | | | | |
Value | | | | |
### TLS
Configures TLS to provide secure communications for the Mule app.
| Field | Type | Description | Default Value | Required |
|---|
Enabled Protocols | | Comma-separated list of protocols enabled for this context. | | |
Enabled Cipher Suites | | Comma-separated list of cipher suites enabled for this context. | | |
Trust Store | | Configures the TLS truststore. | | |
Key Store | | Configures the TLS keystore. | | |
Revocation Check | | Configures a revocation checking mechanism. | | |
### Truststore
Configures the truststore for TLS.
| Field | Type | Description | Default Value | Required |
|---|
Path | | Path to the truststore. Mule resolves the path relative to the current classpath and file system. | | |
Password | | Password used to protect the truststore. | | |
Type | | | | |
Algorithm | | Encryption algorithm that the truststore uses. | | |
Insecure | | If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks. | | |
### Keystore
Configures the keystore for the TLS protocol. The keystore you generate contains a private key and a
public certificate.
| Field | Type | Description | Default Value | Required |
|---|
Path | | Path to the keystore. Mule resolves the path relative to the current classpath and file system. | | |
Type | | | | |
Alias | | Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file. | | |
Key Password | | Password used to protect the private key. | | |
Password | | Password used to protect the keystore. | | |
Algorithm | | Encryption algorithm that the keystore uses. | | |
### Standard Revocation Check
Configures standard revocation checks for TLS certificates.
| Field | Type | Description | Default Value | Required |
|---|
Only End Entities | | Which elements to verify in the certificate chain: true
Verify only the last element in the certificate chain. false
Verify all elements in the certificate chain.
| | |
Prefer Crls | | How to check certificate validity: true
Check the Certification Revocation List (CRL) for certificate validity. false
Use the Online Certificate Status Protocol (OCSP) to check certificate validity.
| | |
No Fallback | | Whether to use the secondary method to check certificate validity: true
Use the method that wasn’t specified in the Prefer Crls field (the secondary method) to check certificate validity. false
Do not use the secondary method to check certificate validity.
| | |
Soft Fail | | What to do if the revocation server can’t be reached or is busy: true
Avoid verification failure. false
Allow the verification to fail.
| | |
### Custom OCSP Responder
Configures a custom OCSP responder for certification revocation checks.
| Field | Type | Description | Default Value | Required |
|---|
Url | | URL of the OCSP responder. | | |
Cert Alias | | Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore. | | |
### CRL File
Specifies the location of the certification revocation list (CRL) file.
| Field | Type | Description | Default Value | Required |
|---|
Path | | | | |
### Reconnection
Configures a reconnection strategy for an operation.
| Field | Type | Description | Default Value | Required |
|---|
Fails Deployment | | What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy: true
Allow the deployment to fail. false
Ignore the results of the connectivity test.
| | |
Reconnection Strategy | | Reconnection strategy to use. | | |
### Reconnect
Configures a standard reconnection strategy, which specifies how often to reconnect and how many
reconnection attempts the connector source or operation can make.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
Count | | How many reconnection attempts the Mule app can make. | | |
### Reconnect Forever
Configures a forever reconnection strategy by which the connector source or operation attempts to
reconnect at a specified frequency for as long as the Mule app runs.
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often to attempt to reconnect, in milliseconds. | | |
Blocking | | If false, the reconnection strategy runs in a separate, non-blocking thread. | | |
### Expiration Policy
Configures an expiration policy strategy.
| Field | Type | Description | Default Value | Required |
|---|
Max Idle Time | | Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. | | |
Time Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit for the Max Idle Time field. | | |
### HTTP Response Attributes
Configures HTTP response attributes for the configuration.
| Field | Type | Description | Default Value | Required |
|---|
Status Code | | HTTP status code of the response. | | |
Headers | | Map of HTTP headers in the message. | | |
Reason Phrase | | HTTP reason phrase of the response. | | |
### Repeatable In Memory Stream
Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX
buffer size. Always run performance tests to find the optimal buffer size for your specific use
case.
| Field | Type | Description | Default Value | Required |
|---|
Initial Buffer Size | | Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max In Memory Size value. | | |
Buffer Size Increment | | Amount by which the buffer size expands if it exceeds its initial size. Setting a value of 0 or lower specifies that the buffer can’t expand. | | |
Max Buffer Size | | The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit. | | |
Buffer Unit | | Unit for the Initial Buffer Size, Buffer Size Increment, and Buffer Unit fields. | | |
### Repeatable File Store Stream
Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream
content in memory. If the stream content is larger than the configured buffer size, Mule backs up
the buffer’s content to disk and then clears the memory.
| Field | Type | Description | Default Value | Required |
|---|
In Memory Size | | Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance: Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory. Configure a smaller buffer size to decrease memory load at the expense of response time.
| | |
Buffer Unit | | Unit for the In Memory Size field. | | |
### Repeatable In Memory Iterable
| Field | Type | Description | Default Value | Required |
|---|
Initial Buffer Size | | The amount of instances that is initially be allowed to be kept in memory to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, then the buffer expands according to the Buffer Size Increment attribute, with an upper limit of Max In Memory Size. The default value is 100 instances. | | |
Buffer Size Increment | | This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full. The default value is 100 instances. | | |
Max Buffer Size | | The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit. | | |
### Repeatable File Store Iterable
| Field | Type | Description | Default Value | Required |
|---|
In Memory Objects | | The maximum amount of instances to keep in memory. If more than that is required, content on the disk is buffered. | | |
Buffer Unit | | Unit for the In Memory Size field. | | |
### Error Mapping
Maps source error types to custom error types for an operation.
| Field | Type | Description | Default Value | Required |
|---|
Source | ANY REDELIVERY_EXHAUSTED TRANSFORMATION EXPRESSION SECURITY CLIENT_SECURITY SERVER_SECURITY ROUTING CONNECTIVITY RETRY_EXHAUSTED TIMEOUT
| Source error type to map. | | |
Target | | Custom error type to map the source error to. | | |
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: Azure Cosmos DB Connector
version: 1.1
is-latest-version: true
---
# Azure Cosmos DB Connector 1.1 XML and Maven Support
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio:
- If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML
editor or from a text editor, you can access the connector from your app by adding reference
statements to both your XML Mule flow and the Apache Maven `pom.xml` file.
- If you add the connector in Studio, Studio automatically populates the XML code with the
connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file.
## Add a Namespace for the Connector
Paste the following code inside the `` tag of the header of your configuration XML:
```xml
http://www.mulesoft.org/schema/mule/azure-cosmos-db
http://www.mulesoft.org/schema/mule/azure-cosmos-db/current/mule-azure-cosmos-db.xsd
```
This example shows how the namespace statements are placed in the XML block:
```xml
```
## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app.
When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access
to this connector:
```xml
com.mulesoft.connectors
mule4-azure-cosmos-db-connector
x.x.x
mule-plugin
```
Replace `x.x.x` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information:
1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/).
2. In Exchange, click **Login** and supply your Anypoint Platform username and password.
3. In Exchange, search for `azure cosmos db`.
4. Select the connector.
5. Click **Dependency Snippets** near the upper right of the screen.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: Azure Cosmos DB Connector
version: 1.0
---
# Using Anypoint Studio to Configure Azure Cosmos DB 1.0
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and
configuration files.
To add and configure a connector in Studio:
1. [Create a Mule project](#create-mule-project).
2. [Add the connector to your Mule project](#add-connector-to-project).
3. [Configure a source for the connector’s flow](#configure-input-source).
4. [Add a connector operation to the flow](#add-connector-operation).
5. [Configure a global element for the connector](#configure-global-element).
6. [Configure the other connector fields](#configure-other-fields).
When you run the connector, you can view the app log to check for problems in real time, as
described in [View the App Log](#view-app-log).
If you are new to configuring connectors in Studio, see
[Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio).
If, after reading this topic, you need additional information about the connector fields, refer to
the [Azure Cosmos DB Connector Reference](https://docs.mulesoft.com/azure-cosmos-db-connector/1.0/azure-cosmos-db-connector-reference).
## Create a Mule Project
In Studio, create a new Mule project in which to add and configure the connector:
1. In Studio, select **File > New > Mule Project**.
2. Enter a name for your Mule project and click **Finish**.
## Add the Connector to Your Mule Project
Add Anypoint Connector for Azure Cosmos DB (Azure Cosmos DB Connector) to your Mule project to
automatically populate the XML code with the connector’s namespace and schema location and add the
required dependencies to the project’s `pom.xml` file:
1. In the **Mule Palette** view, click **(X) Search in Exchange**.
2. In the **Add Dependencies to Project** window, type `azure cosmos db` in the search field.
3. Click **Azure Cosmos DB Connector** in **Available modules**.
4. Click **Add**.
5. Click **Finish**.
Adding a connector to a Mule project in Studio does not make that connector available to other
projects in your Studio workspace.
## Configure a Source
A source initiates a flow when a specified condition is met. You can configure one of these sources
to use with Azure Cosmos DB:
- HTTP Listener
Initiates a flow each time it receives a request on the configured host and port
- Scheduler
Initiates a flow when a time-based condition is met
For example, to configure an HTTP Listener source, follow these steps:
1. In the **Mule Palette** view, select **HTTP > Listener**.
2. Drag **Listener** to the Studio canvas.
3. On the **Listener** configuration screen, optionally change the value of the **Display Name**
field.
4. Specify a value for the **Path** field.
5. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global
element that can be used by all instances of the HTTP Listener source in the app.
6. On the **General** tab, specify the connection information for the connector.
7. On the **TLS** tab, optionally specify the TLS information for the connector.
8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection
strategy.
9. Click **Test Connection** to confirm that Mule can connect with the specified server.
10. Click **OK**.
## Add a Connector Operation to the Flow
When you add a connector operation to your flow, you are specifying an action for that connector to
perform.
To add an operation for Azure Cosmos DB Connector, follow these steps:
1. In the **Mule Palette** view, select **Azure Cosmos DB** and then select the desired operation.
2. Drag the operation onto the Studio canvas to the right of the source.
## Configure a Global Element for the Connector
When you configure a connector, configure a global element that all instances of that connector in
the app can use. Configuring a global element requires you to provide the authentication credentials
that the connector requires to access the target Azure Cosmos DB system. Azure Cosmos DB Connector
supports Key Token authentication and Resource Token authentication.
To configure the global element for Azure Cosmos DB Connector, follow these steps:
1. Select the operation in the Studio canvas.
2. In the configuration screen for the operation, click the plus sign (**+**) next to the
**Connector configuration** field to access the global element configuration fields.
3. On the **General** tab, in **Connection**, select the authentication method to configure.
- Select [Key Token Config](#key-token) to configure Key Token authentication.
- Select [Resource Token Config](#resource-token) to configure Resource Token authentication.
You can reference a configuration file that contains ANT-style property placeholders
(recommended), or you can enter your authorization credentials in the global configuration
properties. For information about the benefits of using property placeholders and how to
configure them, refer to
[Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview).
4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection
strategy.
5. Click **Test Connection** to confirm that Mule can connect with the specified server.
6. Click **OK**.
### Key Token Authentication
Enter the following information on the **General** tab of the **Global Element Properties** screen
to configure Key Token authentication:
| Field | User Action |
|---|
Name | |
Database account url | |
Key token | All access key token that enables users to have full control of the Cosmos DB resources. |
Version | Version of the Cosmos DB REST service. |
### Resource Token Authentication
Enter the following information on the **General** tab of the **Global Element Properties** screen
to configure Resource Token authentication:
| Field | User Action |
|---|
Name | |
Database account url | |
Resource token | |
Version | Version of the Cosmos DB REST service. |
## Configure Additional Connector Fields
After you configure a global element for Azure Cosmos DB Connector, configure the other required
fields for the connector. The required fields vary depending on which connector operation you use.
## View the App Log
To check for problems, you can view the app log as follows:
- If you’re running the app from Anypoint Platform, the app log output is visible in the Anypoint
Studio console window.
- If you’re running the app using Mule from the command line, the app log output is visible in your
OS console.
Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the
app log in the default location `MULE_HOME/logs/.log`.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio)
- [Azure Cosmos DB Reference](https://docs.mulesoft.com/azure-cosmos-db-connector/1.0/azure-cosmos-db-connector-reference)
- [Salesforce Help](https://help.salesforce.com)
---
product: Azure Cosmos DB Connector
version: 1.1
is-latest-version: true
---
# Using Anypoint Studio to Configure Azure Cosmos DB 1.1
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and
configuration files.
To add and configure a connector in Studio:
1. [Create a Mule project](#create-mule-project).
2. [Add the connector to your Mule project](#add-connector-to-project).
3. [Configure a source for the connector’s flow](#configure-input-source).
4. [Add a connector operation to the flow](#add-connector-operation).
5. [Configure a global element for the connector](#configure-global-element).
6. [Configure the other connector fields](#configure-other-fields).
When you run the connector, you can view the app log to check for problems in real time, as
described in [View the App Log](#view-app-log).
If you are new to configuring connectors in Studio, see
[Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio).
If, after reading this topic, you need additional information about the connector fields, refer to
the [Azure Cosmos DB Connector Reference](https://docs.mulesoft.com/azure-cosmos-db-connector/latest/azure-cosmos-db-connector-reference).
## Create a Mule Project
In Studio, create a new Mule project in which to add and configure the connector:
1. In Studio, select **File > New > Mule Project**.
2. Enter a name for your Mule project and click **Finish**.
## Add the Connector to Your Mule Project
Add Anypoint Connector for Azure Cosmos DB (Azure Cosmos DB Connector) to your Mule project to
automatically populate the XML code with the connector’s namespace and schema location and add the
required dependencies to the project’s `pom.xml` file:
1. In the **Mule Palette** view, click **(X) Search in Exchange**.
2. In the **Add Dependencies to Project** window, type `azure cosmos db` in the search field.
3. Click **Azure Cosmos DB Connector** in **Available modules**.
4. Click **Add**.
5. Click **Finish**.
Adding a connector to a Mule project in Studio does not make that connector available to other
projects in your Studio workspace.
## Configure a Source
A source initiates a flow when a specified condition is met. You can configure one of these sources
to use with Azure Cosmos DB:
- HTTP Listener
Initiates a flow each time it receives a request on the configured host and port
- Scheduler
Initiates a flow when a time-based condition is met
For example, to configure an HTTP Listener source, follow these steps:
1. In the **Mule Palette** view, select **HTTP > Listener**.
2. Drag **Listener** to the Studio canvas.
3. On the **Listener** configuration screen, optionally change the value of the **Display Name**
field.
4. Specify a value for the **Path** field.
5. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global
element that can be used by all instances of the HTTP Listener source in the app.
6. On the **General** tab, specify the connection information for the connector.
7. On the **TLS** tab, optionally specify the TLS information for the connector.
8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection
strategy.
9. Click **Test Connection** to confirm that Mule can connect with the specified server.
10. Click **OK**.
## Add a Connector Operation to the Flow
When you add a connector operation to your flow, you are specifying an action for that connector to
perform.
To add an operation for Azure Cosmos DB Connector, follow these steps:
1. In the **Mule Palette** view, select **Azure Cosmos DB** and then select the desired operation.
2. Drag the operation onto the Studio canvas to the right of the source.
## Configure a Global Element for the Connector
When you configure a connector, configure a global element that all instances of that connector in
the app can use. Configuring a global element requires you to provide the authentication credentials
that the connector requires to access the target Azure Cosmos DB system. Azure Cosmos DB Connector
supports Key Token authentication, Resource Token authentication, and Service Principal
authentication.
To configure the global element for Azure Cosmos DB Connector, follow these steps:
1. Select the operation in the Studio canvas.
2. In the configuration screen for the operation, click the plus sign (**+**) next to the
**Connector configuration** field to access the global element configuration fields.
3. On the **General** tab, in **Connection**, select the authentication method to configure.
- Select [Key Token Config](#key-token) to configure Key Token authentication.
- Select [Resource Token Config](#resource-token) to configure Resource Token authentication.
- Select [Service Principal Config](#service-principal) to configure Service Principal
authentication.
You can reference a configuration file that contains ANT-style property placeholders
(recommended), or you can enter your authorization credentials in the global configuration
properties. For information about the benefits of using property placeholders and how to
configure them, refer to
[Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview).
4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection
strategy.
5. Click **Test Connection** to confirm that Mule can connect with the specified server.
6. Click **OK**.
### Key Token Authentication
Enter the following information on the **General** tab of the **Global Element Properties** screen
to configure Key Token authentication:
| Field | User Action |
|---|
Name | |
Database account url | |
Key token | All access key token that enables users to have full control of the Cosmos DB resources. |
Version | Version of the Cosmos DB REST service. |
### Resource Token Authentication
Enter the following information on the **General** tab of the **Global Element Properties** screen
to configure Resource Token authentication:
| Field | User Action |
|---|
Name | |
Database account url | |
Resource token | |
Version | Version of the Cosmos DB REST service. |
### Service Principal Authentication
Enter the following information on the **General** tab of the **Global Element Properties** screen
to configure Service Principal authentication:
| Field | User Action |
|---|
Name | |
Database account url | |
Client ID | Application (client) ID of the Microsoft Entra ID service principal. |
Client secret | Client secret of the Microsoft Entra ID service principal. |
Tenant ID | Microsoft Entra ID tenant the service principal belongs to. |
Version | Version of the Cosmos DB REST service. |
## Configure Additional Connector Fields
After you configure a global element for Azure Cosmos DB Connector, configure the other required
fields for the connector. The required fields vary depending on which connector operation you use.
## View the App Log
To check for problems, you can view the app log as follows:
- If you’re running the app from Anypoint Platform, the app log output is visible in the Anypoint
Studio console window.
- If you’re running the app using Mule from the command line, the app log output is visible in your
OS console.
Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the
app log in the default location `MULE_HOME/logs/.log`.
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio)
- [Azure Cosmos DB Reference](https://docs.mulesoft.com/azure-cosmos-db-connector/latest/azure-cosmos-db-connector-reference)
- [Salesforce Help](https://help.salesforce.com)