UNPKG

@pulumi/juniper-mist

Version:

A Pulumi package for creating and managing Juniper Mist resources.

175 lines 9.72 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, Object.assign(Object.assign({}, 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 ? state.additionalConfigCmds : undefined; resourceInputs["bgpConfig"] = state ? state.bgpConfig : undefined; resourceInputs["deviceId"] = state ? state.deviceId : undefined; resourceInputs["dhcpdConfig"] = state ? state.dhcpdConfig : undefined; resourceInputs["dnsServers"] = state ? state.dnsServers : undefined; resourceInputs["dnsSuffixes"] = state ? state.dnsSuffixes : undefined; resourceInputs["extraRoutes"] = state ? state.extraRoutes : undefined; resourceInputs["extraRoutes6"] = state ? state.extraRoutes6 : undefined; resourceInputs["idpProfiles"] = state ? state.idpProfiles : undefined; resourceInputs["image1Url"] = state ? state.image1Url : undefined; resourceInputs["image2Url"] = state ? state.image2Url : undefined; resourceInputs["image3Url"] = state ? state.image3Url : undefined; resourceInputs["ipConfigs"] = state ? state.ipConfigs : undefined; resourceInputs["mac"] = state ? state.mac : undefined; resourceInputs["managed"] = state ? state.managed : undefined; resourceInputs["mapId"] = state ? state.mapId : undefined; resourceInputs["model"] = state ? state.model : undefined; resourceInputs["mspId"] = state ? state.mspId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networks"] = state ? state.networks : undefined; resourceInputs["notes"] = state ? state.notes : undefined; resourceInputs["ntpServers"] = state ? state.ntpServers : undefined; resourceInputs["oobIpConfig"] = state ? state.oobIpConfig : undefined; resourceInputs["orgId"] = state ? state.orgId : undefined; resourceInputs["pathPreferences"] = state ? state.pathPreferences : undefined; resourceInputs["portConfig"] = state ? state.portConfig : undefined; resourceInputs["portMirroring"] = state ? state.portMirroring : undefined; resourceInputs["routerId"] = state ? state.routerId : undefined; resourceInputs["routingPolicies"] = state ? state.routingPolicies : undefined; resourceInputs["serial"] = state ? state.serial : undefined; resourceInputs["servicePolicies"] = state ? state.servicePolicies : undefined; resourceInputs["siteId"] = state ? state.siteId : undefined; resourceInputs["tunnelConfigs"] = state ? state.tunnelConfigs : undefined; resourceInputs["tunnelProviderOptions"] = state ? state.tunnelProviderOptions : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["vars"] = state ? state.vars : undefined; resourceInputs["vrfConfig"] = state ? state.vrfConfig : undefined; resourceInputs["vrfInstances"] = state ? state.vrfInstances : undefined; resourceInputs["x"] = state ? state.x : undefined; resourceInputs["y"] = state ? state.y : undefined; } else { const args = argsOrState; if ((!args || args.deviceId === undefined) && !opts.urn) { throw new Error("Missing required property 'deviceId'"); } if ((!args || args.siteId === undefined) && !opts.urn) { throw new Error("Missing required property 'siteId'"); } resourceInputs["additionalConfigCmds"] = args ? args.additionalConfigCmds : undefined; resourceInputs["bgpConfig"] = args ? args.bgpConfig : undefined; resourceInputs["deviceId"] = args ? args.deviceId : undefined; resourceInputs["dhcpdConfig"] = args ? args.dhcpdConfig : undefined; resourceInputs["dnsServers"] = args ? args.dnsServers : undefined; resourceInputs["dnsSuffixes"] = args ? args.dnsSuffixes : undefined; resourceInputs["extraRoutes"] = args ? args.extraRoutes : undefined; resourceInputs["extraRoutes6"] = args ? args.extraRoutes6 : undefined; resourceInputs["idpProfiles"] = args ? args.idpProfiles : undefined; resourceInputs["ipConfigs"] = args ? args.ipConfigs : undefined; resourceInputs["managed"] = args ? args.managed : undefined; resourceInputs["mapId"] = args ? args.mapId : undefined; resourceInputs["mspId"] = args ? args.mspId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networks"] = args ? args.networks : undefined; resourceInputs["notes"] = args ? args.notes : undefined; resourceInputs["ntpServers"] = args ? args.ntpServers : undefined; resourceInputs["oobIpConfig"] = args ? args.oobIpConfig : undefined; resourceInputs["pathPreferences"] = args ? args.pathPreferences : undefined; resourceInputs["portConfig"] = args ? args.portConfig : undefined; resourceInputs["portMirroring"] = args ? args.portMirroring : undefined; resourceInputs["routerId"] = args ? args.routerId : undefined; resourceInputs["routingPolicies"] = args ? args.routingPolicies : undefined; resourceInputs["servicePolicies"] = args ? args.servicePolicies : undefined; resourceInputs["siteId"] = args ? args.siteId : undefined; resourceInputs["tunnelConfigs"] = args ? args.tunnelConfigs : undefined; resourceInputs["tunnelProviderOptions"] = args ? args.tunnelProviderOptions : undefined; resourceInputs["vars"] = args ? args.vars : undefined; resourceInputs["vrfConfig"] = args ? args.vrfConfig : undefined; resourceInputs["vrfInstances"] = args ? args.vrfInstances : undefined; resourceInputs["x"] = args ? args.x : undefined; resourceInputs["y"] = args ? args.y : undefined; 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