Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.2.1
published on Wednesday, May 20, 2026 by Daniel Muehlbachler-Pietrzykowski
published on Wednesday, May 20, 2026 by Daniel Muehlbachler-Pietrzykowski
Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.2.1
published on Wednesday, May 20, 2026 by Daniel Muehlbachler-Pietrzykowski
published on Wednesday, May 20, 2026 by Daniel Muehlbachler-Pietrzykowski
Retrieves a list of files available in a datastore on a specific Proxmox VE node.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
import * as std from "@pulumi/std";
export = async () => {
const isoFiles = await proxmoxve.getFiles({
nodeName: "pve",
datastoreId: "local",
contentType: "iso",
});
const imageExists = (await std.anytrue({
input: .map(f => (f.fileName == "noble-server-cloudimg-amd64.img")),
})).result;
// Only download if the image doesn't already exist
const ubuntuNoble: proxmoxve.download.FileLegacy[] = [];
for (const range = {value: 0}; range.value < (imageExists ? 0 : 1); range.value++) {
ubuntuNoble.push(new proxmoxve.download.FileLegacy(`ubuntu_noble-${range.value}`, {
datastoreId: "local",
nodeName: "pve",
contentType: "iso",
url: "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img",
}));
}
// List all files without filtering
const allFiles = await proxmoxve.getFiles({
nodeName: "pve",
datastoreId: "local",
});
return {
isoFileCount: isoFiles.files.length,
allFileNames: .map(f => (f.fileName)),
};
}
import pulumi
from typing import Any
import pulumi_proxmoxve as proxmoxve
import pulumi_std as std
iso_files = proxmoxve.get_files(node_name="pve",
datastore_id="local",
content_type="iso")
image_exists = std.anytrue(input=[f.file_name == "noble-server-cloudimg-amd64.img" for f in iso_files.files]).result
# Only download if the image doesn't already exist
ubuntu_noble: list[Any] = []
for range in [{"value": i} for i in range(0, 0 if image_exists else 1)]:
ubuntu_noble.append(proxmoxve.download.FileLegacy(f"ubuntu_noble-{range['value']}",
datastore_id="local",
node_name="pve",
content_type="iso",
url="https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img"))
# List all files without filtering
all_files = proxmoxve.get_files(node_name="pve",
datastore_id="local")
pulumi.export("isoFileCount", len(iso_files.files))
pulumi.export("allFileNames", [f.file_name for f in all_files.files])
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Pulumi;
using ProxmoxVE = Pulumi.ProxmoxVE;
using Std = Pulumi.Std;
return await Deployment.RunAsync(async() =>
{
var isoFiles = await ProxmoxVE.GetFiles.InvokeAsync(new()
{
NodeName = "pve",
DatastoreId = "local",
ContentType = "iso",
});
var imageExists = (await Std.Anytrue.InvokeAsync(new()
{
Input = ,
})).Result;
// Only download if the image doesn't already exist
var ubuntuNoble = new List<ProxmoxVE.Download.FileLegacy>();
for (var rangeIndex = 0; rangeIndex < imageExists ? 0 : 1; rangeIndex++)
{
var range = new { Value = rangeIndex };
ubuntuNoble.Add(new ProxmoxVE.Download.FileLegacy($"ubuntu_noble-{range.Value}", new()
{
DatastoreId = "local",
NodeName = "pve",
ContentType = "iso",
Url = "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img",
}));
}
// List all files without filtering
var allFiles = await ProxmoxVE.GetFiles.InvokeAsync(new()
{
NodeName = "pve",
DatastoreId = "local",
});
return new Dictionary<string, object?>
{
["isoFileCount"] = isoFiles.Files.Length,
["allFileNames"] = ,
};
});
Example coming soon!
Example coming soon!
Example coming soon!
Using getFiles
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 getFiles(args: GetFilesArgs, opts?: InvokeOptions): Promise<GetFilesResult>
function getFilesOutput(args: GetFilesOutputArgs, opts?: InvokeOptions): Output<GetFilesResult>def get_files(content_type: Optional[str] = None,
datastore_id: Optional[str] = None,
file_name_regex: Optional[str] = None,
node_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFilesResult
def get_files_output(content_type: pulumi.Input[Optional[str]] = None,
datastore_id: pulumi.Input[Optional[str]] = None,
file_name_regex: pulumi.Input[Optional[str]] = None,
node_name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFilesResult]func GetFiles(ctx *Context, args *GetFilesArgs, opts ...InvokeOption) (*GetFilesResult, error)
func GetFilesOutput(ctx *Context, args *GetFilesOutputArgs, opts ...InvokeOption) GetFilesResultOutput> Note: This function is named GetFiles in the Go SDK.
public static class GetFiles
{
public static Task<GetFilesResult> InvokeAsync(GetFilesArgs args, InvokeOptions? opts = null)
public static Output<GetFilesResult> Invoke(GetFilesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFilesResult> getFiles(GetFilesArgs args, InvokeOptions options)
public static Output<GetFilesResult> getFiles(GetFilesArgs args, InvokeOptions options)
fn::invoke:
function: proxmoxve:index/getFiles:getFiles
arguments:
# arguments dictionarydata "proxmoxve_getfiles" "name" {
# arguments
}The following arguments are supported:
- Datastore
Id string - The identifier of the datastore.
- Node
Name string - The name of the node.
- Content
Type string - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - File
Name stringRegex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- Datastore
Id string - The identifier of the datastore.
- Node
Name string - The name of the node.
- Content
Type string - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - File
Name stringRegex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- datastore_
id string - The identifier of the datastore.
- node_
name string - The name of the node.
- content_
type string - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - file_
name_ stringregex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- datastore
Id String - The identifier of the datastore.
- node
Name String - The name of the node.
- content
Type String - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - file
Name StringRegex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- datastore
Id string - The identifier of the datastore.
- node
Name string - The name of the node.
- content
Type string - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - file
Name stringRegex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- datastore_
id str - The identifier of the datastore.
- node_
name str - The name of the node.
- content_
type str - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - file_
name_ strregex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- datastore
Id String - The identifier of the datastore.
- node
Name String - The name of the node.
- content
Type String - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - file
Name StringRegex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
getFiles Result
The following output properties are available:
- Datastore
Id string - The identifier of the datastore.
- Files
List<Pulumi.
Proxmox VE. Outputs. Get Files File> - The list of files in the datastore.
- Id string
- The provider-assigned unique ID for this managed resource.
- Node
Name string - The name of the node.
- Content
Type string - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - File
Name stringRegex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- Datastore
Id string - The identifier of the datastore.
- Files
[]Get
Files File - The list of files in the datastore.
- Id string
- The provider-assigned unique ID for this managed resource.
- Node
Name string - The name of the node.
- Content
Type string - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - File
Name stringRegex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- datastore_
id string - The identifier of the datastore.
- files list(object)
- The list of files in the datastore.
- id string
- The provider-assigned unique ID for this managed resource.
- node_
name string - The name of the node.
- content_
type string - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - file_
name_ stringregex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- datastore
Id String - The identifier of the datastore.
- files
List<Get
Files File> - The list of files in the datastore.
- id String
- The provider-assigned unique ID for this managed resource.
- node
Name String - The name of the node.
- content
Type String - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - file
Name StringRegex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- datastore
Id string - The identifier of the datastore.
- files
Get
Files File[] - The list of files in the datastore.
- id string
- The provider-assigned unique ID for this managed resource.
- node
Name string - The name of the node.
- content
Type string - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - file
Name stringRegex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- datastore_
id str - The identifier of the datastore.
- files
Sequence[Get
Files File] - The list of files in the datastore.
- id str
- The provider-assigned unique ID for this managed resource.
- node_
name str - The name of the node.
- content_
type str - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - file_
name_ strregex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
- datastore
Id String - The identifier of the datastore.
- files List<Property Map>
- The list of files in the datastore.
- id String
- The provider-assigned unique ID for this managed resource.
- node
Name String - The name of the node.
- content
Type String - The content type to filter by. When set, only files of this type are returned. Valid values are
backup,images,import,iso,rootdir,snippets,vztmpl. - file
Name StringRegex - A regular expression to filter files by name. When set, only files whose name matches the expression are returned.
Supporting Types
GetFilesFile
- Content
Type string - The content type of the file.
- File
Format string - The format of the file.
- File
Name string - The name of the file.
- File
Size int - The size of the file in bytes.
- Id string
- The unique identifier of the file (volume ID), e.g.
local:iso/ubuntu.iso. - Vmid int
- The VM ID associated with the file, if applicable.
- Content
Type string - The content type of the file.
- File
Format string - The format of the file.
- File
Name string - The name of the file.
- File
Size int - The size of the file in bytes.
- Id string
- The unique identifier of the file (volume ID), e.g.
local:iso/ubuntu.iso. - Vmid int
- The VM ID associated with the file, if applicable.
- content_
type string - The content type of the file.
- file_
format string - The format of the file.
- file_
name string - The name of the file.
- file_
size number - The size of the file in bytes.
- id string
- The unique identifier of the file (volume ID), e.g.
local:iso/ubuntu.iso. - vmid number
- The VM ID associated with the file, if applicable.
- content
Type String - The content type of the file.
- file
Format String - The format of the file.
- file
Name String - The name of the file.
- file
Size Integer - The size of the file in bytes.
- id String
- The unique identifier of the file (volume ID), e.g.
local:iso/ubuntu.iso. - vmid Integer
- The VM ID associated with the file, if applicable.
- content
Type string - The content type of the file.
- file
Format string - The format of the file.
- file
Name string - The name of the file.
- file
Size number - The size of the file in bytes.
- id string
- The unique identifier of the file (volume ID), e.g.
local:iso/ubuntu.iso. - vmid number
- The VM ID associated with the file, if applicable.
- content_
type str - The content type of the file.
- file_
format str - The format of the file.
- file_
name str - The name of the file.
- file_
size int - The size of the file in bytes.
- id str
- The unique identifier of the file (volume ID), e.g.
local:iso/ubuntu.iso. - vmid int
- The VM ID associated with the file, if applicable.
- content
Type String - The content type of the file.
- file
Format String - The format of the file.
- file
Name String - The name of the file.
- file
Size Number - The size of the file in bytes.
- id String
- The unique identifier of the file (volume ID), e.g.
local:iso/ubuntu.iso. - vmid Number
- The VM ID associated with the file, if applicable.
Package Details
- Repository
- proxmoxve muhlba91/pulumi-proxmoxve
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
proxmoxTerraform Provider.
Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.2.1
published on Wednesday, May 20, 2026 by Daniel Muehlbachler-Pietrzykowski
published on Wednesday, May 20, 2026 by Daniel Muehlbachler-Pietrzykowski