getAutoscalingGroups

Deprecated

aws.getAutoscalingGroups has been deprecated in favor of aws.autoscaling.getAmiIds

The Autoscaling Groups data source allows access to the list of AWS ASGs within a specific region. This will allow you to pass a list of AutoScaling Groups to other resources.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.autoscaling.AutoscalingFunctions;
import com.pulumi.aws.autoscaling.inputs.GetAmiIdsArgs;
import com.pulumi.aws.autoscaling.Notification;
import com.pulumi.aws.autoscaling.NotificationArgs;
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 groups = AutoscalingFunctions.getAmiIds(GetAmiIdsArgs.builder()
.filters(
GetAmiIdsFilterArgs.builder()
.name("tag:Team")
.values("Pets")
.build(),
GetAmiIdsFilterArgs.builder()
.name("tag-key")
.values("Environment")
.build())
.build());
var slackNotifications = new Notification("slackNotifications", NotificationArgs.builder()
.groupNames(groups.applyValue(getAmiIdsResult -> getAmiIdsResult.names()))
.notifications(
"autoscaling:EC2_INSTANCE_LAUNCH",
"autoscaling:EC2_INSTANCE_TERMINATE",
"autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
"autoscaling:EC2_INSTANCE_TERMINATE_ERROR")
.topicArn("TOPIC ARN")
.build());
}
}

Return

A collection of values returned by getAutoscalingGroups.

Parameters

argument

A collection of arguments for invoking getAutoscalingGroups.


Deprecated

aws.getAutoscalingGroups has been deprecated in favor of aws.autoscaling.getAmiIds

Return

A collection of values returned by getAutoscalingGroups.

Parameters

filters

Filter used to scope the list e.g., by tags. See related docs.

names

List of autoscaling group names

See also


Deprecated

aws.getAutoscalingGroups has been deprecated in favor of aws.autoscaling.getAmiIds

Return

A collection of values returned by getAutoscalingGroups.

Parameters

argument

Builder for com.pulumi.aws.kotlin.inputs.GetAutoscalingGroupsPlainArgs.

See also