Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi
alicloud.sae.getApplicationScalingRules
Explore with Pulumi AI
This data source provides the Sae Application Scaling Rules of the current Alibaba Cloud user.
NOTE: Available in v1.159.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.sae.getApplicationScalingRules({
appId: "example_value",
ids: [
"example_value-1",
"example_value-2",
],
});
export const saeApplicationScalingRuleId1 = ids.then(ids => ids.rules?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.sae.get_application_scaling_rules(app_id="example_value",
ids=[
"example_value-1",
"example_value-2",
])
pulumi.export("saeApplicationScalingRuleId1", ids.rules[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sae"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := sae.GetApplicationScalingRules(ctx, &sae.GetApplicationScalingRulesArgs{
AppId: "example_value",
Ids: []string{
"example_value-1",
"example_value-2",
},
}, nil)
if err != nil {
return err
}
ctx.Export("saeApplicationScalingRuleId1", ids.Rules[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Sae.GetApplicationScalingRules.Invoke(new()
{
AppId = "example_value",
Ids = new[]
{
"example_value-1",
"example_value-2",
},
});
return new Dictionary<string, object?>
{
["saeApplicationScalingRuleId1"] = ids.Apply(getApplicationScalingRulesResult => getApplicationScalingRulesResult.Rules[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.sae.SaeFunctions;
import com.pulumi.alicloud.sae.inputs.GetApplicationScalingRulesArgs;
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 ids = SaeFunctions.getApplicationScalingRules(GetApplicationScalingRulesArgs.builder()
.appId("example_value")
.ids(
"example_value-1",
"example_value-2")
.build());
ctx.export("saeApplicationScalingRuleId1", ids.applyValue(getApplicationScalingRulesResult -> getApplicationScalingRulesResult.rules()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:sae:getApplicationScalingRules
Arguments:
appId: example_value
ids:
- example_value-1
- example_value-2
outputs:
saeApplicationScalingRuleId1: ${ids.rules[0].id}
Using getApplicationScalingRules
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 getApplicationScalingRules(args: GetApplicationScalingRulesArgs, opts?: InvokeOptions): Promise<GetApplicationScalingRulesResult>
function getApplicationScalingRulesOutput(args: GetApplicationScalingRulesOutputArgs, opts?: InvokeOptions): Output<GetApplicationScalingRulesResult>
def get_application_scaling_rules(app_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApplicationScalingRulesResult
def get_application_scaling_rules_output(app_id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApplicationScalingRulesResult]
func GetApplicationScalingRules(ctx *Context, args *GetApplicationScalingRulesArgs, opts ...InvokeOption) (*GetApplicationScalingRulesResult, error)
func GetApplicationScalingRulesOutput(ctx *Context, args *GetApplicationScalingRulesOutputArgs, opts ...InvokeOption) GetApplicationScalingRulesResultOutput
> Note: This function is named GetApplicationScalingRules
in the Go SDK.
public static class GetApplicationScalingRules
{
public static Task<GetApplicationScalingRulesResult> InvokeAsync(GetApplicationScalingRulesArgs args, InvokeOptions? opts = null)
public static Output<GetApplicationScalingRulesResult> Invoke(GetApplicationScalingRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetApplicationScalingRulesResult> getApplicationScalingRules(GetApplicationScalingRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:sae/getApplicationScalingRules:getApplicationScalingRules
arguments:
# arguments dictionary
The following arguments are supported:
- App
Id string - The ID of the Application.
- Ids List<string>
- A list of Application Scaling Rule IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- App
Id string - The ID of the Application.
- Ids []string
- A list of Application Scaling Rule IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- app
Id String - The ID of the Application.
- ids List<String>
- A list of Application Scaling Rule IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- app
Id string - The ID of the Application.
- ids string[]
- A list of Application Scaling Rule IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- app_
id str - The ID of the Application.
- ids Sequence[str]
- A list of Application Scaling Rule IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- app
Id String - The ID of the Application.
- ids List<String>
- A list of Application Scaling Rule IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getApplicationScalingRules Result
The following output properties are available:
- App
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Rules
List<Pulumi.
Ali Cloud. Sae. Outputs. Get Application Scaling Rules Rule> - Output
File string
- App
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Rules
[]Get
Application Scaling Rules Rule - Output
File string
- app
Id String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- rules
List<Get
Application Scaling Rules Rule> - output
File String
- app
Id string - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- rules
Get
Application Scaling Rules Rule[] - output
File string
- app_
id str - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- rules
Sequence[Get
Application Scaling Rules Rule] - output_
file str
- app
Id String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- rules List<Property Map>
- output
File String
Supporting Types
GetApplicationScalingRulesRule
- App
Id string - The ID of the Application.
- Create
Time string - The CreateTime of the Application Scaling Rule.
- Id string
- The ID of the Application Scaling Rule.
- Scaling
Rule boolEnable - Whether to enable the auto scaling policy.
- Scaling
Rule List<Pulumi.Metrics Ali Cloud. Sae. Inputs. Get Application Scaling Rules Rule Scaling Rule Metric> - Monitoring indicators for elastic scaling.
- Scaling
Rule stringName - The name of the scaling rule.
- Scaling
Rule List<Pulumi.Timers Ali Cloud. Sae. Inputs. Get Application Scaling Rules Rule Scaling Rule Timer> - Timing elastic expansion.
- Scaling
Rule stringType - Flexible strategy type.
- App
Id string - The ID of the Application.
- Create
Time string - The CreateTime of the Application Scaling Rule.
- Id string
- The ID of the Application Scaling Rule.
- Scaling
Rule boolEnable - Whether to enable the auto scaling policy.
- Scaling
Rule []GetMetrics Application Scaling Rules Rule Scaling Rule Metric - Monitoring indicators for elastic scaling.
- Scaling
Rule stringName - The name of the scaling rule.
- Scaling
Rule []GetTimers Application Scaling Rules Rule Scaling Rule Timer - Timing elastic expansion.
- Scaling
Rule stringType - Flexible strategy type.
- app
Id String - The ID of the Application.
- create
Time String - The CreateTime of the Application Scaling Rule.
- id String
- The ID of the Application Scaling Rule.
- scaling
Rule BooleanEnable - Whether to enable the auto scaling policy.
- scaling
Rule List<GetMetrics Application Scaling Rules Rule Scaling Rule Metric> - Monitoring indicators for elastic scaling.
- scaling
Rule StringName - The name of the scaling rule.
- scaling
Rule List<GetTimers Application Scaling Rules Rule Scaling Rule Timer> - Timing elastic expansion.
- scaling
Rule StringType - Flexible strategy type.
- app
Id string - The ID of the Application.
- create
Time string - The CreateTime of the Application Scaling Rule.
- id string
- The ID of the Application Scaling Rule.
- scaling
Rule booleanEnable - Whether to enable the auto scaling policy.
- scaling
Rule GetMetrics Application Scaling Rules Rule Scaling Rule Metric[] - Monitoring indicators for elastic scaling.
- scaling
Rule stringName - The name of the scaling rule.
- scaling
Rule GetTimers Application Scaling Rules Rule Scaling Rule Timer[] - Timing elastic expansion.
- scaling
Rule stringType - Flexible strategy type.
- app_
id str - The ID of the Application.
- create_
time str - The CreateTime of the Application Scaling Rule.
- id str
- The ID of the Application Scaling Rule.
- scaling_
rule_ boolenable - Whether to enable the auto scaling policy.
- scaling_
rule_ Sequence[Getmetrics Application Scaling Rules Rule Scaling Rule Metric] - Monitoring indicators for elastic scaling.
- scaling_
rule_ strname - The name of the scaling rule.
- scaling_
rule_ Sequence[Gettimers Application Scaling Rules Rule Scaling Rule Timer] - Timing elastic expansion.
- scaling_
rule_ strtype - Flexible strategy type.
- app
Id String - The ID of the Application.
- create
Time String - The CreateTime of the Application Scaling Rule.
- id String
- The ID of the Application Scaling Rule.
- scaling
Rule BooleanEnable - Whether to enable the auto scaling policy.
- scaling
Rule List<Property Map>Metrics - Monitoring indicators for elastic scaling.
- scaling
Rule StringName - The name of the scaling rule.
- scaling
Rule List<Property Map>Timers - Timing elastic expansion.
- scaling
Rule StringType - Flexible strategy type.
GetApplicationScalingRulesRuleScalingRuleMetric
- Max
Replicas int - Metrics
List<Pulumi.
Ali Cloud. Sae. Inputs. Get Application Scaling Rules Rule Scaling Rule Metric Metric> - Metrics
Statuses List<Pulumi.Ali Cloud. Sae. Inputs. Get Application Scaling Rules Rule Scaling Rule Metric Metrics Status> - Min
Replicas int - Scale
Down List<Pulumi.Rules Ali Cloud. Sae. Inputs. Get Application Scaling Rules Rule Scaling Rule Metric Scale Down Rule> - Scale
Up List<Pulumi.Rules Ali Cloud. Sae. Inputs. Get Application Scaling Rules Rule Scaling Rule Metric Scale Up Rule>
- Max
Replicas int - Metrics
[]Get
Application Scaling Rules Rule Scaling Rule Metric Metric - Metrics
Statuses []GetApplication Scaling Rules Rule Scaling Rule Metric Metrics Status - Min
Replicas int - Scale
Down []GetRules Application Scaling Rules Rule Scaling Rule Metric Scale Down Rule - Scale
Up []GetRules Application Scaling Rules Rule Scaling Rule Metric Scale Up Rule
- max
Replicas Integer - metrics
List<Get
Application Scaling Rules Rule Scaling Rule Metric Metric> - metrics
Statuses List<GetApplication Scaling Rules Rule Scaling Rule Metric Metrics Status> - min
Replicas Integer - scale
Down List<GetRules Application Scaling Rules Rule Scaling Rule Metric Scale Down Rule> - scale
Up List<GetRules Application Scaling Rules Rule Scaling Rule Metric Scale Up Rule>
- max
Replicas number - metrics
Get
Application Scaling Rules Rule Scaling Rule Metric Metric[] - metrics
Statuses GetApplication Scaling Rules Rule Scaling Rule Metric Metrics Status[] - min
Replicas number - scale
Down GetRules Application Scaling Rules Rule Scaling Rule Metric Scale Down Rule[] - scale
Up GetRules Application Scaling Rules Rule Scaling Rule Metric Scale Up Rule[]
- max_
replicas int - metrics
Sequence[Get
Application Scaling Rules Rule Scaling Rule Metric Metric] - metrics_
statuses Sequence[GetApplication Scaling Rules Rule Scaling Rule Metric Metrics Status] - min_
replicas int - scale_
down_ Sequence[Getrules Application Scaling Rules Rule Scaling Rule Metric Scale Down Rule] - scale_
up_ Sequence[Getrules Application Scaling Rules Rule Scaling Rule Metric Scale Up Rule]
GetApplicationScalingRulesRuleScalingRuleMetricMetric
- Metric
Target intAverage Utilization - Metric
Type string
- Metric
Target intAverage Utilization - Metric
Type string
- metric
Target IntegerAverage Utilization - metric
Type String
- metric
Target numberAverage Utilization - metric
Type string
- metric
Target NumberAverage Utilization - metric
Type String
GetApplicationScalingRulesRuleScalingRuleMetricMetricsStatus
- Current
Metrics List<Pulumi.Ali Cloud. Sae. Inputs. Get Application Scaling Rules Rule Scaling Rule Metric Metrics Status Current Metric> - Current
Replicas int - Desired
Replicas int - Last
Scale stringTime - Max
Replicas int - Min
Replicas int - Next
Scale List<Pulumi.Metrics Ali Cloud. Sae. Inputs. Get Application Scaling Rules Rule Scaling Rule Metric Metrics Status Next Scale Metric> - Next
Scale intTime Period
- current
Metrics List<GetApplication Scaling Rules Rule Scaling Rule Metric Metrics Status Current Metric> - current
Replicas Integer - desired
Replicas Integer - last
Scale StringTime - max
Replicas Integer - min
Replicas Integer - next
Scale List<GetMetrics Application Scaling Rules Rule Scaling Rule Metric Metrics Status Next Scale Metric> - next
Scale IntegerTime Period
- current
Metrics GetApplication Scaling Rules Rule Scaling Rule Metric Metrics Status Current Metric[] - current
Replicas number - desired
Replicas number - last
Scale stringTime - max
Replicas number - min
Replicas number - next
Scale GetMetrics Application Scaling Rules Rule Scaling Rule Metric Metrics Status Next Scale Metric[] - next
Scale numberTime Period
- current_
metrics Sequence[GetApplication Scaling Rules Rule Scaling Rule Metric Metrics Status Current Metric] - current_
replicas int - desired_
replicas int - last_
scale_ strtime - max_
replicas int - min_
replicas int - next_
scale_ Sequence[Getmetrics Application Scaling Rules Rule Scaling Rule Metric Metrics Status Next Scale Metric] - next_
scale_ inttime_ period
- current
Metrics List<Property Map> - current
Replicas Number - desired
Replicas Number - last
Scale StringTime - max
Replicas Number - min
Replicas Number - next
Scale List<Property Map>Metrics - next
Scale NumberTime Period
GetApplicationScalingRulesRuleScalingRuleMetricMetricsStatusCurrentMetric
- Current
Value int - Name string
- Type string
- Current
Value int - Name string
- Type string
- current
Value Integer - name String
- type String
- current
Value number - name string
- type string
- current_
value int - name str
- type str
- current
Value Number - name String
- type String
GetApplicationScalingRulesRuleScalingRuleMetricMetricsStatusNextScaleMetric
- Name string
- int
- Next
Scale intOut Average Utilization
- Name string
- int
- Next
Scale intOut Average Utilization
- name String
- Integer
- next
Scale IntegerOut Average Utilization
- name string
- number
- next
Scale numberOut Average Utilization
- name String
- Number
- next
Scale NumberOut Average Utilization
GetApplicationScalingRulesRuleScalingRuleMetricScaleDownRule
- Disabled bool
- Stabilization
Window intSeconds - Step int
- Disabled bool
- Stabilization
Window intSeconds - Step int
- disabled Boolean
- stabilization
Window IntegerSeconds - step Integer
- disabled boolean
- stabilization
Window numberSeconds - step number
- disabled bool
- stabilization_
window_ intseconds - step int
- disabled Boolean
- stabilization
Window NumberSeconds - step Number
GetApplicationScalingRulesRuleScalingRuleMetricScaleUpRule
- Disabled bool
- Stabilization
Window intSeconds - Step int
- Disabled bool
- Stabilization
Window intSeconds - Step int
- disabled Boolean
- stabilization
Window IntegerSeconds - step Integer
- disabled boolean
- stabilization
Window numberSeconds - step number
- disabled bool
- stabilization_
window_ intseconds - step int
- disabled Boolean
- stabilization
Window NumberSeconds - step Number
GetApplicationScalingRulesRuleScalingRuleTimer
- Begin
Date string - End
Date string - Period string
- Schedules
[]Get
Application Scaling Rules Rule Scaling Rule Timer Schedule
- begin
Date string - end
Date string - period string
- schedules
Get
Application Scaling Rules Rule Scaling Rule Timer Schedule[]
- begin
Date String - end
Date String - period String
- schedules List<Property Map>
GetApplicationScalingRulesRuleScalingRuleTimerSchedule
- At
Time string - Max
Replicas int - Min
Replicas int - Target
Replicas int
- At
Time string - Max
Replicas int - Min
Replicas int - Target
Replicas int
- at
Time String - max
Replicas Integer - min
Replicas Integer - target
Replicas Integer
- at
Time string - max
Replicas number - min
Replicas number - target
Replicas number
- at_
time str - max_
replicas int - min_
replicas int - target_
replicas int
- at
Time String - max
Replicas Number - min
Replicas Number - target
Replicas Number
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.