π§ Azure Cosmos DB Account has zero Total Request Units - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/azure/cosmos-db/idle-cosmosdb-account/prod.logic.yaml - Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
- π Azure Cosmos DB Account
- π Azure Cosmos DB Account - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2026-02-07T12:02:55.432263107Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| π’ | 1 | βοΈ 199 | βοΈ extract('CA10__capabilities__c').contains('EnableServerless') | βοΈ null |
| π’ | 2 | βοΈ 299 | βοΈ extract('CA10__monitorTotalRequestUnitsSum30Day__c') == number(0.0) | βοΈ null |
| π’ | 3 | βοΈ 300 | βοΈ otherwise | βοΈ null |
Generation Bundleβ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/azure/cosmos-db/idle-cosmosdb-account/policy.yaml | DB5D6CFED96B744E6F3EEC035BBCC5BF |
| Open | /ce/ca/azure/cosmos-db/idle-cosmosdb-account/prod.logic.yaml | 262270D2841A573CB666E605DCA34060 |
| Open | /ce/ca/azure/cosmos-db/idle-cosmosdb-account/test-data.json | 7294C126F2B3A03C5E099BD0EDD5E413 |
| Open | /types/CA10__CaAzureCosmosDbAccount__c/object.extracts.yaml | D218FD427CEE53CFCE79E554F5C4662A |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/azure/cosmos-db/idle-cosmosdb-account/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/azure/cosmos-db/idle-cosmosdb-account/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/azure/cosmos-db/idle-cosmosdb-account/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/azure/cosmos-db/idle-cosmosdb-account/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/azure/cosmos-db/idle-cosmosdb-account/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAzureCosmosDbAccount__c"
testData:
- file: "test-data.json"
importExtracts:
- file: /types/CA10__CaAzureCosmosDbAccount__c/object.extracts.yaml
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "Azure Cosmos DB serverless account type."
check:
CONTAINS:
arg:
EXTRACT: "CA10__capabilities__c"
search:
TEXT: "EnableServerless"
- status: "INCOMPLIANT"
currentStateMessage: "The Cosmos DB Account has zero Total Request Units for the
past 30 days."
remediationMessage: "Consider deleting the Cosmos DB Account or switching to
the serverless option."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__monitorTotalRequestUnitsSum30Day__c"
right:
NUMBER: 0.0
otherwise:
status: "COMPLIANT"
currentStateMessage: "The Cosmos DB Account has Total Request Units for the past 30 days."