@pulumi/nomad
Version:
A Pulumi package for creating and managing nomad cloud resources.
93 lines (92 loc) • 2.58 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* Retrieve a list of allocations from Nomad.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as nomad from "@pulumi/nomad";
*
* const example = nomad.getAllocations({
* filter: "JobID == \"example\"",
* });
* ```
*/
export declare function getAllocations(args?: GetAllocationsArgs, opts?: pulumi.InvokeOptions): Promise<GetAllocationsResult>;
/**
* A collection of arguments for invoking getAllocations.
*/
export interface GetAllocationsArgs {
/**
* `(string: <optional>)` - Specifies the
* [expression][nomadApiFilter] used to filter the results.
*/
filter?: string;
/**
* `(string: <optional>)` - Specifies the namespace to search for
* allocations in.
*/
namespace?: string;
/**
* `(string: <optional>)` - Specifies a string to filter allocations
* based on an ID prefix.
*/
prefix?: string;
}
/**
* A collection of values returned by getAllocations.
*/
export interface GetAllocationsResult {
/**
* `(list of allocations)` - A list of allocations matching the
* search criteria.
*/
readonly allocations: outputs.GetAllocationsAllocation[];
readonly filter?: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* `(string)` - The namespace the allocation belongs to.
*/
readonly namespace?: string;
readonly prefix?: string;
}
/**
* Retrieve a list of allocations from Nomad.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as nomad from "@pulumi/nomad";
*
* const example = nomad.getAllocations({
* filter: "JobID == \"example\"",
* });
* ```
*/
export declare function getAllocationsOutput(args?: GetAllocationsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetAllocationsResult>;
/**
* A collection of arguments for invoking getAllocations.
*/
export interface GetAllocationsOutputArgs {
/**
* `(string: <optional>)` - Specifies the
* [expression][nomadApiFilter] used to filter the results.
*/
filter?: pulumi.Input<string>;
/**
* `(string: <optional>)` - Specifies the namespace to search for
* allocations in.
*/
namespace?: pulumi.Input<string>;
/**
* `(string: <optional>)` - Specifies a string to filter allocations
* based on an ID prefix.
*/
prefix?: pulumi.Input<string>;
}