UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

81 lines 3.7 kB
"use strict"; // *** 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.ListenerRule = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Load Balancer Listener Rule resource. * * > **Note:** `aws.alb.ListenerRule` is known as `aws.lb.ListenerRule`. The functionality is identical. */ class ListenerRule extends pulumi.CustomResource { /** * Get an existing ListenerRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new ListenerRule(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ListenerRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ListenerRule.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["actions"] = state?.actions; resourceInputs["arn"] = state?.arn; resourceInputs["conditions"] = state?.conditions; resourceInputs["listenerArn"] = state?.listenerArn; resourceInputs["priority"] = state?.priority; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["transforms"] = state?.transforms; } else { const args = argsOrState; if (args?.actions === undefined && !opts.urn) { throw new Error("Missing required property 'actions'"); } if (args?.conditions === undefined && !opts.urn) { throw new Error("Missing required property 'conditions'"); } if (args?.listenerArn === undefined && !opts.urn) { throw new Error("Missing required property 'listenerArn'"); } resourceInputs["actions"] = args?.actions; resourceInputs["conditions"] = args?.conditions; resourceInputs["listenerArn"] = args?.listenerArn; resourceInputs["priority"] = args?.priority; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["transforms"] = args?.transforms; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const aliasOpts = { aliases: [{ type: "aws:elasticloadbalancingv2/listenerRule:ListenerRule" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(ListenerRule.__pulumiType, name, resourceInputs, opts); } } exports.ListenerRule = ListenerRule; /** @internal */ ListenerRule.__pulumiType = 'aws:lb/listenerRule:ListenerRule'; //# sourceMappingURL=listenerRule.js.map