libvirt v0.5.0 published on Wednesday, Sep 25, 2024 by Pulumi
libvirt.getNodeDevices
Explore with Pulumi AI
Retrieve information about the devices present on the current node
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as libvirt from "@pulumi/libvirt";
const node = libvirt.getNodeDevices({
    capability: "pci",
});
import pulumi
import pulumi_libvirt as libvirt
node = libvirt.get_node_devices(capability="pci")
package main
import (
	"github.com/pulumi/pulumi-libvirt/sdk/go/libvirt"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := libvirt.GetNodeDevices(ctx, &libvirt.GetNodeDevicesArgs{
			Capability: pulumi.StringRef("pci"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Libvirt = Pulumi.Libvirt;
return await Deployment.RunAsync(() => 
{
    var node = Libvirt.GetNodeDevices.Invoke(new()
    {
        Capability = "pci",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.libvirt.LibvirtFunctions;
import com.pulumi.libvirt.inputs.GetNodeDevicesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var node = LibvirtFunctions.getNodeDevices(GetNodeDevicesArgs.builder()
            .capability("pci")
            .build());
    }
}
variables:
  node:
    fn::invoke:
      Function: libvirt:getNodeDevices
      Arguments:
        capability: pci
Using getNodeDevices
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getNodeDevices(args: GetNodeDevicesArgs, opts?: InvokeOptions): Promise<GetNodeDevicesResult>
function getNodeDevicesOutput(args: GetNodeDevicesOutputArgs, opts?: InvokeOptions): Output<GetNodeDevicesResult>def get_node_devices(capability: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetNodeDevicesResult
def get_node_devices_output(capability: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetNodeDevicesResult]func GetNodeDevices(ctx *Context, args *GetNodeDevicesArgs, opts ...InvokeOption) (*GetNodeDevicesResult, error)
func GetNodeDevicesOutput(ctx *Context, args *GetNodeDevicesOutputArgs, opts ...InvokeOption) GetNodeDevicesResultOutput> Note: This function is named GetNodeDevices in the Go SDK.
public static class GetNodeDevices 
{
    public static Task<GetNodeDevicesResult> InvokeAsync(GetNodeDevicesArgs args, InvokeOptions? opts = null)
    public static Output<GetNodeDevicesResult> Invoke(GetNodeDevicesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNodeDevicesResult> getNodeDevices(GetNodeDevicesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: libvirt:index/getNodeDevices:getNodeDevices
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Capability string
 - The type of device, used to filter the output by capability type.
Can be one of 
system,pci,usb_device,usb,net,scsi_host,scsi_target,scsi,storage,fc_host,vports,scsi_generic,drm,mdev,mdev_types,ccw,css,ap_card,ap_queue,ap_matrix. Defaults to all active devices. 
- Capability string
 - The type of device, used to filter the output by capability type.
Can be one of 
system,pci,usb_device,usb,net,scsi_host,scsi_target,scsi,storage,fc_host,vports,scsi_generic,drm,mdev,mdev_types,ccw,css,ap_card,ap_queue,ap_matrix. Defaults to all active devices. 
- capability String
 - The type of device, used to filter the output by capability type.
Can be one of 
system,pci,usb_device,usb,net,scsi_host,scsi_target,scsi,storage,fc_host,vports,scsi_generic,drm,mdev,mdev_types,ccw,css,ap_card,ap_queue,ap_matrix. Defaults to all active devices. 
- capability string
 - The type of device, used to filter the output by capability type.
Can be one of 
system,pci,usb_device,usb,net,scsi_host,scsi_target,scsi,storage,fc_host,vports,scsi_generic,drm,mdev,mdev_types,ccw,css,ap_card,ap_queue,ap_matrix. Defaults to all active devices. 
- capability str
 - The type of device, used to filter the output by capability type.
Can be one of 
system,pci,usb_device,usb,net,scsi_host,scsi_target,scsi,storage,fc_host,vports,scsi_generic,drm,mdev,mdev_types,ccw,css,ap_card,ap_queue,ap_matrix. Defaults to all active devices. 
- capability String
 - The type of device, used to filter the output by capability type.
Can be one of 
system,pci,usb_device,usb,net,scsi_host,scsi_target,scsi,storage,fc_host,vports,scsi_generic,drm,mdev,mdev_types,ccw,css,ap_card,ap_queue,ap_matrix. Defaults to all active devices. 
getNodeDevices Result
The following output properties are available:
- Devices List<string>
 - A list of devices that match the selected capability
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Capability string
 
- Devices []string
 - A list of devices that match the selected capability
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Capability string
 
- devices List<String>
 - A list of devices that match the selected capability
 - id String
 - The provider-assigned unique ID for this managed resource.
 - capability String
 
- devices string[]
 - A list of devices that match the selected capability
 - id string
 - The provider-assigned unique ID for this managed resource.
 - capability string
 
- devices Sequence[str]
 - A list of devices that match the selected capability
 - id str
 - The provider-assigned unique ID for this managed resource.
 - capability str
 
- devices List<String>
 - A list of devices that match the selected capability
 - id String
 - The provider-assigned unique ID for this managed resource.
 - capability String
 
Package Details
- Repository
 - libvirt pulumi/pulumi-libvirt
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
libvirtTerraform Provider.