Show Table of Contents
3.3. 从集合中获取资源
使用
get 和 list 方法可以从集合中获取资源。
- get
- 从集合中获取一个单一资源。要被获取的资源是由参数中所提供的名称决定的。
get方法可以使用以下参数:name- 从集合中获取的资源名称。id- 从集合中获取的资源的 GUID。
- list
- 从集合中获取一组资源。要获得的资源由所提供的条件所决定。
list方法支持以下参数:**kwargs- 允许进行基于关键字过滤的额外参数字典。query- 和 Red Hat Virtualization 用户接口中所使用的查询相同的查询。max- 可以获得的资源的最大数量。case_sensitive- 指定搜索条件是否区分大小写(True区分大小写或False不区分大小写,默认值是True)。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.