--- policy: /ce/ca/aws/lambda/function-low-invocation-activity logic: /ce/ca/aws/lambda/function-low-invocation-activity/prod.logic.yaml executionTime: 2026-10-17T12:03:41.65311165Z generationMs: 79 executionMs: 730 rows: - id: invocations-0 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: invocations-1 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: invocations-9 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: invocations-10 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 500 actual: 500 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: invocations-None match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: invocations--1 match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 299 actual: 299 conditionText: expected: CA10__sumTwoWeekInvocationCount__c < number(0.0) actual: CA10__sumTwoWeekInvocationCount__c < number(0.0) runtimeError: {} - id: new match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: not(extract('CreatedDate').beyondLastDays(14)) actual: not(extract('CreatedDate').beyondLastDays(14)) runtimeError: {} - id: 14-day-boundary match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: not(extract('CreatedDate').beyondLastDays(14)) actual: not(extract('CreatedDate').beyondLastDays(14)) runtimeError: {} - id: missing-age match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 101 actual: 101 conditionText: expected: CreatedDate.isEmpty() actual: CreatedDate.isEmpty() runtimeError: {} - id: disappeared match: true status: expected: DISAPPEARED actual: DISAPPEARED conditionIndex: expected: 99 actual: 99 conditionText: expected: isDisappeared(CA10__disappearanceTime__c) actual: isDisappeared(CA10__disappearanceTime__c) runtimeError: {} - id: zero-stale-record match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: zero-recent-record-change match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: zero-recent-vulnerability-scan match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: just-before-age-boundary match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: omitted-count match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: future-created-date match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: not(extract('CreatedDate').beyondLastDays(14)) actual: not(extract('CreatedDate').beyondLastDays(14)) runtimeError: {} - id: new-null-count match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: not(extract('CreatedDate').beyondLastDays(14)) actual: not(extract('CreatedDate').beyondLastDays(14)) runtimeError: {} - id: age-boundary-null-count match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: not(extract('CreatedDate').beyondLastDays(14)) actual: not(extract('CreatedDate').beyondLastDays(14)) runtimeError: {} - id: missing-age-null-count match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 101 actual: 101 conditionText: expected: CreatedDate.isEmpty() actual: CreatedDate.isEmpty() runtimeError: {} - id: new-low-count match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: not(extract('CreatedDate').beyondLastDays(14)) actual: not(extract('CreatedDate').beyondLastDays(14)) runtimeError: {} - id: 14-day-boundary-low-count match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: not(extract('CreatedDate').beyondLastDays(14)) actual: not(extract('CreatedDate').beyondLastDays(14)) runtimeError: {} - id: missing-age-low-count match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 101 actual: 101 conditionText: expected: CreatedDate.isEmpty() actual: CreatedDate.isEmpty() runtimeError: {} - id: older-than-14-day-cutoff match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: stale-record-low-count match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: recent-record-update-low-count match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: stale-record-high-count match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 500 actual: 500 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: null-count-high-execution-errors match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0) actual: CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0) runtimeError: {} - id: error-exclusion-boundary match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0) actual: CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0) runtimeError: {} - id: low-count-high-throttles match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0) actual: CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0) runtimeError: {} - id: throttle-exclusion-boundary match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0) actual: CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0) runtimeError: {} - id: auxiliary-counters-below-threshold match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: all-activity-counters-null match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) actual: CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0) runtimeError: {} - id: invalid-count-before-activity-exclusion match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 299 actual: 299 conditionText: expected: CA10__sumTwoWeekInvocationCount__c < number(0.0) actual: CA10__sumTwoWeekInvocationCount__c < number(0.0) runtimeError: {} - id: new-function-before-activity-exclusion match: true status: expected: INAPPLICABLE actual: INAPPLICABLE conditionIndex: expected: 199 actual: 199 conditionText: expected: not(extract('CreatedDate').beyondLastDays(14)) actual: not(extract('CreatedDate').beyondLastDays(14)) runtimeError: {} usedFiles: - path: /ce/ca/aws/lambda/function-low-invocation-activity/policy.yaml md5Hash: 4BA80F38AC09312B10B8277A68E19F97 content: | --- names: full: "AWS Lambda Function has low invocation activity" contextual: "Function has low invocation activity" description: > Review Lambda functions with fewer than 10 invocations over the last 14 days and no substantial recorded error or throttling activity to confirm ownership and continued necessity. Decommission obsolete functions and review associated resources to reduce maintenance burden and unnecessary costs. type: "BEST_PRACTICE" categories: - "COST" frameworkMappings: - "/frameworks/cloudaware/cost-efficiency-and-optimization/waste-reduction" - path: /ce/ca/aws/lambda/function-low-invocation-activity/prod.logic.yaml md5Hash: DE2C60660156221006AF8750F2762682 content: |+ --- inputType: "CA10__CaAwsLambdaFunction__c" testData: - file: "test-data.json" importExtracts: - file: "/types/CA10__CaAwsLambdaFunction__c/object.extracts.yaml" conditions: - status: "INAPPLICABLE" currentStateMessage: "The function CMDB creation date is not earlier than UTC midnight 14 days ago." check: NOT: arg: IS_BEYOND_LAST_DAYS: offsetDays: 14 arg: EXTRACT: "CreatedDate" - status: "UNDETERMINED" currentStateMessage: "The 14-day invocation count is invalid." check: LESS_THAN: left: FIELD: path: "CA10__sumTwoWeekInvocationCount__c" right: NUMBER: 0 - status: "COMPLIANT" currentStateMessage: "The function has at least 10 recorded execution errors or throttled requests over the last 14 days." check: OR: args: - GREATER_THAN_EQUAL: left: FIELD: path: "CA10__sumTwoWeekInvocationErrors__c" right: NUMBER: 10 - GREATER_THAN_EQUAL: left: FIELD: path: "CA10__sumTwoWeekInvocationThrottled__c" right: NUMBER: 10 - status: "INCOMPLIANT" currentStateMessage: "The function has fewer than 10 invocations over the last 14 days." remediationMessage: "Review ownership, schedules, and dependencies; decommission the function only if it is no longer required." check: OR: args: # Under the CMDB data contract, null invocation counts represent zero activity. - IS_EMPTY: arg: FIELD: path: "CA10__sumTwoWeekInvocationCount__c" - LESS_THAN: left: FIELD: path: "CA10__sumTwoWeekInvocationCount__c" right: NUMBER: 10 otherwise: status: "COMPLIANT" currentStateMessage: "The function has at least 10 invocations over the last 14 days." - path: /ce/ca/aws/lambda/function-low-invocation-activity/test-data.json md5Hash: 8206BD3257944662053E92ADB5820FCA content: | [ { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "invocations-0", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 0 }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "invocations-1", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 1 }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "invocations-9", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 9 }, { "expectedResult": { "status": "COMPLIANT", "conditionIndex": "500", "conditionText": "otherwise", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "invocations-10", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 10 }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "invocations-None", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": null }, { "expectedResult": { "status": "UNDETERMINED", "conditionIndex": "299", "conditionText": "CA10__sumTwoWeekInvocationCount__c < number(0.0)", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "invocations--1", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": -1 }, { "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": "199", "conditionText": "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "new", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-10-12T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 0 }, { "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": "199", "conditionText": "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "14-day-boundary", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-09-29T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 0 }, { "expectedResult": { "status": "UNDETERMINED", "conditionIndex": "101", "conditionText": "CreatedDate.isEmpty()", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "missing-age", "CA10__disappearanceTime__c": null, "CreatedDate": null, "CA10__sumTwoWeekInvocationCount__c": 0 }, { "expectedResult": { "status": "DISAPPEARED", "conditionIndex": "99", "conditionText": "isDisappeared(CA10__disappearanceTime__c)", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "disappeared", "CA10__disappearanceTime__c": "2026-10-12T00:00:00Z", "CreatedDate": null, "CA10__sumTwoWeekInvocationCount__c": null }, { "CreatedDate": "2026-08-01T00:00:00Z", "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "Id": "zero-stale-record", "CA10__disappearanceTime__c": null, "LastModifiedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 0 }, { "CreatedDate": "2026-08-01T00:00:00Z", "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "Id": "zero-recent-record-change", "CA10__disappearanceTime__c": null, "LastModifiedDate": "2026-10-13T11:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 0 }, { "CreatedDate": "2026-08-01T00:00:00Z", "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "CA10__lastScanDate__c": "2026-10-13T11:00:00Z", "Id": "zero-recent-vulnerability-scan", "CA10__disappearanceTime__c": null, "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "CA10__sumTwoWeekInvocationCount__c": 0 }, { "CreatedDate": "2026-09-28T23:59:59Z", "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "just-before-age-boundary", "CA10__disappearanceTime__c": null, "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "CA10__sumTwoWeekInvocationCount__c": 0 }, { "CreatedDate": "2026-08-01T00:00:00Z", "CA10__disappearanceTime__c": null, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "omitted-count", "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null } }, { "CreatedDate": "2026-10-14T00:00:00Z", "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "future-created-date", "CA10__disappearanceTime__c": null, "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": "199", "conditionText": "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError": null }, "CA10__sumTwoWeekInvocationCount__c": 0 }, { "Id": "new-null-count", "CreatedDate": "2026-10-12T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": null, "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": "199", "conditionText": "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "CA10__disappearanceTime__c": null }, { "Id": "age-boundary-null-count", "CreatedDate": "2026-09-29T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": null, "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": "199", "conditionText": "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "CA10__disappearanceTime__c": null }, { "Id": "missing-age-null-count", "CreatedDate": null, "CA10__sumTwoWeekInvocationCount__c": null, "expectedResult": { "status": "UNDETERMINED", "conditionIndex": "101", "conditionText": "CreatedDate.isEmpty()", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "CA10__disappearanceTime__c": null }, { "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": "199", "conditionText": "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "new-low-count", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-10-12T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 1 }, { "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": "199", "conditionText": "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "14-day-boundary-low-count", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-09-29T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 1 }, { "expectedResult": { "status": "UNDETERMINED", "conditionIndex": "101", "conditionText": "CreatedDate.isEmpty()", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "missing-age-low-count", "CA10__disappearanceTime__c": null, "CreatedDate": null, "CA10__sumTwoWeekInvocationCount__c": 1 }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "older-than-14-day-cutoff", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-09-28T23:59:59Z", "CA10__sumTwoWeekInvocationCount__c": 1 }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "stale-record-low-count", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 4, "LastModifiedDate": "2026-01-01T00:00:00Z" }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "recent-record-update-low-count", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 3, "LastModifiedDate": "2026-10-13T11:59:00Z" }, { "expectedResult": { "status": "COMPLIANT", "conditionIndex": "500", "conditionText": "otherwise", "runtimeError": null }, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "stale-record-high-count", "CA10__disappearanceTime__c": null, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationCount__c": 1000000, "LastModifiedDate": "2026-01-01T00:00:00Z" }, { "expectedResult": { "status": "COMPLIANT", "conditionIndex": "399", "conditionText": "CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0)", "runtimeError": null }, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationErrors__c": 69102, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "CA10__disappearanceTime__c": null, "CA10__sumTwoWeekInvocationCount__c": null, "CA10__sumTwoWeekInvocationThrottled__c": 0, "Id": "null-count-high-execution-errors" }, { "CA10__sumTwoWeekInvocationCount__c": 0, "CreatedDate": "2026-08-01T00:00:00Z", "Id": "error-exclusion-boundary", "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "CA10__sumTwoWeekInvocationErrors__c": 10, "CA10__disappearanceTime__c": null, "expectedResult": { "status": "COMPLIANT", "conditionIndex": "399", "conditionText": "CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0)", "runtimeError": null } }, { "expectedResult": { "status": "COMPLIANT", "conditionIndex": "399", "conditionText": "CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0)", "runtimeError": null }, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationErrors__c": 0, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "CA10__disappearanceTime__c": null, "CA10__sumTwoWeekInvocationCount__c": 3, "CA10__sumTwoWeekInvocationThrottled__c": 61, "Id": "low-count-high-throttles" }, { "CA10__sumTwoWeekInvocationCount__c": 0, "CreatedDate": "2026-08-01T00:00:00Z", "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "Id": "throttle-exclusion-boundary", "CA10__sumTwoWeekInvocationThrottled__c": 10, "CA10__disappearanceTime__c": null, "expectedResult": { "status": "COMPLIANT", "conditionIndex": "399", "conditionText": "CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0)", "runtimeError": null } }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationErrors__c": 9, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "CA10__disappearanceTime__c": null, "CA10__sumTwoWeekInvocationCount__c": 9, "CA10__sumTwoWeekInvocationThrottled__c": 9, "Id": "auxiliary-counters-below-threshold" }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError": null }, "CreatedDate": "2026-08-01T00:00:00Z", "CA10__sumTwoWeekInvocationErrors__c": null, "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "CA10__disappearanceTime__c": null, "CA10__sumTwoWeekInvocationCount__c": null, "CA10__sumTwoWeekInvocationThrottled__c": null, "Id": "all-activity-counters-null" }, { "CA10__sumTwoWeekInvocationCount__c": -1, "CreatedDate": "2026-08-01T00:00:00Z", "Id": "invalid-count-before-activity-exclusion", "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "CA10__sumTwoWeekInvocationErrors__c": 1008, "CA10__disappearanceTime__c": null, "expectedResult": { "status": "UNDETERMINED", "conditionIndex": "299", "conditionText": "CA10__sumTwoWeekInvocationCount__c < number(0.0)", "runtimeError": null } }, { "CreatedDate": "2026-10-12T00:00:00Z", "context": { "snapshotTime": "2026-10-13T12:00:00Z" }, "expectedResult": { "status": "INAPPLICABLE", "conditionIndex": "199", "conditionText": "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError": null }, "CA10__disappearanceTime__c": null, "CA10__sumTwoWeekInvocationCount__c": null, "CA10__sumTwoWeekInvocationThrottled__c": 61, "Id": "new-function-before-activity-exclusion" } ] - path: /types/CA10__CaAwsLambdaFunction__c/object.extracts.yaml md5Hash: 6BD1B54FA0262220283211F236C080FA content: "---\nextracts:\n# Nullable. Text.\n - name: \"CA10__runtime__c\"\n\ \ value: \n FIELD:\n path: \"CA10__runtime__c\"\n# Values: PassThrough\ \ | Active. Not nullable. Text.\n - name: \"CA10__tracingConfigResponseMode__c\"\ \n value: \n FIELD:\n path: \"CA10__tracingConfigResponseMode__c\"\ \n undeterminedIf:\n isEmpty: \"The function tracing config\ \ cannot be empty. Possible data corruption.\"\n# Values: Zip | Image. Not nullable.\ \ Text.\n - name: \"CA10__packageType__c\"\n value: \n FIELD:\n \ \ path: \"CA10__packageType__c\"\n undeterminedIf:\n isEmpty:\ \ \"The function package type cannot be empty. Possible data corruption.\"\n\ # Nullable. Can't have no access, retrieved via lambda:ListFunctions\n - name:\ \ \"CA10__vpcId__c\"\n value: \n FIELD:\n path: \"CA10__vpcId__c\"\ \n - name: \"CA10__iamPolicyExt__c\"\n value: \n FIELD:\n \ \ path: \"CA10__iamPolicyExt__c\"\n - name: CreatedDate\n value:\n \ \ FIELD:\n path: CreatedDate\n undeterminedIf:\n isEmpty:\ \ The function CMDB creation date is unavailable.\n - name: CA10__sumTwoWeekInvocationCount__c\n\ \ value:\n FIELD:\n path: CA10__sumTwoWeekInvocationCount__c\n\ \ undeterminedIf:\n isEmpty: The 14-day invocation count is\ \ unavailable.\n - name: CA10__version__c\n value:\n FIELD:\n \ \ path: CA10__version__c\n undeterminedIf:\n isEmpty: The\ \ function version is unavailable.\n - name: CA10__lastModified__c\n value:\n\ \ FIELD:\n path: CA10__lastModified__c\n undeterminedIf:\n\ \ isEmpty: The function last modification date is unavailable.\n -\ \ name: CA10__memorySizeMb__c\n value:\n FIELD:\n path: CA10__memorySizeMb__c\n\ \ undeterminedIf:\n isEmpty: The configured function memory\ \ size is unavailable.\n" script: |- CREATE TEMP FUNCTION mock_ExpectedResult() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "Id" : "invocations-0", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "invocations-1", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "invocations-9", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "invocations-10", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : "500", "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "invocations-None", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "invocations--1", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : "299", "conditionText" : "CA10__sumTwoWeekInvocationCount__c < number(0.0)", "runtimeError" : null } }, { "Id" : "new", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : "199", "conditionText" : "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError" : null } }, { "Id" : "14-day-boundary", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : "199", "conditionText" : "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError" : null } }, { "Id" : "missing-age", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : "101", "conditionText" : "CreatedDate.isEmpty()", "runtimeError" : null } }, { "Id" : "disappeared", "expectedResult" : { "status" : "DISAPPEARED", "conditionIndex" : "99", "conditionText" : "isDisappeared(CA10__disappearanceTime__c)", "runtimeError" : null } }, { "Id" : "zero-stale-record", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "zero-recent-record-change", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "zero-recent-vulnerability-scan", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "just-before-age-boundary", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "omitted-count", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "future-created-date", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : "199", "conditionText" : "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError" : null } }, { "Id" : "new-null-count", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : "199", "conditionText" : "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError" : null } }, { "Id" : "age-boundary-null-count", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : "199", "conditionText" : "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError" : null } }, { "Id" : "missing-age-null-count", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : "101", "conditionText" : "CreatedDate.isEmpty()", "runtimeError" : null } }, { "Id" : "new-low-count", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : "199", "conditionText" : "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError" : null } }, { "Id" : "14-day-boundary-low-count", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : "199", "conditionText" : "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError" : null } }, { "Id" : "missing-age-low-count", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : "101", "conditionText" : "CreatedDate.isEmpty()", "runtimeError" : null } }, { "Id" : "older-than-14-day-cutoff", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "stale-record-low-count", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "recent-record-update-low-count", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "stale-record-high-count", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : "500", "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "null-count-high-execution-errors", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : "399", "conditionText" : "CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0)", "runtimeError" : null } }, { "Id" : "error-exclusion-boundary", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : "399", "conditionText" : "CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0)", "runtimeError" : null } }, { "Id" : "low-count-high-throttles", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : "399", "conditionText" : "CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0)", "runtimeError" : null } }, { "Id" : "throttle-exclusion-boundary", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : "399", "conditionText" : "CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0)", "runtimeError" : null } }, { "Id" : "auxiliary-counters-below-threshold", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "all-activity-counters-null", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", "runtimeError" : null } }, { "Id" : "invalid-count-before-activity-exclusion", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : "299", "conditionText" : "CA10__sumTwoWeekInvocationCount__c < number(0.0)", "runtimeError" : null } }, { "Id" : "new-function-before-activity-exclusion", "expectedResult" : { "status" : "INAPPLICABLE", "conditionIndex" : "199", "conditionText" : "not(extract('CreatedDate').beyondLastDays(14))", "runtimeError" : null } } ]; """; CREATE TEMP FUNCTION mock_CA10__CaAwsLambdaFunction__c() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 0, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "invocations-0" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 1, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "invocations-1" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 9, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "invocations-9" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 10, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "invocations-10" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : null, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "invocations-None" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : -1, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "invocations--1" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-10-12T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 0, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "new" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-09-29T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 0, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "14-day-boundary" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CA10__sumTwoWeekInvocationCount__c" : 0, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "missing-age" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CA10__disappearanceTime__c" : new Date("2026-10-12T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : null, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "disappeared" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 0, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "zero-stale-record" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 0, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "zero-recent-record-change" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 0, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "zero-recent-vulnerability-scan" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-09-28T23:59:59Z"), "CA10__sumTwoWeekInvocationCount__c" : 0, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "just-before-age-boundary" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : null, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "omitted-count" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-10-14T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 0, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "future-created-date" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-10-12T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : null, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "new-null-count" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-09-29T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : null, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "age-boundary-null-count" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CA10__sumTwoWeekInvocationCount__c" : null, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "missing-age-null-count" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-10-12T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 1, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "new-low-count" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-09-29T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 1, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "14-day-boundary-low-count" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CA10__sumTwoWeekInvocationCount__c" : 1, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "missing-age-low-count" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-09-28T23:59:59Z"), "CA10__sumTwoWeekInvocationCount__c" : 1, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "older-than-14-day-cutoff" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 4, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "stale-record-low-count" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 3, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "recent-record-update-low-count" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 1000000, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "stale-record-high-count" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : null, "CA10__sumTwoWeekInvocationErrors__c" : 69102, "CA10__sumTwoWeekInvocationThrottled__c" : 0, "Id" : "null-count-high-execution-errors" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 0, "CA10__sumTwoWeekInvocationErrors__c" : 10, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "error-exclusion-boundary" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 3, "CA10__sumTwoWeekInvocationErrors__c" : 0, "CA10__sumTwoWeekInvocationThrottled__c" : 61, "Id" : "low-count-high-throttles" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 0, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : 10, "Id" : "throttle-exclusion-boundary" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : 9, "CA10__sumTwoWeekInvocationErrors__c" : 9, "CA10__sumTwoWeekInvocationThrottled__c" : 9, "Id" : "auxiliary-counters-below-threshold" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : null, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "all-activity-counters-null" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-08-01T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : -1, "CA10__sumTwoWeekInvocationErrors__c" : 1008, "CA10__sumTwoWeekInvocationThrottled__c" : null, "Id" : "invalid-count-before-activity-exclusion" }, { "context" : { "snapshotTime" : new Date("2026-10-13T12:00:00Z") }, "CreatedDate" : new Date("2026-10-12T00:00:00Z"), "CA10__sumTwoWeekInvocationCount__c" : null, "CA10__sumTwoWeekInvocationErrors__c" : null, "CA10__sumTwoWeekInvocationThrottled__c" : 61, "Id" : "new-function-before-activity-exclusion" } ]; """; CREATE TEMP FUNCTION process_CA10__CaAwsLambdaFunction__c( obj STRUCT< CA10__disappearanceTime__c TIMESTAMP, CreatedDate TIMESTAMP, CA10__sumTwoWeekInvocationCount__c FLOAT64, CA10__sumTwoWeekInvocationErrors__c FLOAT64, CA10__sumTwoWeekInvocationThrottled__c FLOAT64, Id STRING >, snapshotTime TIMESTAMP ) RETURNS STRUCT DETERMINISTIC LANGUAGE js AS r""" var IsEmptyLib = new function () { this.simpleIsEmpty = function(arg) { return arg == null; }; this.simpleIsNotEmpty = function(arg) { return arg != null; }; }(); var todayMinus14Day = new Date(snapshotTime.toISOString().substr(0,10)+'T00:00:00.000Z').getTime() + (-14 * 86400000); var references1 = []; // condition[0], conditionIndex:[0..99] references1.push('Deleted From AWS [CA10__disappearanceTime__c]: ' + obj.CA10__disappearanceTime__c); if (obj.CA10__disappearanceTime__c != null) { return {status: 'DISAPPEARED', conditionIndex: 99, conditionText: "isDisappeared(CA10__disappearanceTime__c)", currentStateMessage: "Object is deleted in the source", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; } // condition[1], conditionIndex:[100..199] function fieldChecked4() { if (IsEmptyLib.simpleIsEmpty(obj.CreatedDate)) { throw new Error("UNDETERMINED condition:101", {cause: {status: 'UNDETERMINED', conditionIndex: 101, conditionText: "CreatedDate.isEmpty()", currentStateMessage: "The function CMDB creation date is unavailable.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}}); } return obj.CreatedDate; } function extract3() { if (!this.out) { this.out = fieldChecked4(); } return this.out; }; references1.push('Created Date [obj.CreatedDate]: ' + obj.CreatedDate); try { if (!(extract3.call(extract3) != null && extract3.call(extract3).getTime() < todayMinus14Day)) { return {status: 'INAPPLICABLE', conditionIndex: 199, conditionText: "not(extract('CreatedDate').beyondLastDays(14))", currentStateMessage: "The function CMDB creation date is not earlier than UTC midnight 14 days ago.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; } } catch (err) { if (err.cause && err.cause.status) { return err.cause; } else { throw err; } } // condition[2], conditionIndex:[200..299] references1.push('2-Week Invocation Count [obj.CA10__sumTwoWeekInvocationCount__c]: ' + obj.CA10__sumTwoWeekInvocationCount__c); if (obj.CA10__sumTwoWeekInvocationCount__c != null && 0.0 != null && obj.CA10__sumTwoWeekInvocationCount__c < 0.0) { return {status: 'UNDETERMINED', conditionIndex: 299, conditionText: "CA10__sumTwoWeekInvocationCount__c < number(0.0)", currentStateMessage: "The 14-day invocation count is invalid.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; } // condition[3], conditionIndex:[300..399] references1.push('2-Week Invocation Errors [obj.CA10__sumTwoWeekInvocationErrors__c]: ' + obj.CA10__sumTwoWeekInvocationErrors__c); references1.push('2-Week Invocation Throttled [obj.CA10__sumTwoWeekInvocationThrottled__c]: ' + obj.CA10__sumTwoWeekInvocationThrottled__c); if ((obj.CA10__sumTwoWeekInvocationErrors__c != null && 10.0 != null && obj.CA10__sumTwoWeekInvocationErrors__c >= 10.0) || (obj.CA10__sumTwoWeekInvocationThrottled__c != null && 10.0 != null && obj.CA10__sumTwoWeekInvocationThrottled__c >= 10.0)) { return {status: 'COMPLIANT', conditionIndex: 399, conditionText: "CA10__sumTwoWeekInvocationErrors__c >= number(10.0) || CA10__sumTwoWeekInvocationThrottled__c >= number(10.0)", currentStateMessage: "The function has at least 10 recorded execution errors or throttled requests over the last 14 days.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; } // condition[4], conditionIndex:[400..499] if (IsEmptyLib.simpleIsEmpty(obj.CA10__sumTwoWeekInvocationCount__c) || (obj.CA10__sumTwoWeekInvocationCount__c != null && 10.0 != null && obj.CA10__sumTwoWeekInvocationCount__c < 10.0)) { return {status: 'INCOMPLIANT', conditionIndex: 499, conditionText: "CA10__sumTwoWeekInvocationCount__c.isEmpty() || CA10__sumTwoWeekInvocationCount__c < number(10.0)", currentStateMessage: "The function has fewer than 10 invocations over the last 14 days.", currentStateReferences: references1.join('\n'), remediation: "Review ownership, schedules, and dependencies; decommission the function only if it is no longer required.", runtimeError: null}; } return {status: 'COMPLIANT', conditionIndex: 500, conditionText: "otherwise", currentStateMessage: "The function has at least 10 invocations over the last 14 days.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; """; SELECT expectedResult.Id as Id, IF ( IFNULL(expectedResult.expectedResult.status, '') = IFNULL(sObject.result.status, '') AND IFNULL(expectedResult.expectedResult.conditionIndex, -1) = IFNULL(sObject.result.conditionIndex, -1) AND IFNULL(expectedResult.expectedResult.conditionText, '') = IFNULL(sObject.result.conditionText, '') AND IFNULL(expectedResult.expectedResult.runtimeError, '') = IFNULL(sObject.result.runtimeError, ''), "MATCH", "FAIL" ) as match, expectedResult.expectedResult.status as expectedStatus, sObject.result.status as actualStatus, expectedResult.expectedResult.conditionIndex as expectedConditionIndex, sObject.result.conditionIndex as actualConditionIndex, expectedResult.expectedResult.conditionText as expectedConditionText, sObject.result.conditionText as actualConditionText, expectedResult.expectedResult.runtimeError as expectedRuntimeError, sObject.result.runtimeError as actualRuntimeError FROM UNNEST(mock_ExpectedResult()) expectedResult LEFT JOIN ( SELECT sObject.CA10__disappearanceTime__c AS CA10__disappearanceTime__c, sObject.CreatedDate AS CreatedDate, sObject.CA10__sumTwoWeekInvocationCount__c AS CA10__sumTwoWeekInvocationCount__c, sObject.CA10__sumTwoWeekInvocationErrors__c AS CA10__sumTwoWeekInvocationErrors__c, sObject.CA10__sumTwoWeekInvocationThrottled__c AS CA10__sumTwoWeekInvocationThrottled__c, sObject.Id AS Id, process_CA10__CaAwsLambdaFunction__c( STRUCT( sObject.CA10__disappearanceTime__c AS CA10__disappearanceTime__c, sObject.CreatedDate AS CreatedDate, sObject.CA10__sumTwoWeekInvocationCount__c AS CA10__sumTwoWeekInvocationCount__c, sObject.CA10__sumTwoWeekInvocationErrors__c AS CA10__sumTwoWeekInvocationErrors__c, sObject.CA10__sumTwoWeekInvocationThrottled__c AS CA10__sumTwoWeekInvocationThrottled__c, sObject.Id AS Id ), sObject.context.snapshotTime ) as result FROM UNNEST(mock_CA10__CaAwsLambdaFunction__c()) AS sObject ) sObject ON sObject.Id = expectedResult.Id;