Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.21.0 published on Tuesday, Jun 14, 2022 by Pulumi

getScalingGroups

This data source provides available scaling group resources.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var scalinggroupsDs = Output.Create(AliCloud.Ess.GetScalingGroups.InvokeAsync(new AliCloud.Ess.GetScalingGroupsArgs
        {
            Ids = 
            {
                "scaling_group_id1",
                "scaling_group_id2",
            },
            NameRegex = "scaling_group_name",
        }));
        this.FirstScalingGroup = scalinggroupsDs.Apply(scalinggroupsDs => scalinggroupsDs.Groups?[0]?.Id);
    }

    [Output("firstScalingGroup")]
    public Output<string> FirstScalingGroup { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ess"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		scalinggroupsDs, err := ess.GetScalingGroups(ctx, &ess.GetScalingGroupsArgs{
			Ids: []string{
				"scaling_group_id1",
				"scaling_group_id2",
			},
			NameRegex: pulumi.StringRef("scaling_group_name"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstScalingGroup", scalinggroupsDs.Groups[0].Id)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

scalinggroups_ds = alicloud.ess.get_scaling_groups(ids=[
        "scaling_group_id1",
        "scaling_group_id2",
    ],
    name_regex="scaling_group_name")
pulumi.export("firstScalingGroup", scalinggroups_ds.groups[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const scalinggroupsDs = pulumi.output(alicloud.ess.getScalingGroups({
    ids: [
        "scaling_group_id1",
        "scaling_group_id2",
    ],
    nameRegex: "scaling_group_name",
}));

export const firstScalingGroup = scalinggroupsDs.groups[0].id;

Coming soon!

Using getScalingGroups

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 getScalingGroups(args: GetScalingGroupsArgs, opts?: InvokeOptions): Promise<GetScalingGroupsResult>
function getScalingGroupsOutput(args: GetScalingGroupsOutputArgs, opts?: InvokeOptions): Output<GetScalingGroupsResult>
def get_scaling_groups(ids: Optional[Sequence[str]] = None,
                       name_regex: Optional[str] = None,
                       output_file: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetScalingGroupsResult
def get_scaling_groups_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       name_regex: Optional[pulumi.Input[str]] = None,
                       output_file: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetScalingGroupsResult]
func GetScalingGroups(ctx *Context, args *GetScalingGroupsArgs, opts ...InvokeOption) (*GetScalingGroupsResult, error)
func GetScalingGroupsOutput(ctx *Context, args *GetScalingGroupsOutputArgs, opts ...InvokeOption) GetScalingGroupsResultOutput

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

public static class GetScalingGroups 
{
    public static Task<GetScalingGroupsResult> InvokeAsync(GetScalingGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetScalingGroupsResult> Invoke(GetScalingGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetScalingGroupsResult> getScalingGroups(GetScalingGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:ess/getScalingGroups:getScalingGroups
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Ids List<string>

A list of scaling group IDs.

NameRegex string

A regex string to filter resulting scaling groups by name.

OutputFile string
Ids []string

A list of scaling group IDs.

NameRegex string

A regex string to filter resulting scaling groups by name.

OutputFile string
ids List<String>

A list of scaling group IDs.

nameRegex String

A regex string to filter resulting scaling groups by name.

outputFile String
ids string[]

A list of scaling group IDs.

nameRegex string

A regex string to filter resulting scaling groups by name.

outputFile string
ids Sequence[str]

A list of scaling group IDs.

name_regex str

A regex string to filter resulting scaling groups by name.

output_file str
ids List<String>

A list of scaling group IDs.

nameRegex String

A regex string to filter resulting scaling groups by name.

outputFile String

getScalingGroups Result

The following output properties are available:

Groups List<Pulumi.AliCloud.Ess.Outputs.GetScalingGroupsGroup>

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

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of scaling group ids.

Names List<string>

A list of scaling group names.

NameRegex string
OutputFile string
Groups []GetScalingGroupsGroup

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

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of scaling group ids.

Names []string

A list of scaling group names.

NameRegex string
OutputFile string
groups List<GetScalingGroupsGroup>

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

id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of scaling group ids.

names List<String>

A list of scaling group names.

nameRegex String
outputFile String
groups GetScalingGroupsGroup[]

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

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of scaling group ids.

names string[]

A list of scaling group names.

nameRegex string
outputFile string
groups Sequence[GetScalingGroupsGroup]

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

id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]

A list of scaling group ids.

names Sequence[str]

A list of scaling group names.

name_regex str
output_file str
groups List<Property Map>

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

id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of scaling group ids.

names List<String>

A list of scaling group names.

nameRegex String
outputFile String

Supporting Types

GetScalingGroupsGroup

ActiveCapacity int

Number of active instances in scaling group.

ActiveScalingConfiguration string
CooldownTime int

Default cooldown time of scaling group.

CreationTime string

Creation time of scaling group.

DbInstanceIds List<string>

Db instances id which the ECS instance attached to.

GroupDeletionProtection bool

Whether the scaling group deletion protection is enabled.

HealthCheckType string

The health check method of the scaling group.

Id string

ID of the scaling group.

LaunchTemplateId string

Active launch template ID for scaling group.

LaunchTemplateVersion string

Version of active launch template.

LifecycleState string

Lifecycle state of scaling group.

LoadBalancerIds List<string>

Slb instances id which the ECS instance attached to.

MaxSize int

The maximum number of ECS instances.

MinSize int

The minimum number of ECS instances.

ModificationTime string

The modification time.

Name string

Name of the scaling group.

  • active_scaling_configuration -Active scaling configuration for scaling group.
PendingCapacity int

Number of pending instances in scaling group.

RegionId string

Region ID the scaling group belongs to.

RemovalPolicies List<string>

Removal policy used to select the ECS instance to remove from the scaling group.

RemovingCapacity int

Number of removing instances in scaling group.

SuspendedProcesses List<string>

The Process in suspension.

TotalCapacity int

Number of instances in scaling group.

TotalInstanceCount int

The number of all ECS instances in the scaling group.

VpcId string

The ID of the VPC to which the scaling group belongs.

VswitchId string

The ID of the vSwitch to which the scaling group belongs.

VswitchIds List<string>

Vswitches id in which the ECS instance launched.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

ActiveCapacity int

Number of active instances in scaling group.

ActiveScalingConfiguration string
CooldownTime int

Default cooldown time of scaling group.

CreationTime string

Creation time of scaling group.

DbInstanceIds []string

Db instances id which the ECS instance attached to.

GroupDeletionProtection bool

Whether the scaling group deletion protection is enabled.

HealthCheckType string

The health check method of the scaling group.

Id string

ID of the scaling group.

LaunchTemplateId string

Active launch template ID for scaling group.

LaunchTemplateVersion string

Version of active launch template.

LifecycleState string

Lifecycle state of scaling group.

LoadBalancerIds []string

Slb instances id which the ECS instance attached to.

MaxSize int

The maximum number of ECS instances.

MinSize int

The minimum number of ECS instances.

ModificationTime string

The modification time.

Name string

Name of the scaling group.

  • active_scaling_configuration -Active scaling configuration for scaling group.
PendingCapacity int

Number of pending instances in scaling group.

RegionId string

Region ID the scaling group belongs to.

RemovalPolicies []string

Removal policy used to select the ECS instance to remove from the scaling group.

RemovingCapacity int

Number of removing instances in scaling group.

SuspendedProcesses []string

The Process in suspension.

TotalCapacity int

Number of instances in scaling group.

TotalInstanceCount int

The number of all ECS instances in the scaling group.

VpcId string

The ID of the VPC to which the scaling group belongs.

VswitchId string

The ID of the vSwitch to which the scaling group belongs.

VswitchIds []string

Vswitches id in which the ECS instance launched.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

activeCapacity Integer

Number of active instances in scaling group.

activeScalingConfiguration String
cooldownTime Integer

Default cooldown time of scaling group.

creationTime String

Creation time of scaling group.

dbInstanceIds List<String>

Db instances id which the ECS instance attached to.

groupDeletionProtection Boolean

Whether the scaling group deletion protection is enabled.

healthCheckType String

The health check method of the scaling group.

id String

ID of the scaling group.

launchTemplateId String

Active launch template ID for scaling group.

launchTemplateVersion String

Version of active launch template.

lifecycleState String

Lifecycle state of scaling group.

loadBalancerIds List<String>

Slb instances id which the ECS instance attached to.

maxSize Integer

The maximum number of ECS instances.

minSize Integer

The minimum number of ECS instances.

modificationTime String

The modification time.

name String

Name of the scaling group.

  • active_scaling_configuration -Active scaling configuration for scaling group.
pendingCapacity Integer

Number of pending instances in scaling group.

regionId String

Region ID the scaling group belongs to.

removalPolicies List<String>

Removal policy used to select the ECS instance to remove from the scaling group.

removingCapacity Integer

Number of removing instances in scaling group.

suspendedProcesses List<String>

The Process in suspension.

totalCapacity Integer

Number of instances in scaling group.

totalInstanceCount Integer

The number of all ECS instances in the scaling group.

vpcId String

The ID of the VPC to which the scaling group belongs.

vswitchId String

The ID of the vSwitch to which the scaling group belongs.

vswitchIds List<String>

Vswitches id in which the ECS instance launched.

tags Map<String,Object>

A mapping of tags to assign to the resource.

activeCapacity number

Number of active instances in scaling group.

activeScalingConfiguration string
cooldownTime number

Default cooldown time of scaling group.

creationTime string

Creation time of scaling group.

dbInstanceIds string[]

Db instances id which the ECS instance attached to.

groupDeletionProtection boolean

Whether the scaling group deletion protection is enabled.

healthCheckType string

The health check method of the scaling group.

id string

ID of the scaling group.

launchTemplateId string

Active launch template ID for scaling group.

launchTemplateVersion string

Version of active launch template.

lifecycleState string

Lifecycle state of scaling group.

loadBalancerIds string[]

Slb instances id which the ECS instance attached to.

maxSize number

The maximum number of ECS instances.

minSize number

The minimum number of ECS instances.

modificationTime string

The modification time.

name string

Name of the scaling group.

  • active_scaling_configuration -Active scaling configuration for scaling group.
pendingCapacity number

Number of pending instances in scaling group.

regionId string

Region ID the scaling group belongs to.

removalPolicies string[]

Removal policy used to select the ECS instance to remove from the scaling group.

removingCapacity number

Number of removing instances in scaling group.

suspendedProcesses string[]

The Process in suspension.

totalCapacity number

Number of instances in scaling group.

totalInstanceCount number

The number of all ECS instances in the scaling group.

vpcId string

The ID of the VPC to which the scaling group belongs.

vswitchId string

The ID of the vSwitch to which the scaling group belongs.

vswitchIds string[]

Vswitches id in which the ECS instance launched.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

active_capacity int

Number of active instances in scaling group.

active_scaling_configuration str
cooldown_time int

Default cooldown time of scaling group.

creation_time str

Creation time of scaling group.

db_instance_ids Sequence[str]

Db instances id which the ECS instance attached to.

group_deletion_protection bool

Whether the scaling group deletion protection is enabled.

health_check_type str

The health check method of the scaling group.

id str

ID of the scaling group.

launch_template_id str

Active launch template ID for scaling group.

launch_template_version str

Version of active launch template.

lifecycle_state str

Lifecycle state of scaling group.

load_balancer_ids Sequence[str]

Slb instances id which the ECS instance attached to.

max_size int

The maximum number of ECS instances.

min_size int

The minimum number of ECS instances.

modification_time str

The modification time.

name str

Name of the scaling group.

  • active_scaling_configuration -Active scaling configuration for scaling group.
pending_capacity int

Number of pending instances in scaling group.

region_id str

Region ID the scaling group belongs to.

removal_policies Sequence[str]

Removal policy used to select the ECS instance to remove from the scaling group.

removing_capacity int

Number of removing instances in scaling group.

suspended_processes Sequence[str]

The Process in suspension.

total_capacity int

Number of instances in scaling group.

total_instance_count int

The number of all ECS instances in the scaling group.

vpc_id str

The ID of the VPC to which the scaling group belongs.

vswitch_id str

The ID of the vSwitch to which the scaling group belongs.

vswitch_ids Sequence[str]

Vswitches id in which the ECS instance launched.

tags Mapping[str, Any]

A mapping of tags to assign to the resource.

activeCapacity Number

Number of active instances in scaling group.

activeScalingConfiguration String
cooldownTime Number

Default cooldown time of scaling group.

creationTime String

Creation time of scaling group.

dbInstanceIds List<String>

Db instances id which the ECS instance attached to.

groupDeletionProtection Boolean

Whether the scaling group deletion protection is enabled.

healthCheckType String

The health check method of the scaling group.

id String

ID of the scaling group.

launchTemplateId String

Active launch template ID for scaling group.

launchTemplateVersion String

Version of active launch template.

lifecycleState String

Lifecycle state of scaling group.

loadBalancerIds List<String>

Slb instances id which the ECS instance attached to.

maxSize Number

The maximum number of ECS instances.

minSize Number

The minimum number of ECS instances.

modificationTime String

The modification time.

name String

Name of the scaling group.

  • active_scaling_configuration -Active scaling configuration for scaling group.
pendingCapacity Number

Number of pending instances in scaling group.

regionId String

Region ID the scaling group belongs to.

removalPolicies List<String>

Removal policy used to select the ECS instance to remove from the scaling group.

removingCapacity Number

Number of removing instances in scaling group.

suspendedProcesses List<String>

The Process in suspension.

totalCapacity Number

Number of instances in scaling group.

totalInstanceCount Number

The number of all ECS instances in the scaling group.

vpcId String

The ID of the VPC to which the scaling group belongs.

vswitchId String

The ID of the vSwitch to which the scaling group belongs.

vswitchIds List<String>

Vswitches id in which the ECS instance launched.

tags Map<Any>

A mapping of tags to assign to the resource.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.