Viewing docs for Hetzner Cloud v1.32.1
published on Tuesday, Feb 17, 2026 by Pulumi
published on Tuesday, Feb 17, 2026 by Pulumi
Viewing docs for Hetzner Cloud v1.32.1
published on Tuesday, Feb 17, 2026 by Pulumi
published on Tuesday, Feb 17, 2026 by Pulumi
Provides a list of Hetzner Storage Box Snapshots.
See the Storage Box Snapshots API documentation for more details.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const config = new pulumi.Config();
const storageBoxId = config.requireObject<any>("storageBoxId");
const all = hcloud.getStorageBoxSnapshots({
storageBoxId: storageBoxId,
});
const byLabelSelector = hcloud.getStorageBoxSnapshots({
storageBoxId: storageBoxId,
withSelector: "env=production",
});
import pulumi
import pulumi_hcloud as hcloud
config = pulumi.Config()
storage_box_id = config.require_object("storageBoxId")
all = hcloud.get_storage_box_snapshots(storage_box_id=storage_box_id)
by_label_selector = hcloud.get_storage_box_snapshots(storage_box_id=storage_box_id,
with_selector="env=production")
package main
import (
"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
storageBoxId := cfg.RequireObject("storageBoxId")
_, err := hcloud.GetStorageBoxSnapshots(ctx, &hcloud.GetStorageBoxSnapshotsArgs{
StorageBoxId: storageBoxId,
}, nil)
if err != nil {
return err
}
_, err = hcloud.GetStorageBoxSnapshots(ctx, &hcloud.GetStorageBoxSnapshotsArgs{
StorageBoxId: storageBoxId,
WithSelector: pulumi.StringRef("env=production"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using HCloud = Pulumi.HCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var storageBoxId = config.RequireObject<dynamic>("storageBoxId");
var all = HCloud.GetStorageBoxSnapshots.Invoke(new()
{
StorageBoxId = storageBoxId,
});
var byLabelSelector = HCloud.GetStorageBoxSnapshots.Invoke(new()
{
StorageBoxId = storageBoxId,
WithSelector = "env=production",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hcloud.HcloudFunctions;
import com.pulumi.hcloud.inputs.GetStorageBoxSnapshotsArgs;
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 config = ctx.config();
final var storageBoxId = config.get("storageBoxId");
final var all = HcloudFunctions.getStorageBoxSnapshots(GetStorageBoxSnapshotsArgs.builder()
.storageBoxId(storageBoxId)
.build());
final var byLabelSelector = HcloudFunctions.getStorageBoxSnapshots(GetStorageBoxSnapshotsArgs.builder()
.storageBoxId(storageBoxId)
.withSelector("env=production")
.build());
}
}
configuration:
storageBoxId:
type: dynamic
variables:
all:
fn::invoke:
function: hcloud:getStorageBoxSnapshots
arguments:
storageBoxId: ${storageBoxId}
byLabelSelector:
fn::invoke:
function: hcloud:getStorageBoxSnapshots
arguments:
storageBoxId: ${storageBoxId}
withSelector: env=production
Using getStorageBoxSnapshots
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 getStorageBoxSnapshots(args: GetStorageBoxSnapshotsArgs, opts?: InvokeOptions): Promise<GetStorageBoxSnapshotsResult>
function getStorageBoxSnapshotsOutput(args: GetStorageBoxSnapshotsOutputArgs, opts?: InvokeOptions): Output<GetStorageBoxSnapshotsResult>def get_storage_box_snapshots(storage_box_id: Optional[int] = None,
with_selector: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetStorageBoxSnapshotsResult
def get_storage_box_snapshots_output(storage_box_id: Optional[pulumi.Input[int]] = None,
with_selector: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetStorageBoxSnapshotsResult]func GetStorageBoxSnapshots(ctx *Context, args *GetStorageBoxSnapshotsArgs, opts ...InvokeOption) (*GetStorageBoxSnapshotsResult, error)
func GetStorageBoxSnapshotsOutput(ctx *Context, args *GetStorageBoxSnapshotsOutputArgs, opts ...InvokeOption) GetStorageBoxSnapshotsResultOutput> Note: This function is named GetStorageBoxSnapshots in the Go SDK.
public static class GetStorageBoxSnapshots
{
public static Task<GetStorageBoxSnapshotsResult> InvokeAsync(GetStorageBoxSnapshotsArgs args, InvokeOptions? opts = null)
public static Output<GetStorageBoxSnapshotsResult> Invoke(GetStorageBoxSnapshotsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetStorageBoxSnapshotsResult> getStorageBoxSnapshots(GetStorageBoxSnapshotsArgs args, InvokeOptions options)
public static Output<GetStorageBoxSnapshotsResult> getStorageBoxSnapshots(GetStorageBoxSnapshotsArgs args, InvokeOptions options)
fn::invoke:
function: hcloud:index/getStorageBoxSnapshots:getStorageBoxSnapshots
arguments:
# arguments dictionaryThe following arguments are supported:
- Storage
Box intId - ID of the Storage Box.
- With
Selector string - Filter results using a Label Selector
- Storage
Box intId - ID of the Storage Box.
- With
Selector string - Filter results using a Label Selector
- storage
Box IntegerId - ID of the Storage Box.
- with
Selector String - Filter results using a Label Selector
- storage
Box numberId - ID of the Storage Box.
- with
Selector string - Filter results using a Label Selector
- storage_
box_ intid - ID of the Storage Box.
- with_
selector str - Filter results using a Label Selector
- storage
Box NumberId - ID of the Storage Box.
- with
Selector String - Filter results using a Label Selector
getStorageBoxSnapshots Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Snapshots
List<Pulumi.
HCloud. Outputs. Get Storage Box Snapshots Snapshot> - Storage
Box intId - ID of the Storage Box.
- With
Selector string - Filter results using a Label Selector
- Id string
- The provider-assigned unique ID for this managed resource.
- Snapshots
[]Get
Storage Box Snapshots Snapshot - Storage
Box intId - ID of the Storage Box.
- With
Selector string - Filter results using a Label Selector
- id String
- The provider-assigned unique ID for this managed resource.
- snapshots
List<Get
Storage Box Snapshots Snapshot> - storage
Box IntegerId - ID of the Storage Box.
- with
Selector String - Filter results using a Label Selector
- id string
- The provider-assigned unique ID for this managed resource.
- snapshots
Get
Storage Box Snapshots Snapshot[] - storage
Box numberId - ID of the Storage Box.
- with
Selector string - Filter results using a Label Selector
- id str
- The provider-assigned unique ID for this managed resource.
- snapshots
Sequence[Get
Storage Box Snapshots Snapshot] - storage_
box_ intid - ID of the Storage Box.
- with_
selector str - Filter results using a Label Selector
- id String
- The provider-assigned unique ID for this managed resource.
- snapshots List<Property Map>
- storage
Box NumberId - ID of the Storage Box.
- with
Selector String - Filter results using a Label Selector
Supporting Types
GetStorageBoxSnapshotsSnapshot
- Description string
- Description of the Storage Box Snapshot.
- Id int
- ID of the Storage Box Snapshot.
- Is
Automatic bool - Whether the Storage Box Snapshot was created automatically.
- Labels Dictionary<string, string>
- User-defined labels (key-value pairs) for the resource.
- Name string
- Name of the Storage Box Snapshot.
- Stats
Pulumi.
HCloud. Inputs. Get Storage Box Snapshots Snapshot Stats - Statistics of the Storage Box Snapshot.
- Storage
Box intId - ID of the Storage Box.
- Description string
- Description of the Storage Box Snapshot.
- Id int
- ID of the Storage Box Snapshot.
- Is
Automatic bool - Whether the Storage Box Snapshot was created automatically.
- Labels map[string]string
- User-defined labels (key-value pairs) for the resource.
- Name string
- Name of the Storage Box Snapshot.
- Stats
Get
Storage Box Snapshots Snapshot Stats - Statistics of the Storage Box Snapshot.
- Storage
Box intId - ID of the Storage Box.
- description String
- Description of the Storage Box Snapshot.
- id Integer
- ID of the Storage Box Snapshot.
- is
Automatic Boolean - Whether the Storage Box Snapshot was created automatically.
- labels Map<String,String>
- User-defined labels (key-value pairs) for the resource.
- name String
- Name of the Storage Box Snapshot.
- stats
Get
Storage Box Snapshots Snapshot Stats - Statistics of the Storage Box Snapshot.
- storage
Box IntegerId - ID of the Storage Box.
- description string
- Description of the Storage Box Snapshot.
- id number
- ID of the Storage Box Snapshot.
- is
Automatic boolean - Whether the Storage Box Snapshot was created automatically.
- labels {[key: string]: string}
- User-defined labels (key-value pairs) for the resource.
- name string
- Name of the Storage Box Snapshot.
- stats
Get
Storage Box Snapshots Snapshot Stats - Statistics of the Storage Box Snapshot.
- storage
Box numberId - ID of the Storage Box.
- description str
- Description of the Storage Box Snapshot.
- id int
- ID of the Storage Box Snapshot.
- is_
automatic bool - Whether the Storage Box Snapshot was created automatically.
- labels Mapping[str, str]
- User-defined labels (key-value pairs) for the resource.
- name str
- Name of the Storage Box Snapshot.
- stats
Get
Storage Box Snapshots Snapshot Stats - Statistics of the Storage Box Snapshot.
- storage_
box_ intid - ID of the Storage Box.
- description String
- Description of the Storage Box Snapshot.
- id Number
- ID of the Storage Box Snapshot.
- is
Automatic Boolean - Whether the Storage Box Snapshot was created automatically.
- labels Map<String>
- User-defined labels (key-value pairs) for the resource.
- name String
- Name of the Storage Box Snapshot.
- stats Property Map
- Statistics of the Storage Box Snapshot.
- storage
Box NumberId - ID of the Storage Box.
GetStorageBoxSnapshotsSnapshotStats
- Size int
- Current storage requirements of the Snapshot in bytes.
- Size
Filesystem int - Size of the compressed file system contained in the Snapshot in bytes.
- Size int
- Current storage requirements of the Snapshot in bytes.
- Size
Filesystem int - Size of the compressed file system contained in the Snapshot in bytes.
- size Integer
- Current storage requirements of the Snapshot in bytes.
- size
Filesystem Integer - Size of the compressed file system contained in the Snapshot in bytes.
- size number
- Current storage requirements of the Snapshot in bytes.
- size
Filesystem number - Size of the compressed file system contained in the Snapshot in bytes.
- size int
- Current storage requirements of the Snapshot in bytes.
- size_
filesystem int - Size of the compressed file system contained in the Snapshot in bytes.
- size Number
- Current storage requirements of the Snapshot in bytes.
- size
Filesystem Number - Size of the compressed file system contained in the Snapshot in bytes.
Package Details
- Repository
- Hetzner Cloud pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcloudTerraform Provider.
Viewing docs for Hetzner Cloud v1.32.1
published on Tuesday, Feb 17, 2026 by Pulumi
published on Tuesday, Feb 17, 2026 by Pulumi
