@pulumi/nomad
Version:
A Pulumi package for creating and managing nomad cloud resources.
157 lines (156 loc) • 4.86 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* Get information on a dynamic host volume from Nomad.
*
* ## Example Usage
*
* Check for the existing of a host volume:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as nomad from "@pulumi/nomad";
*
* const example = nomad.getDynamicHostVolume({
* namespace: "prod",
* id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
* });
* ```
*
* This will check for a dynamic host volume with the ID
* `d688ff7a-d299-11ef-ae3c-6f2400953c18`.
*/
export declare function getDynamicHostVolume(args: GetDynamicHostVolumeArgs, opts?: pulumi.InvokeOptions): Promise<GetDynamicHostVolumeResult>;
/**
* A collection of arguments for invoking getDynamicHostVolume.
*/
export interface GetDynamicHostVolumeArgs {
/**
* `(string)` - the ID of the volume
*/
id: string;
/**
* `(string)` - the namespace of the volume. Defaults to `"default"`
*/
namespace?: string;
}
/**
* A collection of values returned by getDynamicHostVolume.
*/
export interface GetDynamicHostVolumeResult {
/**
* `(block)` - Option for validating the capability of a
* volume. Each capability block has the following attributes:
*/
readonly capabilities: outputs.GetDynamicHostVolumeCapability[];
/**
* `(string)` - The size of the volume, in human-friendly format
* (ex. 10 GiB)
*/
readonly capacity: string;
/**
* `(int)` - The size of the volume, in bytes.
*/
readonly capacityBytes: number;
/**
* `(string)` - The requested maximum capacity of the volume, in
* human-friendly format (ex. 10 GiB).
*/
readonly capacityMax: string;
/**
* `(string)` - The requested maximum capacity of the
* volume, in bytes.
*/
readonly capacityMaxBytes: number;
/**
* `(string)` - The requested minimum capacity of the volume, in
* human-friendly format (ex. 10 GiB).
*/
readonly capacityMin: string;
/**
* `(string)` - The requested minimum capacity of the
* volume, in bytes.
*/
readonly capacityMinBytes: number;
/**
* `(block)` - The restrictions used to place the volume on a node,
* similar to the [`constraint`][] block on a Nomad job specification. A volume
* may have multiple `constraint` blocks. Each constraint block has the following
* attributes.
*/
readonly constraints: outputs.GetDynamicHostVolumeConstraint[];
/**
* `(string)` - The path on disk where the volume exists.
*/
readonly hostPath: string;
readonly id: string;
/**
* `(string)` - The name of the volume, which is used as the
* [`volume.source`][volumeSource] field in job specifications that claim this
* volume. Host volume names are be unique per node. Names are visible to any
* user with `node:read` ACL, even across namespaces, so they should not be
* treated as sensitive values.
*/
readonly name: string;
/**
* `(string)` - The namespace of the volume.
*/
readonly namespace?: string;
/**
* `(string)` - A specific node where the volume is mounted.
*/
readonly nodeId: string;
/**
* `(string: <optional>)` - The node pool of the node where the
* volume is mounted.
*/
readonly nodePool: string;
/**
* `(map<string|string>)` - A key-value map of strings
* passed directly to the plugin to configure the volume. The details of these
* parameters are specific to the plugin.
*/
readonly parameters: {
[key: string]: string;
};
/**
* `(string: <required>)` - The ID of the [dynamic host volume
* plugin][dhvPlugin] that manages this volume.
*/
readonly pluginId: string;
readonly state: string;
}
/**
* Get information on a dynamic host volume from Nomad.
*
* ## Example Usage
*
* Check for the existing of a host volume:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as nomad from "@pulumi/nomad";
*
* const example = nomad.getDynamicHostVolume({
* namespace: "prod",
* id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
* });
* ```
*
* This will check for a dynamic host volume with the ID
* `d688ff7a-d299-11ef-ae3c-6f2400953c18`.
*/
export declare function getDynamicHostVolumeOutput(args: GetDynamicHostVolumeOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDynamicHostVolumeResult>;
/**
* A collection of arguments for invoking getDynamicHostVolume.
*/
export interface GetDynamicHostVolumeOutputArgs {
/**
* `(string)` - the ID of the volume
*/
id: pulumi.Input<string>;
/**
* `(string)` - the namespace of the volume. Defaults to `"default"`
*/
namespace?: pulumi.Input<string>;
}