'Lists information for all resources.'

@util.identified_stack
def index(self, req, identity):

    whitelist = {'type': 'mixed', 'status': 'mixed', 'name': 'mixed', 'action': 'mixed', 'id': 'mixed', 'physical_resource_id': 'mixed'}
    invalid_keys = (set(req.params.keys()) - set((list(whitelist) + [rpc_api.PARAM_NESTED_DEPTH, rpc_api.PARAM_WITH_DETAIL])))
    if invalid_keys:
        raise exc.HTTPBadRequest((_('Invalid    filter    parameters    %s') % six.text_type(list(invalid_keys))))
    nested_depth = self._extract_to_param(req, rpc_api.PARAM_NESTED_DEPTH, param_utils.extract_int, default=0)
    with_detail = self._extract_to_param(req, rpc_api.PARAM_WITH_DETAIL, param_utils.extract_bool, default=False)
    params = util.get_allowed_params(req.params, whitelist)
    res_list = self.rpc_client.list_stack_resources(req.context, identity, nested_depth, with_detail, filters=params)
    return {'resources': [format_resource(req, res) for res in res_list]}
