1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. sae
  5. getApplicationScalingRules
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.sae.getApplicationScalingRules

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    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:

    AppId string
    The ID of the Application.
    Ids List<string>
    A list of Application Scaling Rule IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    AppId string
    The ID of the Application.
    Ids []string
    A list of Application Scaling Rule IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    appId String
    The ID of the Application.
    ids List<String>
    A list of Application Scaling Rule IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    appId string
    The ID of the Application.
    ids string[]
    A list of Application Scaling Rule IDs.
    outputFile 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).
    appId String
    The ID of the Application.
    ids List<String>
    A list of Application Scaling Rule IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getApplicationScalingRules Result

    The following output properties are available:

    AppId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Rules List<Pulumi.AliCloud.Sae.Outputs.GetApplicationScalingRulesRule>
    OutputFile string
    AppId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Rules []GetApplicationScalingRulesRule
    OutputFile string
    appId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    rules List<GetApplicationScalingRulesRule>
    outputFile String
    appId string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    rules GetApplicationScalingRulesRule[]
    outputFile string
    app_id str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    rules Sequence[GetApplicationScalingRulesRule]
    output_file str
    appId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    rules List<Property Map>
    outputFile String

    Supporting Types

    GetApplicationScalingRulesRule

    AppId string
    The ID of the Application.
    CreateTime string
    The CreateTime of the Application Scaling Rule.
    Id string
    The ID of the Application Scaling Rule.
    ScalingRuleEnable bool
    Whether to enable the auto scaling policy.
    ScalingRuleMetrics List<Pulumi.AliCloud.Sae.Inputs.GetApplicationScalingRulesRuleScalingRuleMetric>
    Monitoring indicators for elastic scaling.
    ScalingRuleName string
    The name of the scaling rule.
    ScalingRuleTimers List<Pulumi.AliCloud.Sae.Inputs.GetApplicationScalingRulesRuleScalingRuleTimer>
    Timing elastic expansion.
    ScalingRuleType string
    Flexible strategy type.
    AppId string
    The ID of the Application.
    CreateTime string
    The CreateTime of the Application Scaling Rule.
    Id string
    The ID of the Application Scaling Rule.
    ScalingRuleEnable bool
    Whether to enable the auto scaling policy.
    ScalingRuleMetrics []GetApplicationScalingRulesRuleScalingRuleMetric
    Monitoring indicators for elastic scaling.
    ScalingRuleName string
    The name of the scaling rule.
    ScalingRuleTimers []GetApplicationScalingRulesRuleScalingRuleTimer
    Timing elastic expansion.
    ScalingRuleType string
    Flexible strategy type.
    appId String
    The ID of the Application.
    createTime String
    The CreateTime of the Application Scaling Rule.
    id String
    The ID of the Application Scaling Rule.
    scalingRuleEnable Boolean
    Whether to enable the auto scaling policy.
    scalingRuleMetrics List<GetApplicationScalingRulesRuleScalingRuleMetric>
    Monitoring indicators for elastic scaling.
    scalingRuleName String
    The name of the scaling rule.
    scalingRuleTimers List<GetApplicationScalingRulesRuleScalingRuleTimer>
    Timing elastic expansion.
    scalingRuleType String
    Flexible strategy type.
    appId string
    The ID of the Application.
    createTime string
    The CreateTime of the Application Scaling Rule.
    id string
    The ID of the Application Scaling Rule.
    scalingRuleEnable boolean
    Whether to enable the auto scaling policy.
    scalingRuleMetrics GetApplicationScalingRulesRuleScalingRuleMetric[]
    Monitoring indicators for elastic scaling.
    scalingRuleName string
    The name of the scaling rule.
    scalingRuleTimers GetApplicationScalingRulesRuleScalingRuleTimer[]
    Timing elastic expansion.
    scalingRuleType string
    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_enable bool
    Whether to enable the auto scaling policy.
    scaling_rule_metrics Sequence[GetApplicationScalingRulesRuleScalingRuleMetric]
    Monitoring indicators for elastic scaling.
    scaling_rule_name str
    The name of the scaling rule.
    scaling_rule_timers Sequence[GetApplicationScalingRulesRuleScalingRuleTimer]
    Timing elastic expansion.
    scaling_rule_type str
    Flexible strategy type.
    appId String
    The ID of the Application.
    createTime String
    The CreateTime of the Application Scaling Rule.
    id String
    The ID of the Application Scaling Rule.
    scalingRuleEnable Boolean
    Whether to enable the auto scaling policy.
    scalingRuleMetrics List<Property Map>
    Monitoring indicators for elastic scaling.
    scalingRuleName String
    The name of the scaling rule.
    scalingRuleTimers List<Property Map>
    Timing elastic expansion.
    scalingRuleType String
    Flexible strategy type.

    GetApplicationScalingRulesRuleScalingRuleMetric

    GetApplicationScalingRulesRuleScalingRuleMetricMetric

    GetApplicationScalingRulesRuleScalingRuleMetricMetricsStatus

    GetApplicationScalingRulesRuleScalingRuleMetricMetricsStatusCurrentMetric

    CurrentValue int
    Name string
    Type string
    CurrentValue int
    Name string
    Type string
    currentValue Integer
    name String
    type String
    currentValue number
    name string
    type string
    currentValue Number
    name String
    type String

    GetApplicationScalingRulesRuleScalingRuleMetricMetricsStatusNextScaleMetric

    GetApplicationScalingRulesRuleScalingRuleMetricScaleDownRule

    GetApplicationScalingRulesRuleScalingRuleMetricScaleUpRule

    GetApplicationScalingRulesRuleScalingRuleTimer

    GetApplicationScalingRulesRuleScalingRuleTimerSchedule

    atTime String
    maxReplicas Integer
    minReplicas Integer
    targetReplicas Integer
    atTime string
    maxReplicas number
    minReplicas number
    targetReplicas number
    atTime String
    maxReplicas Number
    minReplicas Number
    targetReplicas Number

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi