1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ess
  5. getScalingConfigurations
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.ess.getScalingConfigurations

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

    This data source provides available scaling configuration resources.

    NOTE: Available since v1.240.0

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const defaultInteger = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const myName = `${name}-${defaultInteger.result}`;
    const _default = alicloud.getZones({
        availableDiskCategory: "cloud_efficiency",
        availableResourceCreation: "VSwitch",
    });
    const defaultGetInstanceTypes = _default.then(_default => alicloud.ecs.getInstanceTypes({
        availabilityZone: _default.zones?.[0]?.id,
        cpuCoreCount: 2,
        memorySize: 4,
    }));
    const defaultGetImages = alicloud.ecs.getImages({
        nameRegex: "^ubuntu_18.*64",
        mostRecent: true,
        owners: "system",
    });
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: myName,
        cidrBlock: "172.16.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vpcId: defaultNetwork.id,
        cidrBlock: "172.16.0.0/24",
        zoneId: _default.then(_default => _default.zones?.[0]?.id),
        vswitchName: myName,
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
        securityGroupName: myName,
        vpcId: defaultNetwork.id,
    });
    const defaultSecurityGroupRule = new alicloud.ecs.SecurityGroupRule("default", {
        type: "ingress",
        ipProtocol: "tcp",
        nicType: "intranet",
        policy: "accept",
        portRange: "22/22",
        priority: 1,
        securityGroupId: defaultSecurityGroup.id,
        cidrIp: "172.16.0.0/24",
    });
    const defaultScalingGroup = new alicloud.ess.ScalingGroup("default", {
        minSize: 1,
        maxSize: 1,
        scalingGroupName: myName,
        removalPolicies: [
            "OldestInstance",
            "NewestInstance",
        ],
        vswitchIds: [defaultSwitch.id],
    });
    const defaultScalingConfiguration = new alicloud.ess.ScalingConfiguration("default", {
        scalingGroupId: defaultScalingGroup.id,
        imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
        instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id),
        securityGroupId: defaultSecurityGroup.id,
        forceDelete: true,
        active: true,
        scalingConfigurationName: "scaling_configuration_name",
    });
    const scalingconfigurationsDs = alicloud.ess.getScalingConfigurationsOutput({
        scalingGroupId: defaultScalingGroup.id,
        ids: [defaultScalingConfiguration.id],
        nameRegex: "scaling_configuration_name",
    });
    export const firstScalingConfiguration = scalingconfigurationsDs.apply(scalingconfigurationsDs => scalingconfigurationsDs.configurations?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default_integer = random.index.Integer("default",
        min=10000,
        max=99999)
    my_name = f"{name}-{default_integer['result']}"
    default = alicloud.get_zones(available_disk_category="cloud_efficiency",
        available_resource_creation="VSwitch")
    default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
        cpu_core_count=2,
        memory_size=4)
    default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
        most_recent=True,
        owners="system")
    default_network = alicloud.vpc.Network("default",
        vpc_name=my_name,
        cidr_block="172.16.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vpc_id=default_network.id,
        cidr_block="172.16.0.0/24",
        zone_id=default.zones[0].id,
        vswitch_name=my_name)
    default_security_group = alicloud.ecs.SecurityGroup("default",
        security_group_name=my_name,
        vpc_id=default_network.id)
    default_security_group_rule = alicloud.ecs.SecurityGroupRule("default",
        type="ingress",
        ip_protocol="tcp",
        nic_type="intranet",
        policy="accept",
        port_range="22/22",
        priority=1,
        security_group_id=default_security_group.id,
        cidr_ip="172.16.0.0/24")
    default_scaling_group = alicloud.ess.ScalingGroup("default",
        min_size=1,
        max_size=1,
        scaling_group_name=my_name,
        removal_policies=[
            "OldestInstance",
            "NewestInstance",
        ],
        vswitch_ids=[default_switch.id])
    default_scaling_configuration = alicloud.ess.ScalingConfiguration("default",
        scaling_group_id=default_scaling_group.id,
        image_id=default_get_images.images[0].id,
        instance_type=default_get_instance_types.instance_types[0].id,
        security_group_id=default_security_group.id,
        force_delete=True,
        active=True,
        scaling_configuration_name="scaling_configuration_name")
    scalingconfigurations_ds = alicloud.ess.get_scaling_configurations_output(scaling_group_id=default_scaling_group.id,
        ids=[default_scaling_configuration.id],
        name_regex="scaling_configuration_name")
    pulumi.export("firstScalingConfiguration", scalingconfigurations_ds.configurations[0].id)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ess"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		myName := fmt.Sprintf("%v-%v", name, defaultInteger.Result)
    		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableDiskCategory:     pulumi.StringRef("cloud_efficiency"),
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			AvailabilityZone: pulumi.StringRef(_default.Zones[0].Id),
    			CpuCoreCount:     pulumi.IntRef(2),
    			MemorySize:       pulumi.Float64Ref(4),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			NameRegex:  pulumi.StringRef("^ubuntu_18.*64"),
    			MostRecent: pulumi.BoolRef(true),
    			Owners:     pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(myName),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VpcId:       defaultNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			ZoneId:      pulumi.String(_default.Zones[0].Id),
    			VswitchName: pulumi.String(myName),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			SecurityGroupName: pulumi.String(myName),
    			VpcId:             defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewSecurityGroupRule(ctx, "default", &ecs.SecurityGroupRuleArgs{
    			Type:            pulumi.String("ingress"),
    			IpProtocol:      pulumi.String("tcp"),
    			NicType:         pulumi.String("intranet"),
    			Policy:          pulumi.String("accept"),
    			PortRange:       pulumi.String("22/22"),
    			Priority:        pulumi.Int(1),
    			SecurityGroupId: defaultSecurityGroup.ID(),
    			CidrIp:          pulumi.String("172.16.0.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultScalingGroup, err := ess.NewScalingGroup(ctx, "default", &ess.ScalingGroupArgs{
    			MinSize:          pulumi.Int(1),
    			MaxSize:          pulumi.Int(1),
    			ScalingGroupName: pulumi.String(myName),
    			RemovalPolicies: pulumi.StringArray{
    				pulumi.String("OldestInstance"),
    				pulumi.String("NewestInstance"),
    			},
    			VswitchIds: pulumi.StringArray{
    				defaultSwitch.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultScalingConfiguration, err := ess.NewScalingConfiguration(ctx, "default", &ess.ScalingConfigurationArgs{
    			ScalingGroupId:           defaultScalingGroup.ID(),
    			ImageId:                  pulumi.String(defaultGetImages.Images[0].Id),
    			InstanceType:             pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
    			SecurityGroupId:          defaultSecurityGroup.ID(),
    			ForceDelete:              pulumi.Bool(true),
    			Active:                   pulumi.Bool(true),
    			ScalingConfigurationName: pulumi.String("scaling_configuration_name"),
    		})
    		if err != nil {
    			return err
    		}
    		scalingconfigurationsDs := ess.GetScalingConfigurationsOutput(ctx, ess.GetScalingConfigurationsOutputArgs{
    			ScalingGroupId: defaultScalingGroup.ID(),
    			Ids: pulumi.StringArray{
    				defaultScalingConfiguration.ID(),
    			},
    			NameRegex: pulumi.String("scaling_configuration_name"),
    		}, nil)
    		ctx.Export("firstScalingConfiguration", scalingconfigurationsDs.ApplyT(func(scalingconfigurationsDs ess.GetScalingConfigurationsResult) (*string, error) {
    			return &scalingconfigurationsDs.Configurations[0].Id, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var defaultInteger = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var myName = $"{name}-{defaultInteger.Result}";
    
        var @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableDiskCategory = "cloud_efficiency",
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            CpuCoreCount = 2,
            MemorySize = 4,
        });
    
        var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            NameRegex = "^ubuntu_18.*64",
            MostRecent = true,
            Owners = "system",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = myName,
            CidrBlock = "172.16.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            VswitchName = myName,
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            SecurityGroupName = myName,
            VpcId = defaultNetwork.Id,
        });
    
        var defaultSecurityGroupRule = new AliCloud.Ecs.SecurityGroupRule("default", new()
        {
            Type = "ingress",
            IpProtocol = "tcp",
            NicType = "intranet",
            Policy = "accept",
            PortRange = "22/22",
            Priority = 1,
            SecurityGroupId = defaultSecurityGroup.Id,
            CidrIp = "172.16.0.0/24",
        });
    
        var defaultScalingGroup = new AliCloud.Ess.ScalingGroup("default", new()
        {
            MinSize = 1,
            MaxSize = 1,
            ScalingGroupName = myName,
            RemovalPolicies = new[]
            {
                "OldestInstance",
                "NewestInstance",
            },
            VswitchIds = new[]
            {
                defaultSwitch.Id,
            },
        });
    
        var defaultScalingConfiguration = new AliCloud.Ess.ScalingConfiguration("default", new()
        {
            ScalingGroupId = defaultScalingGroup.Id,
            ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            SecurityGroupId = defaultSecurityGroup.Id,
            ForceDelete = true,
            Active = true,
            ScalingConfigurationName = "scaling_configuration_name",
        });
    
        var scalingconfigurationsDs = AliCloud.Ess.GetScalingConfigurations.Invoke(new()
        {
            ScalingGroupId = defaultScalingGroup.Id,
            Ids = new[]
            {
                defaultScalingConfiguration.Id,
            },
            NameRegex = "scaling_configuration_name",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstScalingConfiguration"] = scalingconfigurationsDs.Apply(getScalingConfigurationsResult => getScalingConfigurationsResult.Configurations[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.SecurityGroupRule;
    import com.pulumi.alicloud.ecs.SecurityGroupRuleArgs;
    import com.pulumi.alicloud.ess.ScalingGroup;
    import com.pulumi.alicloud.ess.ScalingGroupArgs;
    import com.pulumi.alicloud.ess.ScalingConfiguration;
    import com.pulumi.alicloud.ess.ScalingConfigurationArgs;
    import com.pulumi.alicloud.ess.EssFunctions;
    import com.pulumi.alicloud.ess.inputs.GetScalingConfigurationsArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            final var myName = String.format("%s-%s", name,defaultInteger.result());
    
            final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableDiskCategory("cloud_efficiency")
                .availableResourceCreation("VSwitch")
                .build());
    
            final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .cpuCoreCount(2)
                .memorySize(4)
                .build());
    
            final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .nameRegex("^ubuntu_18.*64")
                .mostRecent(true)
                .owners("system")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(myName)
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vpcId(defaultNetwork.id())
                .cidrBlock("172.16.0.0/24")
                .zoneId(default_.zones()[0].id())
                .vswitchName(myName)
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .securityGroupName(myName)
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultSecurityGroupRule = new SecurityGroupRule("defaultSecurityGroupRule", SecurityGroupRuleArgs.builder()
                .type("ingress")
                .ipProtocol("tcp")
                .nicType("intranet")
                .policy("accept")
                .portRange("22/22")
                .priority(1)
                .securityGroupId(defaultSecurityGroup.id())
                .cidrIp("172.16.0.0/24")
                .build());
    
            var defaultScalingGroup = new ScalingGroup("defaultScalingGroup", ScalingGroupArgs.builder()
                .minSize(1)
                .maxSize(1)
                .scalingGroupName(myName)
                .removalPolicies(            
                    "OldestInstance",
                    "NewestInstance")
                .vswitchIds(defaultSwitch.id())
                .build());
    
            var defaultScalingConfiguration = new ScalingConfiguration("defaultScalingConfiguration", ScalingConfigurationArgs.builder()
                .scalingGroupId(defaultScalingGroup.id())
                .imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .securityGroupId(defaultSecurityGroup.id())
                .forceDelete(true)
                .active(true)
                .scalingConfigurationName("scaling_configuration_name")
                .build());
    
            final var scalingconfigurationsDs = EssFunctions.getScalingConfigurations(GetScalingConfigurationsArgs.builder()
                .scalingGroupId(defaultScalingGroup.id())
                .ids(defaultScalingConfiguration.id())
                .nameRegex("scaling_configuration_name")
                .build());
    
            ctx.export("firstScalingConfiguration", scalingconfigurationsDs.applyValue(getScalingConfigurationsResult -> getScalingConfigurationsResult).applyValue(scalingconfigurationsDs -> scalingconfigurationsDs.applyValue(getScalingConfigurationsResult -> getScalingConfigurationsResult.configurations()[0].id())));
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaultInteger:
        type: random:integer
        name: default
        properties:
          min: 10000
          max: 99999
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${myName}
          cidrBlock: 172.16.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vpcId: ${defaultNetwork.id}
          cidrBlock: 172.16.0.0/24
          zoneId: ${default.zones[0].id}
          vswitchName: ${myName}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          securityGroupName: ${myName}
          vpcId: ${defaultNetwork.id}
      defaultSecurityGroupRule:
        type: alicloud:ecs:SecurityGroupRule
        name: default
        properties:
          type: ingress
          ipProtocol: tcp
          nicType: intranet
          policy: accept
          portRange: 22/22
          priority: 1
          securityGroupId: ${defaultSecurityGroup.id}
          cidrIp: 172.16.0.0/24
      defaultScalingGroup:
        type: alicloud:ess:ScalingGroup
        name: default
        properties:
          minSize: 1
          maxSize: 1
          scalingGroupName: ${myName}
          removalPolicies:
            - OldestInstance
            - NewestInstance
          vswitchIds:
            - ${defaultSwitch.id}
      defaultScalingConfiguration:
        type: alicloud:ess:ScalingConfiguration
        name: default
        properties:
          scalingGroupId: ${defaultScalingGroup.id}
          imageId: ${defaultGetImages.images[0].id}
          instanceType: ${defaultGetInstanceTypes.instanceTypes[0].id}
          securityGroupId: ${defaultSecurityGroup.id}
          forceDelete: true
          active: true
          scalingConfigurationName: scaling_configuration_name
    variables:
      myName: ${name}-${defaultInteger.result}
      default:
        fn::invoke:
          function: alicloud:getZones
          arguments:
            availableDiskCategory: cloud_efficiency
            availableResourceCreation: VSwitch
      defaultGetInstanceTypes:
        fn::invoke:
          function: alicloud:ecs:getInstanceTypes
          arguments:
            availabilityZone: ${default.zones[0].id}
            cpuCoreCount: 2
            memorySize: 4
      defaultGetImages:
        fn::invoke:
          function: alicloud:ecs:getImages
          arguments:
            nameRegex: ^ubuntu_18.*64
            mostRecent: true
            owners: system
      scalingconfigurationsDs:
        fn::invoke:
          function: alicloud:ess:getScalingConfigurations
          arguments:
            scalingGroupId: ${defaultScalingGroup.id}
            ids:
              - ${defaultScalingConfiguration.id}
            nameRegex: scaling_configuration_name
    outputs:
      firstScalingConfiguration: ${scalingconfigurationsDs.configurations[0].id}
    

    Using getScalingConfigurations

    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 getScalingConfigurations(args: GetScalingConfigurationsArgs, opts?: InvokeOptions): Promise<GetScalingConfigurationsResult>
    function getScalingConfigurationsOutput(args: GetScalingConfigurationsOutputArgs, opts?: InvokeOptions): Output<GetScalingConfigurationsResult>
    def get_scaling_configurations(ids: Optional[Sequence[str]] = None,
                                   name_regex: Optional[str] = None,
                                   output_file: Optional[str] = None,
                                   scaling_group_id: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetScalingConfigurationsResult
    def get_scaling_configurations_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                   name_regex: Optional[pulumi.Input[str]] = None,
                                   output_file: Optional[pulumi.Input[str]] = None,
                                   scaling_group_id: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetScalingConfigurationsResult]
    func GetScalingConfigurations(ctx *Context, args *GetScalingConfigurationsArgs, opts ...InvokeOption) (*GetScalingConfigurationsResult, error)
    func GetScalingConfigurationsOutput(ctx *Context, args *GetScalingConfigurationsOutputArgs, opts ...InvokeOption) GetScalingConfigurationsResultOutput

    > Note: This function is named GetScalingConfigurations in the Go SDK.

    public static class GetScalingConfigurations 
    {
        public static Task<GetScalingConfigurationsResult> InvokeAsync(GetScalingConfigurationsArgs args, InvokeOptions? opts = null)
        public static Output<GetScalingConfigurationsResult> Invoke(GetScalingConfigurationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetScalingConfigurationsResult> getScalingConfigurations(GetScalingConfigurationsArgs args, InvokeOptions options)
    public static Output<GetScalingConfigurationsResult> getScalingConfigurations(GetScalingConfigurationsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: alicloud:ess/getScalingConfigurations:getScalingConfigurations
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of scaling configuration IDs.
    NameRegex string
    A regex string to filter resulting scaling configurations by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ScalingGroupId string
    Scaling group id the scaling configurations belong to.
    Ids []string
    A list of scaling configuration IDs.
    NameRegex string
    A regex string to filter resulting scaling configurations by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ScalingGroupId string
    Scaling group id the scaling configurations belong to.
    ids List<String>
    A list of scaling configuration IDs.
    nameRegex String
    A regex string to filter resulting scaling configurations by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    scalingGroupId String
    Scaling group id the scaling configurations belong to.
    ids string[]
    A list of scaling configuration IDs.
    nameRegex string
    A regex string to filter resulting scaling configurations by name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    scalingGroupId string
    Scaling group id the scaling configurations belong to.
    ids Sequence[str]
    A list of scaling configuration IDs.
    name_regex str
    A regex string to filter resulting scaling configurations by name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    scaling_group_id str
    Scaling group id the scaling configurations belong to.
    ids List<String>
    A list of scaling configuration IDs.
    nameRegex String
    A regex string to filter resulting scaling configurations by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    scalingGroupId String
    Scaling group id the scaling configurations belong to.

    getScalingConfigurations Result

    The following output properties are available:

    Configurations List<Pulumi.AliCloud.Ess.Outputs.GetScalingConfigurationsConfiguration>
    A list of scaling rules. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of scaling configuration ids.
    Names List<string>
    A list of scaling configuration names.
    NameRegex string
    OutputFile string
    ScalingGroupId string
    ID of the scaling group.
    Configurations []GetScalingConfigurationsConfiguration
    A list of scaling rules. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of scaling configuration ids.
    Names []string
    A list of scaling configuration names.
    NameRegex string
    OutputFile string
    ScalingGroupId string
    ID of the scaling group.
    configurations List<GetScalingConfigurationsConfiguration>
    A list of scaling rules. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of scaling configuration ids.
    names List<String>
    A list of scaling configuration names.
    nameRegex String
    outputFile String
    scalingGroupId String
    ID of the scaling group.
    configurations GetScalingConfigurationsConfiguration[]
    A list of scaling rules. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of scaling configuration ids.
    names string[]
    A list of scaling configuration names.
    nameRegex string
    outputFile string
    scalingGroupId string
    ID of the scaling group.
    configurations Sequence[GetScalingConfigurationsConfiguration]
    A list of scaling rules. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of scaling configuration ids.
    names Sequence[str]
    A list of scaling configuration names.
    name_regex str
    output_file str
    scaling_group_id str
    ID of the scaling group.
    configurations List<Property Map>
    A list of scaling rules. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of scaling configuration ids.
    names List<String>
    A list of scaling configuration names.
    nameRegex String
    outputFile String
    scalingGroupId String
    ID of the scaling group.

    Supporting Types

    GetScalingConfigurationsConfiguration

    CreationTime string
    Creation time of the scaling configuration.
    CreditSpecification string
    Performance mode of the t5 burstable instance.
    DataDisks List<Pulumi.AliCloud.Ess.Inputs.GetScalingConfigurationsConfigurationDataDisk>
    Data disks of the scaling configuration.
    HostName string
    (Optional,Available since v1.143.0) Hostname of an ECS instance.
    Id string
    ID of the scaling rule.
    ImageId string
    Image ID of the scaling configuration.
    InstanceName string
    (Optional,Available since v1.143.0) InstanceName of an ECS instance.
    InstancePatternInfos List<Pulumi.AliCloud.Ess.Inputs.GetScalingConfigurationsConfigurationInstancePatternInfo>
    (Optional, Available since v1.240.0) intelligent configuration mode. In this mode, you only need to specify the number of vCPUs, memory size, instance family, and maximum price. The system selects an instance type that is provided at the lowest price based on your configurations to create ECS instances. This mode is available only for scaling groups that reside in virtual private clouds (VPCs). This mode helps reduce the failures of scale-out activities caused by insufficient inventory of instance types.
    InstanceType string
    Resource type of an ECS instance.
    InternetChargeType string
    Internet charge type of the scaling configuration.
    InternetMaxBandwidthIn int
    Internet max bandwidth in of the scaling configuration.
    InternetMaxBandwidthOut int
    Internet max bandwidth of the scaling configuration.
    LifecycleState string
    Lifecycle state of the scaling configuration.
    Name string
    Name of the scaling configuration.
    ScalingGroupId string
    Scaling group id the scaling configurations belong to.
    SecurityGroupId string
    Security group ID of the scaling configuration.
    SpotPriceLimits List<Pulumi.AliCloud.Ess.Inputs.GetScalingConfigurationsConfigurationSpotPriceLimit>
    (Optional, Available since v1.151.0) The maximum price hourly for instance types.
    SpotStrategy string
    (Optional, Available since v1.151.0) The spot strategy for a Pay-As-You-Go instance.
    SystemDiskCategory string
    System disk category of the scaling configuration.
    SystemDiskPerformanceLevel string
    The performance level of the ESSD used as the system disk.
    SystemDiskSize int
    System disk size of the scaling configuration.
    CreationTime string
    Creation time of the scaling configuration.
    CreditSpecification string
    Performance mode of the t5 burstable instance.
    DataDisks []GetScalingConfigurationsConfigurationDataDisk
    Data disks of the scaling configuration.
    HostName string
    (Optional,Available since v1.143.0) Hostname of an ECS instance.
    Id string
    ID of the scaling rule.
    ImageId string
    Image ID of the scaling configuration.
    InstanceName string
    (Optional,Available since v1.143.0) InstanceName of an ECS instance.
    InstancePatternInfos []GetScalingConfigurationsConfigurationInstancePatternInfo
    (Optional, Available since v1.240.0) intelligent configuration mode. In this mode, you only need to specify the number of vCPUs, memory size, instance family, and maximum price. The system selects an instance type that is provided at the lowest price based on your configurations to create ECS instances. This mode is available only for scaling groups that reside in virtual private clouds (VPCs). This mode helps reduce the failures of scale-out activities caused by insufficient inventory of instance types.
    InstanceType string
    Resource type of an ECS instance.
    InternetChargeType string
    Internet charge type of the scaling configuration.
    InternetMaxBandwidthIn int
    Internet max bandwidth in of the scaling configuration.
    InternetMaxBandwidthOut int
    Internet max bandwidth of the scaling configuration.
    LifecycleState string
    Lifecycle state of the scaling configuration.
    Name string
    Name of the scaling configuration.
    ScalingGroupId string
    Scaling group id the scaling configurations belong to.
    SecurityGroupId string
    Security group ID of the scaling configuration.
    SpotPriceLimits []GetScalingConfigurationsConfigurationSpotPriceLimit
    (Optional, Available since v1.151.0) The maximum price hourly for instance types.
    SpotStrategy string
    (Optional, Available since v1.151.0) The spot strategy for a Pay-As-You-Go instance.
    SystemDiskCategory string
    System disk category of the scaling configuration.
    SystemDiskPerformanceLevel string
    The performance level of the ESSD used as the system disk.
    SystemDiskSize int
    System disk size of the scaling configuration.
    creationTime String
    Creation time of the scaling configuration.
    creditSpecification String
    Performance mode of the t5 burstable instance.
    dataDisks List<GetScalingConfigurationsConfigurationDataDisk>
    Data disks of the scaling configuration.
    hostName String
    (Optional,Available since v1.143.0) Hostname of an ECS instance.
    id String
    ID of the scaling rule.
    imageId String
    Image ID of the scaling configuration.
    instanceName String
    (Optional,Available since v1.143.0) InstanceName of an ECS instance.
    instancePatternInfos List<GetScalingConfigurationsConfigurationInstancePatternInfo>
    (Optional, Available since v1.240.0) intelligent configuration mode. In this mode, you only need to specify the number of vCPUs, memory size, instance family, and maximum price. The system selects an instance type that is provided at the lowest price based on your configurations to create ECS instances. This mode is available only for scaling groups that reside in virtual private clouds (VPCs). This mode helps reduce the failures of scale-out activities caused by insufficient inventory of instance types.
    instanceType String
    Resource type of an ECS instance.
    internetChargeType String
    Internet charge type of the scaling configuration.
    internetMaxBandwidthIn Integer
    Internet max bandwidth in of the scaling configuration.
    internetMaxBandwidthOut Integer
    Internet max bandwidth of the scaling configuration.
    lifecycleState String
    Lifecycle state of the scaling configuration.
    name String
    Name of the scaling configuration.
    scalingGroupId String
    Scaling group id the scaling configurations belong to.
    securityGroupId String
    Security group ID of the scaling configuration.
    spotPriceLimits List<GetScalingConfigurationsConfigurationSpotPriceLimit>
    (Optional, Available since v1.151.0) The maximum price hourly for instance types.
    spotStrategy String
    (Optional, Available since v1.151.0) The spot strategy for a Pay-As-You-Go instance.
    systemDiskCategory String
    System disk category of the scaling configuration.
    systemDiskPerformanceLevel String
    The performance level of the ESSD used as the system disk.
    systemDiskSize Integer
    System disk size of the scaling configuration.
    creationTime string
    Creation time of the scaling configuration.
    creditSpecification string
    Performance mode of the t5 burstable instance.
    dataDisks GetScalingConfigurationsConfigurationDataDisk[]
    Data disks of the scaling configuration.
    hostName string
    (Optional,Available since v1.143.0) Hostname of an ECS instance.
    id string
    ID of the scaling rule.
    imageId string
    Image ID of the scaling configuration.
    instanceName string
    (Optional,Available since v1.143.0) InstanceName of an ECS instance.
    instancePatternInfos GetScalingConfigurationsConfigurationInstancePatternInfo[]
    (Optional, Available since v1.240.0) intelligent configuration mode. In this mode, you only need to specify the number of vCPUs, memory size, instance family, and maximum price. The system selects an instance type that is provided at the lowest price based on your configurations to create ECS instances. This mode is available only for scaling groups that reside in virtual private clouds (VPCs). This mode helps reduce the failures of scale-out activities caused by insufficient inventory of instance types.
    instanceType string
    Resource type of an ECS instance.
    internetChargeType string
    Internet charge type of the scaling configuration.
    internetMaxBandwidthIn number
    Internet max bandwidth in of the scaling configuration.
    internetMaxBandwidthOut number
    Internet max bandwidth of the scaling configuration.
    lifecycleState string
    Lifecycle state of the scaling configuration.
    name string
    Name of the scaling configuration.
    scalingGroupId string
    Scaling group id the scaling configurations belong to.
    securityGroupId string
    Security group ID of the scaling configuration.
    spotPriceLimits GetScalingConfigurationsConfigurationSpotPriceLimit[]
    (Optional, Available since v1.151.0) The maximum price hourly for instance types.
    spotStrategy string
    (Optional, Available since v1.151.0) The spot strategy for a Pay-As-You-Go instance.
    systemDiskCategory string
    System disk category of the scaling configuration.
    systemDiskPerformanceLevel string
    The performance level of the ESSD used as the system disk.
    systemDiskSize number
    System disk size of the scaling configuration.
    creation_time str
    Creation time of the scaling configuration.
    credit_specification str
    Performance mode of the t5 burstable instance.
    data_disks Sequence[GetScalingConfigurationsConfigurationDataDisk]
    Data disks of the scaling configuration.
    host_name str
    (Optional,Available since v1.143.0) Hostname of an ECS instance.
    id str
    ID of the scaling rule.
    image_id str
    Image ID of the scaling configuration.
    instance_name str
    (Optional,Available since v1.143.0) InstanceName of an ECS instance.
    instance_pattern_infos Sequence[GetScalingConfigurationsConfigurationInstancePatternInfo]
    (Optional, Available since v1.240.0) intelligent configuration mode. In this mode, you only need to specify the number of vCPUs, memory size, instance family, and maximum price. The system selects an instance type that is provided at the lowest price based on your configurations to create ECS instances. This mode is available only for scaling groups that reside in virtual private clouds (VPCs). This mode helps reduce the failures of scale-out activities caused by insufficient inventory of instance types.
    instance_type str
    Resource type of an ECS instance.
    internet_charge_type str
    Internet charge type of the scaling configuration.
    internet_max_bandwidth_in int
    Internet max bandwidth in of the scaling configuration.
    internet_max_bandwidth_out int
    Internet max bandwidth of the scaling configuration.
    lifecycle_state str
    Lifecycle state of the scaling configuration.
    name str
    Name of the scaling configuration.
    scaling_group_id str
    Scaling group id the scaling configurations belong to.
    security_group_id str
    Security group ID of the scaling configuration.
    spot_price_limits Sequence[GetScalingConfigurationsConfigurationSpotPriceLimit]
    (Optional, Available since v1.151.0) The maximum price hourly for instance types.
    spot_strategy str
    (Optional, Available since v1.151.0) The spot strategy for a Pay-As-You-Go instance.
    system_disk_category str
    System disk category of the scaling configuration.
    system_disk_performance_level str
    The performance level of the ESSD used as the system disk.
    system_disk_size int
    System disk size of the scaling configuration.
    creationTime String
    Creation time of the scaling configuration.
    creditSpecification String
    Performance mode of the t5 burstable instance.
    dataDisks List<Property Map>
    Data disks of the scaling configuration.
    hostName String
    (Optional,Available since v1.143.0) Hostname of an ECS instance.
    id String
    ID of the scaling rule.
    imageId String
    Image ID of the scaling configuration.
    instanceName String
    (Optional,Available since v1.143.0) InstanceName of an ECS instance.
    instancePatternInfos List<Property Map>
    (Optional, Available since v1.240.0) intelligent configuration mode. In this mode, you only need to specify the number of vCPUs, memory size, instance family, and maximum price. The system selects an instance type that is provided at the lowest price based on your configurations to create ECS instances. This mode is available only for scaling groups that reside in virtual private clouds (VPCs). This mode helps reduce the failures of scale-out activities caused by insufficient inventory of instance types.
    instanceType String
    Resource type of an ECS instance.
    internetChargeType String
    Internet charge type of the scaling configuration.
    internetMaxBandwidthIn Number
    Internet max bandwidth in of the scaling configuration.
    internetMaxBandwidthOut Number
    Internet max bandwidth of the scaling configuration.
    lifecycleState String
    Lifecycle state of the scaling configuration.
    name String
    Name of the scaling configuration.
    scalingGroupId String
    Scaling group id the scaling configurations belong to.
    securityGroupId String
    Security group ID of the scaling configuration.
    spotPriceLimits List<Property Map>
    (Optional, Available since v1.151.0) The maximum price hourly for instance types.
    spotStrategy String
    (Optional, Available since v1.151.0) The spot strategy for a Pay-As-You-Go instance.
    systemDiskCategory String
    System disk category of the scaling configuration.
    systemDiskPerformanceLevel String
    The performance level of the ESSD used as the system disk.
    systemDiskSize Number
    System disk size of the scaling configuration.

    GetScalingConfigurationsConfigurationDataDisk

    Category string
    Category of data disk.
    DeleteWithInstance bool
    Delete_with_instance attribute of data disk.
    Device string
    Device attribute of data disk.
    PerformanceLevel string
    The performance level of the ESSD used as data disk.
    Size int
    Size of data disk.
    SnapshotId string
    Size of data disk.
    Category string
    Category of data disk.
    DeleteWithInstance bool
    Delete_with_instance attribute of data disk.
    Device string
    Device attribute of data disk.
    PerformanceLevel string
    The performance level of the ESSD used as data disk.
    Size int
    Size of data disk.
    SnapshotId string
    Size of data disk.
    category String
    Category of data disk.
    deleteWithInstance Boolean
    Delete_with_instance attribute of data disk.
    device String
    Device attribute of data disk.
    performanceLevel String
    The performance level of the ESSD used as data disk.
    size Integer
    Size of data disk.
    snapshotId String
    Size of data disk.
    category string
    Category of data disk.
    deleteWithInstance boolean
    Delete_with_instance attribute of data disk.
    device string
    Device attribute of data disk.
    performanceLevel string
    The performance level of the ESSD used as data disk.
    size number
    Size of data disk.
    snapshotId string
    Size of data disk.
    category str
    Category of data disk.
    delete_with_instance bool
    Delete_with_instance attribute of data disk.
    device str
    Device attribute of data disk.
    performance_level str
    The performance level of the ESSD used as data disk.
    size int
    Size of data disk.
    snapshot_id str
    Size of data disk.
    category String
    Category of data disk.
    deleteWithInstance Boolean
    Delete_with_instance attribute of data disk.
    device String
    Device attribute of data disk.
    performanceLevel String
    The performance level of the ESSD used as data disk.
    size Number
    Size of data disk.
    snapshotId String
    Size of data disk.

    GetScalingConfigurationsConfigurationInstancePatternInfo

    Architectures List<string>
    Architecture N of instance type N. Valid values: X86, Heterogeneous, BareMetal, Arm, SuperComputeCluster.
    BurstablePerformance string
    Specifies whether to include burstable instance types. Valid values: Exclude, Include, Required.
    Cores int
    The number of vCPUs that are specified for an instance type in instancePatternInfo.
    ExcludedInstanceTypes List<string>
    Instance type N that you want to exclude. You can use wildcard characters, such as an asterisk (*), to exclude an instance type or an instance family.
    InstanceFamilyLevel string
    The instance family level in instancePatternInfo.
    MaxPrice double
    The maximum hourly price for a pay-as-you-go instance or a preemptible instance in instancePatternInfo.
    Memory double
    The memory size that is specified for an instance type in instancePatternInfo.
    Architectures []string
    Architecture N of instance type N. Valid values: X86, Heterogeneous, BareMetal, Arm, SuperComputeCluster.
    BurstablePerformance string
    Specifies whether to include burstable instance types. Valid values: Exclude, Include, Required.
    Cores int
    The number of vCPUs that are specified for an instance type in instancePatternInfo.
    ExcludedInstanceTypes []string
    Instance type N that you want to exclude. You can use wildcard characters, such as an asterisk (*), to exclude an instance type or an instance family.
    InstanceFamilyLevel string
    The instance family level in instancePatternInfo.
    MaxPrice float64
    The maximum hourly price for a pay-as-you-go instance or a preemptible instance in instancePatternInfo.
    Memory float64
    The memory size that is specified for an instance type in instancePatternInfo.
    architectures List<String>
    Architecture N of instance type N. Valid values: X86, Heterogeneous, BareMetal, Arm, SuperComputeCluster.
    burstablePerformance String
    Specifies whether to include burstable instance types. Valid values: Exclude, Include, Required.
    cores Integer
    The number of vCPUs that are specified for an instance type in instancePatternInfo.
    excludedInstanceTypes List<String>
    Instance type N that you want to exclude. You can use wildcard characters, such as an asterisk (*), to exclude an instance type or an instance family.
    instanceFamilyLevel String
    The instance family level in instancePatternInfo.
    maxPrice Double
    The maximum hourly price for a pay-as-you-go instance or a preemptible instance in instancePatternInfo.
    memory Double
    The memory size that is specified for an instance type in instancePatternInfo.
    architectures string[]
    Architecture N of instance type N. Valid values: X86, Heterogeneous, BareMetal, Arm, SuperComputeCluster.
    burstablePerformance string
    Specifies whether to include burstable instance types. Valid values: Exclude, Include, Required.
    cores number
    The number of vCPUs that are specified for an instance type in instancePatternInfo.
    excludedInstanceTypes string[]
    Instance type N that you want to exclude. You can use wildcard characters, such as an asterisk (*), to exclude an instance type or an instance family.
    instanceFamilyLevel string
    The instance family level in instancePatternInfo.
    maxPrice number
    The maximum hourly price for a pay-as-you-go instance or a preemptible instance in instancePatternInfo.
    memory number
    The memory size that is specified for an instance type in instancePatternInfo.
    architectures Sequence[str]
    Architecture N of instance type N. Valid values: X86, Heterogeneous, BareMetal, Arm, SuperComputeCluster.
    burstable_performance str
    Specifies whether to include burstable instance types. Valid values: Exclude, Include, Required.
    cores int
    The number of vCPUs that are specified for an instance type in instancePatternInfo.
    excluded_instance_types Sequence[str]
    Instance type N that you want to exclude. You can use wildcard characters, such as an asterisk (*), to exclude an instance type or an instance family.
    instance_family_level str
    The instance family level in instancePatternInfo.
    max_price float
    The maximum hourly price for a pay-as-you-go instance or a preemptible instance in instancePatternInfo.
    memory float
    The memory size that is specified for an instance type in instancePatternInfo.
    architectures List<String>
    Architecture N of instance type N. Valid values: X86, Heterogeneous, BareMetal, Arm, SuperComputeCluster.
    burstablePerformance String
    Specifies whether to include burstable instance types. Valid values: Exclude, Include, Required.
    cores Number
    The number of vCPUs that are specified for an instance type in instancePatternInfo.
    excludedInstanceTypes List<String>
    Instance type N that you want to exclude. You can use wildcard characters, such as an asterisk (*), to exclude an instance type or an instance family.
    instanceFamilyLevel String
    The instance family level in instancePatternInfo.
    maxPrice Number
    The maximum hourly price for a pay-as-you-go instance or a preemptible instance in instancePatternInfo.
    memory Number
    The memory size that is specified for an instance type in instancePatternInfo.

    GetScalingConfigurationsConfigurationSpotPriceLimit

    InstanceType string
    Resource type of an ECS instance.
    PriceLimit double
    Price limit hourly of instance type.
    InstanceType string
    Resource type of an ECS instance.
    PriceLimit float64
    Price limit hourly of instance type.
    instanceType String
    Resource type of an ECS instance.
    priceLimit Double
    Price limit hourly of instance type.
    instanceType string
    Resource type of an ECS instance.
    priceLimit number
    Price limit hourly of instance type.
    instance_type str
    Resource type of an ECS instance.
    price_limit float
    Price limit hourly of instance type.
    instanceType String
    Resource type of an ECS instance.
    priceLimit Number
    Price limit hourly of instance type.

    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.75.0 published on Friday, Mar 7, 2025 by Pulumi