generated from pulumi/pulumi-tf-provider-boilerplate
/
getSchedulerPolicy.go
54 lines (50 loc) · 1.63 KB
/
getSchedulerPolicy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package nomad
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Retrieve the cluster's [scheduler configuration](https://www.nomadproject.io/api-docs/operator#sample-response-3).
//
// ## Example Usage
//
// ```go
// 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
// })
// }
//
// ```
func GetSchedulerPolicy(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetSchedulerPolicyResult, error) {
var rv GetSchedulerPolicyResult
err := ctx.Invoke("nomad:index/getSchedulerPolicy:getSchedulerPolicy", nil, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of values returned by getSchedulerPolicy.
type GetSchedulerPolicyResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// `(bool: false)` - When `true`, tasks may exceed their reserved memory limit.
MemoryOversubscriptionEnabled bool `pulumi:"memoryOversubscriptionEnabled"`
// `(map[string]bool)` - Options to enable preemption for various schedulers.
PreemptionConfig map[string]bool `pulumi:"preemptionConfig"`
// `(string)` - Specifies whether scheduler binpacks or spreads allocations on available nodes.
SchedulerAlgorithm string `pulumi:"schedulerAlgorithm"`
}