Show / Hide Table of Contents

Class GetListener

Inheritance
System.Object
GetListener
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.ApplicationLoadBalancing
Assembly: Pulumi.Aws.dll
Syntax
[Obsolete("aws.applicationloadbalancing.getListener has been deprecated in favor of aws.alb.getListener")]
public static class GetListener

Methods

View Source

InvokeAsync(GetListenerArgs, InvokeOptions)

Note: aws.alb.Listener is known as aws.lb.Listener. The functionality is identical.

Provides information about a Load Balancer Listener.

This data source can prove useful when a module accepts an LB Listener as an input variable and needs to know the LB it is attached to, or other information specific to the listener in question.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var config = new Config();
    var listenerArn = config.RequireObject<dynamic>("listenerArn");
    var listener = Output.Create(Aws.LB.GetListener.InvokeAsync(new Aws.LB.GetListenerArgs
    {
        Arn = listenerArn,
    }));
    var selected = Output.Create(Aws.LB.GetLoadBalancer.InvokeAsync(new Aws.LB.GetLoadBalancerArgs
    {
        Name = "default-public",
    }));
    var selected443 = selected.Apply(selected => Output.Create(Aws.LB.GetListener.InvokeAsync(new Aws.LB.GetListenerArgs
    {
        LoadBalancerArn = selected.Arn,
        Port = 443,
    })));
}

}

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

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