1. Packages
  2. Hcloud Provider
  3. API Docs
  4. getStorageBoxes
Hetzner Cloud v1.29.0 published on Saturday, Nov 29, 2025 by Pulumi
hcloud logo
Hetzner Cloud v1.29.0 published on Saturday, Nov 29, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hcloud from "@pulumi/hcloud";
    
    const all = hcloud.getStorageBoxes({});
    const byLabelSelector = hcloud.getStorageBoxes({
        withSelector: "env=production",
    });
    
    import pulumi
    import pulumi_hcloud as hcloud
    
    all = hcloud.get_storage_boxes()
    by_label_selector = hcloud.get_storage_boxes(with_selector="env=production")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := hcloud.GetStorageBoxes(ctx, &hcloud.GetStorageBoxesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = hcloud.GetStorageBoxes(ctx, &hcloud.GetStorageBoxesArgs{
    			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 all = HCloud.GetStorageBoxes.Invoke();
    
        var byLabelSelector = HCloud.GetStorageBoxes.Invoke(new()
        {
            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.GetStorageBoxesArgs;
    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 all = HcloudFunctions.getStorageBoxes(GetStorageBoxesArgs.builder()
                .build());
    
            final var byLabelSelector = HcloudFunctions.getStorageBoxes(GetStorageBoxesArgs.builder()
                .withSelector("env=production")
                .build());
    
        }
    }
    
    variables:
      all:
        fn::invoke:
          function: hcloud:getStorageBoxes
          arguments: {}
      byLabelSelector:
        fn::invoke:
          function: hcloud:getStorageBoxes
          arguments:
            withSelector: env=production
    

    Using getStorageBoxes

    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 getStorageBoxes(args: GetStorageBoxesArgs, opts?: InvokeOptions): Promise<GetStorageBoxesResult>
    function getStorageBoxesOutput(args: GetStorageBoxesOutputArgs, opts?: InvokeOptions): Output<GetStorageBoxesResult>
    def get_storage_boxes(with_selector: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetStorageBoxesResult
    def get_storage_boxes_output(with_selector: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetStorageBoxesResult]
    func GetStorageBoxes(ctx *Context, args *GetStorageBoxesArgs, opts ...InvokeOption) (*GetStorageBoxesResult, error)
    func GetStorageBoxesOutput(ctx *Context, args *GetStorageBoxesOutputArgs, opts ...InvokeOption) GetStorageBoxesResultOutput

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

    public static class GetStorageBoxes 
    {
        public static Task<GetStorageBoxesResult> InvokeAsync(GetStorageBoxesArgs args, InvokeOptions? opts = null)
        public static Output<GetStorageBoxesResult> Invoke(GetStorageBoxesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStorageBoxesResult> getStorageBoxes(GetStorageBoxesArgs args, InvokeOptions options)
    public static Output<GetStorageBoxesResult> getStorageBoxes(GetStorageBoxesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: hcloud:index/getStorageBoxes:getStorageBoxes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    WithSelector string
    Filter results using a Label Selector
    WithSelector string
    Filter results using a Label Selector
    withSelector String
    Filter results using a Label Selector
    withSelector string
    Filter results using a Label Selector
    with_selector str
    Filter results using a Label Selector
    withSelector String
    Filter results using a Label Selector

    getStorageBoxes Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    StorageBoxes List<Pulumi.HCloud.Outputs.GetStorageBoxesStorageBox>
    WithSelector string
    Filter results using a Label Selector
    Id string
    The provider-assigned unique ID for this managed resource.
    StorageBoxes []GetStorageBoxesStorageBox
    WithSelector string
    Filter results using a Label Selector
    id String
    The provider-assigned unique ID for this managed resource.
    storageBoxes List<GetStorageBoxesStorageBox>
    withSelector String
    Filter results using a Label Selector
    id string
    The provider-assigned unique ID for this managed resource.
    storageBoxes GetStorageBoxesStorageBox[]
    withSelector string
    Filter results using a Label Selector
    id str
    The provider-assigned unique ID for this managed resource.
    storage_boxes Sequence[GetStorageBoxesStorageBox]
    with_selector str
    Filter results using a Label Selector
    id String
    The provider-assigned unique ID for this managed resource.
    storageBoxes List<Property Map>
    withSelector String
    Filter results using a Label Selector

    Supporting Types

    GetStorageBoxesStorageBox

    AccessSettings Pulumi.HCloud.Inputs.GetStorageBoxesStorageBoxAccessSettings
    Access settings of the Storage Box.
    DeleteProtection bool
    Whether delete protection is enabled.
    Id int
    ID of the Storage Box.
    Labels Dictionary<string, string>
    User-defined labels (key-value pairs) for the resource.
    Location string
    Name of the Location.
    Name string
    Name of the Storage Box.
    Server string
    FQDN of the Storage Box.
    SnapshotPlan Pulumi.HCloud.Inputs.GetStorageBoxesStorageBoxSnapshotPlan
    Details of the active snapshot plan.
    StorageBoxType string
    Name of the Storage Box Type.
    System string
    Host system of the Storage Box.
    Username string
    Primary username of the Storage Box.
    AccessSettings GetStorageBoxesStorageBoxAccessSettings
    Access settings of the Storage Box.
    DeleteProtection bool
    Whether delete protection is enabled.
    Id int
    ID of the Storage Box.
    Labels map[string]string
    User-defined labels (key-value pairs) for the resource.
    Location string
    Name of the Location.
    Name string
    Name of the Storage Box.
    Server string
    FQDN of the Storage Box.
    SnapshotPlan GetStorageBoxesStorageBoxSnapshotPlan
    Details of the active snapshot plan.
    StorageBoxType string
    Name of the Storage Box Type.
    System string
    Host system of the Storage Box.
    Username string
    Primary username of the Storage Box.
    accessSettings GetStorageBoxesStorageBoxAccessSettings
    Access settings of the Storage Box.
    deleteProtection Boolean
    Whether delete protection is enabled.
    id Integer
    ID of the Storage Box.
    labels Map<String,String>
    User-defined labels (key-value pairs) for the resource.
    location String
    Name of the Location.
    name String
    Name of the Storage Box.
    server String
    FQDN of the Storage Box.
    snapshotPlan GetStorageBoxesStorageBoxSnapshotPlan
    Details of the active snapshot plan.
    storageBoxType String
    Name of the Storage Box Type.
    system String
    Host system of the Storage Box.
    username String
    Primary username of the Storage Box.
    accessSettings GetStorageBoxesStorageBoxAccessSettings
    Access settings of the Storage Box.
    deleteProtection boolean
    Whether delete protection is enabled.
    id number
    ID of the Storage Box.
    labels {[key: string]: string}
    User-defined labels (key-value pairs) for the resource.
    location string
    Name of the Location.
    name string
    Name of the Storage Box.
    server string
    FQDN of the Storage Box.
    snapshotPlan GetStorageBoxesStorageBoxSnapshotPlan
    Details of the active snapshot plan.
    storageBoxType string
    Name of the Storage Box Type.
    system string
    Host system of the Storage Box.
    username string
    Primary username of the Storage Box.
    access_settings GetStorageBoxesStorageBoxAccessSettings
    Access settings of the Storage Box.
    delete_protection bool
    Whether delete protection is enabled.
    id int
    ID of the Storage Box.
    labels Mapping[str, str]
    User-defined labels (key-value pairs) for the resource.
    location str
    Name of the Location.
    name str
    Name of the Storage Box.
    server str
    FQDN of the Storage Box.
    snapshot_plan GetStorageBoxesStorageBoxSnapshotPlan
    Details of the active snapshot plan.
    storage_box_type str
    Name of the Storage Box Type.
    system str
    Host system of the Storage Box.
    username str
    Primary username of the Storage Box.
    accessSettings Property Map
    Access settings of the Storage Box.
    deleteProtection Boolean
    Whether delete protection is enabled.
    id Number
    ID of the Storage Box.
    labels Map<String>
    User-defined labels (key-value pairs) for the resource.
    location String
    Name of the Location.
    name String
    Name of the Storage Box.
    server String
    FQDN of the Storage Box.
    snapshotPlan Property Map
    Details of the active snapshot plan.
    storageBoxType String
    Name of the Storage Box Type.
    system String
    Host system of the Storage Box.
    username String
    Primary username of the Storage Box.

    GetStorageBoxesStorageBoxAccessSettings

    ReachableExternally bool
    Whether access from outside the Hetzner network is allowed.
    SambaEnabled bool
    Whether the Samba subsystem is enabled.
    SshEnabled bool
    Whether the SSH subsystem is enabled.
    WebdavEnabled bool
    Whether the WebDAV subsystem is enabled.
    ZfsEnabled bool
    Whether the ZFS snapshot folder is visible.
    ReachableExternally bool
    Whether access from outside the Hetzner network is allowed.
    SambaEnabled bool
    Whether the Samba subsystem is enabled.
    SshEnabled bool
    Whether the SSH subsystem is enabled.
    WebdavEnabled bool
    Whether the WebDAV subsystem is enabled.
    ZfsEnabled bool
    Whether the ZFS snapshot folder is visible.
    reachableExternally Boolean
    Whether access from outside the Hetzner network is allowed.
    sambaEnabled Boolean
    Whether the Samba subsystem is enabled.
    sshEnabled Boolean
    Whether the SSH subsystem is enabled.
    webdavEnabled Boolean
    Whether the WebDAV subsystem is enabled.
    zfsEnabled Boolean
    Whether the ZFS snapshot folder is visible.
    reachableExternally boolean
    Whether access from outside the Hetzner network is allowed.
    sambaEnabled boolean
    Whether the Samba subsystem is enabled.
    sshEnabled boolean
    Whether the SSH subsystem is enabled.
    webdavEnabled boolean
    Whether the WebDAV subsystem is enabled.
    zfsEnabled boolean
    Whether the ZFS snapshot folder is visible.
    reachable_externally bool
    Whether access from outside the Hetzner network is allowed.
    samba_enabled bool
    Whether the Samba subsystem is enabled.
    ssh_enabled bool
    Whether the SSH subsystem is enabled.
    webdav_enabled bool
    Whether the WebDAV subsystem is enabled.
    zfs_enabled bool
    Whether the ZFS snapshot folder is visible.
    reachableExternally Boolean
    Whether access from outside the Hetzner network is allowed.
    sambaEnabled Boolean
    Whether the Samba subsystem is enabled.
    sshEnabled Boolean
    Whether the SSH subsystem is enabled.
    webdavEnabled Boolean
    Whether the WebDAV subsystem is enabled.
    zfsEnabled Boolean
    Whether the ZFS snapshot folder is visible.

    GetStorageBoxesStorageBoxSnapshotPlan

    DayOfMonth int
    Day of the month when the Snapshot Plan is executed. Null means every day.
    DayOfWeek int
    Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
    Hour int
    Hour when the Snapshot Plan is executed (UTC).
    MaxSnapshots int
    Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
    Minute int
    Minute when the Snapshot Plan is executed (UTC).
    DayOfMonth int
    Day of the month when the Snapshot Plan is executed. Null means every day.
    DayOfWeek int
    Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
    Hour int
    Hour when the Snapshot Plan is executed (UTC).
    MaxSnapshots int
    Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
    Minute int
    Minute when the Snapshot Plan is executed (UTC).
    dayOfMonth Integer
    Day of the month when the Snapshot Plan is executed. Null means every day.
    dayOfWeek Integer
    Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
    hour Integer
    Hour when the Snapshot Plan is executed (UTC).
    maxSnapshots Integer
    Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
    minute Integer
    Minute when the Snapshot Plan is executed (UTC).
    dayOfMonth number
    Day of the month when the Snapshot Plan is executed. Null means every day.
    dayOfWeek number
    Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
    hour number
    Hour when the Snapshot Plan is executed (UTC).
    maxSnapshots number
    Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
    minute number
    Minute when the Snapshot Plan is executed (UTC).
    day_of_month int
    Day of the month when the Snapshot Plan is executed. Null means every day.
    day_of_week int
    Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
    hour int
    Hour when the Snapshot Plan is executed (UTC).
    max_snapshots int
    Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
    minute int
    Minute when the Snapshot Plan is executed (UTC).
    dayOfMonth Number
    Day of the month when the Snapshot Plan is executed. Null means every day.
    dayOfWeek Number
    Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
    hour Number
    Hour when the Snapshot Plan is executed (UTC).
    maxSnapshots Number
    Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
    minute Number
    Minute when the Snapshot Plan is executed (UTC).

    Package Details

    Repository
    Hetzner Cloud pulumi/pulumi-hcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the hcloud Terraform Provider.
    hcloud logo
    Hetzner Cloud v1.29.0 published on Saturday, Nov 29, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate