@pulumi/meraki
Version:
A Pulumi package for creating and managing Cisco Meraki resources. Based on terraform-provider-meraki: version v0.2.0
128 lines • 6.51 kB
JavaScript
;
// *** 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.SwitchStacksRoutingInterfacesDhcp = 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.SwitchStacksRoutingInterfacesDhcp("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",
* networkId: "string",
* reservedIpRanges: [{
* comment: "A reserved IP range",
* end: "192.168.1.10",
* start: "192.168.1.1",
* }],
* switchStackId: "string",
* });
* export const merakiNetworksSwitchStacksRoutingInterfacesDhcpExample = example;
* ```
*
* ## Import
*
* ```sh
* $ pulumi import meraki:networks/switchStacksRoutingInterfacesDhcp:SwitchStacksRoutingInterfacesDhcp example "interface_id,network_id,switch_stack_id"
* ```
*/
class SwitchStacksRoutingInterfacesDhcp extends pulumi.CustomResource {
/**
* Get an existing SwitchStacksRoutingInterfacesDhcp 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 SwitchStacksRoutingInterfacesDhcp(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SwitchStacksRoutingInterfacesDhcp. 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'] === SwitchStacksRoutingInterfacesDhcp.__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["networkId"] = state ? state.networkId : undefined;
resourceInputs["reservedIpRanges"] = state ? state.reservedIpRanges : undefined;
resourceInputs["switchStackId"] = state ? state.switchStackId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.interfaceId === undefined) && !opts.urn) {
throw new Error("Missing required property 'interfaceId'");
}
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["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["networkId"] = args ? args.networkId : undefined;
resourceInputs["reservedIpRanges"] = args ? args.reservedIpRanges : undefined;
resourceInputs["switchStackId"] = args ? args.switchStackId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SwitchStacksRoutingInterfacesDhcp.__pulumiType, name, resourceInputs, opts);
}
}
exports.SwitchStacksRoutingInterfacesDhcp = SwitchStacksRoutingInterfacesDhcp;
/** @internal */
SwitchStacksRoutingInterfacesDhcp.__pulumiType = 'meraki:networks/switchStacksRoutingInterfacesDhcp:SwitchStacksRoutingInterfacesDhcp';
//# sourceMappingURL=switchStacksRoutingInterfacesDhcp.js.map