get Dynamic Host Volume
suspend fun getDynamicHostVolume(argument: GetDynamicHostVolumePlainArgs): GetDynamicHostVolumeResult
Get information on a dynamic host volume from Nomad.
Example Usage
Check for the existing of a host volume:
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const example = nomad.getDynamicHostVolume({
namespace: "prod",
id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
});
Content copied to clipboard
import pulumi
import pulumi_nomad as nomad
example = nomad.get_dynamic_host_volume(namespace="prod",
id="d688ff7a-d299-11ef-ae3c-6f2400953c18")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;
return await Deployment.RunAsync(() =>
{
var example = Nomad.GetDynamicHostVolume.Invoke(new()
{
Namespace = "prod",
Id = "d688ff7a-d299-11ef-ae3c-6f2400953c18",
});
});
Content copied to clipboard
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.LookupDynamicHostVolume(ctx, &nomad.LookupDynamicHostVolumeArgs{
Namespace: pulumi.StringRef("prod"),
Id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
}, nil)
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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.GetDynamicHostVolumeArgs;
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.getDynamicHostVolume(GetDynamicHostVolumeArgs.builder()
.namespace("prod")
.id("d688ff7a-d299-11ef-ae3c-6f2400953c18")
.build());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: nomad:getDynamicHostVolume
arguments:
namespace: prod
id: d688ff7a-d299-11ef-ae3c-6f2400953c18
Content copied to clipboard
This will check for a dynamic host volume with the ID d688ff7a-d299-11ef-ae3c-6f2400953c18
.
Return
A collection of values returned by getDynamicHostVolume.
Parameters
argument
A collection of arguments for invoking getDynamicHostVolume.
Return
A collection of values returned by getDynamicHostVolume.
Parameters
id
(string)
- the ID of the volume
namespace
(string)
- the namespace of the volume. Defaults to "default"
See also
suspend fun getDynamicHostVolume(argument: suspend GetDynamicHostVolumePlainArgsBuilder.() -> Unit): GetDynamicHostVolumeResult
Return
A collection of values returned by getDynamicHostVolume.
Parameters
argument
Builder for com.pulumi.nomad.kotlin.inputs.GetDynamicHostVolumePlainArgs.