Skip to content

Latest commit

 

History

History
57 lines (46 loc) · 1.66 KB

AzureCosmosDB.md

File metadata and controls

57 lines (46 loc) · 1.66 KB

Azure Cosmos DB

Read-only account keys

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": {
        ...
    }
}

Read-write account keys

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": {
        ...
    }
}

Outputs

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.