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

nomad.getNodePool

Explore with Pulumi AI

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

    Get information about a node pool in Nomad.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nomad from "@pulumi/nomad";
    
    const dev = nomad.getNodePool({
        name: "dev",
    });
    
    import pulumi
    import pulumi_nomad as nomad
    
    dev = nomad.get_node_pool(name="dev")
    
    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.LookupNodePool(ctx, &nomad.LookupNodePoolArgs{
    			Name: "dev",
    		}, 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 dev = Nomad.GetNodePool.Invoke(new()
        {
            Name = "dev",
        });
    
    });
    
    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.GetNodePoolArgs;
    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 dev = NomadFunctions.getNodePool(GetNodePoolArgs.builder()
                .name("dev")
                .build());
    
        }
    }
    
    variables:
      dev:
        fn::invoke:
          Function: nomad:getNodePool
          Arguments:
            name: dev
    

    Using getNodePool

    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 getNodePool(args: GetNodePoolArgs, opts?: InvokeOptions): Promise<GetNodePoolResult>
    function getNodePoolOutput(args: GetNodePoolOutputArgs, opts?: InvokeOptions): Output<GetNodePoolResult>
    def get_node_pool(name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetNodePoolResult
    def get_node_pool_output(name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetNodePoolResult]
    func LookupNodePool(ctx *Context, args *LookupNodePoolArgs, opts ...InvokeOption) (*LookupNodePoolResult, error)
    func LookupNodePoolOutput(ctx *Context, args *LookupNodePoolOutputArgs, opts ...InvokeOption) LookupNodePoolResultOutput

    > Note: This function is named LookupNodePool in the Go SDK.

    public static class GetNodePool 
    {
        public static Task<GetNodePoolResult> InvokeAsync(GetNodePoolArgs args, InvokeOptions? opts = null)
        public static Output<GetNodePoolResult> Invoke(GetNodePoolInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNodePoolResult> getNodePool(GetNodePoolArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: nomad:index/getNodePool:getNodePool
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    (string) - The name of the node pool to fetch.
    Name string
    (string) - The name of the node pool to fetch.
    name String
    (string) - The name of the node pool to fetch.
    name string
    (string) - The name of the node pool to fetch.
    name str
    (string) - The name of the node pool to fetch.
    name String
    (string) - The name of the node pool to fetch.

    getNodePool Result

    The following output properties are available:

    Description string
    (string) - The description of the node pool.
    Id string
    The provider-assigned unique ID for this managed resource.
    Meta Dictionary<string, string>
    (map[string]string) - Arbitrary KV metadata associated with the node pool.
    Name string
    SchedulerConfigs List<GetNodePoolSchedulerConfig>
    (block) - Scheduler configuration for the node pool.
    Description string
    (string) - The description of the node pool.
    Id string
    The provider-assigned unique ID for this managed resource.
    Meta map[string]string
    (map[string]string) - Arbitrary KV metadata associated with the node pool.
    Name string
    SchedulerConfigs []GetNodePoolSchedulerConfig
    (block) - Scheduler configuration for the node pool.
    description String
    (string) - The description of the node pool.
    id String
    The provider-assigned unique ID for this managed resource.
    meta Map<String,String>
    (map[string]string) - Arbitrary KV metadata associated with the node pool.
    name String
    schedulerConfigs List<GetNodePoolSchedulerConfig>
    (block) - Scheduler configuration for the node pool.
    description string
    (string) - The description of the node pool.
    id string
    The provider-assigned unique ID for this managed resource.
    meta {[key: string]: string}
    (map[string]string) - Arbitrary KV metadata associated with the node pool.
    name string
    schedulerConfigs GetNodePoolSchedulerConfig[]
    (block) - Scheduler configuration for the node pool.
    description str
    (string) - The description of the node pool.
    id str
    The provider-assigned unique ID for this managed resource.
    meta Mapping[str, str]
    (map[string]string) - Arbitrary KV metadata associated with the node pool.
    name str
    scheduler_configs Sequence[GetNodePoolSchedulerConfig]
    (block) - Scheduler configuration for the node pool.
    description String
    (string) - The description of the node pool.
    id String
    The provider-assigned unique ID for this managed resource.
    meta Map<String>
    (map[string]string) - Arbitrary KV metadata associated with the node pool.
    name String
    schedulerConfigs List<Property Map>
    (block) - Scheduler configuration for the node pool.

    Supporting Types

    GetNodePoolSchedulerConfig

    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