@pulumi/meraki
Version:
A Pulumi package for creating and managing Cisco Meraki resources. Based on terraform-provider-meraki: version v0.2.0
115 lines • 4.22 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.SwitchPortSchedules = 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.SwitchPortSchedules("example", {
* name: "Weekdays schedule",
* networkId: "string",
* portSchedule: {
* friday: {
* active: true,
* from: "9:00",
* to: "17:00",
* },
* monday: {
* active: true,
* from: "9:00",
* to: "17:00",
* },
* saturday: {
* active: false,
* from: "0:00",
* to: "24:00",
* },
* sunday: {
* active: false,
* from: "0:00",
* to: "24:00",
* },
* thursday: {
* active: true,
* from: "9:00",
* to: "17:00",
* },
* tuesday: {
* active: true,
* from: "9:00",
* to: "17:00",
* },
* wednesday: {
* active: true,
* from: "9:00",
* to: "17:00",
* },
* },
* });
* export const merakiNetworksSwitchPortSchedulesExample = example;
* ```
*
* ## Import
*
* ```sh
* $ pulumi import meraki:networks/switchPortSchedules:SwitchPortSchedules example "network_id"
* ```
*/
class SwitchPortSchedules extends pulumi.CustomResource {
/**
* Get an existing SwitchPortSchedules 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 SwitchPortSchedules(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SwitchPortSchedules. 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'] === SwitchPortSchedules.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["networkId"] = state ? state.networkId : undefined;
resourceInputs["portSchedule"] = state ? state.portSchedule : undefined;
resourceInputs["portScheduleId"] = state ? state.portScheduleId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.networkId === undefined) && !opts.urn) {
throw new Error("Missing required property 'networkId'");
}
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["networkId"] = args ? args.networkId : undefined;
resourceInputs["portSchedule"] = args ? args.portSchedule : undefined;
resourceInputs["portScheduleId"] = args ? args.portScheduleId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SwitchPortSchedules.__pulumiType, name, resourceInputs, opts);
}
}
exports.SwitchPortSchedules = SwitchPortSchedules;
/** @internal */
SwitchPortSchedules.__pulumiType = 'meraki:networks/switchPortSchedules:SwitchPortSchedules';
//# sourceMappingURL=switchPortSchedules.js.map