code: def filter_request_parameters(field_name, msg, look_in_response=False):
      
      val = msg['detail'].get(field_name, None)
      try:
          if not val:
              val = msg['detail'].get('requestParameters', {}).get(field_name, None)
  
          # If we STILL didn't find it -- check if it's in the response element (default off)
          if not val and look_in_response:
              if msg['detail'].get('responseElements'):
                  val = msg['detail']['responseElements'].get(field_name, None)
  
      # Just in case... We didn't find the value, so just make it None:
      except AttributeError:
          val = None
  
      return val
docs: From an event, extract the field name from the message.
      Different API calls put this information in different places, so check a few places.