def get_mimecast_ttp_attachment_data_in_sentinel(self):
        """Get the TTP Attachment Data from Mimecast."""
        __method_name = inspect.currentframe().f_code.co_name
        try:
            # Get from date, to date and page token from checkpoint files at start of execution
            from_date, to_date, page_token = self.get_from_date_to_date_page_token(
                self.checkpoint_obj
            )
            while (
                self.iso_to_epoch_int(to_date) - self.iso_to_epoch_int(from_date)
                >= consts.TIME_DIFFERENCE
            ):
                if int(time.time()) >= self.start + consts.FUNCTION_APP_TIMEOUT_SECONDS:
                    raise MimecastTimeoutException()
                # Entry point of starting to get and ingest data to sentinel
                from_date, to_date = self.get_and_ingest_data_to_sentinel(
                    from_date, to_date, page_token
                )
            applogger.info(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    "From and To time difference is less than 15 min, Stop execution.",
                )
            )
        except MimecastTimeoutException:
            applogger.info(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    "Mimecast: 9:30 mins executed hence breaking.",
                )
            )
            return
        except MimecastException:
            raise MimecastException()
        except Exception as err:
            applogger.error(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    consts.UNEXPECTED_ERROR_MSG.format(err),
                )
            )
            raise MimecastException()
Get the TTP Attachment Data from Mimecast.
Solutions/Mimecast/Data Connectors/MimecastTTP/MimecastTTPAttachment/mimecast_ttp_attachment.py