@pulumi/meraki
Version:
A Pulumi package for creating and managing Cisco Meraki resources. Based on terraform-provider-meraki: version v0.2.0
97 lines • 4.3 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.AppliancePorts = 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.AppliancePorts("example", {
* accessPolicy: "open",
* allowedVlans: "all",
* dropUntaggedTraffic: false,
* enabled: true,
* networkId: "string",
* portId: "string",
* type: "access",
* vlan: 3,
* });
* export const merakiNetworksAppliancePortsExample = example;
* ```
*
* ## Import
*
* ```sh
* $ pulumi import meraki:networks/appliancePorts:AppliancePorts example "network_id,port_id"
* ```
*/
class AppliancePorts extends pulumi.CustomResource {
/**
* Get an existing AppliancePorts 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 AppliancePorts(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AppliancePorts. 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'] === AppliancePorts.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accessPolicy"] = state ? state.accessPolicy : undefined;
resourceInputs["allowedVlans"] = state ? state.allowedVlans : undefined;
resourceInputs["dropUntaggedTraffic"] = state ? state.dropUntaggedTraffic : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["networkId"] = state ? state.networkId : undefined;
resourceInputs["number"] = state ? state.number : undefined;
resourceInputs["portId"] = state ? state.portId : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["vlan"] = state ? state.vlan : undefined;
}
else {
const args = argsOrState;
if ((!args || args.networkId === undefined) && !opts.urn) {
throw new Error("Missing required property 'networkId'");
}
if ((!args || args.portId === undefined) && !opts.urn) {
throw new Error("Missing required property 'portId'");
}
resourceInputs["accessPolicy"] = args ? args.accessPolicy : undefined;
resourceInputs["allowedVlans"] = args ? args.allowedVlans : undefined;
resourceInputs["dropUntaggedTraffic"] = args ? args.dropUntaggedTraffic : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["networkId"] = args ? args.networkId : undefined;
resourceInputs["portId"] = args ? args.portId : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["vlan"] = args ? args.vlan : undefined;
resourceInputs["number"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AppliancePorts.__pulumiType, name, resourceInputs, opts);
}
}
exports.AppliancePorts = AppliancePorts;
/** @internal */
AppliancePorts.__pulumiType = 'meraki:networks/appliancePorts:AppliancePorts';
//# sourceMappingURL=appliancePorts.js.map