GetScalingRules

This data source provides available scaling rule resources.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var scalingrulesDs = Output.Create(AliCloud.Ess.GetScalingRules.InvokeAsync(new AliCloud.Ess.GetScalingRulesArgs
        {
            Ids = 
            {
                "scaling_rule_id1",
                "scaling_rule_id2",
            },
            NameRegex = "scaling_rule_name",
            ScalingGroupId = "scaling_group_id",
        }));
        this.FirstScalingRule = scalingrulesDs.Apply(scalingrulesDs => scalingrulesDs.Rules[0].Id);
    }

    [Output("firstScalingRule")]
    public Output<string> FirstScalingRule { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

scalingrules_ds = alicloud.ess.get_scaling_rules(ids=[
        "scaling_rule_id1",
        "scaling_rule_id2",
    ],
    name_regex="scaling_rule_name",
    scaling_group_id="scaling_group_id")
pulumi.export("firstScalingRule", scalingrules_ds.rules[0]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const scalingrulesDs = pulumi.output(alicloud.ess.getScalingRules({
    ids: [
        "scaling_rule_id1",
        "scaling_rule_id2",
    ],
    nameRegex: "scaling_rule_name",
    scalingGroupId: "scaling_group_id",
}, { async: true }));

export const firstScalingRule = scalingrulesDs.rules[0].id;

Using GetScalingRules

function getScalingRules(args: GetScalingRulesArgs, opts?: InvokeOptions): Promise<GetScalingRulesResult>
function  get_scaling_rules(ids=None, name_regex=None, output_file=None, scaling_group_id=None, type=None, opts=None)
func GetScalingRules(ctx *Context, args *GetScalingRulesArgs, opts ...InvokeOption) (*GetScalingRulesResult, error)
public static class GetScalingRules {
    public static Task<GetScalingRulesResult> InvokeAsync(GetScalingRulesArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Ids List<string>

A list of scaling rule IDs.

NameRegex string

A regex string to filter resulting scaling rules by name.

OutputFile string
ScalingGroupId string

Scaling group id the scaling rules belong to.

Type string

Type of scaling rule.

Ids []string

A list of scaling rule IDs.

NameRegex string

A regex string to filter resulting scaling rules by name.

OutputFile string
ScalingGroupId string

Scaling group id the scaling rules belong to.

Type string

Type of scaling rule.

ids string[]

A list of scaling rule IDs.

nameRegex string

A regex string to filter resulting scaling rules by name.

outputFile string
scalingGroupId string

Scaling group id the scaling rules belong to.

type string

Type of scaling rule.

ids List[str]

A list of scaling rule IDs.

name_regex str

A regex string to filter resulting scaling rules by name.

output_file str
scaling_group_id str

Scaling group id the scaling rules belong to.

type str

Type of scaling rule.

GetScalingRules Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of scaling rule ids.

Names List<string>

A list of scaling rule names.

Rules List<Pulumi.AliCloud.Ess.Outputs.GetScalingRulesRule>

A list of scaling rules. Each element contains the following attributes:

NameRegex string
OutputFile string
ScalingGroupId string

ID of the scaling group.

Type string

Type of the scaling rule.

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of scaling rule ids.

Names []string

A list of scaling rule names.

Rules []GetScalingRulesRule

A list of scaling rules. Each element contains the following attributes:

NameRegex string
OutputFile string
ScalingGroupId string

ID of the scaling group.

Type string

Type of the scaling rule.

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of scaling rule ids.

names string[]

A list of scaling rule names.

rules GetScalingRulesRule[]

A list of scaling rules. Each element contains the following attributes:

nameRegex string
outputFile string
scalingGroupId string

ID of the scaling group.

type string

Type of the scaling rule.

id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of scaling rule ids.

names List[str]

A list of scaling rule names.

rules List[GetScalingRulesRule]

A list of scaling rules. Each element contains the following attributes:

name_regex str
output_file str
scaling_group_id str

ID of the scaling group.

type str

Type of the scaling rule.

Supporting Types

GetScalingRulesRule

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AdjustmentType string

Adjustment type of the scaling rule.

AdjustmentValue int

Adjustment value of the scaling rule.

Cooldown int

Cooldown time of the scaling rule.

Id string

ID of the scaling rule.

MinAdjustmentMagnitude int

Min adjustment magnitude of scaling rule.

Name string

Name of the scaling rule.

ScalingGroupId string

Scaling group id the scaling rules belong to.

ScalingRuleAri string

Ari of scaling rule.

Type string

Type of scaling rule.

AdjustmentType string

Adjustment type of the scaling rule.

AdjustmentValue int

Adjustment value of the scaling rule.

Cooldown int

Cooldown time of the scaling rule.

Id string

ID of the scaling rule.

MinAdjustmentMagnitude int

Min adjustment magnitude of scaling rule.

Name string

Name of the scaling rule.

ScalingGroupId string

Scaling group id the scaling rules belong to.

ScalingRuleAri string

Ari of scaling rule.

Type string

Type of scaling rule.

adjustmentType string

Adjustment type of the scaling rule.

adjustmentValue number

Adjustment value of the scaling rule.

cooldown number

Cooldown time of the scaling rule.

id string

ID of the scaling rule.

minAdjustmentMagnitude number

Min adjustment magnitude of scaling rule.

name string

Name of the scaling rule.

scalingGroupId string

Scaling group id the scaling rules belong to.

scalingRuleAri string

Ari of scaling rule.

type string

Type of scaling rule.

adjustment_type str

Adjustment type of the scaling rule.

adjustment_value float

Adjustment value of the scaling rule.

cooldown float

Cooldown time of the scaling rule.

id str

ID of the scaling rule.

minAdjustmentMagnitude float

Min adjustment magnitude of scaling rule.

name str

Name of the scaling rule.

scalingRuleAri str

Ari of scaling rule.

scaling_group_id str

Scaling group id the scaling rules belong to.

type str

Type of scaling rule.

Package Details

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