UNPKG

@pulumi/meraki

Version:

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

122 lines 5.98 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.SwitchRoutingInterfacesDhcp = 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.devices.SwitchRoutingInterfacesDhcp("example", { * bootFileName: "home_boot_file", * bootNextServer: "1.2.3.4", * bootOptionsEnabled: true, * dhcpLeaseTime: "1 day", * dhcpMode: "dhcpServer", * dhcpOptions: [{ * code: "5", * type: "text", * value: "five", * }], * dhcpRelayServerIps: ["1.2.3.4"], * dnsCustomNameservers: ["8.8.8.8, 8.8.4.4"], * dnsNameserversOption: "custom", * fixedIpAssignments: [{ * ip: "192.168.1.12", * mac: "22:33:44:55:66:77", * name: "Cisco Meraki valued client", * }], * interfaceId: "string", * reservedIpRanges: [{ * comment: "A reserved IP range", * end: "192.168.1.10", * start: "192.168.1.1", * }], * serial: "string", * }); * export const merakiDevicesSwitchRoutingInterfacesDhcpExample = example; * ``` * * ## Import * * ```sh * $ pulumi import meraki:devices/switchRoutingInterfacesDhcp:SwitchRoutingInterfacesDhcp example "interface_id,serial" * ``` */ class SwitchRoutingInterfacesDhcp extends pulumi.CustomResource { /** * Get an existing SwitchRoutingInterfacesDhcp 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 SwitchRoutingInterfacesDhcp(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SwitchRoutingInterfacesDhcp. 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'] === SwitchRoutingInterfacesDhcp.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["bootFileName"] = state ? state.bootFileName : undefined; resourceInputs["bootNextServer"] = state ? state.bootNextServer : undefined; resourceInputs["bootOptionsEnabled"] = state ? state.bootOptionsEnabled : undefined; resourceInputs["dhcpLeaseTime"] = state ? state.dhcpLeaseTime : undefined; resourceInputs["dhcpMode"] = state ? state.dhcpMode : undefined; resourceInputs["dhcpOptions"] = state ? state.dhcpOptions : undefined; resourceInputs["dhcpRelayServerIps"] = state ? state.dhcpRelayServerIps : undefined; resourceInputs["dnsCustomNameservers"] = state ? state.dnsCustomNameservers : undefined; resourceInputs["dnsNameserversOption"] = state ? state.dnsNameserversOption : undefined; resourceInputs["fixedIpAssignments"] = state ? state.fixedIpAssignments : undefined; resourceInputs["interfaceId"] = state ? state.interfaceId : undefined; resourceInputs["reservedIpRanges"] = state ? state.reservedIpRanges : undefined; resourceInputs["serial"] = state ? state.serial : undefined; } else { const args = argsOrState; if ((!args || args.interfaceId === undefined) && !opts.urn) { throw new Error("Missing required property 'interfaceId'"); } if ((!args || args.serial === undefined) && !opts.urn) { throw new Error("Missing required property 'serial'"); } resourceInputs["bootFileName"] = args ? args.bootFileName : undefined; resourceInputs["bootNextServer"] = args ? args.bootNextServer : undefined; resourceInputs["bootOptionsEnabled"] = args ? args.bootOptionsEnabled : undefined; resourceInputs["dhcpLeaseTime"] = args ? args.dhcpLeaseTime : undefined; resourceInputs["dhcpMode"] = args ? args.dhcpMode : undefined; resourceInputs["dhcpOptions"] = args ? args.dhcpOptions : undefined; resourceInputs["dhcpRelayServerIps"] = args ? args.dhcpRelayServerIps : undefined; resourceInputs["dnsCustomNameservers"] = args ? args.dnsCustomNameservers : undefined; resourceInputs["dnsNameserversOption"] = args ? args.dnsNameserversOption : undefined; resourceInputs["fixedIpAssignments"] = args ? args.fixedIpAssignments : undefined; resourceInputs["interfaceId"] = args ? args.interfaceId : undefined; resourceInputs["reservedIpRanges"] = args ? args.reservedIpRanges : undefined; resourceInputs["serial"] = args ? args.serial : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(SwitchRoutingInterfacesDhcp.__pulumiType, name, resourceInputs, opts); } } exports.SwitchRoutingInterfacesDhcp = SwitchRoutingInterfacesDhcp; /** @internal */ SwitchRoutingInterfacesDhcp.__pulumiType = 'meraki:devices/switchRoutingInterfacesDhcp:SwitchRoutingInterfacesDhcp'; //# sourceMappingURL=switchRoutingInterfacesDhcp.js.map