UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

187 lines 9.09 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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Backend = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * Creates and manages Scaleway Load Balancer backends. * * or more information, see the [main documentation](https://www.scaleway.com/en/docs/load-balancer/reference-content/configuring-backends/) or [API documentation](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-backends). * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const backend01 = new scaleway.loadbalancers.Backend("backend01", { * lbId: lb01.id, * name: "backend01", * forwardProtocol: "http", * forwardPort: 80, * }); * ``` * * ### With HTTP Health Check * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const backend01 = new scaleway.loadbalancers.Backend("backend01", { * lbId: lb01.id, * name: "backend01", * forwardProtocol: "http", * forwardPort: 80, * healthCheckHttp: { * uri: "/health", * }, * }); * ``` * * ## Import * * Load Balancer backends can be imported using `{zone}/{id}`, e.g. * * ```sh * $ pulumi import scaleway:loadbalancers/backend:Backend backend01 fr-par-1/11111111-1111-1111-1111-111111111111 * ``` */ class Backend extends pulumi.CustomResource { /** * Get an existing Backend 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 Backend(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'scaleway:loadbalancers/backend:Backend'; /** * Returns true if the given object is an instance of Backend. 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'] === Backend.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["failoverHost"] = state?.failoverHost; resourceInputs["forwardPort"] = state?.forwardPort; resourceInputs["forwardPortAlgorithm"] = state?.forwardPortAlgorithm; resourceInputs["forwardProtocol"] = state?.forwardProtocol; resourceInputs["healthCheckDelay"] = state?.healthCheckDelay; resourceInputs["healthCheckHttp"] = state?.healthCheckHttp; resourceInputs["healthCheckHttps"] = state?.healthCheckHttps; resourceInputs["healthCheckMaxRetries"] = state?.healthCheckMaxRetries; resourceInputs["healthCheckPort"] = state?.healthCheckPort; resourceInputs["healthCheckSendProxy"] = state?.healthCheckSendProxy; resourceInputs["healthCheckTcp"] = state?.healthCheckTcp; resourceInputs["healthCheckTimeout"] = state?.healthCheckTimeout; resourceInputs["healthCheckTransientDelay"] = state?.healthCheckTransientDelay; resourceInputs["ignoreSslServerVerify"] = state?.ignoreSslServerVerify; resourceInputs["lbId"] = state?.lbId; resourceInputs["maxConnections"] = state?.maxConnections; resourceInputs["maxRetries"] = state?.maxRetries; resourceInputs["name"] = state?.name; resourceInputs["onMarkedDownAction"] = state?.onMarkedDownAction; resourceInputs["proxyProtocol"] = state?.proxyProtocol; resourceInputs["redispatchAttemptCount"] = state?.redispatchAttemptCount; resourceInputs["sendProxyV2"] = state?.sendProxyV2; resourceInputs["serverIps"] = state?.serverIps; resourceInputs["sslBridging"] = state?.sslBridging; resourceInputs["stickySessions"] = state?.stickySessions; resourceInputs["stickySessionsCookieName"] = state?.stickySessionsCookieName; resourceInputs["timeoutConnect"] = state?.timeoutConnect; resourceInputs["timeoutQueue"] = state?.timeoutQueue; resourceInputs["timeoutServer"] = state?.timeoutServer; resourceInputs["timeoutTunnel"] = state?.timeoutTunnel; } else { const args = argsOrState; if (args?.forwardPort === undefined && !opts.urn) { throw new Error("Missing required property 'forwardPort'"); } if (args?.forwardProtocol === undefined && !opts.urn) { throw new Error("Missing required property 'forwardProtocol'"); } if (args?.lbId === undefined && !opts.urn) { throw new Error("Missing required property 'lbId'"); } resourceInputs["failoverHost"] = args?.failoverHost; resourceInputs["forwardPort"] = args?.forwardPort; resourceInputs["forwardPortAlgorithm"] = args?.forwardPortAlgorithm; resourceInputs["forwardProtocol"] = args?.forwardProtocol; resourceInputs["healthCheckDelay"] = args?.healthCheckDelay; resourceInputs["healthCheckHttp"] = args?.healthCheckHttp; resourceInputs["healthCheckHttps"] = args?.healthCheckHttps; resourceInputs["healthCheckMaxRetries"] = args?.healthCheckMaxRetries; resourceInputs["healthCheckPort"] = args?.healthCheckPort; resourceInputs["healthCheckSendProxy"] = args?.healthCheckSendProxy; resourceInputs["healthCheckTcp"] = args?.healthCheckTcp; resourceInputs["healthCheckTimeout"] = args?.healthCheckTimeout; resourceInputs["healthCheckTransientDelay"] = args?.healthCheckTransientDelay; resourceInputs["ignoreSslServerVerify"] = args?.ignoreSslServerVerify; resourceInputs["lbId"] = args?.lbId; resourceInputs["maxConnections"] = args?.maxConnections; resourceInputs["maxRetries"] = args?.maxRetries; resourceInputs["name"] = args?.name; resourceInputs["onMarkedDownAction"] = args?.onMarkedDownAction; resourceInputs["proxyProtocol"] = args?.proxyProtocol; resourceInputs["redispatchAttemptCount"] = args?.redispatchAttemptCount; resourceInputs["sendProxyV2"] = args?.sendProxyV2; resourceInputs["serverIps"] = args?.serverIps; resourceInputs["sslBridging"] = args?.sslBridging; resourceInputs["stickySessions"] = args?.stickySessions; resourceInputs["stickySessionsCookieName"] = args?.stickySessionsCookieName; resourceInputs["timeoutConnect"] = args?.timeoutConnect; resourceInputs["timeoutQueue"] = args?.timeoutQueue; resourceInputs["timeoutServer"] = args?.timeoutServer; resourceInputs["timeoutTunnel"] = args?.timeoutTunnel; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const aliasOpts = { aliases: [{ type: "scaleway:index/loadbalancerBackend:LoadbalancerBackend" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(Backend.__pulumiType, name, resourceInputs, opts); } } exports.Backend = Backend; //# sourceMappingURL=backend.js.map