1. Packages
  2. Proxmox Virtual Environment (Proxmox VE)
  3. API Docs
  4. Storage
  5. getDatastores
Proxmox Virtual Environment (Proxmox VE) v6.3.1 published on Friday, Apr 12, 2024 by Daniel Muehlbachler-Pietrzykowski

proxmoxve.Storage.getDatastores

Explore with Pulumi AI

proxmoxve logo
Proxmox Virtual Environment (Proxmox VE) v6.3.1 published on Friday, Apr 12, 2024 by Daniel Muehlbachler-Pietrzykowski

    Retrieves information about all the datastores available to a specific node.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@pulumi/proxmoxve";
    
    const firstNode = proxmoxve.Storage.getDatastores({
        nodeName: "first-node",
    });
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    
    first_node = proxmoxve.Storage.get_datastores(node_name="first-node")
    
    package main
    
    import (
    	"github.com/muhlba91/pulumi-proxmoxve/sdk/v6/go/proxmoxve/Storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Storage.GetDatastores(ctx, &storage.GetDatastoresArgs{
    			NodeName: "first-node",
    		}, 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 firstNode = ProxmoxVE.Storage.GetDatastores.Invoke(new()
        {
            NodeName = "first-node",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.proxmoxve.Storage.StorageFunctions;
    import com.pulumi.proxmoxve.Storage.inputs.GetDatastoresArgs;
    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 firstNode = StorageFunctions.getDatastores(GetDatastoresArgs.builder()
                .nodeName("first-node")
                .build());
    
        }
    }
    
    variables:
      firstNode:
        fn::invoke:
          Function: proxmoxve:Storage:getDatastores
          Arguments:
            nodeName: first-node
    

    Using getDatastores

    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 getDatastores(args: GetDatastoresArgs, opts?: InvokeOptions): Promise<GetDatastoresResult>
    function getDatastoresOutput(args: GetDatastoresOutputArgs, opts?: InvokeOptions): Output<GetDatastoresResult>
    def get_datastores(node_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetDatastoresResult
    def get_datastores_output(node_name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetDatastoresResult]
    func GetDatastores(ctx *Context, args *GetDatastoresArgs, opts ...InvokeOption) (*GetDatastoresResult, error)
    func GetDatastoresOutput(ctx *Context, args *GetDatastoresOutputArgs, opts ...InvokeOption) GetDatastoresResultOutput

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

    public static class GetDatastores 
    {
        public static Task<GetDatastoresResult> InvokeAsync(GetDatastoresArgs args, InvokeOptions? opts = null)
        public static Output<GetDatastoresResult> Invoke(GetDatastoresInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDatastoresResult> getDatastores(GetDatastoresArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: proxmoxve:Storage/getDatastores:getDatastores
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NodeName string
    A node name.
    NodeName string
    A node name.
    nodeName String
    A node name.
    nodeName string
    A node name.
    node_name str
    A node name.
    nodeName String
    A node name.

    getDatastores Result

    The following output properties are available:

    Actives List<bool>
    Whether the datastore is active.
    ContentTypes List<ImmutableArray<string>>
    The allowed content types.
    DatastoreIds List<string>
    The datastore identifiers.
    Enableds List<bool>
    Whether the datastore is enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    NodeName string
    Shareds List<bool>
    Whether the datastore is shared.
    SpaceAvailables List<int>
    The available space in bytes.
    SpaceTotals List<int>
    The total space in bytes.
    SpaceUseds List<int>
    The used space in bytes.
    Types List<string>
    The storage types.
    Actives []bool
    Whether the datastore is active.
    ContentTypes [][]string
    The allowed content types.
    DatastoreIds []string
    The datastore identifiers.
    Enableds []bool
    Whether the datastore is enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    NodeName string
    Shareds []bool
    Whether the datastore is shared.
    SpaceAvailables []int
    The available space in bytes.
    SpaceTotals []int
    The total space in bytes.
    SpaceUseds []int
    The used space in bytes.
    Types []string
    The storage types.
    actives List<Boolean>
    Whether the datastore is active.
    contentTypes List<List<String>>
    The allowed content types.
    datastoreIds List<String>
    The datastore identifiers.
    enableds List<Boolean>
    Whether the datastore is enabled.
    id String
    The provider-assigned unique ID for this managed resource.
    nodeName String
    shareds List<Boolean>
    Whether the datastore is shared.
    spaceAvailables List<Integer>
    The available space in bytes.
    spaceTotals List<Integer>
    The total space in bytes.
    spaceUseds List<Integer>
    The used space in bytes.
    types List<String>
    The storage types.
    actives boolean[]
    Whether the datastore is active.
    contentTypes string[][]
    The allowed content types.
    datastoreIds string[]
    The datastore identifiers.
    enableds boolean[]
    Whether the datastore is enabled.
    id string
    The provider-assigned unique ID for this managed resource.
    nodeName string
    shareds boolean[]
    Whether the datastore is shared.
    spaceAvailables number[]
    The available space in bytes.
    spaceTotals number[]
    The total space in bytes.
    spaceUseds number[]
    The used space in bytes.
    types string[]
    The storage types.
    actives Sequence[bool]
    Whether the datastore is active.
    content_types Sequence[Sequence[str]]
    The allowed content types.
    datastore_ids Sequence[str]
    The datastore identifiers.
    enableds Sequence[bool]
    Whether the datastore is enabled.
    id str
    The provider-assigned unique ID for this managed resource.
    node_name str
    shareds Sequence[bool]
    Whether the datastore is shared.
    space_availables Sequence[int]
    The available space in bytes.
    space_totals Sequence[int]
    The total space in bytes.
    space_useds Sequence[int]
    The used space in bytes.
    types Sequence[str]
    The storage types.
    actives List<Boolean>
    Whether the datastore is active.
    contentTypes List<List<String>>
    The allowed content types.
    datastoreIds List<String>
    The datastore identifiers.
    enableds List<Boolean>
    Whether the datastore is enabled.
    id String
    The provider-assigned unique ID for this managed resource.
    nodeName String
    shareds List<Boolean>
    Whether the datastore is shared.
    spaceAvailables List<Number>
    The available space in bytes.
    spaceTotals List<Number>
    The total space in bytes.
    spaceUseds List<Number>
    The used space in bytes.
    types List<String>
    The storage types.

    Package Details

    Repository
    proxmoxve muhlba91/pulumi-proxmoxve
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the proxmox Terraform Provider.
    proxmoxve logo
    Proxmox Virtual Environment (Proxmox VE) v6.3.1 published on Friday, Apr 12, 2024 by Daniel Muehlbachler-Pietrzykowski