UNPKG

@pulumi/juniper-mist

Version:

A Pulumi package for creating and managing Juniper Mist resources.

172 lines 10.7 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.Switch = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * This resource manages the Switch configuration. * * It can be used to define specific configuration at the device level or to override Org/Site Network template settings. * * > **WARNING** For **adopted** devices, make sure to set `managed`=`true` to allow Mist to manage the switch * * ## Import * * Using `pulumi import`, import `mist_device_switch` with: * * Switch Configuration can be imported by specifying the site_id and the device_id * * ```sh * $ pulumi import junipermist:device/switch:Switch switch_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309 * ``` */ class Switch extends pulumi.CustomResource { /** * Get an existing Switch 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 Switch(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Switch. 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'] === Switch.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["aclPolicies"] = state ? state.aclPolicies : undefined; resourceInputs["aclTags"] = state ? state.aclTags : undefined; resourceInputs["additionalConfigCmds"] = state ? state.additionalConfigCmds : undefined; resourceInputs["deviceId"] = state ? state.deviceId : undefined; resourceInputs["dhcpSnooping"] = state ? state.dhcpSnooping : undefined; resourceInputs["dhcpdConfig"] = state ? state.dhcpdConfig : undefined; resourceInputs["disableAutoConfig"] = state ? state.disableAutoConfig : 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["image1Url"] = state ? state.image1Url : undefined; resourceInputs["image2Url"] = state ? state.image2Url : undefined; resourceInputs["image3Url"] = state ? state.image3Url : undefined; resourceInputs["ipConfig"] = state ? state.ipConfig : undefined; resourceInputs["localPortConfig"] = state ? state.localPortConfig : undefined; resourceInputs["mac"] = state ? state.mac : undefined; resourceInputs["managed"] = state ? state.managed : undefined; resourceInputs["mapId"] = state ? state.mapId : undefined; resourceInputs["mistNac"] = state ? state.mistNac : undefined; resourceInputs["model"] = state ? state.model : 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["ospfAreas"] = state ? state.ospfAreas : undefined; resourceInputs["ospfConfig"] = state ? state.ospfConfig : undefined; resourceInputs["otherIpConfigs"] = state ? state.otherIpConfigs : undefined; resourceInputs["portConfig"] = state ? state.portConfig : undefined; resourceInputs["portMirroring"] = state ? state.portMirroring : undefined; resourceInputs["portUsages"] = state ? state.portUsages : undefined; resourceInputs["radiusConfig"] = state ? state.radiusConfig : undefined; resourceInputs["remoteSyslog"] = state ? state.remoteSyslog : undefined; resourceInputs["role"] = state ? state.role : undefined; resourceInputs["routerId"] = state ? state.routerId : undefined; resourceInputs["serial"] = state ? state.serial : undefined; resourceInputs["siteId"] = state ? state.siteId : undefined; resourceInputs["snmpConfig"] = state ? state.snmpConfig : undefined; resourceInputs["stpConfig"] = state ? state.stpConfig : undefined; resourceInputs["switchMgmt"] = state ? state.switchMgmt : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["useRouterIdAsSourceIp"] = state ? state.useRouterIdAsSourceIp : undefined; resourceInputs["vars"] = state ? state.vars : undefined; resourceInputs["virtualChassis"] = state ? state.virtualChassis : undefined; resourceInputs["vrfConfig"] = state ? state.vrfConfig : undefined; resourceInputs["vrfInstances"] = state ? state.vrfInstances : undefined; resourceInputs["vrrpConfig"] = state ? state.vrrpConfig : 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["aclPolicies"] = args ? args.aclPolicies : undefined; resourceInputs["aclTags"] = args ? args.aclTags : undefined; resourceInputs["additionalConfigCmds"] = args ? args.additionalConfigCmds : undefined; resourceInputs["deviceId"] = args ? args.deviceId : undefined; resourceInputs["dhcpSnooping"] = args ? args.dhcpSnooping : undefined; resourceInputs["dhcpdConfig"] = args ? args.dhcpdConfig : undefined; resourceInputs["disableAutoConfig"] = args ? args.disableAutoConfig : 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["ipConfig"] = args ? args.ipConfig : undefined; resourceInputs["localPortConfig"] = args ? args.localPortConfig : undefined; resourceInputs["managed"] = args ? args.managed : undefined; resourceInputs["mapId"] = args ? args.mapId : undefined; resourceInputs["mistNac"] = args ? args.mistNac : 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["ospfAreas"] = args ? args.ospfAreas : undefined; resourceInputs["ospfConfig"] = args ? args.ospfConfig : undefined; resourceInputs["otherIpConfigs"] = args ? args.otherIpConfigs : undefined; resourceInputs["portConfig"] = args ? args.portConfig : undefined; resourceInputs["portMirroring"] = args ? args.portMirroring : undefined; resourceInputs["portUsages"] = args ? args.portUsages : undefined; resourceInputs["radiusConfig"] = args ? args.radiusConfig : undefined; resourceInputs["remoteSyslog"] = args ? args.remoteSyslog : undefined; resourceInputs["role"] = args ? args.role : undefined; resourceInputs["routerId"] = args ? args.routerId : undefined; resourceInputs["siteId"] = args ? args.siteId : undefined; resourceInputs["snmpConfig"] = args ? args.snmpConfig : undefined; resourceInputs["stpConfig"] = args ? args.stpConfig : undefined; resourceInputs["switchMgmt"] = args ? args.switchMgmt : undefined; resourceInputs["useRouterIdAsSourceIp"] = args ? args.useRouterIdAsSourceIp : undefined; resourceInputs["vars"] = args ? args.vars : undefined; resourceInputs["virtualChassis"] = args ? args.virtualChassis : undefined; resourceInputs["vrfConfig"] = args ? args.vrfConfig : undefined; resourceInputs["vrfInstances"] = args ? args.vrfInstances : undefined; resourceInputs["vrrpConfig"] = args ? args.vrrpConfig : 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(Switch.__pulumiType, name, resourceInputs, opts); } } exports.Switch = Switch; /** @internal */ Switch.__pulumiType = 'junipermist:device/switch:Switch'; //# sourceMappingURL=switch.js.map