UNPKG

@pulumi/meraki

Version:

A Pulumi package for creating and managing Cisco Meraki resources. Based on terraform-provider-meraki: version v0.2.0

94 lines 4.64 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.SwitchStacksRoutingStaticRoutes = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as meraki from "@pulumi/meraki"; * * const example = new meraki.networks.SwitchStacksRoutingStaticRoutes("example", { * advertiseViaOspfEnabled: false, * name: "My route", * networkId: "string", * nextHopIp: "1.2.3.4", * preferOverOspfRoutesEnabled: false, * subnet: "192.168.1.0/24", * switchStackId: "string", * }); * export const merakiNetworksSwitchStacksRoutingStaticRoutesExample = example; * ``` * * ## Import * * ```sh * $ pulumi import meraki:networks/switchStacksRoutingStaticRoutes:SwitchStacksRoutingStaticRoutes example "network_id,static_route_id,switch_stack_id" * ``` */ class SwitchStacksRoutingStaticRoutes extends pulumi.CustomResource { /** * Get an existing SwitchStacksRoutingStaticRoutes 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 SwitchStacksRoutingStaticRoutes(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SwitchStacksRoutingStaticRoutes. 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'] === SwitchStacksRoutingStaticRoutes.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["advertiseViaOspfEnabled"] = state ? state.advertiseViaOspfEnabled : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networkId"] = state ? state.networkId : undefined; resourceInputs["nextHopIp"] = state ? state.nextHopIp : undefined; resourceInputs["preferOverOspfRoutesEnabled"] = state ? state.preferOverOspfRoutesEnabled : undefined; resourceInputs["staticRouteId"] = state ? state.staticRouteId : undefined; resourceInputs["subnet"] = state ? state.subnet : undefined; resourceInputs["switchStackId"] = state ? state.switchStackId : undefined; } else { const args = argsOrState; if ((!args || args.networkId === undefined) && !opts.urn) { throw new Error("Missing required property 'networkId'"); } if ((!args || args.switchStackId === undefined) && !opts.urn) { throw new Error("Missing required property 'switchStackId'"); } resourceInputs["advertiseViaOspfEnabled"] = args ? args.advertiseViaOspfEnabled : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networkId"] = args ? args.networkId : undefined; resourceInputs["nextHopIp"] = args ? args.nextHopIp : undefined; resourceInputs["preferOverOspfRoutesEnabled"] = args ? args.preferOverOspfRoutesEnabled : undefined; resourceInputs["staticRouteId"] = args ? args.staticRouteId : undefined; resourceInputs["subnet"] = args ? args.subnet : undefined; resourceInputs["switchStackId"] = args ? args.switchStackId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(SwitchStacksRoutingStaticRoutes.__pulumiType, name, resourceInputs, opts); } } exports.SwitchStacksRoutingStaticRoutes = SwitchStacksRoutingStaticRoutes; /** @internal */ SwitchStacksRoutingStaticRoutes.__pulumiType = 'meraki:networks/switchStacksRoutingStaticRoutes:SwitchStacksRoutingStaticRoutes'; //# sourceMappingURL=switchStacksRoutingStaticRoutes.js.map