List all keys associated with the given resource.

        Args:
            resource (intern.resource.boss.BossResource)

        Returns:
            (list)

        Raises:
            requests.HTTPError on a failure.
978346
def list_metadata(self, resource):
        
        self.metadata_service.set_auth(self._token_metadata)
        return self.metadata_service.list(resource)
293847
def get_current_key(self, resource_name):
        
        url = ENCRYPTION_CURRENT_KEY_URL.format(resource_name)
        return self._key_from_json(self._get_resource(url))
118237
def do_list(self, resource):
        
        if resource == 'plugins':
            self.__list_plugins()
        elif resource == 'volumes':
            self.__list_volumes()
        else:
            self.logger.error("Unknown resource: '{}', type 'help list' "
                              "to get more information".format(resource))
622092
def notify(self, resource, root=None):
        
        ret = []
        if root is not None:
            resource_list = root.with_prefix_resource(resource.path)
        else:
            resource_list = [resource]
        for key in list(self._relations.keys()):
            if self._relations[key].transaction.resource in resource_list:
                if self._relations[key].non_counter > defines.MAX_NON_NOTIFICATIONS \
                        or self._relations[key].transaction.request.type == defines.Types["CON"]:
                    self._relations[key].transaction.response.type = defines.Types["CON"]
                    self._relations[key].non_counter = 0
                elif self._relations[key].transaction.request.type == defines.Types["NON"]:
                    self._relations[key].non_counter += 1
                    self._relations[key].transaction.response.type = defines.Types["NON"]
                self._relations[key].transaction.resource = resource
                del self._relations[key].transaction.response.mid
                del self._relations[key].transaction.response.token
                ret.append(self._relations[key].transaction)
        return ret
1061799
def _list(self, uri, obj_class=None, body=None, return_raw=False,
            other_keys=None):
        
        if body:
            resp, resp_body = self.api.method_post(uri, body=body)
        else:
            resp, resp_body = self.api.method_get(uri)
        if return_raw:
            return (resp, resp_body)
        if obj_class is None:
            obj_class = self.resource_class

        data = self._data_from_response(resp_body)
        ret = [obj_class(self, res, loaded=False) for res in data if res]
        if other_keys:
            keys = utils.coerce_to_list(other_keys)
            other = [self._data_from_response(resp_body, key) for key in keys]
            return (ret, other)
        else:
            return ret
