1. Packages
  2. Proxmox Virtual Environment (Proxmox VE)
  3. API Docs
  4. getContainer
Proxmox Virtual Environment (Proxmox VE) v7.0.0 published on Tuesday, Apr 1, 2025 by Daniel Muehlbachler-Pietrzykowski

proxmoxve.getContainer

Explore with Pulumi AI

Proxmox Virtual Environment (Proxmox VE) v7.0.0 published on Tuesday, Apr 1, 2025 by Daniel Muehlbachler-Pietrzykowski

Retrieves information about a specific Container.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as proxmoxve from "@pulumi/proxmoxve";

const testContainer = proxmoxve.getContainer({
    nodeName: "test",
    vmId: 100,
});
Copy
import pulumi
import pulumi_proxmoxve as proxmoxve

test_container = proxmoxve.get_container(node_name="test",
    vm_id=100)
Copy
package main

import (
	"github.com/muhlba91/pulumi-proxmoxve/sdk/v6/go/proxmoxve"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := proxmoxve.GetContainer(ctx, &proxmoxve.GetContainerArgs{
			NodeName: "test",
			VmId:     100,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ProxmoxVE = Pulumi.ProxmoxVE;

return await Deployment.RunAsync(() => 
{
    var testContainer = ProxmoxVE.GetContainer.Invoke(new()
    {
        NodeName = "test",
        VmId = 100,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.proxmoxve.ProxmoxveFunctions;
import com.pulumi.proxmoxve.inputs.GetContainerArgs;
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 testContainer = ProxmoxveFunctions.getContainer(GetContainerArgs.builder()
            .nodeName("test")
            .vmId(100)
            .build());

    }
}
Copy
variables:
  testContainer:
    fn::invoke:
      function: proxmoxve:getContainer
      arguments:
        nodeName: test
        vmId: 100
Copy

Using getContainer

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 getContainer(args: GetContainerArgs, opts?: InvokeOptions): Promise<GetContainerResult>
function getContainerOutput(args: GetContainerOutputArgs, opts?: InvokeOptions): Output<GetContainerResult>
Copy
def get_container(node_name: Optional[str] = None,
                  status: Optional[str] = None,
                  template: Optional[bool] = None,
                  vm_id: Optional[int] = None,
                  opts: Optional[InvokeOptions] = None) -> GetContainerResult
def get_container_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[GetContainerResult]
Copy
func GetContainer(ctx *Context, args *GetContainerArgs, opts ...InvokeOption) (*GetContainerResult, error)
func GetContainerOutput(ctx *Context, args *GetContainerOutputArgs, opts ...InvokeOption) GetContainerResultOutput
Copy

> Note: This function is named GetContainer in the Go SDK.

public static class GetContainer 
{
    public static Task<GetContainerResult> InvokeAsync(GetContainerArgs args, InvokeOptions? opts = null)
    public static Output<GetContainerResult> Invoke(GetContainerInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetContainerResult> getContainer(GetContainerArgs args, InvokeOptions options)
public static Output<GetContainerResult> getContainer(GetContainerArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: proxmoxve:index/getContainer:getContainer
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

NodeName This property is required. string
The node name.
VmId This property is required. int
The container identifier.
Status string
Status of the container
Template bool
Is container a template (true) or a regular container (false)
NodeName This property is required. string
The node name.
VmId This property is required. int
The container identifier.
Status string
Status of the container
Template bool
Is container a template (true) or a regular container (false)
nodeName This property is required. String
The node name.
vmId This property is required. Integer
The container identifier.
status String
Status of the container
template Boolean
Is container a template (true) or a regular container (false)
nodeName This property is required. string
The node name.
vmId This property is required. number
The container identifier.
status string
Status of the container
template boolean
Is container a template (true) or a regular container (false)
node_name This property is required. str
The node name.
vm_id This property is required. int
The container identifier.
status str
Status of the container
template bool
Is container a template (true) or a regular container (false)
nodeName This property is required. String
The node name.
vmId This property is required. Number
The container identifier.
status String
Status of the container
template Boolean
Is container a template (true) or a regular container (false)

getContainer Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Name string
The container name.
NodeName string
Tags List<string>
A list of tags of the container.
VmId int
Status string
Status of the container
Template bool
Is container a template (true) or a regular container (false)
Id string
The provider-assigned unique ID for this managed resource.
Name string
The container name.
NodeName string
Tags []string
A list of tags of the container.
VmId int
Status string
Status of the container
Template bool
Is container a template (true) or a regular container (false)
id String
The provider-assigned unique ID for this managed resource.
name String
The container name.
nodeName String
tags List<String>
A list of tags of the container.
vmId Integer
status String
Status of the container
template Boolean
Is container a template (true) or a regular container (false)
id string
The provider-assigned unique ID for this managed resource.
name string
The container name.
nodeName string
tags string[]
A list of tags of the container.
vmId number
status string
Status of the container
template boolean
Is container a template (true) or a regular container (false)
id str
The provider-assigned unique ID for this managed resource.
name str
The container name.
node_name str
tags Sequence[str]
A list of tags of the container.
vm_id int
status str
Status of the container
template bool
Is container a template (true) or a regular container (false)
id String
The provider-assigned unique ID for this managed resource.
name String
The container name.
nodeName String
tags List<String>
A list of tags of the container.
vmId Number
status String
Status of the container
template Boolean
Is container a template (true) or a regular container (false)

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) v7.0.0 published on Tuesday, Apr 1, 2025 by Daniel Muehlbachler-Pietrzykowski