Nomad v2.4.1 published on Wednesday, Oct 30, 2024 by Pulumi
nomad.getScalingPolicies
Explore with Pulumi AI
Retrieve a list of Scaling Policies.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const example = nomad.getScalingPolicies({
jobId: "webapp",
type: "horizontal",
});
import pulumi
import pulumi_nomad as nomad
example = nomad.get_scaling_policies(job_id="webapp",
type="horizontal")
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.GetScalingPolicies(ctx, &nomad.GetScalingPoliciesArgs{
JobId: pulumi.StringRef("webapp"),
Type: pulumi.StringRef("horizontal"),
}, 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.GetScalingPolicies.Invoke(new()
{
JobId = "webapp",
Type = "horizontal",
});
});
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.GetScalingPoliciesArgs;
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.getScalingPolicies(GetScalingPoliciesArgs.builder()
.jobId("webapp")
.type("horizontal")
.build());
}
}
variables:
example:
fn::invoke:
Function: nomad:getScalingPolicies
Arguments:
jobId: webapp
type: horizontal
Using getScalingPolicies
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 getScalingPolicies(args: GetScalingPoliciesArgs, opts?: InvokeOptions): Promise<GetScalingPoliciesResult>
function getScalingPoliciesOutput(args: GetScalingPoliciesOutputArgs, opts?: InvokeOptions): Output<GetScalingPoliciesResult>
def get_scaling_policies(job_id: Optional[str] = None,
type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetScalingPoliciesResult
def get_scaling_policies_output(job_id: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetScalingPoliciesResult]
func GetScalingPolicies(ctx *Context, args *GetScalingPoliciesArgs, opts ...InvokeOption) (*GetScalingPoliciesResult, error)
func GetScalingPoliciesOutput(ctx *Context, args *GetScalingPoliciesOutputArgs, opts ...InvokeOption) GetScalingPoliciesResultOutput
> Note: This function is named GetScalingPolicies
in the Go SDK.
public static class GetScalingPolicies
{
public static Task<GetScalingPoliciesResult> InvokeAsync(GetScalingPoliciesArgs args, InvokeOptions? opts = null)
public static Output<GetScalingPoliciesResult> Invoke(GetScalingPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetScalingPoliciesResult> getScalingPolicies(GetScalingPoliciesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: nomad:index/getScalingPolicies:getScalingPolicies
arguments:
# arguments dictionary
The following arguments are supported:
getScalingPolicies Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Policies
List<Get
Scaling Policies Policy> list of maps
- A list of scaling policies.- Job
Id string - Type string
(string)
- The scaling policy type.
- Id string
- The provider-assigned unique ID for this managed resource.
- Policies
[]Get
Scaling Policies Policy list of maps
- A list of scaling policies.- Job
Id string - Type string
(string)
- The scaling policy type.
- id String
- The provider-assigned unique ID for this managed resource.
- policies
List<Get
Scaling Policies Policy> list of maps
- A list of scaling policies.- job
Id String - type String
(string)
- The scaling policy type.
- id string
- The provider-assigned unique ID for this managed resource.
- policies
Get
Scaling Policies Policy[] list of maps
- A list of scaling policies.- job
Id string - type string
(string)
- The scaling policy type.
- id str
- The provider-assigned unique ID for this managed resource.
- policies
Sequence[Get
Scaling Policies Policy] list of maps
- A list of scaling policies.- job_
id str - type str
(string)
- The scaling policy type.
- id String
- The provider-assigned unique ID for this managed resource.
- policies List<Property Map>
list of maps
- A list of scaling policies.- job
Id String - type String
(string)
- The scaling policy type.
Supporting Types
GetScalingPoliciesPolicy
- Enabled bool
(boolean)
- Whether or not the scaling policy is enabled.- Id string
(string)
- The scaling policy ID.- Target Dictionary<string, string>
(map[string]string)
- The scaling policy target.- Type string
(string)
- An optional string to filter scaling policies based on policy type. If not provided, policies of all types are returned.
- Enabled bool
(boolean)
- Whether or not the scaling policy is enabled.- Id string
(string)
- The scaling policy ID.- Target map[string]string
(map[string]string)
- The scaling policy target.- Type string
(string)
- An optional string to filter scaling policies based on policy type. If not provided, policies of all types are returned.
- enabled Boolean
(boolean)
- Whether or not the scaling policy is enabled.- id String
(string)
- The scaling policy ID.- target Map<String,String>
(map[string]string)
- The scaling policy target.- type String
(string)
- An optional string to filter scaling policies based on policy type. If not provided, policies of all types are returned.
- enabled boolean
(boolean)
- Whether or not the scaling policy is enabled.- id string
(string)
- The scaling policy ID.- target {[key: string]: string}
(map[string]string)
- The scaling policy target.- type string
(string)
- An optional string to filter scaling policies based on policy type. If not provided, policies of all types are returned.
- enabled bool
(boolean)
- Whether or not the scaling policy is enabled.- id str
(string)
- The scaling policy ID.- target Mapping[str, str]
(map[string]string)
- The scaling policy target.- type str
(string)
- An optional string to filter scaling policies based on policy type. If not provided, policies of all types are returned.
- enabled Boolean
(boolean)
- Whether or not the scaling policy is enabled.- id String
(string)
- The scaling policy ID.- target Map<String>
(map[string]string)
- The scaling policy target.- type String
(string)
- An optional string to filter scaling policies based on policy type. If not provided, policies of all types are returned.
Package Details
- Repository
- HashiCorp Nomad pulumi/pulumi-nomad
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nomad
Terraform Provider.