Proxmox Virtual Environment (Proxmox VE) v6.15.3 published on Monday, Nov 11, 2024 by Daniel Muehlbachler-Pietrzykowski
proxmoxve.VM.getVirtualMachine
Explore with Pulumi AI
Proxmox Virtual Environment (Proxmox VE) v6.15.3 published on Monday, Nov 11, 2024 by Daniel Muehlbachler-Pietrzykowski
Retrieves information about a specific VM.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as proxmoxve from "@pulumi/proxmoxve";
const testVm = proxmoxve.VM.getVirtualMachine({
nodeName: "test",
vmId: 100,
});
import pulumi
import pulumi_proxmoxve as proxmoxve
test_vm = proxmoxve.VM.get_virtual_machine(node_name="test",
vm_id=100)
package main
import (
"github.com/muhlba91/pulumi-proxmoxve/sdk/v6/go/proxmoxve/VM"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := VM.GetVirtualMachine(ctx, &vm.GetVirtualMachineArgs{
NodeName: "test",
VmId: 100,
}, nil)
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 testVm = ProxmoxVE.VM.GetVirtualMachine.Invoke(new()
{
NodeName = "test",
VmId = 100,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.proxmoxve.VM.VMFunctions;
import com.pulumi.proxmoxve.VM.inputs.GetVirtualMachineArgs;
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 testVm = VMFunctions.getVirtualMachine(GetVirtualMachineArgs.builder()
.nodeName("test")
.vmId(100)
.build());
}
}
variables:
testVm:
fn::invoke:
Function: proxmoxve:VM:getVirtualMachine
Arguments:
nodeName: test
vmId: 100
Using getVirtualMachine
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 getVirtualMachine(args: GetVirtualMachineArgs, opts?: InvokeOptions): Promise<GetVirtualMachineResult>
function getVirtualMachineOutput(args: GetVirtualMachineOutputArgs, opts?: InvokeOptions): Output<GetVirtualMachineResult>
def get_virtual_machine(node_name: Optional[str] = None,
status: Optional[str] = None,
template: Optional[bool] = None,
vm_id: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetVirtualMachineResult
def get_virtual_machine_output(node_name: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
template: Optional[pulumi.Input[bool]] = None,
vm_id: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVirtualMachineResult]
func GetVirtualMachine(ctx *Context, args *GetVirtualMachineArgs, opts ...InvokeOption) (*GetVirtualMachineResult, error)
func GetVirtualMachineOutput(ctx *Context, args *GetVirtualMachineOutputArgs, opts ...InvokeOption) GetVirtualMachineResultOutput
> Note: This function is named GetVirtualMachine
in the Go SDK.
public static class GetVirtualMachine
{
public static Task<GetVirtualMachineResult> InvokeAsync(GetVirtualMachineArgs args, InvokeOptions? opts = null)
public static Output<GetVirtualMachineResult> Invoke(GetVirtualMachineInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVirtualMachineResult> getVirtualMachine(GetVirtualMachineArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: proxmoxve:VM/getVirtualMachine:getVirtualMachine
arguments:
# arguments dictionary
The following arguments are supported:
getVirtualMachine Result
The following output properties are available:
Package Details
- Repository
- proxmoxve muhlba91/pulumi-proxmoxve
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
proxmox
Terraform Provider.
Proxmox Virtual Environment (Proxmox VE) v6.15.3 published on Monday, Nov 11, 2024 by Daniel Muehlbachler-Pietrzykowski