@natzka-oss/pulumi-netbox
Version:
A Pulumi package for creating and managing Netbox cloud resources.
120 lines (119 loc) • 4.84 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* From the [official documentation](https://docs.netbox.dev/en/stable/models/dcim/module/):
*
* > A module is a field-replaceable hardware component installed within a device which houses its own child components. The most common example is a chassis-based router or switch.
*
* Similar to devices, modules are instantiated from module types, and any components associated with the module type are automatically instantiated on the new model. Each module must be installed within a module bay on a device, and each module bay may have only one module installed in it.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as netbox from "@natzka-oss/pulumi-netbox";
*
* // Note that some terraform code is not included in the example for brevity
* const test = new netbox.dcim.Device("test", {
* name: "%[1]s",
* deviceTypeId: testNetboxDeviceType.id,
* roleId: testNetboxDeviceRole.id,
* siteId: testNetboxSite.id,
* });
* const testDeviceModuleBay = new netbox.dcim.DeviceModuleBay("test", {
* deviceId: test.id,
* name: "SFP",
* });
* const testManufacturer = new netbox.dcim.Manufacturer("test", {name: "Dell"});
* const testModuleType = new netbox.dcim.ModuleType("test", {
* manufacturerId: testManufacturer.id,
* model: "Networking",
* });
* const testModule = new netbox.dcim.Module("test", {
* deviceId: test.id,
* moduleBayId: testDeviceModuleBay.id,
* moduleTypeId: testModuleType.id,
* status: "active",
* description: "SFP card",
* });
* ```
*/
export declare class Module extends pulumi.CustomResource {
/**
* Get an existing Module 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: string, id: pulumi.Input<pulumi.ID>, state?: ModuleState, opts?: pulumi.CustomResourceOptions): Module;
/**
* Returns true if the given object is an instance of Module. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Module;
readonly assetTag: pulumi.Output<string | undefined>;
readonly comments: pulumi.Output<string | undefined>;
readonly customFields: pulumi.Output<{
[key: string]: string;
} | undefined>;
readonly description: pulumi.Output<string | undefined>;
readonly deviceId: pulumi.Output<number>;
readonly moduleBayId: pulumi.Output<number>;
readonly moduleTypeId: pulumi.Output<number>;
readonly serial: pulumi.Output<string | undefined>;
/**
* One of [offline, active, planned, staged, failed, decommissioning].
*/
readonly status: pulumi.Output<string>;
readonly tags: pulumi.Output<string[] | undefined>;
/**
* Create a Module resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ModuleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Module resources.
*/
export interface ModuleState {
assetTag?: pulumi.Input<string>;
comments?: pulumi.Input<string>;
customFields?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
description?: pulumi.Input<string>;
deviceId?: pulumi.Input<number>;
moduleBayId?: pulumi.Input<number>;
moduleTypeId?: pulumi.Input<number>;
serial?: pulumi.Input<string>;
/**
* One of [offline, active, planned, staged, failed, decommissioning].
*/
status?: pulumi.Input<string>;
tags?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a Module resource.
*/
export interface ModuleArgs {
assetTag?: pulumi.Input<string>;
comments?: pulumi.Input<string>;
customFields?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
description?: pulumi.Input<string>;
deviceId: pulumi.Input<number>;
moduleBayId: pulumi.Input<number>;
moduleTypeId: pulumi.Input<number>;
serial?: pulumi.Input<string>;
/**
* One of [offline, active, planned, staged, failed, decommissioning].
*/
status: pulumi.Input<string>;
tags?: pulumi.Input<pulumi.Input<string>[]>;
}