@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
88 lines • 3.14 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getListenerOutput = exports.getListener = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* > **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.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const config = new pulumi.Config();
* const listenerArn = config.require("listenerArn");
* const listener = aws.lb.getListener({
* arn: listenerArn,
* });
* // get listener from load_balancer_arn and port
* const selected = aws.lb.getLoadBalancer({
* name: "default-public",
* });
* const selected443 = selected.then(selected => aws.lb.getListener({
* loadBalancerArn: selected.arn,
* port: 443,
* }));
* ```
*/
function getListener(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:lb/getListener:getListener", {
"arn": args.arn,
"loadBalancerArn": args.loadBalancerArn,
"port": args.port,
"region": args.region,
"tags": args.tags,
}, opts);
}
exports.getListener = getListener;
/**
* > **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.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const config = new pulumi.Config();
* const listenerArn = config.require("listenerArn");
* const listener = aws.lb.getListener({
* arn: listenerArn,
* });
* // get listener from load_balancer_arn and port
* const selected = aws.lb.getLoadBalancer({
* name: "default-public",
* });
* const selected443 = selected.then(selected => aws.lb.getListener({
* loadBalancerArn: selected.arn,
* port: 443,
* }));
* ```
*/
function getListenerOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:lb/getListener:getListener", {
"arn": args.arn,
"loadBalancerArn": args.loadBalancerArn,
"port": args.port,
"region": args.region,
"tags": args.tags,
}, opts);
}
exports.getListenerOutput = getListenerOutput;
//# sourceMappingURL=getListener.js.map