nomad.getSchedulerPolicy

Retrieve the cluster’s scheduler configuration.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Nomad = Pulumi.Nomad;

return await Deployment.RunAsync(() => 
{
    var @global = Nomad.GetSchedulerPolicy.Invoke();

});
package main

import (
	"github.com/pulumi/pulumi-nomad/sdk/go/nomad"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := nomad.GetSchedulerPolicy(ctx, nil, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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();

    }
}
import pulumi
import pulumi_nomad as nomad

global_ = nomad.get_scheduler_policy()
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const global = nomad.getSchedulerPolicy({});
variables:
  global:
    fn::invoke:
      Function: nomad:getSchedulerPolicy
      Arguments: {}

Using getSchedulerPolicy

function getSchedulerPolicy(opts?: InvokeOptions): Promise<GetSchedulerPolicyResult>
def get_scheduler_policy(opts: Optional[InvokeOptions] = None) -> GetSchedulerPolicyResult
func GetSchedulerPolicy(ctx *Context, opts ...InvokeOption) (*GetSchedulerPolicyResult, error)

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

public static class GetSchedulerPolicy 
{
    public static Task<GetSchedulerPolicyResult> InvokeAsync(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.