Skip to content

Commit 510c8a5

Browse files
committed
Updating docs for Cosmos RBAC
1 parent d76dc50 commit 510c8a5

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

Extensions/Cosmos/README.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ The Cosmos data transfer extension provides source and sink capabilities for rea
66
77
## Settings
88

9-
Source and sink settings both require multiple parameters to specify and provide access to the data location within a Cosmos DB account:
10-
- `ConnectionString`
9+
Source and sink require settings used to locate and access the Cosmos DB account. This can be done in one of two ways:
10+
- Using a `ConnectionString` that includes an AccountEndpoint and AccountKey
11+
- Using RBAC (Role Based Access Control) by setting `UseRbac` to true and specifying `AccountEndpoint` and optionally `EnableInteractiveCredentials` to prompt the user to log in to Azure if default credentials are not available.
12+
13+
Source and sink settings also both require parameters to specify the data location within a Cosmos DB account:
1114
- `Database`
1215
- `Container`
1316

@@ -26,6 +29,21 @@ Source supports an optional `IncludeMetadataFields` parameter (`false` by defaul
2629
}
2730
```
2831

32+
Or with RBAC:
33+
34+
```json
35+
{
36+
"UseRbac": true,
37+
"AccountEndpoint": "https://...",
38+
"EnableInteractiveCredentials": true,
39+
"Database":"myDb",
40+
"Container":"myContainer",
41+
"IncludeMetadataFields": false,
42+
"PartitionKeyValue":"123",
43+
"Query":"SELECT * FROM c WHERE c.category='event'"
44+
}
45+
```
46+
2947
Sink requires an additional `PartitionKeyPath` parameter which is used when creating the container if it does not exist. To use hierarchical partition keys, instead use the `PartitionKeyPaths` setting to supply an array of up to 3 paths. It also supports an optional `RecreateContainer` parameter (`false` by default) to delete and then recreate the container to ensure only newly imported data is present. The optional `BatchSize` parameter (100 by default) sets the number of items to accumulate before inserting. `ConnectionMode` can be set to either `Gateway` (default) or `Direct` to control how the client connects to the CosmosDB service. For situations where a container is created as part of the transfer operation `CreatedContainerMaxThroughput` (in RUs) and `UseAutoscaleForCreatedContainer` provide the initial throughput settings which will be in effect when executing the transfer. The optional `WriteMode` parameter specifies the type of data write to use: `InsertStream`, `Insert`, `UpsertStream`, or `Upsert`. The `IsServerlessAccount` parameter specifies whether the target account uses Serverless instead of Provisioned throughput, which affects the way containers are created. Additional parameters allow changing the behavior of the Cosmos client appropriate to your environment.
3048

3149
### Sink

0 commit comments

Comments
 (0)