get Listener
Deprecated
aws.elasticloadbalancingv2.getListener has been deprecated in favor of aws.lb.getListener
Note:
aws.alb.Listener
is known asaws.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.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lb.LbFunctions;
import com.pulumi.aws.lb.inputs.GetListenerArgs;
import com.pulumi.aws.lb.inputs.GetLoadBalancerArgs;
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 config = ctx.config();
final var listenerArn = config.get("listenerArn");
final var listener = LbFunctions.getListener(GetListenerArgs.builder()
.arn(listenerArn)
.build());
final var selected = LbFunctions.getLoadBalancer(GetLoadBalancerArgs.builder()
.name("default-public")
.build());
final var selected443 = LbFunctions.getListener(GetListenerArgs.builder()
.loadBalancerArn(selected.applyValue(getLoadBalancerResult -> getLoadBalancerResult.arn()))
.port(443)
.build());
}
}
Return
A collection of values returned by getListener.
Parameters
A collection of arguments for invoking getListener.
Deprecated
aws.elasticloadbalancingv2.getListener has been deprecated in favor of aws.lb.getListener
Return
A collection of values returned by getListener.
Parameters
ARN of the listener. Required if load_balancer_arn
and port
is not set.
ARN of the load balancer. Required if arn
is not set.
Port of the listener. Required if arn
is not set.
See also
Deprecated
aws.elasticloadbalancingv2.getListener has been deprecated in favor of aws.lb.getListener
Return
A collection of values returned by getListener.
Parameters
Builder for com.pulumi.aws.elasticloadbalancingv2.kotlin.inputs.GetListenerPlainArgs.