original_docstring: Lists the vulnerability assessment policies associated with a server.
  
          :param resource_group_name: The name of the resource group that contains the resource. You can
           obtain this value from the Azure Resource Manager API or the portal.
          :type resource_group_name: str
          :param server_name: The name of the server.
          :type server_name: str
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: An iterator like instance of either ServerVulnerabilityAssessmentListResult or the
           result of cls(response)
          :rtype:
           ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.sql.models.ServerVulnerabilityAssessmentListResult]
          :raises: ~azure.core.exceptions.HttpResponseError
          
docstring: Lists the vulnerability assessment policies associated with a server.
docstring_tokens: Lists the vulnerability assessment policies associated with a server .
code: def list_by_server(
          self,
          resource_group_name: str,
          server_name: str,
          **kwargs: Any
      ) -> AsyncIterable["_models.ServerVulnerabilityAssessmentListResult"]:
          """Lists the vulnerability assessment policies associated with a server.
  
          :param resource_group_name: The name of the resource group that contains the resource. You can
           obtain this value from the Azure Resource Manager API or the portal.
          :type resource_group_name: str
          :param server_name: The name of the server.
          :type server_name: str
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: An iterator like instance of either ServerVulnerabilityAssessmentListResult or the
           result of cls(response)
          :rtype:
           ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.sql.models.ServerVulnerabilityAssessmentListResult]
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop('cls', None)  # type: ClsType["_models.ServerVulnerabilityAssessmentListResult"]
          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_list_by_server_request(
                      resource_group_name=resource_group_name,
                      server_name=server_name,
                      subscription_id=self._config.subscription_id,
                      template_url=self.list_by_server.metadata['url'],
                  )
                  request = _convert_request(request)
                  request.url = self._client.format_url(request.url)
  
              else:
                  
                  request = build_list_by_server_request(
                      resource_group_name=resource_group_name,
                      server_name=server_name,
                      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("ServerVulnerabilityAssessmentListResult", 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
          )
code_tokens: def list_by_server ( self , resource_group_name : str , server_name : str , ** kwargs : Any ) -> AsyncIterable [ "_models.ServerVulnerabilityAssessmentListResult" ] : 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_list_by_server_request ( resource_group_name = resource_group_name , server_name = server_name , subscription_id = self . _config . subscription_id , template_url = self . list_by_server . metadata [ 'url' ] , ) request = _convert_request ( request ) request . url = self . _client . format_url ( request . url ) else : request = build_list_by_server_request ( resource_group_name = resource_group_name , server_name = server_name , 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 ( "ServerVulnerabilityAssessmentListResult" , 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 )
short_docstring: Lists the vulnerability assessment policies associated with a server.
short_docstring_tokens: Lists the vulnerability assessment policies associated with a server .
comment: """Lists the vulnerability assessment policies associated with a server.
  
          :param resource_group_name: The name of the resource group that contains the resource. You can
           obtain this value from the Azure Resource Manager API or the portal.
          :type resource_group_name: str
          :param server_name: The name of the server.
          :type server_name: str
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: An iterator like instance of either ServerVulnerabilityAssessmentListResult or the
           result of cls(response)
          :rtype:
           ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.sql.models.ServerVulnerabilityAssessmentListResult]
          :raises: ~azure.core.exceptions.HttpResponseError
          """$SEP$# type: ClsType["_models.ServerVulnerabilityAssessmentListResult"]