Show / Hide Table of Contents

Class GetAutoscalingGroups

Inheritance
System.Object
GetAutoscalingGroups
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws
Assembly: Pulumi.Aws.dll
Syntax
public static class GetAutoscalingGroups

Methods

View Source

InvokeAsync(GetAutoscalingGroupsArgs, InvokeOptions)

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.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var groups = Output.Create(Aws.GetAutoscalingGroups.InvokeAsync(new Aws.GetAutoscalingGroupsArgs
    {
        Filters = 
        {
            new Aws.Inputs.GetAutoscalingGroupsFilterArgs
            {
                Name = "key",
                Values = 
                {
                    "Team",
                },
            },
            new Aws.Inputs.GetAutoscalingGroupsFilterArgs
            {
                Name = "value",
                Values = 
                {
                    "Pets",
                },
            },
        },
    }));
    var slackNotifications = new Aws.AutoScaling.Notification("slackNotifications", new Aws.AutoScaling.NotificationArgs
    {
        GroupNames = groups.Apply(groups => groups.Names),
        Notifications = 
        {
            "autoscaling:EC2_INSTANCE_LAUNCH",
            "autoscaling:EC2_INSTANCE_TERMINATE",
            "autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
            "autoscaling:EC2_INSTANCE_TERMINATE_ERROR",
        },
        TopicArn = "TOPIC ARN",
    });
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetAutoscalingGroupsResult> InvokeAsync(GetAutoscalingGroupsArgs args = null, InvokeOptions options = null)
Parameters
Type Name Description
GetAutoscalingGroupsArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetAutoscalingGroupsResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.