@pulumi/meraki
Version:
A Pulumi package for creating and managing Cisco Meraki resources. Based on terraform-provider-meraki: version v0.2.0
98 lines • 4.09 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.SwitchDhcpServerPolicy = 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.SwitchDhcpServerPolicy("example", {
* alerts: {
* email: {
* enabled: true,
* },
* },
* allowedServers: [
* "00:50:56:00:00:01",
* "00:50:56:00:00:02",
* ],
* arpInspection: {
* enabled: true,
* },
* blockedServers: [
* "00:50:56:00:00:03",
* "00:50:56:00:00:04",
* ],
* defaultPolicy: "block",
* networkId: "string",
* });
* export const merakiNetworksSwitchDhcpServerPolicyExample = example;
* ```
*
* ## Import
*
* ```sh
* $ pulumi import meraki:networks/switchDhcpServerPolicy:SwitchDhcpServerPolicy example "network_id"
* ```
*/
class SwitchDhcpServerPolicy extends pulumi.CustomResource {
/**
* Get an existing SwitchDhcpServerPolicy 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 SwitchDhcpServerPolicy(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SwitchDhcpServerPolicy. 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'] === SwitchDhcpServerPolicy.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["alerts"] = state ? state.alerts : undefined;
resourceInputs["allowedServers"] = state ? state.allowedServers : undefined;
resourceInputs["arpInspection"] = state ? state.arpInspection : undefined;
resourceInputs["blockedServers"] = state ? state.blockedServers : undefined;
resourceInputs["defaultPolicy"] = state ? state.defaultPolicy : undefined;
resourceInputs["networkId"] = state ? state.networkId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.networkId === undefined) && !opts.urn) {
throw new Error("Missing required property 'networkId'");
}
resourceInputs["alerts"] = args ? args.alerts : undefined;
resourceInputs["allowedServers"] = args ? args.allowedServers : undefined;
resourceInputs["arpInspection"] = args ? args.arpInspection : undefined;
resourceInputs["blockedServers"] = args ? args.blockedServers : undefined;
resourceInputs["defaultPolicy"] = args ? args.defaultPolicy : undefined;
resourceInputs["networkId"] = args ? args.networkId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SwitchDhcpServerPolicy.__pulumiType, name, resourceInputs, opts);
}
}
exports.SwitchDhcpServerPolicy = SwitchDhcpServerPolicy;
/** @internal */
SwitchDhcpServerPolicy.__pulumiType = 'meraki:networks/switchDhcpServerPolicy:SwitchDhcpServerPolicy';
//# sourceMappingURL=switchDhcpServerPolicy.js.map