Show / Hide Table of Contents

Class GetIpRanges

Inheritance
System.Object
GetIpRanges
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 GetIpRanges

Methods

View Source

InvokeAsync(GetIpRangesArgs, InvokeOptions)

Use this data source to get the IP ranges of various AWS products and services. For more information about the contents of this data source and required JSON syntax if referencing a custom URL, see the AWS IP Address Ranges documention.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var europeanEc2 = Output.Create(Aws.GetIpRanges.InvokeAsync(new Aws.GetIpRangesArgs
    {
        Regions = 
        {
            "eu-west-1",
            "eu-central-1",
        },
        Services = 
        {
            "ec2",
        },
    }));
    var fromEurope = new Aws.Ec2.SecurityGroup("fromEurope", new Aws.Ec2.SecurityGroupArgs
    {
        Ingress = 
        {
            new Aws.Ec2.Inputs.SecurityGroupIngressArgs
            {
                FromPort = "443",
                ToPort = "443",
                Protocol = "tcp",
                CidrBlocks = europeanEc2.Apply(europeanEc2 => europeanEc2.CidrBlocks),
                Ipv6CidrBlocks = europeanEc2.Apply(europeanEc2 => europeanEc2.Ipv6CidrBlocks),
            },
        },
        Tags = 
        {
            { "CreateDate", europeanEc2.Apply(europeanEc2 => europeanEc2.CreateDate) },
            { "SyncToken", europeanEc2.Apply(europeanEc2 => europeanEc2.SyncToken) },
        },
    });
}

}

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

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