HashiCorp Nomad

v0.2.1 published on Tuesday, Dec 7, 2021 by Pulumi

getScalingPolicy

Retrieve a Scaling Policy.

Example Usage

using Pulumi;
using Nomad = Pulumi.Nomad;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Nomad.GetScalingPolicy.InvokeAsync(new Nomad.GetScalingPolicyArgs
        {
            Id = "ad19848d-1921-179c-affa-244a3543be88",
        }));
    }

}
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.GetScalingPolicy(ctx, &GetScalingPolicyArgs{
			Id: "ad19848d-1921-179c-affa-244a3543be88",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_nomad as nomad

example = nomad.get_scaling_policy(id="ad19848d-1921-179c-affa-244a3543be88")
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const example = pulumi.output(nomad.getScalingPolicy({
    id: "ad19848d-1921-179c-affa-244a3543be88",
}));

Using getScalingPolicy

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 getScalingPolicy(args: GetScalingPolicyArgs, opts?: InvokeOptions): Promise<GetScalingPolicyResult>
function getScalingPolicyOutput(args: GetScalingPolicyOutputArgs, opts?: InvokeOptions): Output<GetScalingPolicyResult>
def get_scaling_policy(id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetScalingPolicyResult
def get_scaling_policy_output(id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetScalingPolicyResult]
func GetScalingPolicy(ctx *Context, args *GetScalingPolicyArgs, opts ...InvokeOption) (*GetScalingPolicyResult, error)
func GetScalingPolicyOutput(ctx *Context, args *GetScalingPolicyOutputArgs, opts ...InvokeOption) GetScalingPolicyResultOutput

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

public static class GetScalingPolicy 
{
    public static Task<GetScalingPolicyResult> InvokeAsync(GetScalingPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetScalingPolicyResult> Invoke(GetScalingPolicyInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Id string
(string: <required>) - The ID of the scaling policy.
Id string
(string: <required>) - The ID of the scaling policy.
id string
(string: <required>) - The ID of the scaling policy.
id str
(string: <required>) - The ID of the scaling policy.

getScalingPolicy Result

The following output properties are available:

Enabled bool
Id string
Max int
Min int
Policy string
Target Dictionary<string, object>
Type string
Enabled bool
Id string
Max int
Min int
Policy string
Target map[string]interface{}
Type string
enabled boolean
id string
max number
min number
policy string
target {[key: string]: any}
type string
enabled bool
id str
max int
min int
policy str
target Mapping[str, Any]
type str

Package Details

Repository
https://github.com/pulumi/pulumi-nomad
License
Apache-2.0
Notes
This Pulumi package is based on the nomad Terraform Provider.