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

nomad.getScalingPolicy

Explore with Pulumi AI

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

    Retrieve a Scaling Policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nomad from "@pulumi/nomad";
    
    const example = nomad.getScalingPolicy({
        id: "ad19848d-1921-179c-affa-244a3543be88",
    });
    
    import pulumi
    import pulumi_nomad as nomad
    
    example = nomad.get_scaling_policy(id="ad19848d-1921-179c-affa-244a3543be88")
    
    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.GetScalingPolicy(ctx, &nomad.GetScalingPolicyArgs{
    			Id: "ad19848d-1921-179c-affa-244a3543be88",
    		}, 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 example = Nomad.GetScalingPolicy.Invoke(new()
        {
            Id = "ad19848d-1921-179c-affa-244a3543be88",
        });
    
    });
    
    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.GetScalingPolicyArgs;
    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 example = NomadFunctions.getScalingPolicy(GetScalingPolicyArgs.builder()
                .id("ad19848d-1921-179c-affa-244a3543be88")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: nomad:getScalingPolicy
          Arguments:
            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)
    }
    public static CompletableFuture<GetScalingPolicyResult> getScalingPolicy(GetScalingPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: nomad:index/getScalingPolicy:getScalingPolicy
      arguments:
        # arguments dictionary

    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 string
    (string: <required>) - The ID of the scaling policy.
    id str
    (string: <required>) - The ID of the scaling policy.
    id String
    (string: <required>) - The ID of the scaling policy.

    getScalingPolicy Result

    The following output properties are available:

    Enabled bool
    (boolean) - Whether or not the scaling policy is enabled.
    Id string
    Max int
    (integer) - The maximum value set in the scaling policy.
    Min int
    (integer) - The minimum value set in the scaling policy.
    Policy string
    (string) - The policy inside the scaling policy.
    Target Dictionary<string, string>
    (map[string]string) - The scaling policy target.
    Type string
    (string) - The scaling policy type.
    Enabled bool
    (boolean) - Whether or not the scaling policy is enabled.
    Id string
    Max int
    (integer) - The maximum value set in the scaling policy.
    Min int
    (integer) - The minimum value set in the scaling policy.
    Policy string
    (string) - The policy inside the scaling policy.
    Target map[string]string
    (map[string]string) - The scaling policy target.
    Type string
    (string) - The scaling policy type.
    enabled Boolean
    (boolean) - Whether or not the scaling policy is enabled.
    id String
    max Integer
    (integer) - The maximum value set in the scaling policy.
    min Integer
    (integer) - The minimum value set in the scaling policy.
    policy String
    (string) - The policy inside the scaling policy.
    target Map<String,String>
    (map[string]string) - The scaling policy target.
    type String
    (string) - The scaling policy type.
    enabled boolean
    (boolean) - Whether or not the scaling policy is enabled.
    id string
    max number
    (integer) - The maximum value set in the scaling policy.
    min number
    (integer) - The minimum value set in the scaling policy.
    policy string
    (string) - The policy inside the scaling policy.
    target {[key: string]: string}
    (map[string]string) - The scaling policy target.
    type string
    (string) - The scaling policy type.
    enabled bool
    (boolean) - Whether or not the scaling policy is enabled.
    id str
    max int
    (integer) - The maximum value set in the scaling policy.
    min int
    (integer) - The minimum value set in the scaling policy.
    policy str
    (string) - The policy inside the scaling policy.
    target Mapping[str, str]
    (map[string]string) - The scaling policy target.
    type str
    (string) - The scaling policy type.
    enabled Boolean
    (boolean) - Whether or not the scaling policy is enabled.
    id String
    max Number
    (integer) - The maximum value set in the scaling policy.
    min Number
    (integer) - The minimum value set in the scaling policy.
    policy String
    (string) - The policy inside the scaling policy.
    target Map<String>
    (map[string]string) - The scaling policy target.
    type String
    (string) - The scaling policy type.

    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