def list_for_resource_group(<EOL>self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config):
def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list_for_resource_group.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>', max_length=<NUM_LIT>, min_length=<NUM_LIT:1>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>', skip_quote=True)<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorResponseException(self._deserialize, response)<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>
Retrieves all policy assignments that apply to a resource group.

        This operation retrieves the list of all policy assignments associated
        with the given resource group in the given subscription that match the
        optional given $filter. Valid values for $filter are: 'atScope()' or
        'policyDefinitionId eq '{value}''. If $filter is not provided, the
        unfiltered list includes all policy assignments associated with the
        resource group, including those that apply directly or apply from
        containing scopes, as well as any applied to resources contained within
        the resource group. If $filter=atScope() is provided, the returned list
        includes all policy assignments that apply to the resource group, which
        is everything in the unfiltered list except those applied to resources
        contained within the resource group. If $filter=policyDefinitionId eq
        '{value}' is provided, the returned list includes only policy
        assignments that apply to the resource group and assign the policy
        definition whose id is {value}.

        :param resource_group_name: The name of the resource group that
         contains policy assignments.
        :type resource_group_name: str
        :param filter: The filter to apply on the operation. Valid values for
         $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If
         $filter is not provided, no filtering is performed.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyAssignment
        :rtype:
         ~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignmentPaged[~azure.mgmt.resource.policy.v2018_03_01.models.PolicyAssignment]
        :raises:
         :class:`ErrorResponseException<azure.mgmt.resource.policy.v2018_03_01.models.ErrorResponseException>`