@pulumi/juniper-mist
Version:
A Pulumi package for creating and managing Juniper Mist resources.
178 lines • 9.31 kB
JavaScript
;
// *** 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, { ...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?.aclPolicies;
resourceInputs["aclTags"] = state?.aclTags;
resourceInputs["additionalConfigCmds"] = state?.additionalConfigCmds;
resourceInputs["bgpConfig"] = state?.bgpConfig;
resourceInputs["deviceId"] = state?.deviceId;
resourceInputs["dhcpSnooping"] = state?.dhcpSnooping;
resourceInputs["dhcpdConfig"] = state?.dhcpdConfig;
resourceInputs["disableAutoConfig"] = state?.disableAutoConfig;
resourceInputs["dnsServers"] = state?.dnsServers;
resourceInputs["dnsSuffixes"] = state?.dnsSuffixes;
resourceInputs["extraRoutes"] = state?.extraRoutes;
resourceInputs["extraRoutes6"] = state?.extraRoutes6;
resourceInputs["image1Url"] = state?.image1Url;
resourceInputs["image2Url"] = state?.image2Url;
resourceInputs["image3Url"] = state?.image3Url;
resourceInputs["ipConfig"] = state?.ipConfig;
resourceInputs["localPortConfig"] = state?.localPortConfig;
resourceInputs["mac"] = state?.mac;
resourceInputs["managed"] = state?.managed;
resourceInputs["mapId"] = state?.mapId;
resourceInputs["mistNac"] = state?.mistNac;
resourceInputs["model"] = state?.model;
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["ospfAreas"] = state?.ospfAreas;
resourceInputs["ospfConfig"] = state?.ospfConfig;
resourceInputs["otherIpConfigs"] = state?.otherIpConfigs;
resourceInputs["portConfig"] = state?.portConfig;
resourceInputs["portConfigOverwrite"] = state?.portConfigOverwrite;
resourceInputs["portMirroring"] = state?.portMirroring;
resourceInputs["portUsages"] = state?.portUsages;
resourceInputs["radiusConfig"] = state?.radiusConfig;
resourceInputs["remoteSyslog"] = state?.remoteSyslog;
resourceInputs["role"] = state?.role;
resourceInputs["routerId"] = state?.routerId;
resourceInputs["routingPolicies"] = state?.routingPolicies;
resourceInputs["serial"] = state?.serial;
resourceInputs["siteId"] = state?.siteId;
resourceInputs["snmpConfig"] = state?.snmpConfig;
resourceInputs["stpConfig"] = state?.stpConfig;
resourceInputs["switchMgmt"] = state?.switchMgmt;
resourceInputs["type"] = state?.type;
resourceInputs["useRouterIdAsSourceIp"] = state?.useRouterIdAsSourceIp;
resourceInputs["vars"] = state?.vars;
resourceInputs["virtualChassis"] = state?.virtualChassis;
resourceInputs["vrfConfig"] = state?.vrfConfig;
resourceInputs["vrfInstances"] = state?.vrfInstances;
resourceInputs["vrrpConfig"] = state?.vrrpConfig;
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["aclPolicies"] = args?.aclPolicies;
resourceInputs["aclTags"] = args?.aclTags;
resourceInputs["additionalConfigCmds"] = args?.additionalConfigCmds;
resourceInputs["bgpConfig"] = args?.bgpConfig;
resourceInputs["deviceId"] = args?.deviceId;
resourceInputs["dhcpSnooping"] = args?.dhcpSnooping;
resourceInputs["dhcpdConfig"] = args?.dhcpdConfig;
resourceInputs["disableAutoConfig"] = args?.disableAutoConfig;
resourceInputs["dnsServers"] = args?.dnsServers;
resourceInputs["dnsSuffixes"] = args?.dnsSuffixes;
resourceInputs["extraRoutes"] = args?.extraRoutes;
resourceInputs["extraRoutes6"] = args?.extraRoutes6;
resourceInputs["ipConfig"] = args?.ipConfig;
resourceInputs["localPortConfig"] = args?.localPortConfig;
resourceInputs["managed"] = args?.managed;
resourceInputs["mapId"] = args?.mapId;
resourceInputs["mistNac"] = args?.mistNac;
resourceInputs["name"] = args?.name;
resourceInputs["networks"] = args?.networks;
resourceInputs["notes"] = args?.notes;
resourceInputs["ntpServers"] = args?.ntpServers;
resourceInputs["oobIpConfig"] = args?.oobIpConfig;
resourceInputs["ospfAreas"] = args?.ospfAreas;
resourceInputs["ospfConfig"] = args?.ospfConfig;
resourceInputs["otherIpConfigs"] = args?.otherIpConfigs;
resourceInputs["portConfig"] = args?.portConfig;
resourceInputs["portConfigOverwrite"] = args?.portConfigOverwrite;
resourceInputs["portMirroring"] = args?.portMirroring;
resourceInputs["portUsages"] = args?.portUsages;
resourceInputs["radiusConfig"] = args?.radiusConfig;
resourceInputs["remoteSyslog"] = args?.remoteSyslog;
resourceInputs["role"] = args?.role;
resourceInputs["routerId"] = args?.routerId;
resourceInputs["routingPolicies"] = args?.routingPolicies;
resourceInputs["siteId"] = args?.siteId;
resourceInputs["snmpConfig"] = args?.snmpConfig;
resourceInputs["stpConfig"] = args?.stpConfig;
resourceInputs["switchMgmt"] = args?.switchMgmt;
resourceInputs["useRouterIdAsSourceIp"] = args?.useRouterIdAsSourceIp;
resourceInputs["vars"] = args?.vars;
resourceInputs["virtualChassis"] = args?.virtualChassis;
resourceInputs["vrfConfig"] = args?.vrfConfig;
resourceInputs["vrfInstances"] = args?.vrfInstances;
resourceInputs["vrrpConfig"] = args?.vrrpConfig;
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(Switch.__pulumiType, name, resourceInputs, opts);
}
}
exports.Switch = Switch;
/** @internal */
Switch.__pulumiType = 'junipermist:device/switch:Switch';
//# sourceMappingURL=switch.js.map