@natzka-oss/pulumi-netbox
Version:
A Pulumi package for creating and managing Netbox cloud resources.
82 lines • 4.14 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.AvailableVlan = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Per [the docs](https://netbox.readthedocs.io/en/stable/models/ipam/vlan/):
*
* > A VLAN represents an isolated Layer 2 domain identified by a numeric ID (1–4094). VLANs may be assigned to specific sites or marked as global.
* Optionally, they can be organized within VLAN groups to define scope and enforce uniqueness.
* >
* > Each VLAN can also be assigned an operational status and a functional role. Statuses are hard-coded in NetBox and include the following:
* > * Active
* > * Reserved
* > * Deprecated
*
* This resource will retrieve the next available VLAN ID from a given VLAN group (specified by ID).
*/
class AvailableVlan extends pulumi.CustomResource {
/**
* Get an existing AvailableVlan 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 AvailableVlan(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AvailableVlan. 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'] === AvailableVlan.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["comments"] = state ? state.comments : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["groupId"] = state ? state.groupId : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["roleId"] = state ? state.roleId : undefined;
resourceInputs["siteId"] = state ? state.siteId : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAlls"] = state ? state.tagsAlls : undefined;
resourceInputs["tenantId"] = state ? state.tenantId : undefined;
resourceInputs["vid"] = state ? state.vid : undefined;
}
else {
const args = argsOrState;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["groupId"] = args ? args.groupId : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["roleId"] = args ? args.roleId : undefined;
resourceInputs["siteId"] = args ? args.siteId : undefined;
resourceInputs["status"] = args ? args.status : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["tenantId"] = args ? args.tenantId : undefined;
resourceInputs["comments"] = undefined /*out*/;
resourceInputs["tagsAlls"] = undefined /*out*/;
resourceInputs["vid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AvailableVlan.__pulumiType, name, resourceInputs, opts);
}
}
exports.AvailableVlan = AvailableVlan;
/** @internal */
AvailableVlan.__pulumiType = 'netbox:index/availableVlan:AvailableVlan';
//# sourceMappingURL=availableVlan.js.map