UNPKG

@pulumi/juniper-mist

Version:

A Pulumi package for creating and managing Juniper Mist resources.

181 lines 8.79 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.Gateway = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = 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 `managed`=`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 `mist_device_gateway` with: * * Gateway Configuration can be imported by specifying the site_id and the device_id * * ```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 }); } /** * 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["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["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; /** @internal */ Gateway.__pulumiType = 'junipermist:device/gateway:Gateway'; //# sourceMappingURL=gateway.js.map