UNPKG

@lbrlabs/pulumi-scaleway

Version:

A Pulumi package for creating and managing scaleway cloud resources.

102 lines 4.9 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.LoadbalancerFrontend = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Creates and manages Scaleway Load-Balancer Frontends. For more information, see [the documentation](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-frontends). * * ## Examples Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@lbrlabs/pulumi-scaleway"; * * const frontend01 = new scaleway.LoadbalancerFrontend("frontend01", { * lbId: scaleway_lb.lb01.id, * backendId: scaleway_lb_backend.backend01.id, * inboundPort: 80, * }); * ``` * * ## Import * * Load-Balancer frontend can be imported using the `{zone}/{id}`, e.g. bash * * ```sh * $ pulumi import scaleway:index/loadbalancerFrontend:LoadbalancerFrontend frontend01 fr-par-1/11111111-1111-1111-1111-111111111111 * ``` */ class LoadbalancerFrontend extends pulumi.CustomResource { /** * Get an existing LoadbalancerFrontend 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 LoadbalancerFrontend(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of LoadbalancerFrontend. 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'] === LoadbalancerFrontend.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["acls"] = state ? state.acls : undefined; resourceInputs["backendId"] = state ? state.backendId : undefined; resourceInputs["certificateId"] = state ? state.certificateId : undefined; resourceInputs["certificateIds"] = state ? state.certificateIds : undefined; resourceInputs["enableHttp3"] = state ? state.enableHttp3 : undefined; resourceInputs["externalAcls"] = state ? state.externalAcls : undefined; resourceInputs["inboundPort"] = state ? state.inboundPort : undefined; resourceInputs["lbId"] = state ? state.lbId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["timeoutClient"] = state ? state.timeoutClient : undefined; } else { const args = argsOrState; if ((!args || args.backendId === undefined) && !opts.urn) { throw new Error("Missing required property 'backendId'"); } if ((!args || args.inboundPort === undefined) && !opts.urn) { throw new Error("Missing required property 'inboundPort'"); } if ((!args || args.lbId === undefined) && !opts.urn) { throw new Error("Missing required property 'lbId'"); } resourceInputs["acls"] = args ? args.acls : undefined; resourceInputs["backendId"] = args ? args.backendId : undefined; resourceInputs["certificateIds"] = args ? args.certificateIds : undefined; resourceInputs["enableHttp3"] = args ? args.enableHttp3 : undefined; resourceInputs["externalAcls"] = args ? args.externalAcls : undefined; resourceInputs["inboundPort"] = args ? args.inboundPort : undefined; resourceInputs["lbId"] = args ? args.lbId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["timeoutClient"] = args ? args.timeoutClient : undefined; resourceInputs["certificateId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(LoadbalancerFrontend.__pulumiType, name, resourceInputs, opts); } } exports.LoadbalancerFrontend = LoadbalancerFrontend; /** @internal */ LoadbalancerFrontend.__pulumiType = 'scaleway:index/loadbalancerFrontend:LoadbalancerFrontend'; //# sourceMappingURL=loadbalancerFrontend.js.map