1. Packages
  2. HashiCorp Nomad
  3. API Docs
  4. getNodePools
Nomad v2.3.0 published on Wednesday, Jun 5, 2024 by Pulumi

nomad.getNodePools

Explore with Pulumi AI

nomad logo
Nomad v2.3.0 published on Wednesday, Jun 5, 2024 by Pulumi

    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 dictionary

    The following arguments are supported:

    Filter string
    (string) - Specifies the [expression][nomad_api_filter] used to filter the results.
    Prefix string
    (string) - Specifies a string to filter node pools based on a name prefix.
    Filter string
    (string) - Specifies the [expression][nomad_api_filter] used to filter the results.
    Prefix string
    (string) - Specifies a string to filter node pools based on a name prefix.
    filter String
    (string) - Specifies the [expression][nomad_api_filter] used to filter the results.
    prefix String
    (string) - Specifies a string to filter node pools based on a name prefix.
    filter string
    (string) - Specifies the [expression][nomad_api_filter] used to filter the results.
    prefix string
    (string) - Specifies a string to filter node pools based on a name prefix.
    filter str
    (string) - Specifies the [expression][nomad_api_filter] used to filter the results.
    prefix str
    (string) - Specifies a string to filter node pools based on a name prefix.
    filter String
    (string) - Specifies the [expression][nomad_api_filter] used to filter the results.
    prefix String
    (string) - Specifies a string to filter node pools based on a name prefix.

    getNodePools Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    NodePools List<GetNodePoolsNodePool>
    (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.
    NodePools []GetNodePoolsNodePool
    (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.
    nodePools List<GetNodePoolsNodePool>
    (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.
    nodePools GetNodePoolsNodePool[]
    (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[GetNodePoolsNodePool]
    (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.
    nodePools 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.
    SchedulerConfigs List<GetNodePoolsNodePoolSchedulerConfig>
    (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.
    SchedulerConfigs []GetNodePoolsNodePoolSchedulerConfig
    (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.
    schedulerConfigs List<GetNodePoolsNodePoolSchedulerConfig>
    (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.
    schedulerConfigs GetNodePoolsNodePoolSchedulerConfig[]
    (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[GetNodePoolsNodePoolSchedulerConfig]
    (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.
    schedulerConfigs List<Property Map>
    (block) - Scheduler configuration for the node pool.

    GetNodePoolsNodePoolSchedulerConfig

    MemoryOversubscription string
    (string) - Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.
    SchedulerAlgorithm string
    (string) - The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
    MemoryOversubscription string
    (string) - Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.
    SchedulerAlgorithm string
    (string) - The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
    memoryOversubscription String
    (string) - Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.
    schedulerAlgorithm String
    (string) - The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
    memoryOversubscription string
    (string) - Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.
    schedulerAlgorithm 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.
    memoryOversubscription String
    (string) - Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.
    schedulerAlgorithm 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 nomad Terraform Provider.
    nomad logo
    Nomad v2.3.0 published on Wednesday, Jun 5, 2024 by Pulumi