Skip to main content

๐Ÿง  Azure Reservation monthly utilization is below 80% - prod.logic.yaml๐ŸŸข

Usesโ€‹

Test Results ๐ŸŸขโ€‹

Generated at: 2026-09-22T15:06:44.406472902Z Open

ResultIdCondition IndexCondition TextRuntime Error
๐ŸŸขgoneโœ”๏ธ 99โœ”๏ธ isDisappeared(CA10Z1__disappearanceTime__c)โœ”๏ธ null
๐ŸŸขmissing-stateโœ”๏ธ 199โœ”๏ธ extract('CA10Z1__provisioningState__c').isEmpty()โœ”๏ธ null
๐ŸŸขexpiredโœ”๏ธ 299โœ”๏ธ extract('CA10Z1__provisioningState__c') != 'Succeeded'โœ”๏ธ null
๐ŸŸขmalformed-monthโœ”๏ธ 399โœ”๏ธ CA10Z1__Azure_Reservation_Utilizations__r.has(UNDETERMINED)โœ”๏ธ null
๐ŸŸขfuture-monthโœ”๏ธ 399โœ”๏ธ CA10Z1__Azure_Reservation_Utilizations__r.has(UNDETERMINED)โœ”๏ธ null
๐ŸŸขno-utilizationโœ”๏ธ 700โœ”๏ธ otherwiseโœ”๏ธ null
๐ŸŸขbelowโœ”๏ธ 599โœ”๏ธ CA10Z1__Azure_Reservation_Utilizations__r.has(INCOMPLIANT)โœ”๏ธ null
๐ŸŸขboundaryโœ”๏ธ 699โœ”๏ธ CA10Z1__Azure_Reservation_Utilizations__r.has(COMPLIANT)โœ”๏ธ null
๐ŸŸขconflictingโœ”๏ธ 499โœ”๏ธ CA10Z1__Azure_Reservation_Utilizations__r.has(INCOMPLIANT) && CA10Z1__Azure_Reservation_Utilizations__r.has(COMPLIANT)โœ”๏ธ null
๐ŸŸขinvalid-utilizationโœ”๏ธ 399โœ”๏ธ CA10Z1__Azure_Reservation_Utilizations__r.has(UNDETERMINED)โœ”๏ธ null
๐ŸŸขstale-onlyโœ”๏ธ 700โœ”๏ธ otherwiseโœ”๏ธ null

Generation Bundleโ€‹

FileMD5
Open/ce/ca/azure/reservations/monthly-utilization-below-threshold/policy.yamlAE80F8B70E6CE5B7C9A92640F666C903
Open/ce/ca/azure/reservations/monthly-utilization-below-threshold/prod.logic.yaml4687B46EEEF51B5ADEF9E91A0F7C683F
Open/ce/ca/azure/reservations/monthly-utilization-below-threshold/test-data.jsonFDC2E8D6718BED35AAACE111F8D3CCFC
Open/types/CA10Z1__CaAzureReservationUtilization__c/object.extracts.yaml3FEC6F893E37BAE80951CC413A3EA60A
Open/types/CA10Z1__CaAzureReservation__c/object.extracts.yamlBAF6C1776D15C0CD930DFF3000823EE6

Available Commandsโ€‹

repo-manager policies generate FULL /ce/ca/azure/reservations/monthly-utilization-below-threshold/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/azure/reservations/monthly-utilization-below-threshold/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/azure/reservations/monthly-utilization-below-threshold/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/azure/reservations/monthly-utilization-below-threshold/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/azure/reservations/monthly-utilization-below-threshold/prod.logic.yaml

Contentโ€‹

Open File

---
inputType: "CA10Z1__CaAzureReservation__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10Z1__CaAzureReservation__c/object.extracts.yaml"
conditions:
- status: "UNDETERMINED"
currentStateMessage: "The Reservation provisioning state is unavailable."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10Z1__provisioningState__c"
- status: "INAPPLICABLE"
currentStateMessage: "The Reservation is not successfully provisioned."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10Z1__provisioningState__c"
right:
TEXT: "Succeeded"
- status: "UNDETERMINED"
currentStateMessage: "A utilization record has missing or invalid required data."
check:
RELATED_LIST_HAS:
status: "UNDETERMINED"
relationshipName: "CA10Z1__Azure_Reservation_Utilizations__r"
- status: "UNDETERMINED"
currentStateMessage: "Recent utilization records disagree across the 80% threshold."
check:
AND:
args:
- RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10Z1__Azure_Reservation_Utilizations__r"
- RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10Z1__Azure_Reservation_Utilizations__r"
- status: "INCOMPLIANT"
currentStateMessage: "Recent monthly Reservation utilization is below 80%."
remediationMessage: "Review utilization across several periods and adjust Reservation scope or future commitment coverage if the shortfall is persistent."
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10Z1__Azure_Reservation_Utilizations__r"
- status: "COMPLIANT"
currentStateMessage: "Recent monthly Reservation utilization meets the 80% threshold."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10Z1__Azure_Reservation_Utilizations__r"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "No complete utilization record is available within the last 40 days."
relatedLists:
- relationshipName: "CA10Z1__Azure_Reservation_Utilizations__r"
importExtracts:
- file: "/types/CA10Z1__CaAzureReservationUtilization__c/object.extracts.yaml"
conditions:
- status: "UNDETERMINED"
currentStateMessage: "Year Month or the parent Reservation is unavailable."
check:
OR:
args:
- IS_EMPTY:
arg:
EXTRACT: "CA10Z1__yearMonth__c"
- IS_EMPTY:
arg:
EXTRACT: "CA10Z1__reservation__c"
- status: "UNDETERMINED"
currentStateMessage: "Year Month is in the future."
check:
IS_AFTER_TODAY:
arg:
DATE_TIME_FROM:
arg:
EXTRACT: "CA10Z1__yearMonth__c"
format: "ISO_8601"
undeterminedIf:
invalidFormat: "Year Month is not a valid ISO 8601 date."
isEmpty: "Year Month is unavailable."
- status: "INAPPLICABLE"
currentStateMessage: "The monthly utilization record is older than 40 days."
check:
IS_BEYOND_LAST_DAYS:
offsetDays: 40
arg:
DATE_TIME_FROM:
arg:
EXTRACT: "CA10Z1__yearMonth__c"
format: "ISO_8601"
undeterminedIf:
invalidFormat: "Year Month is not a valid ISO 8601 date."
isEmpty: "Year Month is unavailable."
- status: "UNDETERMINED"
currentStateMessage: "Average utilization is unavailable."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10Z1__avgUtilizationPercentage__c"
- status: "UNDETERMINED"
currentStateMessage: "Average utilization is outside the valid range of 0% through 100%."
check:
OR:
args:
- LESS_THAN:
left:
EXTRACT: "CA10Z1__avgUtilizationPercentage__c"
right:
NUMBER: 0.0
- GREATER_THAN:
left:
EXTRACT: "CA10Z1__avgUtilizationPercentage__c"
right:
NUMBER: 100.0
- status: "INCOMPLIANT"
currentStateMessage: "Average utilization is below 80%."
remediationMessage: "Review Reservation utilization and future commitment requirements."
check:
LESS_THAN:
left:
EXTRACT: "CA10Z1__avgUtilizationPercentage__c"
right:
NUMBER: 80.0
otherwise:
status: "COMPLIANT"
currentStateMessage: "Average utilization meets the 80% threshold."