@distributed_trace
def list(self, filter: Optional[str]=None, expand: Optional[str]=None, top: Optional[int]=None, **kwargs: Any) -> AsyncIterable['_models.ResourceListResult']:
    "Get all the resources in a subscription.\n\n        :param filter: The filter to apply on the operation.:code:`<br>`:code:`<br>`The properties you\n         can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup,\n         identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version,\n         and plan/promotionCode.:code:`<br>`:code:`<br>`For example, to filter by a resource type, use:\n         $filter=resourceType eq 'Microsoft.Network/virtualNetworks':code:`<br>`:code:`<br>`You can use\n         substringof(value, property) in the filter. The properties you can use for substring are: name\n         and resourceGroup.:code:`<br>`:code:`<br>`For example, to get all resources with 'demo'\n         anywhere in the name, use: $filter=substringof('demo', name):code:`<br>`:code:`<br>`You can\n         link more than one substringof together by adding and/or operators.:code:`<br>`:code:`<br>`You\n         can filter by tag names and values. For example, to filter for a tag name and value, use\n         $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value,\n         the tags for each resource are not returned in the results.:code:`<br>`:code:`<br>`You can use\n         some properties together when filtering. The combinations you can use are: substringof and/or\n         resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. Default\n         value is None.\n        :type filter: str\n        :param expand: Comma-separated list of additional properties to be included in the response.\n         Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For example,\n         ``$expand=createdTime,changedTime``. Default value is None.\n        :type expand: str\n        :param top: The number of results to return. If null is passed, returns all resources. Default\n         value is None.\n        :type top: int\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: An iterator like instance of either ResourceListResult or the result of cls(response)\n        :rtype:\n         ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.resources.v2019_08_01.models.ResourceListResult]\n        :raises: ~azure.core.exceptions.HttpResponseError\n        "
    api_version = kwargs.pop('api_version', '2019-08-01')
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))

    def prepare_request(next_link=None):
        if (not next_link):
            request = build_resources_list_request(subscription_id=self._config.subscription_id, api_version=api_version, filter=filter, expand=expand, top=top, template_url=self.list.metadata['url'])
            request = _convert_request(request)
            request.url = self._client.format_url(request.url)
        else:
            request = build_resources_list_request(subscription_id=self._config.subscription_id, template_url=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('ResourceListResult', pipeline_response)
        list_of_elem = deserialized.value
        if cls:
            list_of_elem = cls(list_of_elem)
        return ((deserialized.next_link or None), AsyncList(list_of_elem))

    async def get_next(next_link=None):
        request = prepare_request(next_link)
        pipeline_response = (await self._client._pipeline.run(request, stream=False, **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)
            raise HttpResponseError(response=response, error_format=ARMErrorFormat)
        return pipeline_response
    return AsyncItemPaged(get_next, extract_data)
Get all the resources in a subscription.

:param filter: The filter to apply on the operation.:code:`<br>`:code:`<br>`The properties you
 can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup,
 identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version,
 and plan/promotionCode.:code:`<br>`:code:`<br>`For example, to filter by a resource type, use:
 $filter=resourceType eq 'Microsoft.Network/virtualNetworks':code:`<br>`:code:`<br>`You can use
 substringof(value, property) in the filter. The properties you can use for substring are: name
 and resourceGroup.:code:`<br>`:code:`<br>`For example, to get all resources with 'demo'
 anywhere in the name, use: $filter=substringof('demo', name):code:`<br>`:code:`<br>`You can
 link more than one substringof together by adding and/or operators.:code:`<br>`:code:`<br>`You
 can filter by tag names and values. For example, to filter for a tag name and value, use
 $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value,
 the tags for each resource are not returned in the results.:code:`<br>`:code:`<br>`You can use
 some properties together when filtering. The combinations you can use are: substringof and/or
 resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. Default
 value is None.
:type filter: str
:param expand: Comma-separated list of additional properties to be included in the response.
 Valid values include ``createdTime``\ , ``changedTime`` and ``provisioningState``. For example,
 ``$expand=createdTime,changedTime``. Default value is None.
:type expand: str
:param top: The number of results to return. If null is passed, returns all resources. Default
 value is None.
:type top: int
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ResourceListResult or the result of cls(response)
:rtype:
 ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.resources.v2019_08_01.models.ResourceListResult]
:raises: ~azure.core.exceptions.HttpResponseError
@distributed_trace
def list(self, filter: Optional[str]=None, expand: Optional[str]=None, top: Optional[int]=None, **kwargs: Any) -> AsyncIterable['_models.ResourceListResult']:
    "Get all the resources in a subscription.\n\n        :param filter: The filter to apply on the operation.:code:`<br>`:code:`<br>`The properties you\n         can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup,\n         identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version,\n         and plan/promotionCode.:code:`<br>`:code:`<br>`For example, to filter by a resource type, use:\n         $filter=resourceType eq 'Microsoft.Network/virtualNetworks':code:`<br>`:code:`<br>`You can use\n         substringof(value, property) in the filter. The properties you can use for substring are: name\n         and resourceGroup.:code:`<br>`:code:`<br>`For example, to get all resources with 'demo'\n         anywhere in the name, use: $filter=substringof('demo', name):code:`<br>`:code:`<br>`You can\n         link more than one substringof together by adding and/or operators.:code:`<br>`:code:`<br>`You\n         can filter by tag names and values. For example, to filter for a tag name and value, use\n         $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When you filter by a tag name and value,\n         the tags for each resource are not returned in the results.:code:`<br>`:code:`<br>`You can use\n         some properties together when filtering. The combinations you can use are: substringof and/or\n         resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. Default\n         value is None.\n        :type filter: str\n        :param expand: Comma-separated list of additional properties to be included in the response.\n         Valid values include ``createdTime``\\ , ``changedTime`` and ``provisioningState``. For example,\n         ``$expand=createdTime,changedTime``. Default value is None.\n        :type expand: str\n        :param top: The number of results to return. If null is passed, returns all resources. Default\n         value is None.\n        :type top: int\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: An iterator like instance of either ResourceListResult or the result of cls(response)\n        :rtype:\n         ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.resources.v2019_08_01.models.ResourceListResult]\n        :raises: ~azure.core.exceptions.HttpResponseError\n        "
    api_version = kwargs.pop('api_version', '2019-08-01')
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))

    def prepare_request(next_link=None):
        if (not next_link):
            request = build_resources_list_request(subscription_id=self._config.subscription_id, api_version=api_version, filter=filter, expand=expand, top=top, template_url=self.list.metadata['url'])
            request = _convert_request(request)
            request.url = self._client.format_url(request.url)
        else:
            request = build_resources_list_request(subscription_id=self._config.subscription_id, template_url=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('ResourceListResult', pipeline_response)
        list_of_elem = deserialized.value
        if cls:
            list_of_elem = cls(list_of_elem)
        return ((deserialized.next_link or None), AsyncList(list_of_elem))

    async def get_next(next_link=None):
        request = prepare_request(next_link)
        pipeline_response = (await self._client._pipeline.run(request, stream=False, **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)
            raise HttpResponseError(response=response, error_format=ARMErrorFormat)
        return pipeline_response
    return AsyncItemPaged(get_next, extract_data)