@pulumi/meraki
Version:
A Pulumi package for creating and managing Cisco Meraki resources. Based on terraform-provider-meraki: version v0.2.0
171 lines • 8.68 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.SwitchPorts = 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.SwitchPorts("example", {
* accessPolicyNumber: 2,
* accessPolicyType: "Sticky MAC allow list",
* adaptivePolicyGroupId: "123",
* allowedVlans: "1,3,5-10",
* daiTrusted: false,
* enabled: true,
* flexibleStackingEnabled: true,
* isolationEnabled: false,
* linkNegotiation: "Auto negotiate",
* macAllowLists: [
* "34:56:fe:ce:8e:b0",
* "34:56:fe:ce:8e:b1",
* ],
* name: "My switch port",
* peerSgtCapable: false,
* poeEnabled: true,
* portId: "string",
* portScheduleId: "1234",
* profile: {
* enabled: false,
* id: "1284392014819",
* iname: "iname",
* },
* rstpEnabled: true,
* serial: "string",
* stickyMacAllowLists: [
* "34:56:fe:ce:8e:b0",
* "34:56:fe:ce:8e:b1",
* ],
* stickyMacAllowListLimit: 5,
* stormControlEnabled: true,
* stpGuard: "disabled",
* tags: [
* "tag1",
* "tag2",
* ],
* type: "access",
* udld: "Alert only",
* vlan: 10,
* voiceVlan: 20,
* });
* export const merakiDevicesSwitchPortsExample = example;
* ```
*
* ## Import
*
* ```sh
* $ pulumi import meraki:devices/switchPorts:SwitchPorts example "port_id,serial"
* ```
*/
class SwitchPorts extends pulumi.CustomResource {
/**
* Get an existing SwitchPorts 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 SwitchPorts(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SwitchPorts. 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'] === SwitchPorts.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accessPolicyNumber"] = state ? state.accessPolicyNumber : undefined;
resourceInputs["accessPolicyType"] = state ? state.accessPolicyType : undefined;
resourceInputs["adaptivePolicyGroupId"] = state ? state.adaptivePolicyGroupId : undefined;
resourceInputs["allowedVlans"] = state ? state.allowedVlans : undefined;
resourceInputs["daiTrusted"] = state ? state.daiTrusted : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["flexibleStackingEnabled"] = state ? state.flexibleStackingEnabled : undefined;
resourceInputs["isolationEnabled"] = state ? state.isolationEnabled : undefined;
resourceInputs["linkNegotiation"] = state ? state.linkNegotiation : undefined;
resourceInputs["linkNegotiationCapabilities"] = state ? state.linkNegotiationCapabilities : undefined;
resourceInputs["macAllowLists"] = state ? state.macAllowLists : undefined;
resourceInputs["mirror"] = state ? state.mirror : undefined;
resourceInputs["module"] = state ? state.module : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["peerSgtCapable"] = state ? state.peerSgtCapable : undefined;
resourceInputs["poeEnabled"] = state ? state.poeEnabled : undefined;
resourceInputs["portId"] = state ? state.portId : undefined;
resourceInputs["portScheduleId"] = state ? state.portScheduleId : undefined;
resourceInputs["profile"] = state ? state.profile : undefined;
resourceInputs["rstpEnabled"] = state ? state.rstpEnabled : undefined;
resourceInputs["serial"] = state ? state.serial : undefined;
resourceInputs["stickyMacAllowListLimit"] = state ? state.stickyMacAllowListLimit : undefined;
resourceInputs["stickyMacAllowLists"] = state ? state.stickyMacAllowLists : undefined;
resourceInputs["stormControlEnabled"] = state ? state.stormControlEnabled : undefined;
resourceInputs["stpGuard"] = state ? state.stpGuard : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["udld"] = state ? state.udld : undefined;
resourceInputs["vlan"] = state ? state.vlan : undefined;
resourceInputs["voiceVlan"] = state ? state.voiceVlan : undefined;
}
else {
const args = argsOrState;
if ((!args || args.portId === undefined) && !opts.urn) {
throw new Error("Missing required property 'portId'");
}
if ((!args || args.serial === undefined) && !opts.urn) {
throw new Error("Missing required property 'serial'");
}
resourceInputs["accessPolicyNumber"] = args ? args.accessPolicyNumber : undefined;
resourceInputs["accessPolicyType"] = args ? args.accessPolicyType : undefined;
resourceInputs["adaptivePolicyGroupId"] = args ? args.adaptivePolicyGroupId : undefined;
resourceInputs["allowedVlans"] = args ? args.allowedVlans : undefined;
resourceInputs["daiTrusted"] = args ? args.daiTrusted : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["flexibleStackingEnabled"] = args ? args.flexibleStackingEnabled : undefined;
resourceInputs["isolationEnabled"] = args ? args.isolationEnabled : undefined;
resourceInputs["linkNegotiation"] = args ? args.linkNegotiation : undefined;
resourceInputs["macAllowLists"] = args ? args.macAllowLists : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["peerSgtCapable"] = args ? args.peerSgtCapable : undefined;
resourceInputs["poeEnabled"] = args ? args.poeEnabled : undefined;
resourceInputs["portId"] = args ? args.portId : undefined;
resourceInputs["portScheduleId"] = args ? args.portScheduleId : undefined;
resourceInputs["profile"] = args ? args.profile : undefined;
resourceInputs["rstpEnabled"] = args ? args.rstpEnabled : undefined;
resourceInputs["serial"] = args ? args.serial : undefined;
resourceInputs["stickyMacAllowListLimit"] = args ? args.stickyMacAllowListLimit : undefined;
resourceInputs["stickyMacAllowLists"] = args ? args.stickyMacAllowLists : undefined;
resourceInputs["stormControlEnabled"] = args ? args.stormControlEnabled : undefined;
resourceInputs["stpGuard"] = args ? args.stpGuard : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["udld"] = args ? args.udld : undefined;
resourceInputs["vlan"] = args ? args.vlan : undefined;
resourceInputs["voiceVlan"] = args ? args.voiceVlan : undefined;
resourceInputs["linkNegotiationCapabilities"] = undefined /*out*/;
resourceInputs["mirror"] = undefined /*out*/;
resourceInputs["module"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SwitchPorts.__pulumiType, name, resourceInputs, opts);
}
}
exports.SwitchPorts = SwitchPorts;
/** @internal */
SwitchPorts.__pulumiType = 'meraki:devices/switchPorts:SwitchPorts';
//# sourceMappingURL=switchPorts.js.map