pulumi-netbox
Version:
A Pulumi package for creating and managing Netbox resources.
41 lines • 1.24 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.getVlanOutput = exports.getVlan = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as netbox from "@pulumi/netbox";
*
* // Get VLAN by name
* const vlan1 = pulumi.output(netbox.getVlan({
* name: "vlan-1",
* }));
* // Get VLAN by VLAN ID
* const vlan2 = pulumi.output(netbox.getVlan({
* vid: 1234,
* }));
* ```
*/
function getVlan(args, opts) {
args = args || {};
if (!opts) {
opts = {};
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
return pulumi.runtime.invoke("netbox:index/getVlan:getVlan", {
"name": args.name,
"vid": args.vid,
}, opts);
}
exports.getVlan = getVlan;
function getVlanOutput(args, opts) {
return pulumi.output(args).apply(a => getVlan(a, opts));
}
exports.getVlanOutput = getVlanOutput;
//# sourceMappingURL=getVlan.js.map