The following JSON job definition snippet rotates the read-only account keys of an Azure Cosmos DB:
{
"cosmosDBAccount": {
"accountName": "NAME OF THE COSMOS DB ACCOUNT",
"accountResourceGroupName": "RESOURCE GROUP THAT CONTAINS THE COSMOS DB ACCOUNT",
"keyType": "readonly"
},
"rotationSchedule": "...",
"update": {
...
}
}
The following JSON job definition snippet rotates the read-write account keys of an Azure Cosmos DB:
{
"cosmosDBAccount": {
"accountName": "NAME OF THE COSMOS DB ACCOUNT",
"accountResourceGroupName": "RESOURCE GROUP THAT CONTAINS THE COSMOS DB ACCOUNT",
"keyType": "readwrite"
},
"rotationSchedule": "...",
"update": {
...
}
}
When a rotation job occurs it produces a map containing useful information that can be assigned to various destinations. This rotation type outputs:
Key Name | Description |
---|---|
CosmosDBAccountKey | The newly generated Cosmos DB account key. |
CosmosDBConnectionString | The connection string for the Cosmos DB account, containing the newly generated account key. |