def list(self, scope: str, **kwargs: Any) -> AsyncIterable['_models.ComplianceResultList']:
    'Security compliance results in the subscription.\n\n        :param scope: Scope of the query, can be subscription\n         (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group\n         (/providers/Microsoft.Management/managementGroups/mgName).\n        :type scope: str\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: An iterator like instance of either ComplianceResultList or the result of cls(response)\n        :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.security.models.ComplianceResultList]\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = '2017-08-01'
    accept = 'application/json'

    def prepare_request(next_link=None):
        header_parameters = {}
        header_parameters['Accept'] = self._serialize.header('accept', accept, 'str')
        if (not next_link):
            url = self.list.metadata['url']
            path_format_arguments = {'scope': self._serialize.url('scope', scope, 'str', skip_quote=True)}
            url = self._client.format_url(url, **path_format_arguments)
            query_parameters = {}
            query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
            request = self._client.get(url, query_parameters, header_parameters)
        else:
            url = next_link
            query_parameters = {}
            request = self._client.get(url, query_parameters, header_parameters)
        return request

    async def extract_data(pipeline_response):
        deserialized = self._deserialize('ComplianceResultList', 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)
Security compliance results in the subscription.

:param scope: Scope of the query, can be subscription
 (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group
 (/providers/Microsoft.Management/managementGroups/mgName).
:type scope: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ComplianceResultList or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.security.models.ComplianceResultList]
:raises: ~azure.core.exceptions.HttpResponseError
def list(self, scope: str, **kwargs: Any) -> AsyncIterable['_models.ComplianceResultList']:
    'Security compliance results in the subscription.\n\n        :param scope: Scope of the query, can be subscription\n         (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group\n         (/providers/Microsoft.Management/managementGroups/mgName).\n        :type scope: str\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: An iterator like instance of either ComplianceResultList or the result of cls(response)\n        :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.security.models.ComplianceResultList]\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = '2017-08-01'
    accept = 'application/json'

    def prepare_request(next_link=None):
        header_parameters = {}
        header_parameters['Accept'] = self._serialize.header('accept', accept, 'str')
        if (not next_link):
            url = self.list.metadata['url']
            path_format_arguments = {'scope': self._serialize.url('scope', scope, 'str', skip_quote=True)}
            url = self._client.format_url(url, **path_format_arguments)
            query_parameters = {}
            query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
            request = self._client.get(url, query_parameters, header_parameters)
        else:
            url = next_link
            query_parameters = {}
            request = self._client.get(url, query_parameters, header_parameters)
        return request

    async def extract_data(pipeline_response):
        deserialized = self._deserialize('ComplianceResultList', 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)