--- policy: /ce/ca/azure/storage/account-has-no-transactions-or-stored-data logic: /ce/ca/azure/storage/account-has-no-transactions-or-stored-data/prod.logic.yaml executionTime: 2026-09-22T15:06:49.905837401Z generationMs: 72 executionMs: 1130 rows: - id: '001' match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 300 actual: 300 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: gone 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: missing match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 199 actual: 199 conditionText: expected: extract('CA10__monitorTransactionsSum30Day__c').isEmpty() || extract('CA10__monitorUsedCapacityBytesAvg30Day__c').isEmpty() actual: extract('CA10__monitorTransactionsSum30Day__c').isEmpty() || extract('CA10__monitorUsedCapacityBytesAvg30Day__c').isEmpty() runtimeError: {} - id: empty match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 299 actual: 299 conditionText: expected: extract('CA10__monitorTransactionsSum30Day__c') == number(0.0) && extract('CA10__monitorUsedCapacityBytesAvg30Day__c') == number(0.0) actual: extract('CA10__monitorTransactionsSum30Day__c') == number(0.0) && extract('CA10__monitorUsedCapacityBytesAvg30Day__c') == number(0.0) runtimeError: {} usedFiles: - path: /ce/ca/azure/storage/account-has-no-transactions-or-stored-data/policy.yaml md5Hash: 27FB11F181F6F0CA9A6FDFE0B069D2BF content: | --- names: full: "Azure Storage Account has no transactions or stored data" contextual: "Storage Account has no transactions or stored data" description: "Identify Azure Storage Accounts with zero transactions and zero average used capacity over the last 30 days." type: "BEST_PRACTICE" categories: - "COST" frameworkMappings: - "/frameworks/cloudaware/cost-efficiency-and-optimization/waste-reduction" - path: /ce/ca/azure/storage/account-has-no-transactions-or-stored-data/prod.logic.yaml md5Hash: 6F3FE4D49A15094219D29E6AAEFF8ED7 content: | --- inputType: "CA10__CaAzureStorageAccount__c" testData: - file: "test-data.json" importExtracts: - file: "/types/CA10__CaAzureStorageAccount__c/object.extracts.yaml" conditions: - status: "UNDETERMINED" currentStateMessage: "30-day transaction or capacity evidence is unavailable." check: OR: args: - IS_EMPTY: arg: EXTRACT: "CA10__monitorTransactionsSum30Day__c" - IS_EMPTY: arg: EXTRACT: "CA10__monitorUsedCapacityBytesAvg30Day__c" - status: "INCOMPLIANT" currentStateMessage: "The storage account has no transactions or stored data in the last 30 days." remediationMessage: "Review dependencies and data-protection requirements before deleting the storage account." check: AND: args: - IS_EQUAL: left: EXTRACT: "CA10__monitorTransactionsSum30Day__c" right: NUMBER: 0.0 - IS_EQUAL: left: EXTRACT: "CA10__monitorUsedCapacityBytesAvg30Day__c" right: NUMBER: 0.0 otherwise: status: "COMPLIANT" currentStateMessage: "The storage account has transactions or stored data in the last 30 days." - path: /ce/ca/azure/storage/account-has-no-transactions-or-stored-data/test-data.json md5Hash: BC296E535A46D531360B740927C53F4B content: |- [ { "RecordType": { "Id": "RecordType1" }, "expectedResult": { "runtimeError": null, "conditionText": "otherwise", "conditionIndex": 300, "status": "COMPLIANT" }, "context": { "snapshotTime": "2026-09-10T13:03:37Z" }, "RecordTypeId": "RecordType1", "CA10__monitorTransactionsSum30Day__c": 8035.0, "Id": "001", "CA10__disappearanceTime__c": null, "CA10__monitorUsedCapacityBytesAvg30Day__c": 1461130.9137691238 }, { "RecordType": { "Id": "RecordType1" }, "expectedResult": { "runtimeError": null, "conditionText": "isDisappeared(CA10__disappearanceTime__c)", "conditionIndex": 99, "status": "DISAPPEARED" }, "context": { "snapshotTime": "2026-09-10T13:03:37Z" }, "RecordTypeId": "RecordType1", "CA10__monitorTransactionsSum30Day__c": 0, "Id": "gone", "CA10__disappearanceTime__c": "2026-09-09T00:00:00Z", "CA10__monitorUsedCapacityBytesAvg30Day__c": 0 }, { "RecordType": { "Id": "RecordType1" }, "expectedResult": { "runtimeError": null, "conditionText": "extract('CA10__monitorTransactionsSum30Day__c').isEmpty() || extract('CA10__monitorUsedCapacityBytesAvg30Day__c').isEmpty()", "conditionIndex": 199, "status": "UNDETERMINED" }, "context": { "snapshotTime": "2026-09-10T13:03:37Z" }, "RecordTypeId": "RecordType1", "CA10__monitorTransactionsSum30Day__c": null, "Id": "missing", "CA10__disappearanceTime__c": null, "CA10__monitorUsedCapacityBytesAvg30Day__c": 0 }, { "RecordType": { "Id": "RecordType1" }, "expectedResult": { "runtimeError": null, "conditionText": "extract('CA10__monitorTransactionsSum30Day__c') == number(0.0) && extract('CA10__monitorUsedCapacityBytesAvg30Day__c') == number(0.0)", "conditionIndex": 299, "status": "INCOMPLIANT" }, "context": { "snapshotTime": "2026-09-10T13:03:37Z" }, "RecordTypeId": "RecordType1", "CA10__monitorTransactionsSum30Day__c": 0, "Id": "empty", "CA10__disappearanceTime__c": null, "CA10__monitorUsedCapacityBytesAvg30Day__c": 0 } ] - path: /types/CA10__CaAzureStorageAccount__c/object.extracts.yaml md5Hash: DF0B0F4A488784069D6A056FBD3A3133 content: "---\nextracts:\n - name: \"CA10__monitorTransactionsSum30Day__c\"\n\ \ value:\n FIELD:\n path: \"CA10__monitorTransactionsSum30Day__c\"\ \n - name: \"CA10__monitorUsedCapacityBytesAvg30Day__c\"\n value:\n \ \ FIELD:\n path: \"CA10__monitorUsedCapacityBytesAvg30Day__c\"\n# Nullable.\ \ Classic service logging retention settings.\n - name: \"CA10__blobLoggingRetentionPolicyState__c\"\ \n value:\n FIELD:\n path: \"CA10__blobLoggingRetentionPolicyState__c\"\ \n - name: \"CA10__blobLoggingRetentionPolicyDays__c\"\n value:\n FIELD:\n\ \ path: \"CA10__blobLoggingRetentionPolicyDays__c\"\n - name: \"CA10__queueLoggingRetentionPolicyState__c\"\ \n value:\n FIELD:\n path: \"CA10__queueLoggingRetentionPolicyState__c\"\ \n - name: \"CA10__queueLoggingRetentionPolicyDays__c\"\n value:\n \ \ FIELD:\n path: \"CA10__queueLoggingRetentionPolicyDays__c\"\n - name:\ \ \"CA10__tableLoggingRetentionPolicyState__c\"\n value:\n FIELD:\n\ \ path: \"CA10__tableLoggingRetentionPolicyState__c\"\n - name: \"CA10__tableLoggingRetentionPolicyDays__c\"\ \n value:\n FIELD:\n path: \"CA10__tableLoggingRetentionPolicyDays__c\"\ \n# This is a checkbox. Not nullable. Can't have no access, retrieved via Microsoft.Storage/storageAccounts\n\ \ - name: \"CA10__secureTransferRequired__c\"\n value: \n FIELD:\n\ \ path: \"CA10__secureTransferRequired__c\"\n# Values: Enabled, Disabled.\ \ Not Nullable. Can't have no access, retrieved via Microsoft.Storage/storageAccounts\n\ \ - name: \"CA10__requireInfrastructureEncryptionState__c\"\n value: \n\ \ FIELD:\n path: \"CA10__requireInfrastructureEncryptionState__c\"\ \n undeterminedIf:\n isEmpty: \"Corrupted data. Require Infrastructure\ \ Encryption setting cannot be empty.\"\n# Values: Enabled, Disabled. Not Nullable.\ \ Can't have no access, retrieved via Microsoft.Storage/storageAccounts\n -\ \ name: \"CA10__publicNetworkAccessState__c\"\n value: \n FIELD:\n \ \ path: \"CA10__publicNetworkAccessState__c\"\n undeterminedIf:\n\ \ isEmpty: \"Corrupted data. Public Network Access cannot be empty.\"\ \n# Values: Allow, Deny. Not nullable. Can't have no access, retrieved via Microsoft.Storage/storageAccounts.\n\ \ - name: \"CA10__networkAclsDefaultAction__c\"\n value: \n FIELD:\n\ \ path: \"CA10__networkAclsDefaultAction__c\"\n undeterminedIf:\n\ \ isEmpty: \"Corrupted data. Default Network Action cannot be empty.\"\ \n# Values: any combination of Logging|Metrics|AzureServices or None. Not nullable.\ \ \n# Can't have no access, retrieved via Microsoft.Storage/storageAccounts.\n\ \ - name: \"CA10__networkAclsBypass__c\"\n value: \n FIELD:\n \ \ path: \"CA10__networkAclsBypass__c\"\n undeterminedIf:\n \ \ isEmpty: \"Corrupted data. Network Bypass cannot be empty.\"\n# Values TLS1_0,\ \ TLS1_1, TLS1_2. Not nullable. Can't have no access, retrieved via Microsoft.Storage/storageAccounts.\n\ \ - name: \"CA10__minimumTlsVersion__c\"\n value: \n FIELD:\n \ \ path: \"CA10__minimumTlsVersion__c\"\n undeterminedIf:\n \ \ isEmpty: \"Corrupted data. TLS Version cannot be empty.\"\n# Values: Allow,\ \ Deny, null (Old storage accounts can have null, which means that the account\ \ can still have replication). \n# Nullable. Can't have no access, retrieved\ \ via Microsoft.Storage/storageAccounts.\n - name: \"CA10__crossTenantReplication__c\"\ \n value: \n FIELD:\n path: \"CA10__crossTenantReplication__c\"\ \n# Values: Allow, Deny. Not nullable. Can't have no access, retrieved via Microsoft.Storage/storageAccounts.\n\ \ - name: \"CA10__blobPublicAccess__c\"\n value: \n FIELD:\n \ \ path: \"CA10__blobPublicAccess__c\"\n undeterminedIf:\n isEmpty:\ \ \"Corrupted data. Allow Blob Anonymous Access cannot be empty.\"\n# Values\ \ Enabled, Disabled. Not Nullable\n - name: \"CA10__blobLoggingReadState__c\"\ \n value: \n FIELD:\n path: \"CA10__blobLoggingReadState__c\"\ \n undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__blobLoggingReadState__c\"\n currentStateMessage: \"Unable to\ \ determine Blob Container Logging Read property. Possible permission issue\ \ with Microsoft.Storage/storageAccounts/blobServices/containers/read\"\n \ \ isEmpty: \"Storage Blob Logging is not populated yet.\"\n# Values Enabled,\ \ Disabled. Not Nullable\n - name: \"CA10__blobLoggingWriteState__c\"\n \ \ value: \n FIELD:\n path: \"CA10__blobLoggingWriteState__c\"\n\ \ undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__blobLoggingWriteState__c\"\n currentStateMessage: \"Unable\ \ to determine Blob Container Logging Write property. Possible permission issue\ \ with Microsoft.Storage/storageAccounts/blobServices/containers/read\"\n \ \ isEmpty: \"Storage Blob Logging is not populated yet.\"\n # Values\ \ Enabled, Disabled. Not Nullable\n - name: \"CA10__blobLoggingDeleteState__c\"\ \n value: \n FIELD:\n path: \"CA10__blobLoggingDeleteState__c\"\ \n undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__blobLoggingDeleteState__c\"\n currentStateMessage: \"Unable\ \ to determine Blob Container Logging Delete property. Possible permission issue\ \ with Microsoft.Storage/storageAccounts/blobServices/containers/read\"\n \ \ isEmpty: \"Storage Blob Logging is not populated yet.\"\n# Values Enabled,\ \ Disabled. Not Nullable\n - name: \"CA10__queueLoggingReadState__c\"\n \ \ value: \n FIELD:\n path: \"CA10__queueLoggingReadState__c\"\n\ \ undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__queueLoggingReadState__c\"\n currentStateMessage: \"Unable\ \ to determine Queue Logging Read property. Possible permission issue with Microsoft.Storage/storageAccounts/queueServices/queues/read\"\ \n isEmpty: \"Storage Queue Logging is not populated yet.\"\n# Values\ \ Enabled, Disabled. Not Nullable\n - name: \"CA10__queueLoggingWriteState__c\"\ \n value: \n FIELD:\n path: \"CA10__queueLoggingWriteState__c\"\ \n undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__queueLoggingWriteState__c\"\n currentStateMessage: \"Unable\ \ to determine Queue Logging Write property. Possible permission issue with\ \ Microsoft.Storage/storageAccounts/queueServices/queues/read\"\n isEmpty:\ \ \"Storage Queue Logging is not populated yet.\"\n# Values Enabled, Disabled.\ \ Not Nullable\n - name: \"CA10__queueLoggingDeleteState__c\"\n value: \n\ \ FIELD:\n path: \"CA10__queueLoggingDeleteState__c\"\n undeterminedIf:\n\ \ noAccessDelegate:\n path: \"CA10__queueLoggingDeleteState__c\"\ \n currentStateMessage: \"Unable to determine Queue Logging Delete\ \ property. Possible permission issue with Microsoft.Storage/storageAccounts/queueServices/queues/read\"\ \n isEmpty: \"Storage Queue Logging is not populated yet.\"\n# Values\ \ Enabled, Disabled. Not Nullable\n - name: \"CA10__tableLoggingReadState__c\"\ \n value: \n FIELD:\n path: \"CA10__tableLoggingReadState__c\"\ \n undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__tableLoggingReadState__c\"\n currentStateMessage: \"Unable\ \ to determine Table Logging Read property. Possible permission issue with Microsoft.Storage/storageAccounts/tableServices/tables/read\"\ \n isEmpty: \"Storage Table Logging is not populated yet.\"\n# Values\ \ Enabled, Disabled. Not Nullable\n - name: \"CA10__tableLoggingWriteState__c\"\ \n value: \n FIELD:\n path: \"CA10__tableLoggingWriteState__c\"\ \n undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__tableLoggingWriteState__c\"\n currentStateMessage: \"Unable\ \ to determine Table Logging Write property. Possible permission issue with\ \ Microsoft.Storage/storageAccounts/tableServices/tables/read\"\n isEmpty:\ \ \"Storage Table Logging is not populated yet.\"\n# Values Enabled, Disabled.\ \ Not Nullable\n - name: \"CA10__tableLoggingDeleteState__c\"\n value: \n\ \ FIELD:\n path: \"CA10__tableLoggingDeleteState__c\"\n undeterminedIf:\n\ \ noAccessDelegate:\n path: \"CA10__tableLoggingDeleteState__c\"\ \n currentStateMessage: \"Unable to determine Table Logging Delete\ \ property. Possible permission issue with Microsoft.Storage/storageAccounts/tableServices/tables/read\"\ \n isEmpty: \"Storage Table Logging is not populated yet.\"\n# Values\ \ Microsoft.Storage, Microsoft.Keyvault. Not Nullable. Can't have no access,\ \ retrieved via Microsoft.Storage/storageAccounts\n - name: \"CA10__encryptionKeySource__c\"\ \n value: \n FIELD:\n path: \"CA10__encryptionKeySource__c\"\n\ \ undeterminedIf:\n isEmpty: \"Corrupted data. Encryption Key\ \ Source cannot be empty.\"\n# Nullable. Can't have no access, retrieved via\ \ Microsoft.Storage/storageAccounts\n - name: \"CA10__encryptionKeyVaultUri__c\"\ \n value: \n FIELD:\n path: \"CA10__encryptionKeyVaultUri__c\"\ \n# Nullable. \n - name: \"CA10__blobRetentionPolicyDays__c\"\n value: \n\ \ FIELD:\n path: \"CA10__blobRetentionPolicyDays__c\"\n# Values:\ \ Enabled, Disabled. Nullable. \n - name: \"CA10__blobRetentionPolicyState__c\"\ \n value: \n FIELD:\n path: \"CA10__blobRetentionPolicyState__c\"\ \n# Nullable. \n - name: \"CA10__containerRetentionPolicyDays__c\"\n value:\ \ \n FIELD:\n path: \"CA10__containerRetentionPolicyDays__c\"\n\ # Values: Enabled, Disabled. Nullable. \n - name: \"CA10__containerRetentionPolicyState__c\"\ \n value: \n FIELD:\n path: \"CA10__containerRetentionPolicyState__c\"\ \n# Nullable. Text field.\n - name: \"CA10__skuName__c\"\n value:\n \ \ FIELD:\n path: \"CA10__skuName__c\"\n# Nullable. Text field.\n -\ \ name: \"CA10__defaultToOAuthAuthentication__c\"\n value:\n FIELD:\n\ \ path: \"CA10__defaultToOAuthAuthentication__c\"\n# Nullable. Text field.\n\ \ - name: \"CA10__sharedKeyAccess__c\"\n value:\n FIELD:\n path:\ \ \"CA10__sharedKeyAccess__c\"\n# Nullable. Text field.\n - name: \"CA10__blobVersioning__c\"\ \n value:\n FIELD:\n path: \"CA10__blobVersioning__c\"\n# Text\ \ field.\n - name: \"CA10__locationName__c\"\n value:\n FIELD:\n \ \ path: \"CA10__locationName__c\"\n# Date/Time field.\n - name: \"CA10__primaryKeyCreationTime__c\"\ \n value:\n FIELD:\n path: \"CA10__primaryKeyCreationTime__c\"\ \n# Date/Time field.\n - name: \"CA10__secondaryKeyCreationTime__c\"\n value:\n\ \ FIELD:\n path: \"CA10__secondaryKeyCreationTime__c\"\n# Nullable.\ \ Number field.\n - name: \"CA10__keyExpirationPeriodDays__c\"\n value:\n\ \ FIELD:\n path: \"CA10__keyExpirationPeriodDays__c\"\n\n \ \ \n" script: |- CREATE TEMP FUNCTION mock_ExpectedResult() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "Id" : "001", "expectedResult" : { "runtimeError" : null, "conditionText" : "otherwise", "conditionIndex" : 300, "status" : "COMPLIANT" } }, { "Id" : "gone", "expectedResult" : { "runtimeError" : null, "conditionText" : "isDisappeared(CA10__disappearanceTime__c)", "conditionIndex" : 99, "status" : "DISAPPEARED" } }, { "Id" : "missing", "expectedResult" : { "runtimeError" : null, "conditionText" : "extract('CA10__monitorTransactionsSum30Day__c').isEmpty() || extract('CA10__monitorUsedCapacityBytesAvg30Day__c').isEmpty()", "conditionIndex" : 199, "status" : "UNDETERMINED" } }, { "Id" : "empty", "expectedResult" : { "runtimeError" : null, "conditionText" : "extract('CA10__monitorTransactionsSum30Day__c') == number(0.0) && extract('CA10__monitorUsedCapacityBytesAvg30Day__c') == number(0.0)", "conditionIndex" : 299, "status" : "INCOMPLIANT" } } ]; """; CREATE TEMP FUNCTION mock_CA10__CaAzureStorageAccount__c() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "context" : { "snapshotTime" : new Date("2026-09-10T13:03:37Z") }, "CA10__monitorTransactionsSum30Day__c" : 8035.0, "CA10__monitorUsedCapacityBytesAvg30Day__c" : 1461130.9137691238, "Id" : "001", "RecordTypeId" : "RecordType1" }, { "context" : { "snapshotTime" : new Date("2026-09-10T13:03:37Z") }, "CA10__disappearanceTime__c" : new Date("2026-09-09T00:00:00Z"), "CA10__monitorTransactionsSum30Day__c" : 0, "CA10__monitorUsedCapacityBytesAvg30Day__c" : 0, "Id" : "gone", "RecordTypeId" : "RecordType1" }, { "context" : { "snapshotTime" : new Date("2026-09-10T13:03:37Z") }, "CA10__monitorTransactionsSum30Day__c" : null, "CA10__monitorUsedCapacityBytesAvg30Day__c" : 0, "Id" : "missing", "RecordTypeId" : "RecordType1" }, { "context" : { "snapshotTime" : new Date("2026-09-10T13:03:37Z") }, "CA10__monitorTransactionsSum30Day__c" : 0, "CA10__monitorUsedCapacityBytesAvg30Day__c" : 0, "Id" : "empty", "RecordTypeId" : "RecordType1" } ]; """; CREATE TEMP FUNCTION mock_RecordType() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "context" : { "snapshotTime" : new Date("2026-09-10T13:03:37Z") }, "Id" : "RecordType1" } ]; """; CREATE TEMP FUNCTION process_CA10__CaAzureStorageAccount__c( obj STRUCT< CA10__disappearanceTime__c TIMESTAMP, CA10__monitorTransactionsSum30Day__c FLOAT64, CA10__monitorUsedCapacityBytesAvg30Day__c FLOAT64, Id STRING, RecordTypeId STRING, RecordType STRUCT< 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 references1 = []; // condition[0], conditionIndex:[0..99] references1.push('Deleted From Azure [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 extract3() { if (!this.out) { this.out = obj.CA10__monitorTransactionsSum30Day__c; } return this.out; }; function extract6() { if (!this.out) { this.out = obj.CA10__monitorUsedCapacityBytesAvg30Day__c; } return this.out; }; references1.push('Monitor: Transactions, 30-Day [obj.CA10__monitorTransactionsSum30Day__c]: ' + obj.CA10__monitorTransactionsSum30Day__c); references1.push('Monitor: Used Capacity, Bytes, 30-Day [obj.CA10__monitorUsedCapacityBytesAvg30Day__c]: ' + obj.CA10__monitorUsedCapacityBytesAvg30Day__c); if (IsEmptyLib.simpleIsEmpty(extract3.call(extract3)) || IsEmptyLib.simpleIsEmpty(extract6.call(extract6))) { return {status: 'UNDETERMINED', conditionIndex: 199, conditionText: "extract('CA10__monitorTransactionsSum30Day__c').isEmpty() || extract('CA10__monitorUsedCapacityBytesAvg30Day__c').isEmpty()", currentStateMessage: "30-day transaction or capacity evidence is unavailable.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; } // condition[2], conditionIndex:[200..299] function extract9() { if (!this.out) { this.out = obj.CA10__monitorTransactionsSum30Day__c; } return this.out; }; function extract12() { if (!this.out) { this.out = obj.CA10__monitorUsedCapacityBytesAvg30Day__c; } return this.out; }; if (extract9.call(extract9) == 0.0 && extract12.call(extract12) == 0.0) { return {status: 'INCOMPLIANT', conditionIndex: 299, conditionText: "extract('CA10__monitorTransactionsSum30Day__c') == number(0.0) && extract('CA10__monitorUsedCapacityBytesAvg30Day__c') == number(0.0)", currentStateMessage: "The storage account has no transactions or stored data in the last 30 days.", currentStateReferences: references1.join('\n'), remediation: "Review dependencies and data-protection requirements before deleting the storage account.", runtimeError: null}; } return {status: 'COMPLIANT', conditionIndex: 300, conditionText: "otherwise", currentStateMessage: "The storage account has transactions or stored data in the last 30 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.CA10__monitorTransactionsSum30Day__c AS CA10__monitorTransactionsSum30Day__c, sObject.CA10__monitorUsedCapacityBytesAvg30Day__c AS CA10__monitorUsedCapacityBytesAvg30Day__c, sObject.Id AS Id, sObject.RecordTypeId AS RecordTypeId, STRUCT ( `RecordType`.Id AS Id ) AS RecordType, process_CA10__CaAzureStorageAccount__c( STRUCT( sObject.CA10__disappearanceTime__c AS CA10__disappearanceTime__c, sObject.CA10__monitorTransactionsSum30Day__c AS CA10__monitorTransactionsSum30Day__c, sObject.CA10__monitorUsedCapacityBytesAvg30Day__c AS CA10__monitorUsedCapacityBytesAvg30Day__c, sObject.Id AS Id, sObject.RecordTypeId AS RecordTypeId, STRUCT ( `RecordType`.Id AS Id ) AS RecordType ), sObject.context.snapshotTime ) as result FROM UNNEST(mock_CA10__CaAzureStorageAccount__c()) AS sObject LEFT JOIN UNNEST(mock_RecordType()) AS `RecordType` ON sObject.RecordTypeId = `RecordType`.Id ) sObject ON sObject.Id = expectedResult.Id;