Show Table of Contents
2.8. 列出子资源
以下示例展示了如何列出资源的子资源。在这个示例中,列出了一个名为 'test' 的虚拟机的子资源。
过程 2.4. 列出子资源
- 声明一个需要被列出子资源的资源实例。
VM vm = api.getVMs().get("test"); - 列出子资源:
List<VMDisk> disks = vm.getDisks().list();

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.