π§ Azure Subscription Activity Log Alert for Service Health does not exist - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/azure/subscription/activity-log-alert-for-service-health/prod.logic.yaml
- Located in: π Azure Subscription Activity Log Alert for Service Health does not exist π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π Azure Subscription | CA10__CaAzureAccount__c | 13 | 1 | 31 |
Usesβ
Test Results π’β
Generated at: 2025-07-21T17:39:14.384010318Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | 001 | βοΈ 199 | βοΈ CA10__Azure_Activity_Log_Alerts__r.has(COMPLIANT) | βοΈ null |
π’ | 002 | βοΈ 200 | βοΈ otherwise | βοΈ null |
π’ | 003 | βοΈ 200 | βοΈ otherwise | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/azure/subscription/activity-log-alert-for-service-health/policy.yaml | 421C32035346A55B5A34F4B8F4582048 |
Open | /ce/ca/azure/subscription/activity-log-alert-for-service-health/prod.logic.yaml | 40C66BEE8E587459A02DB054003D7EFA |
Open | /types/CA10__CaAzureActivityLogAlert__c/object.extracts.yaml | 8A1FFCB1A6A450C933A1A1E63AD96EA2 |
Open | /ce/ca/azure/subscription/activity-log-alert-for-service-health/test-data.json | 147DD5B19B29C67C0649F7AF7E43494B |
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β
---
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."