libvirt v0.5.0 published on Wednesday, Sep 25, 2024 by Pulumi
libvirt.getNodeDeviceInfo
Explore with Pulumi AI
Retrieve information about a specific device on the current node
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as libvirt from "@pulumi/libvirt";
const device = libvirt.getNodeDeviceInfo({
    name: "pci_0000_00_00_0",
});
import pulumi
import pulumi_libvirt as libvirt
device = libvirt.get_node_device_info(name="pci_0000_00_00_0")
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.GetNodeDeviceInfo(ctx, &libvirt.GetNodeDeviceInfoArgs{
			Name: "pci_0000_00_00_0",
		}, 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 device = Libvirt.GetNodeDeviceInfo.Invoke(new()
    {
        Name = "pci_0000_00_00_0",
    });
});
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.GetNodeDeviceInfoArgs;
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 device = LibvirtFunctions.getNodeDeviceInfo(GetNodeDeviceInfoArgs.builder()
            .name("pci_0000_00_00_0")
            .build());
    }
}
variables:
  device:
    fn::invoke:
      Function: libvirt:getNodeDeviceInfo
      Arguments:
        name: pci_0000_00_00_0
Using getNodeDeviceInfo
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 getNodeDeviceInfo(args: GetNodeDeviceInfoArgs, opts?: InvokeOptions): Promise<GetNodeDeviceInfoResult>
function getNodeDeviceInfoOutput(args: GetNodeDeviceInfoOutputArgs, opts?: InvokeOptions): Output<GetNodeDeviceInfoResult>def get_node_device_info(capability: Optional[GetNodeDeviceInfoCapability] = None,
                         name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetNodeDeviceInfoResult
def get_node_device_info_output(capability: Optional[pulumi.Input[GetNodeDeviceInfoCapabilityArgs]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetNodeDeviceInfoResult]func GetNodeDeviceInfo(ctx *Context, args *GetNodeDeviceInfoArgs, opts ...InvokeOption) (*GetNodeDeviceInfoResult, error)
func GetNodeDeviceInfoOutput(ctx *Context, args *GetNodeDeviceInfoOutputArgs, opts ...InvokeOption) GetNodeDeviceInfoResultOutput> Note: This function is named GetNodeDeviceInfo in the Go SDK.
public static class GetNodeDeviceInfo 
{
    public static Task<GetNodeDeviceInfoResult> InvokeAsync(GetNodeDeviceInfoArgs args, InvokeOptions? opts = null)
    public static Output<GetNodeDeviceInfoResult> Invoke(GetNodeDeviceInfoInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNodeDeviceInfoResult> getNodeDeviceInfo(GetNodeDeviceInfoArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: libvirt:index/getNodeDeviceInfo:getNodeDeviceInfo
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
 - The name of the device name as expected by libvirt.
 - Capability
Get
Node Device Info Capability  - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 
- Name string
 - The name of the device name as expected by libvirt.
 - Capability
Get
Node Device Info Capability  - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 
- name String
 - The name of the device name as expected by libvirt.
 - capability
Get
Node Device Info Capability  - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 
- name string
 - The name of the device name as expected by libvirt.
 - capability
Get
Node Device Info Capability  - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 
- name str
 - The name of the device name as expected by libvirt.
 - capability
Get
Node Device Info Capability  - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 
- name String
 - The name of the device name as expected by libvirt.
 - capability Property Map
 - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 
getNodeDeviceInfo Result
The following output properties are available:
- Capability
Get
Node Device Info Capability  - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - Devnodes
List<Get
Node Device Info Devnode>  - For type 
drmholds thepathandlinkthat point to the device - Id string
 - The provider-assigned unique ID for this managed resource.
 - Name string
 - Parent string
 - The parent of this device in the hierarchy
 - Path string
 - Full path of the device
 - Xml string
 - The XML returned by the libvirt API call
 
- Capability
Get
Node Device Info Capability  - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - Devnodes
[]Get
Node Device Info Devnode  - For type 
drmholds thepathandlinkthat point to the device - Id string
 - The provider-assigned unique ID for this managed resource.
 - Name string
 - Parent string
 - The parent of this device in the hierarchy
 - Path string
 - Full path of the device
 - Xml string
 - The XML returned by the libvirt API call
 
- capability
Get
Node Device Info Capability  - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - devnodes
List<Get
Node Device Info Devnode>  - For type 
drmholds thepathandlinkthat point to the device - id String
 - The provider-assigned unique ID for this managed resource.
 - name String
 - parent String
 - The parent of this device in the hierarchy
 - path String
 - Full path of the device
 - xml String
 - The XML returned by the libvirt API call
 
- capability
Get
Node Device Info Capability  - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - devnodes
Get
Node Device Info Devnode[]  - For type 
drmholds thepathandlinkthat point to the device - id string
 - The provider-assigned unique ID for this managed resource.
 - name string
 - parent string
 - The parent of this device in the hierarchy
 - path string
 - Full path of the device
 - xml string
 - The XML returned by the libvirt API call
 
- capability
Get
Node Device Info Capability  - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - devnodes
Sequence[Get
Node Device Info Devnode]  - For type 
drmholds thepathandlinkthat point to the device - id str
 - The provider-assigned unique ID for this managed resource.
 - name str
 - parent str
 - The parent of this device in the hierarchy
 - path str
 - Full path of the device
 - xml str
 - The XML returned by the libvirt API call
 
- capability Property Map
 - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - devnodes List<Property Map>
 - For type 
drmholds thepathandlinkthat point to the device - id String
 - The provider-assigned unique ID for this managed resource.
 - name String
 - parent String
 - The parent of this device in the hierarchy
 - path String
 - Full path of the device
 - xml String
 - The XML returned by the libvirt API call
 
Supporting Types
GetNodeDeviceInfoCapability    
- Block string
 - Block device name
 - Bus string
 - The bus within the host
 - Class string
 - Device class
 - Description string
 - Device string
 - Which device within the \
 - Domain string
 - Device PCI domain
 - Drive
Type string - Device drive type
 - Drm
Type string - Type of DRM device: 
renderorcard - Function string
 - Device PCI function
 - Host string
 - The SCSI host containing the device
 - Iommu
Group GetNode Device Info Capability Iommu Group  - Structure that holds IOMMU Group 
numberand the list of devices that are part of the group - Logical
Block stringSize  - Device logical block size
 - Lun string
 - The lun within the target
 - Model string
 - Device model
 - Num
Blocks string - Number of blocks on the device
 - Number string
 - Device number
 - Protocol string
 - Device protocol
 - Scsi
Type string - The type of SCSI device
 - Serial string
 - Device serial number
 - Size string
 - Device size in bytes
 - Slot string
 - Device PCI slot
 - Subclass string
 - Device subclass
 - Target string
 - The target within the bus
 - Type string
 - Device type: 
pci,storage,usb - Unique
Id string - This optionally provides the value from the 'unique_id' file found in the scsi_host's directory
 - Address string
 - If present, the MAC address of the device
 - Capability Dictionary<string, string>
 - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - Features List<string>
 - Firmware Dictionary<string, string>
 - Hardware Dictionary<string, string>
 - Interface string
 - The interface name tied to this device
 - Link Dictionary<string, string>
 - Optional to reflect the status of the link via 
speedandstatekeys - Product Dictionary<string, string>
 - If present, the product 
idandnamefrom the device ROM - Vendor Dictionary<string, string>
 - If present, the vendor 
idandnamefrom the device ROM 
- Block string
 - Block device name
 - Bus string
 - The bus within the host
 - Class string
 - Device class
 - Description string
 - Device string
 - Which device within the \
 - Domain string
 - Device PCI domain
 - Drive
Type string - Device drive type
 - Drm
Type string - Type of DRM device: 
renderorcard - Function string
 - Device PCI function
 - Host string
 - The SCSI host containing the device
 - Iommu
Group GetNode Device Info Capability Iommu Group  - Structure that holds IOMMU Group 
numberand the list of devices that are part of the group - Logical
Block stringSize  - Device logical block size
 - Lun string
 - The lun within the target
 - Model string
 - Device model
 - Num
Blocks string - Number of blocks on the device
 - Number string
 - Device number
 - Protocol string
 - Device protocol
 - Scsi
Type string - The type of SCSI device
 - Serial string
 - Device serial number
 - Size string
 - Device size in bytes
 - Slot string
 - Device PCI slot
 - Subclass string
 - Device subclass
 - Target string
 - The target within the bus
 - Type string
 - Device type: 
pci,storage,usb - Unique
Id string - This optionally provides the value from the 'unique_id' file found in the scsi_host's directory
 - Address string
 - If present, the MAC address of the device
 - Capability map[string]string
 - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - Features []string
 - Firmware map[string]string
 - Hardware map[string]string
 - Interface string
 - The interface name tied to this device
 - Link map[string]string
 - Optional to reflect the status of the link via 
speedandstatekeys - Product map[string]string
 - If present, the product 
idandnamefrom the device ROM - Vendor map[string]string
 - If present, the vendor 
idandnamefrom the device ROM 
- block String
 - Block device name
 - bus String
 - The bus within the host
 - class_ String
 - Device class
 - description String
 - device String
 - Which device within the \
 - domain String
 - Device PCI domain
 - drive
Type String - Device drive type
 - drm
Type String - Type of DRM device: 
renderorcard - function String
 - Device PCI function
 - host String
 - The SCSI host containing the device
 - iommu
Group GetNode Device Info Capability Iommu Group  - Structure that holds IOMMU Group 
numberand the list of devices that are part of the group - logical
Block StringSize  - Device logical block size
 - lun String
 - The lun within the target
 - model String
 - Device model
 - num
Blocks String - Number of blocks on the device
 - number String
 - Device number
 - protocol String
 - Device protocol
 - scsi
Type String - The type of SCSI device
 - serial String
 - Device serial number
 - size String
 - Device size in bytes
 - slot String
 - Device PCI slot
 - subclass String
 - Device subclass
 - target String
 - The target within the bus
 - type String
 - Device type: 
pci,storage,usb - unique
Id String - This optionally provides the value from the 'unique_id' file found in the scsi_host's directory
 - address String
 - If present, the MAC address of the device
 - capability Map<String,String>
 - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - features List<String>
 - firmware Map<String,String>
 - hardware Map<String,String>
 - interface_ String
 - The interface name tied to this device
 - link Map<String,String>
 - Optional to reflect the status of the link via 
speedandstatekeys - product Map<String,String>
 - If present, the product 
idandnamefrom the device ROM - vendor Map<String,String>
 - If present, the vendor 
idandnamefrom the device ROM 
- block string
 - Block device name
 - bus string
 - The bus within the host
 - class string
 - Device class
 - description string
 - device string
 - Which device within the \
 - domain string
 - Device PCI domain
 - drive
Type string - Device drive type
 - drm
Type string - Type of DRM device: 
renderorcard - function string
 - Device PCI function
 - host string
 - The SCSI host containing the device
 - iommu
Group GetNode Device Info Capability Iommu Group  - Structure that holds IOMMU Group 
numberand the list of devices that are part of the group - logical
Block stringSize  - Device logical block size
 - lun string
 - The lun within the target
 - model string
 - Device model
 - num
Blocks string - Number of blocks on the device
 - number string
 - Device number
 - protocol string
 - Device protocol
 - scsi
Type string - The type of SCSI device
 - serial string
 - Device serial number
 - size string
 - Device size in bytes
 - slot string
 - Device PCI slot
 - subclass string
 - Device subclass
 - target string
 - The target within the bus
 - type string
 - Device type: 
pci,storage,usb - unique
Id string - This optionally provides the value from the 'unique_id' file found in the scsi_host's directory
 - address string
 - If present, the MAC address of the device
 - capability {[key: string]: string}
 - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - features string[]
 - firmware {[key: string]: string}
 - hardware {[key: string]: string}
 - interface string
 - The interface name tied to this device
 - link {[key: string]: string}
 - Optional to reflect the status of the link via 
speedandstatekeys - product {[key: string]: string}
 - If present, the product 
idandnamefrom the device ROM - vendor {[key: string]: string}
 - If present, the vendor 
idandnamefrom the device ROM 
- block str
 - Block device name
 - bus str
 - The bus within the host
 - class_ str
 - Device class
 - description str
 - device str
 - Which device within the \
 - domain str
 - Device PCI domain
 - drive_
type str - Device drive type
 - drm_
type str - Type of DRM device: 
renderorcard - function str
 - Device PCI function
 - host str
 - The SCSI host containing the device
 - iommu_
group GetNode Device Info Capability Iommu Group  - Structure that holds IOMMU Group 
numberand the list of devices that are part of the group - logical_
block_ strsize  - Device logical block size
 - lun str
 - The lun within the target
 - model str
 - Device model
 - num_
blocks str - Number of blocks on the device
 - number str
 - Device number
 - protocol str
 - Device protocol
 - scsi_
type str - The type of SCSI device
 - serial str
 - Device serial number
 - size str
 - Device size in bytes
 - slot str
 - Device PCI slot
 - subclass str
 - Device subclass
 - target str
 - The target within the bus
 - type str
 - Device type: 
pci,storage,usb - unique_
id str - This optionally provides the value from the 'unique_id' file found in the scsi_host's directory
 - address str
 - If present, the MAC address of the device
 - capability Mapping[str, str]
 - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - features Sequence[str]
 - firmware Mapping[str, str]
 - hardware Mapping[str, str]
 - interface str
 - The interface name tied to this device
 - link Mapping[str, str]
 - Optional to reflect the status of the link via 
speedandstatekeys - product Mapping[str, str]
 - If present, the product 
idandnamefrom the device ROM - vendor Mapping[str, str]
 - If present, the vendor 
idandnamefrom the device ROM 
- block String
 - Block device name
 - bus String
 - The bus within the host
 - class String
 - Device class
 - description String
 - device String
 - Which device within the \
 - domain String
 - Device PCI domain
 - drive
Type String - Device drive type
 - drm
Type String - Type of DRM device: 
renderorcard - function String
 - Device PCI function
 - host String
 - The SCSI host containing the device
 - iommu
Group Property Map - Structure that holds IOMMU Group 
numberand the list of devices that are part of the group - logical
Block StringSize  - Device logical block size
 - lun String
 - The lun within the target
 - model String
 - Device model
 - num
Blocks String - Number of blocks on the device
 - number String
 - Device number
 - protocol String
 - Device protocol
 - scsi
Type String - The type of SCSI device
 - serial String
 - Device serial number
 - size String
 - Device size in bytes
 - slot String
 - Device PCI slot
 - subclass String
 - Device subclass
 - target String
 - The target within the bus
 - type String
 - Device type: 
pci,storage,usb - unique
Id String - This optionally provides the value from the 'unique_id' file found in the scsi_host's directory
 - address String
 - If present, the MAC address of the device
 - capability Map<String>
 - Holds key 
typethat describes the type of network interface:80203for IEEE 802.3 or80211for IEEE 802.11 - features List<String>
 - firmware Map<String>
 - hardware Map<String>
 - interface String
 - The interface name tied to this device
 - link Map<String>
 - Optional to reflect the status of the link via 
speedandstatekeys - product Map<String>
 - If present, the product 
idandnamefrom the device ROM - vendor Map<String>
 - If present, the vendor 
idandnamefrom the device ROM 
GetNodeDeviceInfoCapabilityIommuGroup      
GetNodeDeviceInfoDevnode    
Package Details
- Repository
 - libvirt pulumi/pulumi-libvirt
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
libvirtTerraform Provider.