---
policy: /ce/ca/aws/connect/instance-flow-logs
logic: /ce/ca/aws/connect/instance-flow-logs/prod.logic.yaml
executionTime: 2025-07-11T00:36:32.526118628Z
rows:
  - id: test1
    match: true
    status:
      expected: DISAPPEARED
      actual: DISAPPEARED
    conditionIndex:
      expected: 99
      actual: 99
    conditionText:
      expected: isDisappeared(CA10A1__disappearanceTime__c)
      actual: isDisappeared(CA10A1__disappearanceTime__c)
    runtimeError: {}
  - id: test2
    match: true
    status:
      expected: INCOMPLIANT
      actual: INCOMPLIANT
    conditionIndex:
      expected: 199
      actual: 199
    conditionText:
      expected: extract('CA10A1__attributesAsSet__c').contains('CONTACTFLOW_LOGS -
        false')
      actual: extract('CA10A1__attributesAsSet__c').contains('CONTACTFLOW_LOGS - false')
    runtimeError: {}
  - id: test3
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 299
      actual: 299
    conditionText:
      expected: extract('CA10A1__attributesAsSet__c').contains('CONTACTFLOW_LOGS -
        true')
      actual: extract('CA10A1__attributesAsSet__c').contains('CONTACTFLOW_LOGS - true')
    runtimeError: {}
  - id: test4
    match: true
    status:
      expected: UNDETERMINED
      actual: UNDETERMINED
    conditionIndex:
      expected: 300
      actual: 300
    conditionText:
      expected: otherwise
      actual: otherwise
    runtimeError: {}
usedFiles:
  - path: /ce/ca/aws/connect/instance-flow-logs/policy.yaml
    md5Hash: 7382D2BEEACCBC289BAD2B4EA21100CE
    content: |-
      ---
      names:
        full: AWS Connect Instance flow logs are not enabled
        contextual: Instance flow logs are not enabled
      description: >
        Ensure that Amazon Connect Instances have CloudWatch logging enabled to capture contact flow logs.
      type: COMPLIANCE_POLICY
      categories:
        - SECURITY
        - RELIABILITY
      frameworkMappings:
        - "/frameworks/cloudaware/logging-and-monitoring/logging-and-monitoring-configuration"
        - "/frameworks/aws-fsbp-v1.0.0/connect/02"
      similarPolicies:
        awsSecurityHub:
          - name: "[Connect.2] Amazon Connect instances should have CloudWatch logging enabled"
            url: "https://docs.aws.amazon.com/securityhub/latest/userguide/connect-controls.html#connect-2"
  - path: /ce/ca/aws/connect/instance-flow-logs/prod.logic.yaml
    md5Hash: A55EDA97D7ED45B095286E002A3D3639
    content: |-
      ---
      inputType: "CA10A1__CaAwsConnectInstance__c"
      importExtracts:
        - file: /types/CA10A1__CaAwsConnectInstance__c/object.extracts.yaml
      testData:
        - file: "test-data.json"
      conditions:
        - status: "INCOMPLIANT"
          currentStateMessage: "The Connect Instance flow logs are not enabled."
          remediationMessage: "Consider enabling CloudWatch logging for the Connect Instance to capture contact flow logs."
          check:
            CONTAINS:
              arg:
                EXTRACT: "CA10A1__attributesAsSet__c"
              search:
                TEXT: "CONTACTFLOW_LOGS - false"
        - status: "COMPLIANT"
          currentStateMessage: "The Connect Instance flow logs are enabled."
          check:
            CONTAINS:
              arg:
                EXTRACT: "CA10A1__attributesAsSet__c"
              search:
                TEXT: "CONTACTFLOW_LOGS - true"
      otherwise:
        status: "UNDETERMINED"
        currentStateMessage: "Unable to determine Connect Instance flow logs status."
  - path: /ce/ca/aws/connect/instance-flow-logs/test-data.json
    md5Hash: C353B2F9D50DBFB67AD2F4C0C17B9CF5
    content: |-
      [
          {
              "expectedResult": {
                  "status": "DISAPPEARED",
                  "conditionIndex": "99",
                  "conditionText": "isDisappeared(CA10A1__disappearanceTime__c)",
                  "runtimeError": null
              },
              "context": {
                  "snapshotTime": "2025-07-09T03:22:15Z"
              },
              "Id": "test1",
              "CA10A1__disappearanceTime__c": "2025-07-01T22:28:38Z",
              "CA10A1__attributes__c": "AUTOMATED_INTERACTION_LOG - false\nAUTO_RESOLVE_BEST_VOICES - true\nBOT_MANAGEMENT - false\nCONTACTFLOW_LOGS - false\nCONTACT_LENS - true\nEARLY_MEDIA - true\nENABLE_BOT_ANALYTICS_AND_TRANSCRIPTS - false\nENHANCED_CHAT_MONITORING - true\nENHANCED_CONTACT_MONITORING - true\nFORECASTING_PLANNING_SCHEDULING - false"
          },
          {
              "expectedResult": {
                  "status": "INCOMPLIANT",
                  "conditionIndex": "199",
                  "conditionText": "extract('CA10A1__attributesAsSet__c').contains('CONTACTFLOW_LOGS - false')",
                  "runtimeError": null
              },
              "context": {
                  "snapshotTime": "2025-07-09T03:22:15Z"
              },
              "Id": "test2",
              "CA10A1__disappearanceTime__c": null,
              "CA10A1__attributes__c": "AUTOMATED_INTERACTION_LOG - false\nAUTO_RESOLVE_BEST_VOICES - true\nBOT_MANAGEMENT - false\nCONTACTFLOW_LOGS - false\nCONTACT_LENS - true\nEARLY_MEDIA - true\nENABLE_BOT_ANALYTICS_AND_TRANSCRIPTS - false\nENHANCED_CHAT_MONITORING - true\nENHANCED_CONTACT_MONITORING - true\nFORECASTING_PLANNING_SCHEDULING - false"
          },
          {
              "expectedResult": {
                  "status": "COMPLIANT",
                  "conditionIndex": "299",
                  "conditionText": "extract('CA10A1__attributesAsSet__c').contains('CONTACTFLOW_LOGS - true')",
                  "runtimeError": null
              },
              "context": {
                  "snapshotTime": "2025-07-09T03:22:15Z"
              },
              "Id": "test3",
              "CA10A1__disappearanceTime__c": null,
              "CA10A1__attributes__c": "AUTOMATED_INTERACTION_LOG - true\nAUTO_RESOLVE_BEST_VOICES - true\nBOT_MANAGEMENT - true\nCONTACTFLOW_LOGS - true\nCONTACT_LENS - false\nEARLY_MEDIA - true\nENABLE_BOT_ANALYTICS_AND_TRANSCRIPTS - true\nENHANCED_CHAT_MONITORING - true\nENHANCED_CONTACT_MONITORING - true\nFORECASTING_PLANNING_SCHEDULING - true"
          },
          {
              "expectedResult": {
                  "status": "UNDETERMINED",
                  "conditionIndex": "300",
                  "conditionText": "otherwise",
                  "runtimeError": null
              },
              "context": {
                  "snapshotTime": "2025-07-09T03:22:15Z"
              },
              "Id": "test4",
              "CA10A1__disappearanceTime__c": null,
              "CA10A1__attributes__c": "AUTOMATED_INTERACTION_LOG - true\nAUTO_RESOLVE_BEST_VOICES - true\nBOT_MANAGEMENT - true\nCONTACT_LENS - false\nEARLY_MEDIA - true\nENABLE_BOT_ANALYTICS_AND_TRANSCRIPTS - true\nENHANCED_CHAT_MONITORING - true\nENHANCED_CONTACT_MONITORING - true\nFORECASTING_PLANNING_SCHEDULING - true"
          }
      ]
  - path: /types/CA10A1__CaAwsConnectInstance__c/object.extracts.yaml
    md5Hash: EB5BEEC38957E2BDBC3F4F51DACF3FE5
    content: "---\nextracts:\n# Values in the form of 'ATTRIBUTE - boolean\\n': \n\
      # INBOUND_CALLS | OUTBOUND_CALLS | CONTACTFLOW_LOGS | CONTACT_LENS \n# AUTO_RESOLVE_BEST_VOICES\
      \ | USE_CUSTOM_TTS_VOICES | EARLY_MEDIA | MULTI_PARTY_CONFERENCE \n# HIGH_VOLUME_OUTBOUND\
      \ | ENHANCED_CONTACT_MONITORING | ENHANCED_CHAT_MONITORING \n# MULTI_PARTY_CHAT_CONFERENCE\n\
      # Not Nullable. \n  - name: CA10A1__attributes__c\n    value: \n      FIELD:\n\
      \        path: CA10A1__attributes__c\n        undeterminedIf:\n          noAccessDelegate:\n\
      \            path: \"CA10A1__attributes__c\"\n            currentStateMessage:\
      \ \"AWS Connect Instance Attributes cannot be empty. Possible permissions issue\
      \ with connect:ListInstanceAttributes\"\n  - name: CA10A1__attributesAsSet__c\n\
      \    value: \n      SET_FROM:\n        separator: \"\\n\"\n        arg:\n  \
      \        EXTRACT: \"CA10A1__attributes__c\""
script: |-
  CREATE TEMP FUNCTION mock_ExpectedResult()
  RETURNS ARRAY<STRUCT<
          Id STRING,
          expectedResult STRUCT<status STRING, conditionIndex DECIMAL, conditionText STRING, runtimeError STRING>
      >>
  DETERMINISTIC
  LANGUAGE js
  AS r"""
    return [ {
    "Id" : "test1",
    "expectedResult" : {
      "status" : "DISAPPEARED",
      "conditionIndex" : "99",
      "conditionText" : "isDisappeared(CA10A1__disappearanceTime__c)",
      "runtimeError" : null
    }
  }, {
    "Id" : "test2",
    "expectedResult" : {
      "status" : "INCOMPLIANT",
      "conditionIndex" : "199",
      "conditionText" : "extract('CA10A1__attributesAsSet__c').contains('CONTACTFLOW_LOGS - false')",
      "runtimeError" : null
    }
  }, {
    "Id" : "test3",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "299",
      "conditionText" : "extract('CA10A1__attributesAsSet__c').contains('CONTACTFLOW_LOGS - true')",
      "runtimeError" : null
    }
  }, {
    "Id" : "test4",
    "expectedResult" : {
      "status" : "UNDETERMINED",
      "conditionIndex" : "300",
      "conditionText" : "otherwise",
      "runtimeError" : null
    }
  } ];
  """;

  CREATE TEMP FUNCTION mock_CA10A1__CaAwsConnectInstance__c()
  RETURNS ARRAY<STRUCT<
      Id STRING,
      CA10A1__disappearanceTime__c TIMESTAMP,
      CA10A1__attributes__c STRING,
      context STRUCT<
          snapshotTime TIMESTAMP
      >
  >>
  DETERMINISTIC
  LANGUAGE js
  AS r"""
    return [ {
    "context" : {
      "snapshotTime" : new Date("2025-07-09T03:22:15Z")
    },
    "Id" : "test1",
    "CA10A1__disappearanceTime__c" : new Date("2025-07-01T22:28:38Z"),
    "CA10A1__attributes__c" : "AUTOMATED_INTERACTION_LOG - false\nAUTO_RESOLVE_BEST_VOICES - true\nBOT_MANAGEMENT - false\nCONTACTFLOW_LOGS - false\nCONTACT_LENS - true\nEARLY_MEDIA - true\nENABLE_BOT_ANALYTICS_AND_TRANSCRIPTS - false\nENHANCED_CHAT_MONITORING - true\nENHANCED_CONTACT_MONITORING - true\nFORECASTING_PLANNING_SCHEDULING - false"
  }, {
    "context" : {
      "snapshotTime" : new Date("2025-07-09T03:22:15Z")
    },
    "Id" : "test2",
    "CA10A1__attributes__c" : "AUTOMATED_INTERACTION_LOG - false\nAUTO_RESOLVE_BEST_VOICES - true\nBOT_MANAGEMENT - false\nCONTACTFLOW_LOGS - false\nCONTACT_LENS - true\nEARLY_MEDIA - true\nENABLE_BOT_ANALYTICS_AND_TRANSCRIPTS - false\nENHANCED_CHAT_MONITORING - true\nENHANCED_CONTACT_MONITORING - true\nFORECASTING_PLANNING_SCHEDULING - false"
  }, {
    "context" : {
      "snapshotTime" : new Date("2025-07-09T03:22:15Z")
    },
    "Id" : "test3",
    "CA10A1__attributes__c" : "AUTOMATED_INTERACTION_LOG - true\nAUTO_RESOLVE_BEST_VOICES - true\nBOT_MANAGEMENT - true\nCONTACTFLOW_LOGS - true\nCONTACT_LENS - false\nEARLY_MEDIA - true\nENABLE_BOT_ANALYTICS_AND_TRANSCRIPTS - true\nENHANCED_CHAT_MONITORING - true\nENHANCED_CONTACT_MONITORING - true\nFORECASTING_PLANNING_SCHEDULING - true"
  }, {
    "context" : {
      "snapshotTime" : new Date("2025-07-09T03:22:15Z")
    },
    "Id" : "test4",
    "CA10A1__attributes__c" : "AUTOMATED_INTERACTION_LOG - true\nAUTO_RESOLVE_BEST_VOICES - true\nBOT_MANAGEMENT - true\nCONTACT_LENS - false\nEARLY_MEDIA - true\nENABLE_BOT_ANALYTICS_AND_TRANSCRIPTS - true\nENHANCED_CHAT_MONITORING - true\nENHANCED_CONTACT_MONITORING - true\nFORECASTING_PLANNING_SCHEDULING - true"
  } ];
  """;

  CREATE TEMP FUNCTION process_CA10A1__CaAwsConnectInstance__c(
      obj STRUCT<
          Id STRING,
          CA10A1__disappearanceTime__c TIMESTAMP,
          CA10A1__attributes__c STRING
      >,
      snapshotTime TIMESTAMP
  )
  RETURNS STRUCT<status STRING, conditionIndex DECIMAL, conditionText STRING, currentStateMessage STRING, currentStateReferences STRING, remediation STRING, runtimeError STRING>
  DETERMINISTIC
  LANGUAGE js
  AS r"""
      var TextLib = new function () {
          this.normalize = function(arg) {
              return arg == null ? '' : arg.replace(/\s+/g, ' ').trim().toLowerCase();
          };
          this.isEmpty = function(arg) {
              return this.normalize(arg) == '';
          };
          this.isNotEmpty = function(arg) {
              return this.normalize(arg) != '';
          };
          this.equal = function(left, right) {
              return this.normalize(left) == this.normalize(right);
          };
          this.notEqual = function(left, right) {
              return this.normalize(left) != this.normalize(right);
          };
          this.startsWith = function(arg, substring) {
              return this.normalize(arg).startsWith(this.normalize(substring));
          };
          this.endsWith = function(arg, substring) {
              return this.normalize(arg).endsWith(this.normalize(substring));
          };
          this.contains = function(arg, substring) {
              return this.normalize(arg).includes(this.normalize(substring));
          };
          this.containsAll = function(arg, substrings) {
              if (substrings == null || substrings.length === 0) return false;
              let normalizedArg = this.normalize(arg);
              return substrings.every(sub => normalizedArg.includes(this.normalize(sub)));
          };
          this.containsAny = function(arg, substrings) {
              if (substrings == null || substrings.length === 0) return false;
              let normalizedArg = this.normalize(arg);
              return substrings.some(sub => normalizedArg.includes(this.normalize(sub)));
          };
      }();
      var CollectionLib = new function () {
          this.parse = function(arg, separator, skipEmpty, skipDuplicates, sort, normalize) {
              if (arg == null) return [];
              let parts = arg.split(separator);
              return this.fromArray(parts, skipEmpty, skipDuplicates, sort, normalize);
          };
          this.fromArray = function(arr, skipEmpty, skipDuplicates, sort, normalize) {
              if (arr == null) return [];
              let result = [];
              let seen = new Set();
              arr.forEach(el => {
                  let normalized = normalize ? TextLib.normalize(el) : BytesLib.normalize(el);
                  if (!skipEmpty || (normalize ? TextLib.isNotEmpty(el) : BytesLib.isNotEmpty(el))) {
                      if (!skipDuplicates || !seen.has(normalized)) {
                          if (skipDuplicates) seen.add(normalized);
                          result.push(normalized);
                      }
                  }
              });
              if (sort) result.sort();
              return result;
          };
          this.equal = function(left, right) {
              left = left == null ? [] : left;
              right = right == null ? [] : right;
              if (left.length !== right.length) return false;
              for (let i = 0; i < left.length; i++) {
                  if (left[i] !== right[i]) return false;
              }
              return true;
          };
          this.notEqual = function(left, right) {
              return !this.equal(left, right);
          };
          this.size = function(collection) {
              return collection == null ? 0 : collection.length;
          };
          this.startsWith = function(collection, search, normalize) {
              if (collection == null || collection.length === 0) return false;
              let normalizedSearch = normalize ? TextLib.normalize(search) : BytesLib.normalize(search);
              return collection[0] === normalizedSearch;
          };
          this.endsWith = function(collection, search, normalize) {
              if (collection == null || collection.length === 0) return false;
              let normalizedSearch = normalize ? TextLib.normalize(search) : BytesLib.normalize(search);
              return collection[collection.length - 1] === normalizedSearch;
          };
          this.contains = function(collection, search, normalize) {
              if (collection == null || collection.length === 0) return false;
              return collection.includes(normalize ? TextLib.normalize(search) : BytesLib.normalize(search));
          };
          this.containsAll = function(collection, searchArray, normalize) {
              if (collection == null || collection.length === 0 || searchArray == null || searchArray.length === 0) return false;
              return searchArray.every(search => collection.includes(normalize ? TextLib.normalize(search) : BytesLib.normalize(search)));
          };
          this.containsAny = function(collection, searchArray, normalize) {
              if (collection == null || collection.length === 0 || searchArray == null || searchArray.length === 0) return false;
              return searchArray.some(search => collection.includes(normalize ? TextLib.normalize(search) : BytesLib.normalize(search)));
          };
      }();
      var BytesLib = new function () {
          this.normalize = function(arg) {
              return arg == null ? '' : arg;
          };
          this.isEmpty = function(arg) {
              return this.normalize(arg) == '';
          };
          this.isNotEmpty = function(arg) {
              return this.normalize(arg) != '';
          };
          this.equal = function(left, right) {
              return this.normalize(left) == this.normalize(right);
          };
          this.notEqual = function(left, right) {
              return this.normalize(left) != this.normalize(right);
          };
          this.startsWith = function(arg, substring) {
              return this.normalize(arg).startsWith(this.normalize(substring));
          };
          this.endsWith = function(arg, substring) {
              return this.normalize(arg).endsWith(this.normalize(substring));
          };
          this.contains = function(arg, substring) {
              return this.normalize(arg).includes(this.normalize(substring));
          };
          this.containsAll = function(arg, substrings) {
              if (substrings == null || substrings.length === 0) return false;
              let normalizedArg = this.normalize(arg);
              return substrings.every(sub => normalizedArg.includes(this.normalize(sub)));
          };
          this.containsAny = function(arg, substrings) {
              if (substrings == null || substrings.length === 0) return false;
              let normalizedArg = this.normalize(arg);
              return substrings.some(sub => normalizedArg.includes(this.normalize(sub)));
          };
      }();
      var references1 = [];
      // condition[0], conditionIndex:[0..99]
      references1.push('Deleted From AWS [CA10A1__disappearanceTime__c]: ' + obj.CA10A1__disappearanceTime__c);
      if (obj.CA10A1__disappearanceTime__c != null) {
          return {status: 'DISAPPEARED', conditionIndex: 99, conditionText: "isDisappeared(CA10A1__disappearanceTime__c)", currentStateMessage: "Object is deleted in the source", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
      }
      // condition[1], conditionIndex:[100..199]
      function fieldChecked6() {
          if (TextLib.isEmpty(obj.CA10A1__attributes__c)) {
              throw new Error("UNDETERMINED condition:101", {cause: {status: 'UNDETERMINED', conditionIndex: 101, conditionText: "CA10A1__attributes__c.delegatedTo(CA10A1__attributes__c).isEmpty()", currentStateMessage: "AWS Connect Instance Attributes cannot be empty. Possible permissions issue with connect:ListInstanceAttributes", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}});
          }
          return obj.CA10A1__attributes__c;
      }
      function extract5() { if (!this.out) { this.out = fieldChecked6(); } return this.out; };
      function extract3() { if (!this.out) { this.out = CollectionLib.parse(extract5.call(extract5), '\n', true, true, true, true); } return this.out; };
      references1.push('Attributes [obj.CA10A1__attributes__c]: ' + obj.CA10A1__attributes__c);
      try {
          if (CollectionLib.contains(extract3.call(extract3), 'CONTACTFLOW_LOGS - false', true)) {
              return {status: 'INCOMPLIANT', conditionIndex: 199, conditionText: "extract('CA10A1__attributesAsSet__c').contains('CONTACTFLOW_LOGS - false')", currentStateMessage: "The Connect Instance flow logs are not enabled.", currentStateReferences: references1.join('\n'), remediation: "Consider enabling CloudWatch logging for the Connect Instance to capture contact flow logs.", runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[2], conditionIndex:[200..299]
      function fieldChecked12() {
          if (TextLib.isEmpty(obj.CA10A1__attributes__c)) {
              throw new Error("UNDETERMINED condition:201", {cause: {status: 'UNDETERMINED', conditionIndex: 201, conditionText: "CA10A1__attributes__c.delegatedTo(CA10A1__attributes__c).isEmpty()", currentStateMessage: "AWS Connect Instance Attributes cannot be empty. Possible permissions issue with connect:ListInstanceAttributes", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}});
          }
          return obj.CA10A1__attributes__c;
      }
      function extract11() { if (!this.out) { this.out = fieldChecked12(); } return this.out; };
      function extract9() { if (!this.out) { this.out = CollectionLib.parse(extract11.call(extract11), '\n', true, true, true, true); } return this.out; };
      try {
          if (CollectionLib.contains(extract9.call(extract9), 'CONTACTFLOW_LOGS - true', true)) {
              return {status: 'COMPLIANT', conditionIndex: 299, conditionText: "extract('CA10A1__attributesAsSet__c').contains('CONTACTFLOW_LOGS - true')", currentStateMessage: "The Connect Instance flow logs are enabled.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      return {status: 'UNDETERMINED', conditionIndex: 300, conditionText: "otherwise", currentStateMessage: "Unable to determine Connect Instance flow logs status.", 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.Id AS Id,
          sObject.CA10A1__disappearanceTime__c AS CA10A1__disappearanceTime__c,
          sObject.CA10A1__attributes__c AS CA10A1__attributes__c,
          process_CA10A1__CaAwsConnectInstance__c(
              STRUCT(
                  sObject.Id AS Id,
                  sObject.CA10A1__disappearanceTime__c AS CA10A1__disappearanceTime__c,
                  sObject.CA10A1__attributes__c AS CA10A1__attributes__c
              ),
              sObject.context.snapshotTime
          ) as result
      FROM UNNEST(mock_CA10A1__CaAwsConnectInstance__c()) AS sObject
  ) sObject ON sObject.Id = expectedResult.Id;
