UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

87 lines 4.71 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Listener = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); class Listener extends pulumi.CustomResource { /** * Get an existing Listener 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 Listener(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Listener. 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'] === Listener.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["connectionTimeout"] = state ? state.connectionTimeout : undefined; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["endPort"] = state ? state.endPort : undefined; resourceInputs["listenerName"] = state ? state.listenerName : undefined; resourceInputs["loadBalancerId"] = state ? state.loadBalancerId : undefined; resourceInputs["port"] = state ? state.port : undefined; resourceInputs["protocol"] = state ? state.protocol : undefined; resourceInputs["serverGroupId"] = state ? state.serverGroupId : undefined; resourceInputs["startPort"] = state ? state.startPort : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; } else { const args = argsOrState; if ((!args || args.loadBalancerId === undefined) && !opts.urn) { throw new Error("Missing required property 'loadBalancerId'"); } if ((!args || args.port === undefined) && !opts.urn) { throw new Error("Missing required property 'port'"); } if ((!args || args.protocol === undefined) && !opts.urn) { throw new Error("Missing required property 'protocol'"); } if ((!args || args.serverGroupId === undefined) && !opts.urn) { throw new Error("Missing required property 'serverGroupId'"); } resourceInputs["connectionTimeout"] = args ? args.connectionTimeout : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["endPort"] = args ? args.endPort : undefined; resourceInputs["listenerName"] = args ? args.listenerName : undefined; resourceInputs["loadBalancerId"] = args ? args.loadBalancerId : undefined; resourceInputs["port"] = args ? args.port : undefined; resourceInputs["protocol"] = args ? args.protocol : undefined; resourceInputs["serverGroupId"] = args ? args.serverGroupId : undefined; resourceInputs["startPort"] = args ? args.startPort : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Listener.__pulumiType, name, resourceInputs, opts); } } exports.Listener = Listener; /** @internal */ Listener.__pulumiType = 'volcengine:nlb/listener:Listener'; //# sourceMappingURL=listener.js.map