proxmoxve.Hardware/mapping.Usb
Explore with Pulumi AI
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)
type: proxmoxve:Hardware/mapping/usb:Usb
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. UsbArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. 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
This property is required. string - The unique name of the resource.
- args
This property is required. UsbArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. UsbArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Usb resource accepts the following input properties:
- Maps
This property is required. List<Pulumi.Proxmox VE. Hardware. Mapping. Inputs. Usb 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.
- Maps
This property is required. []UsbMap Type Args - 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
This property is required. 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
This property is required. Sequence[hardware.mapping.Usb Map Args] - 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
This property is required. 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)
resources: _: type: proxmoxve:Hardware/mapping/usb:Usb get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Comment string
- The comment of this USB hardware mapping.
- Maps
List<Pulumi.
Proxmox VE. Hardware. Mapping. Inputs. Usb Map> - 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
[]Usb
Map Type Args - 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<Usb
Map> - 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.
Usb Map Args] - 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
This property is required. string - The ID of the map.
- Node
This property is required. 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
This property is required. string - The ID of the map.
- Node
This property is required. 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
This property is required. String - The ID of the map.
- node
This property is required. 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
This property is required. string - The ID of the map.
- node
This property is required. 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
This property is required. str - The ID of the map.
- node
This property is required. 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
This property is required. String - The ID of the map.
- node
This property is required. 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.