Show / Hide Table of Contents

Class GetSecurityGroups

Inheritance
System.Object
GetSecurityGroups
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.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public static class GetSecurityGroups

Methods

View Source

InvokeAsync(GetSecurityGroupsArgs, InvokeOptions)

Use this data source to get IDs and VPC membership of Security Groups that are created outside of this provider.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var test = Output.Create(Aws.Ec2.GetSecurityGroups.InvokeAsync(new Aws.Ec2.GetSecurityGroupsArgs
    {
        Tags = 
        {
            { "Application", "k8s" },
            { "Environment", "dev" },
        },
    }));
}

}
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var test = Output.Create(Aws.Ec2.GetSecurityGroups.InvokeAsync(new Aws.Ec2.GetSecurityGroupsArgs
    {
        Filters = 
        {
            new Aws.Ec2.Inputs.GetSecurityGroupsFilterArgs
            {
                Name = "group-name",
                Values = 
                {
                    "*nodes*",
                },
            },
            new Aws.Ec2.Inputs.GetSecurityGroupsFilterArgs
            {
                Name = "vpc-id",
                Values = 
                {
                    @var.Vpc_id,
                },
            },
        },
    }));
}

}

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

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