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.
- Name
Regex string A regex string to filter resulting scaling rules by name.
- Output
File string - Scaling
Group stringId Scaling group id the scaling rules belong to.
- Type string
Type of scaling rule.
- Ids []string
A list of scaling rule IDs.
- Name
Regex string A regex string to filter resulting scaling rules by name.
- Output
File string - Scaling
Group stringId Scaling group id the scaling rules belong to.
- Type string
Type of scaling rule.
- ids string[]
A list of scaling rule IDs.
- name
Regex string A regex string to filter resulting scaling rules by name.
- output
File string - scaling
Group stringId 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_ strid 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.
Ali Cloud. Ess. Outputs. Get Scaling Rules Rule> A list of scaling rules. Each element contains the following attributes:
- Name
Regex string - Output
File string - Scaling
Group stringId 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
[]Get
Scaling Rules Rule A list of scaling rules. Each element contains the following attributes:
- Name
Regex string - Output
File string - Scaling
Group stringId 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
Get
Scaling Rules Rule[] A list of scaling rules. Each element contains the following attributes:
- name
Regex string - output
File string - scaling
Group stringId 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[Get
Scaling Rules Rule] A list of scaling rules. Each element contains the following attributes:
- name_
regex str - output_
file str - scaling_
group_ strid 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.
- Adjustment
Type string Adjustment type of the scaling rule.
- Adjustment
Value int Adjustment value of the scaling rule.
- Cooldown int
Cooldown time of the scaling rule.
- Id string
ID of the scaling rule.
- Min
Adjustment intMagnitude Min adjustment magnitude of scaling rule.
- Name string
Name of the scaling rule.
- Scaling
Group stringId Scaling group id the scaling rules belong to.
- Scaling
Rule stringAri Ari of scaling rule.
- Type string
Type of scaling rule.
- Adjustment
Type string Adjustment type of the scaling rule.
- Adjustment
Value int Adjustment value of the scaling rule.
- Cooldown int
Cooldown time of the scaling rule.
- Id string
ID of the scaling rule.
- Min
Adjustment intMagnitude Min adjustment magnitude of scaling rule.
- Name string
Name of the scaling rule.
- Scaling
Group stringId Scaling group id the scaling rules belong to.
- Scaling
Rule stringAri Ari of scaling rule.
- Type string
Type of scaling rule.
- adjustment
Type string Adjustment type of the scaling rule.
- adjustment
Value number Adjustment value of the scaling rule.
- cooldown number
Cooldown time of the scaling rule.
- id string
ID of the scaling rule.
- min
Adjustment numberMagnitude Min adjustment magnitude of scaling rule.
- name string
Name of the scaling rule.
- scaling
Group stringId Scaling group id the scaling rules belong to.
- scaling
Rule stringAri 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.
- min
Adjustment floatMagnitude Min adjustment magnitude of scaling rule.
- name str
Name of the scaling rule.
- scaling
Rule strAri Ari of scaling rule.
- scaling_
group_ strid 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
alicloudTerraform Provider.