def METHOD_NAME(
    self, filter: Optional[str] = None, select: Optional[str] = None, **kwargs: Any
) -> AsyncIterable["_models.EventData"]:
    """Gets the Activity Logs for the Tenant.:code:`<br>`Everything that is applicable to the API to
    get the Activity Logs for the subscription is applicable to this API (the parameters, $filter,
    etc.).:code:`<br>`One thing to point out here is that this API does *not* retrieve the logs at
    the individual subscription of the tenant but only surfaces the logs that were generated at the
    tenant level.
    :param filter: Reduces the set of data collected. :code:`<br>`The **$filter** is very
     restricted and allows only the following patterns.:code:`<br>`- List events for a resource
     group: $filter=eventTimestamp ge ':code:`<Start Time>`' and eventTimestamp le ':code:`<End
     Time>`' and eventChannels eq 'Admin, Operation' and resourceGroupName eq
     ':code:`<ResourceGroupName>`'.:code:`<br>`- List events for resource: $filter=eventTimestamp ge
     ':code:`<Start Time>`' and eventTimestamp le ':code:`<End Time>`' and eventChannels eq 'Admin,
     Operation' and resourceUri eq ':code:`<ResourceURI>`'.:code:`<br>`- List events for a
     subscription: $filter=eventTimestamp ge ':code:`<Start Time>`' and eventTimestamp le
     ':code:`<End Time>`' and eventChannels eq 'Admin, Operation'.:code:`<br>`- List events for a
     resource provider: $filter=eventTimestamp ge ':code:`<Start Time>`' and eventTimestamp le
     ':code:`<End Time>`' and eventChannels eq 'Admin, Operation' and resourceProvider eq
     ':code:`<ResourceProviderName>`'.:code:`<br>`- List events for a correlation Id:
     api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and
     eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and
     correlationId eq ':code:`<CorrelationID>`'.:code:`<br>`\ **NOTE**\ : No other syntax is
     allowed. Default value is None.
    :type filter: str
    :param select: Used to fetch events with only the given properties.:code:`<br>`The **$select**
     argument is a comma separated list of property names to be returned. Possible values are:
     *authorization*\ , *claims*\ , *correlationId*\ , *description*\ , *eventDataId*\ ,
     *eventName*\ , *eventTimestamp*\ , *httpRequest*\ , *level*\ , *operationId*\ ,
     *operationName*\ , *properties*\ , *resourceGroupName*\ , *resourceProviderName*\ ,
     *resourceId*\ , *status*\ , *submissionTimestamp*\ , *subStatus*\ , *subscriptionId*. Default
     value is None.
    :type select: str
    :keyword callable cls: A custom type or function that will be passed the direct response
    :return: An iterator like instance of either EventData or the result of cls(response)
    :rtype:
     ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_04_01.models.EventData]
    :raises ~azure.core.exceptions.HttpResponseError:
    """
    _headers = kwargs.pop("headers", {}) or {}
    _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
    api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
    cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None)
    error_map = {
        401: ClientAuthenticationError,
        404: ResourceNotFoundError,
        409: ResourceExistsError,
        304: ResourceNotModifiedError,
    }
    error_map.update(kwargs.pop("error_map", {}) or {})
    def prepare_request(next_link=None):
        if not next_link:
            request = build_list_request(
                filter=filter,
                select=select,
                api_version=api_version,
                template_url=self.METHOD_NAME.metadata["url"],
                headers=_headers,
                params=_params,
            )
            request = _convert_request(request)
            request.url = self._client.format_url(request.url)
        else:
            request = HttpRequest("GET", next_link)
            request = _convert_request(request)
            request.url = self._client.format_url(request.url)
            request.method = "GET"
        return request
    async def extract_data(pipeline_response):
        deserialized = self._deserialize("EventDataCollection", pipeline_response)
        list_of_elem = deserialized.value
        if cls:
            list_of_elem = cls(list_of_elem)  # type: ignore
        return deserialized.next_link or None, AsyncList(list_of_elem)
    async def get_next(next_link=None):
        request = prepare_request(next_link)
        _stream = False
        pipeline_response: PipelineResponse = await self._client._pipeline.run(  # pylint: disable=protected-access
            request, stream=_stream, **kwargs
        )
        response = pipeline_response.http_response
        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
        return pipeline_response
    return AsyncItemPaged(get_next, extract_data)