1. Packages
  2. Nomad Provider
  3. API Docs
  4. getSchedulerPolicy
Nomad v2.4.1 published on Wednesday, Oct 30, 2024 by Pulumi

nomad.getSchedulerPolicy

Explore with Pulumi AI

nomad logo
Nomad v2.4.1 published on Wednesday, Oct 30, 2024 by Pulumi

    Retrieve the cluster’s scheduler configuration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nomad from "@pulumi/nomad";
    
    const global = nomad.getSchedulerPolicy({});
    
    import pulumi
    import pulumi_nomad as nomad
    
    global_ = nomad.get_scheduler_policy()
    
    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.GetSchedulerPolicy(ctx, map[string]interface{}{}, 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 @global = Nomad.GetSchedulerPolicy.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nomad.NomadFunctions;
    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 global = NomadFunctions.getSchedulerPolicy();
    
        }
    }
    
    variables:
      global:
        fn::invoke:
          Function: nomad:getSchedulerPolicy
          Arguments: {}
    

    Using getSchedulerPolicy

    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 getSchedulerPolicy(opts?: InvokeOptions): Promise<GetSchedulerPolicyResult>
    function getSchedulerPolicyOutput(opts?: InvokeOptions): Output<GetSchedulerPolicyResult>
    def get_scheduler_policy(opts: Optional[InvokeOptions] = None) -> GetSchedulerPolicyResult
    def get_scheduler_policy_output(opts: Optional[InvokeOptions] = None) -> Output[GetSchedulerPolicyResult]
    func GetSchedulerPolicy(ctx *Context, opts ...InvokeOption) (*GetSchedulerPolicyResult, error)
    func GetSchedulerPolicyOutput(ctx *Context, opts ...InvokeOption) GetSchedulerPolicyResultOutput

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

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

    getSchedulerPolicy Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    MemoryOversubscriptionEnabled bool
    (bool: false) - When true, tasks may exceed their reserved memory limit.
    PreemptionConfig Dictionary<string, bool>
    (map[string]bool) - Options to enable preemption for various schedulers.
    SchedulerAlgorithm string
    (string) - Specifies whether scheduler binpacks or spreads allocations on available nodes.
    Id string
    The provider-assigned unique ID for this managed resource.
    MemoryOversubscriptionEnabled bool
    (bool: false) - When true, tasks may exceed their reserved memory limit.
    PreemptionConfig map[string]bool
    (map[string]bool) - Options to enable preemption for various schedulers.
    SchedulerAlgorithm string
    (string) - Specifies whether scheduler binpacks or spreads allocations on available nodes.
    id String
    The provider-assigned unique ID for this managed resource.
    memoryOversubscriptionEnabled Boolean
    (bool: false) - When true, tasks may exceed their reserved memory limit.
    preemptionConfig Map<String,Boolean>
    (map[string]bool) - Options to enable preemption for various schedulers.
    schedulerAlgorithm String
    (string) - Specifies whether scheduler binpacks or spreads allocations on available nodes.
    id string
    The provider-assigned unique ID for this managed resource.
    memoryOversubscriptionEnabled boolean
    (bool: false) - When true, tasks may exceed their reserved memory limit.
    preemptionConfig {[key: string]: boolean}
    (map[string]bool) - Options to enable preemption for various schedulers.
    schedulerAlgorithm string
    (string) - Specifies whether scheduler binpacks or spreads allocations on available nodes.
    id str
    The provider-assigned unique ID for this managed resource.
    memory_oversubscription_enabled bool
    (bool: false) - When true, tasks may exceed their reserved memory limit.
    preemption_config Mapping[str, bool]
    (map[string]bool) - Options to enable preemption for various schedulers.
    scheduler_algorithm str
    (string) - Specifies whether scheduler binpacks or spreads allocations on available nodes.
    id String
    The provider-assigned unique ID for this managed resource.
    memoryOversubscriptionEnabled Boolean
    (bool: false) - When true, tasks may exceed their reserved memory limit.
    preemptionConfig Map<Boolean>
    (map[string]bool) - Options to enable preemption for various schedulers.
    schedulerAlgorithm String
    (string) - Specifies whether scheduler binpacks or spreads allocations on available nodes.

    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.4.1 published on Wednesday, Oct 30, 2024 by Pulumi