UNPKG

@natzka-oss/pulumi-netbox

Version:

A Pulumi package for creating and managing Netbox cloud resources.

104 lines 4.29 kB
"use strict"; // *** 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.VlanGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * > A VLAN Group represents a collection of VLANs. Generally, these are limited by one of a number of scopes such as "Site" or "Virtualization Cluster". * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as netbox from "@natzka-oss/pulumi-netbox"; * * //Basic VLAN Group example * const example1 = new netbox.ipam.VlanGroup("example1", { * name: "example1", * slug: "example1", * }); * //Full VLAN Group example * const example2 = new netbox.ipam.VlanGroup("example2", { * name: "Second Example", * slug: "example2", * scopeType: "dcim.site", * scopeId: example.id, * description: "Second Example VLAN Group", * tags: [exampleNetboxTag.id], * vidRanges: [ * [ * 1, * 2, * ], * [ * 3, * 4, * ], * ], * }); * ``` */ class VlanGroup extends pulumi.CustomResource { /** * Get an existing VlanGroup 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 VlanGroup(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of VlanGroup. 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'] === VlanGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["scopeId"] = state ? state.scopeId : undefined; resourceInputs["scopeType"] = state ? state.scopeType : undefined; resourceInputs["slug"] = state ? state.slug : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAlls"] = state ? state.tagsAlls : undefined; resourceInputs["vidRanges"] = state ? state.vidRanges : undefined; } else { const args = argsOrState; if ((!args || args.slug === undefined) && !opts.urn) { throw new Error("Missing required property 'slug'"); } if ((!args || args.vidRanges === undefined) && !opts.urn) { throw new Error("Missing required property 'vidRanges'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["scopeId"] = args ? args.scopeId : undefined; resourceInputs["scopeType"] = args ? args.scopeType : undefined; resourceInputs["slug"] = args ? args.slug : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["vidRanges"] = args ? args.vidRanges : undefined; resourceInputs["tagsAlls"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VlanGroup.__pulumiType, name, resourceInputs, opts); } } exports.VlanGroup = VlanGroup; /** @internal */ VlanGroup.__pulumiType = 'netbox:ipam/vlanGroup:VlanGroup'; //# sourceMappingURL=vlanGroup.js.map