Nomad v2.3.0 published on Wednesday, Jun 5, 2024 by Pulumi
nomad.getNodePools
Explore with Pulumi AI
Retrieve a list of node pools available in Nomad.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const prod = nomad.getNodePools({
    filter: "Meta.env == \"prod\"",
});
import pulumi
import pulumi_nomad as nomad
prod = nomad.get_node_pools(filter="Meta.env == \"prod\"")
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.GetNodePools(ctx, &nomad.GetNodePoolsArgs{
			Filter: pulumi.StringRef("Meta.env == \"prod\""),
		}, 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 prod = Nomad.GetNodePools.Invoke(new()
    {
        Filter = "Meta.env == \"prod\"",
    });
});
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.GetNodePoolsArgs;
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 prod = NomadFunctions.getNodePools(GetNodePoolsArgs.builder()
            .filter("Meta.env == \"prod\"")
            .build());
    }
}
variables:
  prod:
    fn::invoke:
      Function: nomad:getNodePools
      Arguments:
        filter: Meta.env == "prod"
Using getNodePools
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 getNodePools(args: GetNodePoolsArgs, opts?: InvokeOptions): Promise<GetNodePoolsResult>
function getNodePoolsOutput(args: GetNodePoolsOutputArgs, opts?: InvokeOptions): Output<GetNodePoolsResult>def get_node_pools(filter: Optional[str] = None,
                   prefix: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetNodePoolsResult
def get_node_pools_output(filter: Optional[pulumi.Input[str]] = None,
                   prefix: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetNodePoolsResult]func GetNodePools(ctx *Context, args *GetNodePoolsArgs, opts ...InvokeOption) (*GetNodePoolsResult, error)
func GetNodePoolsOutput(ctx *Context, args *GetNodePoolsOutputArgs, opts ...InvokeOption) GetNodePoolsResultOutput> Note: This function is named GetNodePools in the Go SDK.
public static class GetNodePools 
{
    public static Task<GetNodePoolsResult> InvokeAsync(GetNodePoolsArgs args, InvokeOptions? opts = null)
    public static Output<GetNodePoolsResult> Invoke(GetNodePoolsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNodePoolsResult> getNodePools(GetNodePoolsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: nomad:index/getNodePools:getNodePools
  arguments:
    # arguments dictionaryThe following arguments are supported:
getNodePools Result
The following output properties are available:
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Node
Pools List<GetNode Pools Node Pool>  (list of node pools)- A list of node pools matching the search criteria.- Filter string
 - Prefix string
 
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Node
Pools []GetNode Pools Node Pool  (list of node pools)- A list of node pools matching the search criteria.- Filter string
 - Prefix string
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - node
Pools List<GetNode Pools Node Pool>  (list of node pools)- A list of node pools matching the search criteria.- filter String
 - prefix String
 
- id string
 - The provider-assigned unique ID for this managed resource.
 - node
Pools GetNode Pools Node Pool[]  (list of node pools)- A list of node pools matching the search criteria.- filter string
 - prefix string
 
- id str
 - The provider-assigned unique ID for this managed resource.
 - node_
pools Sequence[GetNode Pools Node Pool]  (list of node pools)- A list of node pools matching the search criteria.- filter str
 - prefix str
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - node
Pools List<Property Map> (list of node pools)- A list of node pools matching the search criteria.- filter String
 - prefix String
 
Supporting Types
GetNodePoolsNodePool    
- Description string
 (string)- The description of the node pool.- Meta Dictionary<string, string>
 (map[string]string)- Arbitrary KV metadata associated with the node pool.- Name string
 (string)- The name of the node pool.- Scheduler
Configs List<GetNode Pools Node Pool Scheduler Config>  (block)- Scheduler configuration for the node pool.
- Description string
 (string)- The description of the node pool.- Meta map[string]string
 (map[string]string)- Arbitrary KV metadata associated with the node pool.- Name string
 (string)- The name of the node pool.- Scheduler
Configs []GetNode Pools Node Pool Scheduler Config  (block)- Scheduler configuration for the node pool.
- description String
 (string)- The description of the node pool.- meta Map<String,String>
 (map[string]string)- Arbitrary KV metadata associated with the node pool.- name String
 (string)- The name of the node pool.- scheduler
Configs List<GetNode Pools Node Pool Scheduler Config>  (block)- Scheduler configuration for the node pool.
- description string
 (string)- The description of the node pool.- meta {[key: string]: string}
 (map[string]string)- Arbitrary KV metadata associated with the node pool.- name string
 (string)- The name of the node pool.- scheduler
Configs GetNode Pools Node Pool Scheduler Config[]  (block)- Scheduler configuration for the node pool.
- description str
 (string)- The description of the node pool.- meta Mapping[str, str]
 (map[string]string)- Arbitrary KV metadata associated with the node pool.- name str
 (string)- The name of the node pool.- scheduler_
configs Sequence[GetNode Pools Node Pool Scheduler Config]  (block)- Scheduler configuration for the node pool.
- description String
 (string)- The description of the node pool.- meta Map<String>
 (map[string]string)- Arbitrary KV metadata associated with the node pool.- name String
 (string)- The name of the node pool.- scheduler
Configs List<Property Map> (block)- Scheduler configuration for the node pool.
GetNodePoolsNodePoolSchedulerConfig      
- Memory
Oversubscription string (string)- Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.- Scheduler
Algorithm string (string)- The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
- Memory
Oversubscription string (string)- Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.- Scheduler
Algorithm string (string)- The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
- memory
Oversubscription String (string)- Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.- scheduler
Algorithm String (string)- The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
- memory
Oversubscription string (string)- Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.- scheduler
Algorithm string (string)- The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
- memory_
oversubscription str (string)- Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.- scheduler_
algorithm str (string)- The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
- memory
Oversubscription String (string)- Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.- scheduler
Algorithm String (string)- The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
Package Details
- Repository
 - HashiCorp Nomad pulumi/pulumi-nomad
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
nomadTerraform Provider.