1. Packages
  2. HashiCorp Nomad
  3. API Docs
  4. getVolumes
Nomad v2.2.0 published on Wednesday, Mar 13, 2024 by Pulumi

nomad.getVolumes

Explore with Pulumi AI

nomad logo
Nomad v2.2.0 published on Wednesday, Mar 13, 2024 by Pulumi

    Retrieve a list of volumes in Nomad.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nomad from "@pulumi/nomad";
    
    const example = nomad.getVolumes({});
    
    import pulumi
    import pulumi_nomad as nomad
    
    example = nomad.get_volumes()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-nomad/sdk/v2/go/nomad"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nomad.GetVolumes(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nomad = Pulumi.Nomad;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Nomad.GetVolumes.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nomad.NomadFunctions;
    import com.pulumi.nomad.inputs.GetVolumesArgs;
    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 example = NomadFunctions.getVolumes();
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: nomad:getVolumes
          Arguments: {}
    

    Using getVolumes

    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 getVolumes(args: GetVolumesArgs, opts?: InvokeOptions): Promise<GetVolumesResult>
    function getVolumesOutput(args: GetVolumesOutputArgs, opts?: InvokeOptions): Output<GetVolumesResult>
    def get_volumes(namespace: Optional[str] = None,
                    node_id: Optional[str] = None,
                    plugin_id: Optional[str] = None,
                    type: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetVolumesResult
    def get_volumes_output(namespace: Optional[pulumi.Input[str]] = None,
                    node_id: Optional[pulumi.Input[str]] = None,
                    plugin_id: Optional[pulumi.Input[str]] = None,
                    type: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetVolumesResult]
    func GetVolumes(ctx *Context, args *GetVolumesArgs, opts ...InvokeOption) (*GetVolumesResult, error)
    func GetVolumesOutput(ctx *Context, args *GetVolumesOutputArgs, opts ...InvokeOption) GetVolumesResultOutput

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

    public static class GetVolumes 
    {
        public static Task<GetVolumesResult> InvokeAsync(GetVolumesArgs args, InvokeOptions? opts = null)
        public static Output<GetVolumesResult> Invoke(GetVolumesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVolumesResult> getVolumes(GetVolumesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: nomad:index/getVolumes:getVolumes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Namespace string
    (string: "default") Nomad namespace.
    NodeId string
    (string: optional) Volume node filter.
    PluginId string
    (string: optional) Plugin ID filter.
    Type string
    (string: "csi") Volume type (currently only supports csi)
    Namespace string
    (string: "default") Nomad namespace.
    NodeId string
    (string: optional) Volume node filter.
    PluginId string
    (string: optional) Plugin ID filter.
    Type string
    (string: "csi") Volume type (currently only supports csi)
    namespace String
    (string: "default") Nomad namespace.
    nodeId String
    (string: optional) Volume node filter.
    pluginId String
    (string: optional) Plugin ID filter.
    type String
    (string: "csi") Volume type (currently only supports csi)
    namespace string
    (string: "default") Nomad namespace.
    nodeId string
    (string: optional) Volume node filter.
    pluginId string
    (string: optional) Plugin ID filter.
    type string
    (string: "csi") Volume type (currently only supports csi)
    namespace str
    (string: "default") Nomad namespace.
    node_id str
    (string: optional) Volume node filter.
    plugin_id str
    (string: optional) Plugin ID filter.
    type str
    (string: "csi") Volume type (currently only supports csi)
    namespace String
    (string: "default") Nomad namespace.
    nodeId String
    (string: optional) Volume node filter.
    pluginId String
    (string: optional) Plugin ID filter.
    type String
    (string: "csi") Volume type (currently only supports csi)

    getVolumes Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Volumes List<ImmutableDictionary<string, object>>
    list of maps a list of volumes in the cluster.
    Namespace string
    string Volume namespace.
    NodeId string
    PluginId string
    Type string
    Id string
    The provider-assigned unique ID for this managed resource.
    Volumes []map[string]interface{}
    list of maps a list of volumes in the cluster.
    Namespace string
    string Volume namespace.
    NodeId string
    PluginId string
    Type string
    id String
    The provider-assigned unique ID for this managed resource.
    volumes List<Map<String,Object>>
    list of maps a list of volumes in the cluster.
    namespace String
    string Volume namespace.
    nodeId String
    pluginId String
    type String
    id string
    The provider-assigned unique ID for this managed resource.
    volumes {[key: string]: any}[]
    list of maps a list of volumes in the cluster.
    namespace string
    string Volume namespace.
    nodeId string
    pluginId string
    type string
    id str
    The provider-assigned unique ID for this managed resource.
    volumes Sequence[Mapping[str, Any]]
    list of maps a list of volumes in the cluster.
    namespace str
    string Volume namespace.
    node_id str
    plugin_id str
    type str
    id String
    The provider-assigned unique ID for this managed resource.
    volumes List<Map<Any>>
    list of maps a list of volumes in the cluster.
    namespace String
    string Volume namespace.
    nodeId String
    pluginId String
    type String

    Package Details

    Repository
    HashiCorp Nomad pulumi/pulumi-nomad
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nomad Terraform Provider.
    nomad logo
    Nomad v2.2.0 published on Wednesday, Mar 13, 2024 by Pulumi