1. Packages
  2. libvirt
  3. API Docs
  4. getNodeDeviceInfo
libvirt v0.5.0 published on Wednesday, Sep 25, 2024 by Pulumi

libvirt.getNodeDeviceInfo

Explore with Pulumi AI

libvirt logo
libvirt v0.5.0 published on Wednesday, Sep 25, 2024 by Pulumi

    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 dictionary

    The following arguments are supported:

    Name string
    The name of the device name as expected by libvirt.
    Capability GetNodeDeviceInfoCapability
    Holds key type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11
    Name string
    The name of the device name as expected by libvirt.
    Capability GetNodeDeviceInfoCapability
    Holds key type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11
    name String
    The name of the device name as expected by libvirt.
    capability GetNodeDeviceInfoCapability
    Holds key type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11
    name string
    The name of the device name as expected by libvirt.
    capability GetNodeDeviceInfoCapability
    Holds key type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11
    name str
    The name of the device name as expected by libvirt.
    capability GetNodeDeviceInfoCapability
    Holds key type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11
    name String
    The name of the device name as expected by libvirt.
    capability Property Map
    Holds key type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11

    getNodeDeviceInfo Result

    The following output properties are available:

    Capability GetNodeDeviceInfoCapability
    Holds key type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11
    Devnodes List<GetNodeDeviceInfoDevnode>
    For type drm holds the path and link that 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 GetNodeDeviceInfoCapability
    Holds key type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11
    Devnodes []GetNodeDeviceInfoDevnode
    For type drm holds the path and link that 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 GetNodeDeviceInfoCapability
    Holds key type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11
    devnodes List<GetNodeDeviceInfoDevnode>
    For type drm holds the path and link that 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 GetNodeDeviceInfoCapability
    Holds key type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11
    devnodes GetNodeDeviceInfoDevnode[]
    For type drm holds the path and link that 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 GetNodeDeviceInfoCapability
    Holds key type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11
    devnodes Sequence[GetNodeDeviceInfoDevnode]
    For type drm holds the path and link that 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 type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for IEEE 802.11
    devnodes List<Property Map>
    For type drm holds the path and link that 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
    DriveType string
    Device drive type
    DrmType string
    Type of DRM device: render or card
    Function string
    Device PCI function
    Host string
    The SCSI host containing the device
    IommuGroup GetNodeDeviceInfoCapabilityIommuGroup
    Structure that holds IOMMU Group number and the list of devices that are part of the group
    LogicalBlockSize string
    Device logical block size
    Lun string
    The lun within the target
    Model string
    Device model
    NumBlocks string
    Number of blocks on the device
    Number string
    Device number
    Protocol string
    Device protocol
    ScsiType 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
    UniqueId 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 type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for 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 speed and state keys
    Product Dictionary<string, string>
    If present, the product id and name from the device ROM
    Vendor Dictionary<string, string>
    If present, the vendor id and name from 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
    DriveType string
    Device drive type
    DrmType string
    Type of DRM device: render or card
    Function string
    Device PCI function
    Host string
    The SCSI host containing the device
    IommuGroup GetNodeDeviceInfoCapabilityIommuGroup
    Structure that holds IOMMU Group number and the list of devices that are part of the group
    LogicalBlockSize string
    Device logical block size
    Lun string
    The lun within the target
    Model string
    Device model
    NumBlocks string
    Number of blocks on the device
    Number string
    Device number
    Protocol string
    Device protocol
    ScsiType 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
    UniqueId 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 type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for 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 speed and state keys
    Product map[string]string
    If present, the product id and name from the device ROM
    Vendor map[string]string
    If present, the vendor id and name from 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
    driveType String
    Device drive type
    drmType String
    Type of DRM device: render or card
    function String
    Device PCI function
    host String
    The SCSI host containing the device
    iommuGroup GetNodeDeviceInfoCapabilityIommuGroup
    Structure that holds IOMMU Group number and the list of devices that are part of the group
    logicalBlockSize String
    Device logical block size
    lun String
    The lun within the target
    model String
    Device model
    numBlocks String
    Number of blocks on the device
    number String
    Device number
    protocol String
    Device protocol
    scsiType 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
    uniqueId 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 type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for 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 speed and state keys
    product Map<String,String>
    If present, the product id and name from the device ROM
    vendor Map<String,String>
    If present, the vendor id and name from 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
    driveType string
    Device drive type
    drmType string
    Type of DRM device: render or card
    function string
    Device PCI function
    host string
    The SCSI host containing the device
    iommuGroup GetNodeDeviceInfoCapabilityIommuGroup
    Structure that holds IOMMU Group number and the list of devices that are part of the group
    logicalBlockSize string
    Device logical block size
    lun string
    The lun within the target
    model string
    Device model
    numBlocks string
    Number of blocks on the device
    number string
    Device number
    protocol string
    Device protocol
    scsiType 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
    uniqueId 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 type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for 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 speed and state keys
    product {[key: string]: string}
    If present, the product id and name from the device ROM
    vendor {[key: string]: string}
    If present, the vendor id and name from 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: render or card
    function str
    Device PCI function
    host str
    The SCSI host containing the device
    iommu_group GetNodeDeviceInfoCapabilityIommuGroup
    Structure that holds IOMMU Group number and the list of devices that are part of the group
    logical_block_size str
    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 type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for 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 speed and state keys
    product Mapping[str, str]
    If present, the product id and name from the device ROM
    vendor Mapping[str, str]
    If present, the vendor id and name from 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
    driveType String
    Device drive type
    drmType String
    Type of DRM device: render or card
    function String
    Device PCI function
    host String
    The SCSI host containing the device
    iommuGroup Property Map
    Structure that holds IOMMU Group number and the list of devices that are part of the group
    logicalBlockSize String
    Device logical block size
    lun String
    The lun within the target
    model String
    Device model
    numBlocks String
    Number of blocks on the device
    number String
    Device number
    protocol String
    Device protocol
    scsiType 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
    uniqueId 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 type that describes the type of network interface: 80203 for IEEE 802.3 or 80211 for 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 speed and state keys
    product Map<String>
    If present, the product id and name from the device ROM
    vendor Map<String>
    If present, the vendor id and name from the device ROM

    GetNodeDeviceInfoCapabilityIommuGroup

    Addresses List<ImmutableDictionary<string, string>>
    Number string
    Device number
    Addresses []map[string]string
    Number string
    Device number
    addresses List<Map<String,String>>
    number String
    Device number
    addresses {[key: string]: string}[]
    number string
    Device number
    addresses Sequence[Mapping[str, str]]
    number str
    Device number
    addresses List<Map<String>>
    number String
    Device number

    GetNodeDeviceInfoDevnode

    Path string
    Full path of the device
    Type string
    Device type: pci, storage, usb
    Path string
    Full path of the device
    Type string
    Device type: pci, storage, usb
    path String
    Full path of the device
    type String
    Device type: pci, storage, usb
    path string
    Full path of the device
    type string
    Device type: pci, storage, usb
    path str
    Full path of the device
    type str
    Device type: pci, storage, usb
    path String
    Full path of the device
    type String
    Device type: pci, storage, usb

    Package Details

    Repository
    libvirt pulumi/pulumi-libvirt
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the libvirt Terraform Provider.
    libvirt logo
    libvirt v0.5.0 published on Wednesday, Sep 25, 2024 by Pulumi