HashiCorp Nomad

v0.2.1 published on Tuesday, Dec 7, 2021 by Pulumi

getVolumes

Retrieve a list of volumes in Nomad.

Example Usage

using Pulumi;
using Nomad = Pulumi.Nomad;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Nomad.GetVolumes.InvokeAsync());
    }

}
package main

import (
	"github.com/pulumi/pulumi-nomad/sdk/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
	})
}
import pulumi
import pulumi_nomad as nomad

example = nomad.get_volumes()
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const example = pulumi.output(nomad.getVolumes());

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)
}

The following arguments are supported:

Namespace string
NodeId string
PluginId string
Type string
Namespace string
NodeId string
PluginId string
Type string
namespace string
nodeId string
pluginId string
type string
namespace str
node_id str
plugin_id str
type str

getVolumes Result

The following output properties are available:

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

Package Details

Repository
https://github.com/pulumi/pulumi-nomad
License
Apache-2.0
Notes
This Pulumi package is based on the nomad Terraform Provider.