568465
def describe_api_resources(restApiId, region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        resources = sorted(_multi_call(conn.get_resources, 'items', restApiId=restApiId),
                           key=lambda k: k['path'])

        return {'resources': resources}
    except ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
915214
def list(
            self,
            bucket: str,
            prefix: str=None,
            delimiter: str=None,
    ) -> typing.Iterator[str]:
        
        kwargs = dict()
        if prefix is not None:
            kwargs['Prefix'] = prefix
        if delimiter is not None:
            kwargs['Delimiter'] = delimiter
        for item in (
                boto3.resource("s3").Bucket(bucket).
                objects.
                filter(**kwargs)):
            yield item.key
501912
def _call_api_many_related_resources(self, resource, url_list,
                                         method_name, **kwargs):
        
        responses = []
        for url in url_list:
            params = {
                'headers': self.get_http_headers(
                    resource.Meta.name, method_name, **kwargs),
                'url': url
            }
            prepared_request = self.prepare_http_request(
                'GET', params, **kwargs)
            response = self.session.send(prepared_request)
            result = self._handle_response(
                response, resource.Meta.valid_status_codes, resource)
            if len(result) > 1:
                responses.append(result)
            else:
                responses.append(result[0])
        return responses
1133642
def _find_resource_by_key(self, resource_list, key, value):
		
		original = value
		value = unicode(value.upper())
		for k, resource in resource_list.iteritems():
			if key in resource and resource[key].upper() == value:
				return k, resource

		raise KeyError, original
108934
def list(gandi, resource):
    """"""
    keys = gandi.dnssec.list(resource)
    gandi.pretty_echo(keys)

    return keys
274122
def _parse_resource(self, resource):
        

        link = 'jsonapi.org/format/#document-resource-objects'
        rid = isinstance(resource.get('id'), unicode)
        rtype = isinstance(resource.get('type'), unicode)

        if not rtype or (self.req.is_patching and not rid):
            self.fail('JSON API requires that every resource object MUST '
                      'contain a `type` top-level key. Additionally, when '
                      'modifying an existing resource object an `id` '
                      'top-level key is required. The values of both keys '
                      'MUST be strings. Your request did not comply with '
                      'one or more of these 3 rules', link)
        elif 'attributes' not in resource and 'relationships' not in resource:
            self.fail('Modifiying or creating resources require at minimum '
                      'an attributes object and/or relationship object.', link)
        elif rid and self.req.is_posting:
            abort(exceptions.ModificationDenied(**{
                'detail': 'Our API does not support client-generated ID\'s '
                          'when creating NEW resources. Instead, our API '
                          'will generate one for you & return it in the '
                          'response.',
                'links': 'jsonapi.org/format/#crud-creating-client-ids',
            }))
349477
def resource_names(self, repo_type):
        
        try:
            names = self._resource_names[repo_type]
        except KeyError:
            names = [self.name, self.name.upper()]
        return names
743334
def output(self, resource):
        
        @wraps(resource)
        def wrapper(*args, **kwargs):
            rv = resource(*args, **kwargs)
            rv = self.responder(rv)
            return rv

        return wrapper
405500
def list_all(self, name=None, visibility=None, member_status=None,
            owner=None, tag=None, status=None, size_min=None, size_max=None,
            sort_key=None, sort_dir=None):
        

        def strip_version(uri):
            """
            The 'next' uri contains a redundant version number. We need to
            strip it to use in the method_get() call.
            """
            pos = uri.find("/images")
            return uri[pos:]

        obj_class = self.resource_class
        resp, resp_body = self.list(name=name, visibility=visibility,
                member_status=member_status, owner=owner, tag=tag,
                status=status, size_min=size_min, size_max=size_max,
                sort_key=sort_key, sort_dir=sort_dir, return_raw=True)
        data = resp_body.get(self.plural_response_key, resp_body)
        next_uri = strip_version(resp_body.get("next", ""))
        ret = [obj_class(manager=self, info=res) for res in data if res]
        while next_uri:
            resp, resp_body = self.api.method_get(next_uri)
            data = resp_body.get(self.plural_response_key, resp_body)
            next_uri = strip_version(resp_body.get("next", ""))
            ret.extend([obj_class(manager=self, info=res)
                    for res in data if res])
        return ret
652518
def _list(self, uri, obj_class=None, list_all=False):
        
        resp, resp_body = self._retry_get(uri)
        if obj_class is None:
            obj_class = self.resource_class

        data = resp_body[self.plural_response_key]
        ret = [obj_class(self, res, loaded=False)
                for res in data if res]
        self._reset_paging("domain", resp_body)
        if list_all:
            dom_paging = self._paging.get("domain", {})
            while dom_paging.get("next_uri"):
                next_uri = dom_paging.get("next_uri")
                ret.extend(self._list(uri=next_uri, obj_class=obj_class,
                        list_all=False))
        return ret
1232944
def get_resource_dirs(resource):
    
    dirs = [
        os.path.join(dir, resource) for dir in
        itertools.chain(GLib.get_system_data_dirs(), GUAKE_THEME_DIR, GLib.get_user_data_dir())
    ]
    dirs += [os.path.join(os.path.expanduser("~"), ".{}".format(resource))]

    return [Path(dir) for dir in dirs if os.path.isdir(dir)]
778303
def list_resources(self, session, query='?*::INSTR'):
        

        # For each session type, ask for the list of connected resources and merge them into a single list.

        resources = self.devices.list_resources()

        resources = rname.filter(resources, query)

        if resources:
            return resources

        raise errors.VisaIOError(errors.StatusCode.error_resource_not_found.value)