Skip to main content

🧠 Azure Subscription Activity Log Alert for Service Health does not exist - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“— Azure SubscriptionCA10__CaAzureAccount__c13131

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-07-21T17:39:14.384010318Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒001βœ”οΈ 199βœ”οΈ CA10__Azure_Activity_Log_Alerts__r.has(COMPLIANT)βœ”οΈ null
🟒002βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒003βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/azure/subscription/activity-log-alert-for-service-health/policy.yaml421C32035346A55B5A34F4B8F4582048
Open/ce/ca/azure/subscription/activity-log-alert-for-service-health/prod.logic.yaml40C66BEE8E587459A02DB054003D7EFA
Open/types/CA10__CaAzureActivityLogAlert__c/object.extracts.yaml8A1FFCB1A6A450C933A1A1E63AD96EA2
Open/ce/ca/azure/subscription/activity-log-alert-for-service-health/test-data.json147DD5B19B29C67C0649F7AF7E43494B

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/azure/subscription/activity-log-alert-for-service-health/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/subscription/activity-log-alert-for-service-health/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/azure/subscription/activity-log-alert-for-service-health/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/subscription/activity-log-alert-for-service-health/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/azure/subscription/activity-log-alert-for-service-health/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAzureAccount__c"
testData:
- file: "test-data.json"
conditions:
- status: "COMPLIANT"
currentStateMessage: "This subscription has an Activity Log Alert for Service Health."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__Azure_Activity_Log_Alerts__r"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "This subscription doesn't have an Activity Log Alert for Service Health."
remediationMessage: "Consider creating an Activity Log Alert for Service Health."
relatedLists:
- relationshipName: "CA10__Azure_Activity_Log_Alerts__r"
importExtracts:
- file: "/types/CA10__CaAzureActivityLogAlert__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "This is a disabled Activity Log Alert."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__enabledStatus__c"
right:
TEXT: "Enabled"
- status: "COMPLIANT"
currentStateMessage: "This is an Activity Log Alert for Service Health."
check:
AND:
args:
- JSON_QUERY_BOOLEAN:
arg:
EXTRACT: "caJsonFrom__conditionJson__c"
expression: "contains(allOf[*].equals, 'ServiceHealth')"
undeterminedIf:
evaluationError: "The JSON query has failed."
resultTypeMismatch: "The JSON query did not return boolean type."
- CONTAINS:
arg:
EXTRACT: "CA10__scopes__c"
search:
TEXT: "/subscriptions/"
- NOT:
arg:
CONTAINS:
arg:
EXTRACT: "CA10__scopes__c"
search:
TEXT: "/resourceGroups/"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "This is an unrelated Activity Log Alert."