@natzka-oss/pulumi-netbox
Version:
A Pulumi package for creating and managing Netbox cloud resources.
145 lines (144 loc) • 5.39 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* From the [official documentation](https://docs.netbox.dev/en/stable/models/dcim/inventoryitem/):
*
* > Inventory items represent hardware components installed within a device, such as a power supply or CPU or line card. They are intended to be used primarily for inventory purposes.
*
* ## 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,
* tenantId: testNetboxTenant.id,
* roleId: testNetboxDeviceRole.id,
* siteId: testNetboxSite.id,
* });
* const testDeviceRearPort = new netbox.dcim.DeviceRearPort("test", {
* deviceId: test.id,
* name: "rear port",
* type: "8p8c",
* positions: 1,
* markConnected: true,
* });
* const parent = new netbox.dcim.InventoryItem("parent", {
* deviceId: test.id,
* name: "Parent Item",
* });
* const testInventoryItem = new netbox.dcim.InventoryItem("test", {
* deviceId: test.id,
* name: "Child Item",
* parentId: parent.id,
* componentType: "dcim.rearport",
* componentId: testDeviceRearPort.id,
* });
* ```
*/
export declare class InventoryItem extends pulumi.CustomResource {
/**
* Get an existing InventoryItem 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?: InventoryItemState, opts?: pulumi.CustomResourceOptions): InventoryItem;
/**
* Returns true if the given object is an instance of InventoryItem. 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 InventoryItem;
readonly assetTag: pulumi.Output<string | undefined>;
/**
* Required when `componentType` is set.
*/
readonly componentId: pulumi.Output<number | undefined>;
readonly componentType: pulumi.Output<string | undefined>;
readonly customFields: pulumi.Output<{
[key: string]: string;
} | undefined>;
readonly description: pulumi.Output<string | undefined>;
readonly deviceId: pulumi.Output<number>;
/**
* Defaults to `false`.
*/
readonly discovered: pulumi.Output<boolean | undefined>;
readonly label: pulumi.Output<string | undefined>;
readonly manufacturerId: pulumi.Output<number | undefined>;
readonly name: pulumi.Output<string>;
readonly parentId: pulumi.Output<number | undefined>;
readonly partId: pulumi.Output<string | undefined>;
readonly roleId: pulumi.Output<number | undefined>;
readonly serial: pulumi.Output<string | undefined>;
readonly tags: pulumi.Output<string[] | undefined>;
/**
* Create a InventoryItem 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: InventoryItemArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering InventoryItem resources.
*/
export interface InventoryItemState {
assetTag?: pulumi.Input<string>;
/**
* Required when `componentType` is set.
*/
componentId?: pulumi.Input<number>;
componentType?: pulumi.Input<string>;
customFields?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
description?: pulumi.Input<string>;
deviceId?: pulumi.Input<number>;
/**
* Defaults to `false`.
*/
discovered?: pulumi.Input<boolean>;
label?: pulumi.Input<string>;
manufacturerId?: pulumi.Input<number>;
name?: pulumi.Input<string>;
parentId?: pulumi.Input<number>;
partId?: pulumi.Input<string>;
roleId?: pulumi.Input<number>;
serial?: pulumi.Input<string>;
tags?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a InventoryItem resource.
*/
export interface InventoryItemArgs {
assetTag?: pulumi.Input<string>;
/**
* Required when `componentType` is set.
*/
componentId?: pulumi.Input<number>;
componentType?: pulumi.Input<string>;
customFields?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
description?: pulumi.Input<string>;
deviceId: pulumi.Input<number>;
/**
* Defaults to `false`.
*/
discovered?: pulumi.Input<boolean>;
label?: pulumi.Input<string>;
manufacturerId?: pulumi.Input<number>;
name?: pulumi.Input<string>;
parentId?: pulumi.Input<number>;
partId?: pulumi.Input<string>;
roleId?: pulumi.Input<number>;
serial?: pulumi.Input<string>;
tags?: pulumi.Input<pulumi.Input<string>[]>;
}