async def get_netskope_data_and_post_to_azure_storage(self, index, url, session, end_epoch, is_resend=False):
        """Fetch Netskope data and post to azure storage.

        Args:
            index (str): name of iterator
            url (str): url for request
            session (aiohttp.ClientSession): session object
            end_epoch (int): end time epoch
            is_resend (bool): if it is resend or not.
        Returns:
            int: updated epoch time
        """
        __method_name = inspect.currentframe().f_code.co_name
        try:
            share_name = self.share_name
            data = await self.netskope_api_async_obj.aio_http_handler(url, session)
            epoch = int(data.get("timestamp_hwm"))
            is_duplicate = False
            if is_resend:
                is_duplicate = await self.remove_duplicates_generated_due_to_data_saving_failures(index, data, epoch)

            if is_duplicate:
                applogger.info("The data for epoch {} and iterator {} was duplicate".format(epoch, index))
                return None

            applogger.info(
                "{}(method={}) : {} ({}) : Netskope data fetched for iterator {} till {}.".format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    consts.NETSKOPE_TO_AZURE_STORAGE,
                    self.nskp_data_type_for_logging,
                    index,
                    epoch,
                )
            )
            file_name_for_saving = "{}_{}_{}_{}"
            if epoch >= end_epoch:
                share_name = self.share_name_for_duplication_check
            if epoch > end_epoch + consts.DIFFERENCE_BETWEEN_ITERATORS_IN_SECONDS:
                applogger.info(
                    "{}(method={}) : {} ({}) : The epoch timestamp is more than the next iterator,"
                    "allowed chunk for iterator-{}. Current-{}, End-{} .".format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        consts.NETSKOPE_TO_AZURE_STORAGE,
                        self.nskp_data_type_for_logging,
                        index,
                        epoch,
                        end_epoch,
                    )
                )
                share_name = self.share_name_for_duplication_check
                epoch = end_epoch
                file_name_for_saving = "{}_{}_{}_{}_empty_file"
                data = {"ok": 1, "result": [], "wait_time": data.get("wait_time"), "timestamp_hwm": end_epoch}
            state_manager_obj_to_post_data = StateManager(
                consts.CONNECTION_STRING,
                file_name_for_saving.format(
                    index,
                    str(self.starttime),
                    str(epoch),
                    str(int(time.time())),
                ),
                share_name,
            )
            state_manager_obj_to_post_data.post(json.dumps(data))
            applogger.info(
                "{}(method={}) : {} ({}) : Netskope data posted to azure storage for iterator {}.".format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    consts.NETSKOPE_TO_AZURE_STORAGE,
                    self.nskp_data_type_for_logging,
                    index,
                )
            )
            if epoch >= end_epoch:
                applogger.info(
                    "{}(method={}) : {} ({}) : Iterator-{} : Got the {} seconds netskope data at time-{}, "
                    "Breaking Execution.".format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        consts.NETSKOPE_TO_AZURE_STORAGE,
                        self.nskp_data_type_for_logging,
                        index,
                        consts.DIFFERENCE_BETWEEN_ITERATORS_IN_SECONDS,
                        int(time.time()),
                    )
                )

                updated_start = await self.reset_iterators(index, epoch, end_epoch, session)
                update_end_epoch = updated_start + consts.DIFFERENCE_BETWEEN_ITERATORS_IN_SECONDS
                return update_end_epoch
            await self.honour_wait_time(data)
        except NetskopeException:
            applogger.error(
                "{}(method={}) : {} ({}) : Error while getting data and post to state manager.".format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    consts.NETSKOPE_TO_AZURE_STORAGE,
                    self.nskp_data_type_for_logging,
                )
            )
            raise NetskopeException()
        except Exception as error:
            applogger.error(
                "{}(method={}) : {} ({}) : Error captured in perform_request_function, Error-{}.".format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    consts.NETSKOPE_TO_AZURE_STORAGE,
                    self.nskp_data_type_for_logging,
                    error,
                )
            )
            raise NetskopeException()
Fetch Netskope data and post to azure storage.

        Args:
            index (str): name of iterator
            url (str): url for request
            session (aiohttp.ClientSession): session object
            end_epoch (int): end time epoch
            is_resend (bool): if it is resend or not.
        Returns:
            int: updated epoch time
        
Solutions/Netskopev2/Data Connectors/NetskopeDataConnector/NetskopeToAzureStorage/netskope_to_azure_storage.py