1. Packages
  2. Proxmox Virtual Environment (Proxmox VE)
  3. API Docs
  4. Hardware
  5. Hardware/mapping
  6. Usb
Proxmox Virtual Environment (Proxmox VE) v6.14.0 published on Monday, Sep 9, 2024 by Daniel Muehlbachler-Pietrzykowski

proxmoxve.Hardware/mapping.Usb

Explore with Pulumi AI

proxmoxve logo
Proxmox Virtual Environment (Proxmox VE) v6.14.0 published on Monday, Sep 9, 2024 by Daniel Muehlbachler-Pietrzykowski

    Manages a USB hardware mapping in a Proxmox VE cluster.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
    
    const example = new proxmoxve.hardware.mapping.Usb("example", {
        comment: "This is a comment",
        maps: [{
            comment: "This is a device specific comment",
            id: "8087:0a2b",
            node: "pve",
            path: "1-8.2",
        }],
    });
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    
    example = proxmoxve.hardware.mapping.Usb("example",
        comment="This is a comment",
        maps=[{
            "comment": "This is a device specific comment",
            "id": "8087:0a2b",
            "node": "pve",
            "path": "1-8.2",
        }])
    
    package main
    
    import (
    	"github.com/muhlba91/pulumi-proxmoxve/sdk/v6/go/proxmoxve/Hardware"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Hardware.NewUsb(ctx, "example", &Hardware.UsbArgs{
    			Comment: pulumi.String("This is a comment"),
    			Maps: mapping.UsbMapTypeArray{
    				&mapping.UsbMapTypeArgs{
    					Comment: pulumi.String("This is a device specific comment"),
    					Id:      pulumi.String("8087:0a2b"),
    					Node:    pulumi.String("pve"),
    					Path:    pulumi.String("1-8.2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ProxmoxVE = Pulumi.ProxmoxVE;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new ProxmoxVE.Hardware.Mapping.Usb("example", new()
        {
            Comment = "This is a comment",
            Maps = new[]
            {
                new ProxmoxVE.Hardware.Mapping.Inputs.UsbMapArgs
                {
                    Comment = "This is a device specific comment",
                    Id = "8087:0a2b",
                    Node = "pve",
                    Path = "1-8.2",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.proxmoxve.Hardware.Usb;
    import com.pulumi.proxmoxve.Hardware.UsbArgs;
    import com.pulumi.proxmoxve.Hardware.inputs.UsbMapArgs;
    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) {
            var example = new Usb("example", UsbArgs.builder()
                .comment("This is a comment")
                .maps(UsbMapArgs.builder()
                    .comment("This is a device specific comment")
                    .id("8087:0a2b")
                    .node("pve")
                    .path("1-8.2")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: proxmoxve:Hardware/mapping:Usb
        properties:
          comment: This is a comment
          # The actual map of devices.
          maps:
            - comment: This is a device specific comment
              id: 8087:0a2b
              node: pve
              path: 1-8.2
    

    Create Usb Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Usb(name: string, args: UsbArgs, opts?: CustomResourceOptions);
    @overload
    def Usb(resource_name: str,
            args: UsbArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Usb(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            maps: Optional[Sequence[_hardware.mapping.UsbMapArgs]] = None,
            comment: Optional[str] = None,
            name: Optional[str] = None)
    func NewUsb(ctx *Context, name string, args UsbArgs, opts ...ResourceOption) (*Usb, error)
    public Usb(string name, UsbArgs args, CustomResourceOptions? opts = null)
    public Usb(String name, UsbArgs args)
    public Usb(String name, UsbArgs args, CustomResourceOptions options)
    
    type: proxmoxve:Hardware/mapping/usb:Usb
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args UsbArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args UsbArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args UsbArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UsbArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UsbArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Usb Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Usb resource accepts the following input properties:

    Maps List<Pulumi.ProxmoxVE.Hardware.Mapping.Inputs.UsbMap>
    The actual map of devices for the hardware mapping.
    Comment string
    The comment of this USB hardware mapping.
    Name string
    The name of this hardware mapping.
    Maps []UsbMapTypeArgs
    The actual map of devices for the hardware mapping.
    Comment string
    The comment of this USB hardware mapping.
    Name string
    The name of this hardware mapping.
    maps List<UsbMap>
    The actual map of devices for the hardware mapping.
    comment String
    The comment of this USB hardware mapping.
    name String
    The name of this hardware mapping.
    maps UsbMap[]
    The actual map of devices for the hardware mapping.
    comment string
    The comment of this USB hardware mapping.
    name string
    The name of this hardware mapping.
    maps Sequence[hardware.mapping.UsbMapArgs]
    The actual map of devices for the hardware mapping.
    comment str
    The comment of this USB hardware mapping.
    name str
    The name of this hardware mapping.
    maps List<Property Map>
    The actual map of devices for the hardware mapping.
    comment String
    The comment of this USB hardware mapping.
    name String
    The name of this hardware mapping.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Usb resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Usb Resource

    Get an existing Usb resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: UsbState, opts?: CustomResourceOptions): Usb
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comment: Optional[str] = None,
            maps: Optional[Sequence[_hardware.mapping.UsbMapArgs]] = None,
            name: Optional[str] = None) -> Usb
    func GetUsb(ctx *Context, name string, id IDInput, state *UsbState, opts ...ResourceOption) (*Usb, error)
    public static Usb Get(string name, Input<string> id, UsbState? state, CustomResourceOptions? opts = null)
    public static Usb get(String name, Output<String> id, UsbState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Comment string
    The comment of this USB hardware mapping.
    Maps List<Pulumi.ProxmoxVE.Hardware.Mapping.Inputs.UsbMap>
    The actual map of devices for the hardware mapping.
    Name string
    The name of this hardware mapping.
    Comment string
    The comment of this USB hardware mapping.
    Maps []UsbMapTypeArgs
    The actual map of devices for the hardware mapping.
    Name string
    The name of this hardware mapping.
    comment String
    The comment of this USB hardware mapping.
    maps List<UsbMap>
    The actual map of devices for the hardware mapping.
    name String
    The name of this hardware mapping.
    comment string
    The comment of this USB hardware mapping.
    maps UsbMap[]
    The actual map of devices for the hardware mapping.
    name string
    The name of this hardware mapping.
    comment str
    The comment of this USB hardware mapping.
    maps Sequence[hardware.mapping.UsbMapArgs]
    The actual map of devices for the hardware mapping.
    name str
    The name of this hardware mapping.
    comment String
    The comment of this USB hardware mapping.
    maps List<Property Map>
    The actual map of devices for the hardware mapping.
    name String
    The name of this hardware mapping.

    Supporting Types

    UsbMap, UsbMapArgs

    Id string
    The ID of the map.
    Node string
    The node name of the map.
    Comment string
    The comment of the mapped USB device.
    Path string
    The path of the map. For hardware mappings of type USB the path is optional and indicates that the device is mapped through the device ID instead of ports.
    Id string
    The ID of the map.
    Node string
    The node name of the map.
    Comment string
    The comment of the mapped USB device.
    Path string
    The path of the map. For hardware mappings of type USB the path is optional and indicates that the device is mapped through the device ID instead of ports.
    id String
    The ID of the map.
    node String
    The node name of the map.
    comment String
    The comment of the mapped USB device.
    path String
    The path of the map. For hardware mappings of type USB the path is optional and indicates that the device is mapped through the device ID instead of ports.
    id string
    The ID of the map.
    node string
    The node name of the map.
    comment string
    The comment of the mapped USB device.
    path string
    The path of the map. For hardware mappings of type USB the path is optional and indicates that the device is mapped through the device ID instead of ports.
    id str
    The ID of the map.
    node str
    The node name of the map.
    comment str
    The comment of the mapped USB device.
    path str
    The path of the map. For hardware mappings of type USB the path is optional and indicates that the device is mapped through the device ID instead of ports.
    id String
    The ID of the map.
    node String
    The node name of the map.
    comment String
    The comment of the mapped USB device.
    path String
    The path of the map. For hardware mappings of type USB the path is optional and indicates that the device is mapped through the device ID instead of ports.

    Import

    #!/usr/bin/env sh

    A USB hardware mapping can be imported using their name, e.g.:

    $ pulumi import proxmoxve:Hardware/mapping/usb:Usb example example
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    proxmoxve muhlba91/pulumi-proxmoxve
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the proxmox Terraform Provider.
    proxmoxve logo
    Proxmox Virtual Environment (Proxmox VE) v6.14.0 published on Monday, Sep 9, 2024 by Daniel Muehlbachler-Pietrzykowski