UNPKG

@pulumi/juniper-mist

Version:

A Pulumi package for creating and managing Juniper Mist resources.

205 lines 10 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.Gateway = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * This resource manages the Gateway configuration. * * It can be used to define specific configuration at the device level or to override Org Gateway template settings. * * > **WARNING** For **adopted** devices, make sure to set `mistConfigured`=`true` to allow Mist to manage the gateway * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as junipermist from "@pulumi/juniper-mist"; * * const gatewayOne = new junipermist.device.Gateway("gateway_one", { * name: "gateway_one", * deviceId: clusterOne.deviceId, * siteId: clusterOne.siteId, * oobIpConfig: { * type: "dhcp", * }, * dnsServers: ["8.8.8.8"], * additionalConfigCmds: [ * "annotate system \" -- custom-main -- Template level --\"", * "delete apply-groups custom-main", * "delete groups custom-main", * "set groups custom-main", * "set groups custom-main system services ssh root-login allow", * "set apply-groups custom-main", * ], * }); * ``` * * ## Import * * Using `pulumi import`, import `junipermist.device.Gateway` with: * Gateway Configuration can be imported by specifying the siteId and the deviceId * * ```sh * $ pulumi import junipermist:device/gateway:Gateway gateway_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309 * ``` */ class Gateway extends pulumi.CustomResource { /** * Get an existing Gateway 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 Gateway(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'junipermist:device/gateway:Gateway'; /** * Returns true if the given object is an instance of Gateway. 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'] === Gateway.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["additionalConfigCmds"] = state?.additionalConfigCmds; resourceInputs["bgpConfig"] = state?.bgpConfig; resourceInputs["deviceId"] = state?.deviceId; resourceInputs["dhcpdConfig"] = state?.dhcpdConfig; resourceInputs["dnsServers"] = state?.dnsServers; resourceInputs["dnsSuffixes"] = state?.dnsSuffixes; resourceInputs["extraRoutes"] = state?.extraRoutes; resourceInputs["extraRoutes6"] = state?.extraRoutes6; resourceInputs["gatewayMgmt"] = state?.gatewayMgmt; resourceInputs["idpProfiles"] = state?.idpProfiles; resourceInputs["image1Url"] = state?.image1Url; resourceInputs["image2Url"] = state?.image2Url; resourceInputs["image3Url"] = state?.image3Url; resourceInputs["ipConfigs"] = state?.ipConfigs; resourceInputs["mac"] = state?.mac; resourceInputs["managed"] = state?.managed; resourceInputs["mapId"] = state?.mapId; resourceInputs["mistConfigured"] = state?.mistConfigured; resourceInputs["model"] = state?.model; resourceInputs["mspId"] = state?.mspId; resourceInputs["name"] = state?.name; resourceInputs["networks"] = state?.networks; resourceInputs["notes"] = state?.notes; resourceInputs["ntpServers"] = state?.ntpServers; resourceInputs["oobIpConfig"] = state?.oobIpConfig; resourceInputs["orgId"] = state?.orgId; resourceInputs["pathPreferences"] = state?.pathPreferences; resourceInputs["portConfig"] = state?.portConfig; resourceInputs["portMirroring"] = state?.portMirroring; resourceInputs["routerId"] = state?.routerId; resourceInputs["routingPolicies"] = state?.routingPolicies; resourceInputs["serial"] = state?.serial; resourceInputs["servicePolicies"] = state?.servicePolicies; resourceInputs["siteId"] = state?.siteId; resourceInputs["ssrAdditionalConfigCmds"] = state?.ssrAdditionalConfigCmds; resourceInputs["tunnelConfigs"] = state?.tunnelConfigs; resourceInputs["tunnelProviderOptions"] = state?.tunnelProviderOptions; resourceInputs["type"] = state?.type; resourceInputs["urlFilteringDenyMsg"] = state?.urlFilteringDenyMsg; resourceInputs["vars"] = state?.vars; resourceInputs["vrfConfig"] = state?.vrfConfig; resourceInputs["vrfInstances"] = state?.vrfInstances; resourceInputs["x"] = state?.x; resourceInputs["y"] = state?.y; } else { const args = argsOrState; if (args?.deviceId === undefined && !opts.urn) { throw new Error("Missing required property 'deviceId'"); } if (args?.siteId === undefined && !opts.urn) { throw new Error("Missing required property 'siteId'"); } resourceInputs["additionalConfigCmds"] = args?.additionalConfigCmds; resourceInputs["bgpConfig"] = args?.bgpConfig; resourceInputs["deviceId"] = args?.deviceId; resourceInputs["dhcpdConfig"] = args?.dhcpdConfig; resourceInputs["dnsServers"] = args?.dnsServers; resourceInputs["dnsSuffixes"] = args?.dnsSuffixes; resourceInputs["extraRoutes"] = args?.extraRoutes; resourceInputs["extraRoutes6"] = args?.extraRoutes6; resourceInputs["gatewayMgmt"] = args?.gatewayMgmt; resourceInputs["idpProfiles"] = args?.idpProfiles; resourceInputs["ipConfigs"] = args?.ipConfigs; resourceInputs["managed"] = args?.managed; resourceInputs["mapId"] = args?.mapId; resourceInputs["mistConfigured"] = args?.mistConfigured; resourceInputs["mspId"] = args?.mspId; resourceInputs["name"] = args?.name; resourceInputs["networks"] = args?.networks; resourceInputs["notes"] = args?.notes; resourceInputs["ntpServers"] = args?.ntpServers; resourceInputs["oobIpConfig"] = args?.oobIpConfig; resourceInputs["pathPreferences"] = args?.pathPreferences; resourceInputs["portConfig"] = args?.portConfig; resourceInputs["portMirroring"] = args?.portMirroring; resourceInputs["routerId"] = args?.routerId; resourceInputs["routingPolicies"] = args?.routingPolicies; resourceInputs["servicePolicies"] = args?.servicePolicies; resourceInputs["siteId"] = args?.siteId; resourceInputs["ssrAdditionalConfigCmds"] = args?.ssrAdditionalConfigCmds; resourceInputs["tunnelConfigs"] = args?.tunnelConfigs; resourceInputs["tunnelProviderOptions"] = args?.tunnelProviderOptions; resourceInputs["urlFilteringDenyMsg"] = args?.urlFilteringDenyMsg; resourceInputs["vars"] = args?.vars; resourceInputs["vrfConfig"] = args?.vrfConfig; resourceInputs["vrfInstances"] = args?.vrfInstances; resourceInputs["x"] = args?.x; resourceInputs["y"] = args?.y; resourceInputs["image1Url"] = undefined /*out*/; resourceInputs["image2Url"] = undefined /*out*/; resourceInputs["image3Url"] = undefined /*out*/; resourceInputs["mac"] = undefined /*out*/; resourceInputs["model"] = undefined /*out*/; resourceInputs["orgId"] = undefined /*out*/; resourceInputs["serial"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Gateway.__pulumiType, name, resourceInputs, opts); } } exports.Gateway = Gateway; //# sourceMappingURL=gateway.js.map