alicloud.ess.getScalingGroups
This data source provides available scaling group resources.
Example Usage
using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var scalinggroupsDs = AliCloud.Ess.GetScalingGroups.Invoke(new()
{
Ids = new[]
{
"scaling_group_id1",
"scaling_group_id2",
},
NameRegex = "scaling_group_name",
});
return new Dictionary<string, object?>
{
["firstScalingGroup"] = scalinggroupsDs.Apply(getScalingGroupsResult => getScalingGroupsResult.Groups[0]?.Id),
};
});
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ess.EssFunctions;
import com.pulumi.alicloud.ess.inputs.GetScalingGroupsArgs;
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 scalinggroupsDs = EssFunctions.getScalingGroups(GetScalingGroupsArgs.builder()
.ids(
"scaling_group_id1",
"scaling_group_id2")
.nameRegex("scaling_group_name")
.build());
ctx.export("firstScalingGroup", scalinggroupsDs.applyValue(getScalingGroupsResult -> getScalingGroupsResult.groups()[0].id()));
}
}
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 = alicloud.ess.getScalingGroups({
ids: [
"scaling_group_id1",
"scaling_group_id2",
],
nameRegex: "scaling_group_name",
});
export const firstScalingGroup = scalinggroupsDs.then(scalinggroupsDs => scalinggroupsDs.groups?.[0]?.id);
variables:
scalinggroupsDs:
fn::invoke:
Function: alicloud:ess:getScalingGroups
Arguments:
ids:
- scaling_group_id1
- scaling_group_id2
nameRegex: scaling_group_name
outputs:
firstScalingGroup: ${scalinggroupsDs.groups[0].id}
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.
- Name
Regex string A regex string to filter resulting scaling groups by name.
- Output
File string
- Ids []string
A list of scaling group IDs.
- Name
Regex string A regex string to filter resulting scaling groups by name.
- Output
File string
- ids List<String>
A list of scaling group IDs.
- name
Regex String A regex string to filter resulting scaling groups by name.
- output
File String
- ids string[]
A list of scaling group IDs.
- name
Regex string A regex string to filter resulting scaling groups by name.
- output
File 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.
- name
Regex String A regex string to filter resulting scaling groups by name.
- output
File String
getScalingGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Ali Cloud. Ess. Outputs. Get Scaling Groups Group> 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.
- Name
Regex string - Output
File string
- Groups
[]Get
Scaling Groups Group 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.
- Name
Regex string - Output
File string
- groups
List<Get
Scaling Groups Group> 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.
- name
Regex String - output
File String
- groups
Get
Scaling Groups Group[] 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.
- name
Regex string - output
File string
- groups
Sequence[Get
Scaling Groups Group] 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.
- name
Regex String - output
File String
Supporting Types
GetScalingGroupsGroup
- Active
Capacity int Number of active instances in scaling group.
- Active
Scaling stringConfiguration Active scaling configuration for scaling group.
- Cooldown
Time int Default cooldown time of scaling group.
- Creation
Time string Creation time of scaling group.
- Db
Instance List<string>Ids Db instances id which the ECS instance attached to.
- Group
Deletion boolProtection Whether the scaling group deletion protection is enabled.
- Health
Check stringType The health check method of the scaling group.
- Id string
ID of the scaling group.
- Launch
Template stringId Active launch template ID for scaling group.
- Launch
Template stringVersion Version of active launch template.
- Lifecycle
State string Lifecycle state of scaling group.
- Load
Balancer List<string>Ids 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 string The modification time.
- Name string
Name of the scaling group.
- Pending
Capacity int Number of pending instances in scaling group.
- Region
Id string Region ID the scaling group belongs to.
- Removal
Policies List<string> 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 List<string> The Process in suspension.
- Total
Capacity int Number of instances in scaling group.
- Total
Instance intCount The number of all ECS instances in the scaling group.
- Vpc
Id string The ID of the VPC to which the scaling group belongs.
- Vswitch
Id string The ID of the vSwitch to which the scaling group belongs.
- Vswitch
Ids List<string> Vswitches id in which the ECS instance launched.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Active
Capacity int Number of active instances in scaling group.
- Active
Scaling stringConfiguration Active scaling configuration for scaling group.
- Cooldown
Time int Default cooldown time of scaling group.
- Creation
Time string Creation time of scaling group.
- Db
Instance []stringIds Db instances id which the ECS instance attached to.
- Group
Deletion boolProtection Whether the scaling group deletion protection is enabled.
- Health
Check stringType The health check method of the scaling group.
- Id string
ID of the scaling group.
- Launch
Template stringId Active launch template ID for scaling group.
- Launch
Template stringVersion Version of active launch template.
- Lifecycle
State string Lifecycle state of scaling group.
- Load
Balancer []stringIds 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 string The modification time.
- Name string
Name of the scaling group.
- Pending
Capacity int Number of pending instances in scaling group.
- Region
Id string Region ID the scaling group belongs to.
- Removal
Policies []string 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 []string The Process in suspension.
- Total
Capacity int Number of instances in scaling group.
- Total
Instance intCount The number of all ECS instances in the scaling group.
- Vpc
Id string The ID of the VPC to which the scaling group belongs.
- Vswitch
Id string The ID of the vSwitch to which the scaling group belongs.
- Vswitch
Ids []string Vswitches id in which the ECS instance launched.
- map[string]interface{}
A mapping of tags to assign to the resource.
- active
Capacity Integer Number of active instances in scaling group.
- active
Scaling StringConfiguration Active scaling configuration for scaling group.
- cooldown
Time Integer Default cooldown time of scaling group.
- creation
Time String Creation time of scaling group.
- db
Instance List<String>Ids Db instances id which the ECS instance attached to.
- group
Deletion BooleanProtection Whether the scaling group deletion protection is enabled.
- health
Check StringType The health check method of the scaling group.
- id String
ID of the scaling group.
- launch
Template StringId Active launch template ID for scaling group.
- launch
Template StringVersion Version of active launch template.
- lifecycle
State String Lifecycle state of scaling group.
- load
Balancer List<String>Ids Slb instances id which the ECS instance attached to.
- max
Size Integer The maximum number of ECS instances.
- min
Size Integer The minimum number of ECS instances.
- modification
Time String The modification time.
- name String
Name of the scaling group.
- pending
Capacity Integer Number of pending instances in scaling group.
- region
Id String Region ID the scaling group belongs to.
- removal
Policies List<String> Removal policy used to select the ECS instance to remove from the scaling group.
- removing
Capacity Integer Number of removing instances in scaling group.
- suspended
Processes List<String> The Process in suspension.
- total
Capacity Integer Number of instances in scaling group.
- total
Instance IntegerCount The number of all ECS instances in the scaling group.
- vpc
Id String The ID of the VPC to which the scaling group belongs.
- vswitch
Id String The ID of the vSwitch to which the scaling group belongs.
- vswitch
Ids List<String> Vswitches id in which the ECS instance launched.
- Map<String,Object>
A mapping of tags to assign to the resource.
- active
Capacity number Number of active instances in scaling group.
- active
Scaling stringConfiguration Active scaling configuration for scaling group.
- cooldown
Time number Default cooldown time of scaling group.
- creation
Time string Creation time of scaling group.
- db
Instance string[]Ids Db instances id which the ECS instance attached to.
- group
Deletion booleanProtection Whether the scaling group deletion protection is enabled.
- health
Check stringType The health check method of the scaling group.
- id string
ID of the scaling group.
- launch
Template stringId Active launch template ID for scaling group.
- launch
Template stringVersion Version of active launch template.
- lifecycle
State string Lifecycle state of scaling group.
- load
Balancer string[]Ids Slb instances id which the ECS instance attached to.
- max
Size number The maximum number of ECS instances.
- min
Size number The minimum number of ECS instances.
- modification
Time string The modification time.
- name string
Name of the scaling group.
- pending
Capacity number Number of pending instances in scaling group.
- region
Id string Region ID the scaling group belongs to.
- removal
Policies string[] Removal policy used to select the ECS instance to remove from the scaling group.
- removing
Capacity number Number of removing instances in scaling group.
- suspended
Processes string[] The Process in suspension.
- total
Capacity number Number of instances in scaling group.
- total
Instance numberCount The number of all ECS instances in the scaling group.
- vpc
Id string The ID of the VPC to which the scaling group belongs.
- vswitch
Id string The ID of the vSwitch to which the scaling group belongs.
- vswitch
Ids string[] Vswitches id in which the ECS instance launched.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- active_
capacity int Number of active instances in scaling group.
- active_
scaling_ strconfiguration Active scaling configuration for scaling group.
- cooldown_
time int Default cooldown time of scaling group.
- creation_
time str Creation time of scaling group.
- db_
instance_ Sequence[str]ids Db instances id which the ECS instance attached to.
- group_
deletion_ boolprotection Whether the scaling group deletion protection is enabled.
- health_
check_ strtype The health check method of the scaling group.
- id str
ID of the scaling group.
- launch_
template_ strid Active launch template ID for scaling group.
- launch_
template_ strversion Version of active launch template.
- lifecycle_
state str Lifecycle state of scaling group.
- load_
balancer_ Sequence[str]ids 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.
- 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_ intcount 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.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- active
Capacity Number Number of active instances in scaling group.
- active
Scaling StringConfiguration Active scaling configuration for scaling group.
- cooldown
Time Number Default cooldown time of scaling group.
- creation
Time String Creation time of scaling group.
- db
Instance List<String>Ids Db instances id which the ECS instance attached to.
- group
Deletion BooleanProtection Whether the scaling group deletion protection is enabled.
- health
Check StringType The health check method of the scaling group.
- id String
ID of the scaling group.
- launch
Template StringId Active launch template ID for scaling group.
- launch
Template StringVersion Version of active launch template.
- lifecycle
State String Lifecycle state of scaling group.
- load
Balancer List<String>Ids Slb instances id which the ECS instance attached to.
- max
Size Number The maximum number of ECS instances.
- min
Size Number The minimum number of ECS instances.
- modification
Time String The modification time.
- name String
Name of the scaling group.
- pending
Capacity Number Number of pending instances in scaling group.
- region
Id String Region ID the scaling group belongs to.
- removal
Policies List<String> Removal policy used to select the ECS instance to remove from the scaling group.
- removing
Capacity Number Number of removing instances in scaling group.
- suspended
Processes List<String> The Process in suspension.
- total
Capacity Number Number of instances in scaling group.
- total
Instance NumberCount The number of all ECS instances in the scaling group.
- vpc
Id String The ID of the VPC to which the scaling group belongs.
- vswitch
Id String The ID of the vSwitch to which the scaling group belongs.
- vswitch
Ids List<String> Vswitches id in which the ECS instance launched.
- Map<Any>
A mapping of tags to assign to the resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.