UNPKG

@natzka-oss/pulumi-netbox

Version:

A Pulumi package for creating and managing Netbox cloud resources.

197 lines (196 loc) 8.23 kB
import * as pulumi from "@pulumi/pulumi"; /** * From the [official documentation](https://docs.netbox.dev/en/stable/models/dcim/rack/): * * > The rack model represents a physical two- or four-post equipment rack in which devices can be installed. Each rack must be assigned to a site, and may optionally be assigned to a location within that site. Racks can also be organized by user-defined functional roles. The name and facility ID of each rack within a location must be unique. * * Rack height is measured in rack units (U); racks are commonly between 42U and 48U tall, but NetBox allows you to define racks of arbitrary height. A toggle is provided to indicate whether rack units are in ascending (from the ground up) or descending order. * * Each rack is assigned a name and (optionally) a separate facility ID. This is helpful when leasing space in a data center your organization does not own: The facility will often assign a seemingly arbitrary ID to a rack (for example, "M204.313") whereas internally you refer to is simply as "R113." A unique serial number and asset tag may also be associated with each rack. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as netbox from "@natzka-oss/pulumi-netbox"; * * const test = new netbox.dcim.Site("test", { * name: "test", * status: "active", * }); * const testRack = new netbox.dcim.Rack("test", { * name: "test", * siteId: test.id, * status: "reserved", * width: 19, * uHeight: 48, * }); * ``` */ export declare class Rack extends pulumi.CustomResource { /** * Get an existing Rack 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?: RackState, opts?: pulumi.CustomResourceOptions): Rack; /** * Returns true if the given object is an instance of Rack. 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 Rack; readonly assetTag: pulumi.Output<string | undefined>; readonly comments: pulumi.Output<string | undefined>; readonly customFields: pulumi.Output<{ [key: string]: string; } | undefined>; /** * If rack units are descending. Defaults to `false`. */ readonly descUnits: pulumi.Output<boolean | undefined>; readonly description: pulumi.Output<string | undefined>; readonly facilityId: pulumi.Output<string | undefined>; /** * Valid values are `2-post-frame`, `4-post-frame`, `4-post-cabinet`, `wall-frame`, `wall-frame-vertical`, `wall-cabinet` and `wall-cabinet-vertical`. */ readonly formFactor: pulumi.Output<string | undefined>; readonly locationId: pulumi.Output<number | undefined>; readonly maxWeight: pulumi.Output<number | undefined>; readonly mountingDepth: pulumi.Output<number | undefined>; readonly name: pulumi.Output<string>; readonly outerDepth: pulumi.Output<number | undefined>; /** * Valid values are `mm` and `in`. Required when `outerWidth` and `outerDepth` is set. */ readonly outerUnit: pulumi.Output<string | undefined>; readonly outerWidth: pulumi.Output<number | undefined>; readonly roleId: pulumi.Output<number | undefined>; readonly serial: pulumi.Output<string | undefined>; readonly siteId: pulumi.Output<number>; /** * Valid values are `reserved`, `available`, `planned`, `active` and `deprecated`. */ readonly status: pulumi.Output<string>; readonly tags: pulumi.Output<string[] | undefined>; readonly tenantId: pulumi.Output<number | undefined>; readonly uHeight: pulumi.Output<number | undefined>; readonly weight: pulumi.Output<number | undefined>; /** * Valid values are `kg`, `g`, `lb` and `oz`. Required when `weight` and `maxWeight` is set. */ readonly weightUnit: pulumi.Output<string | undefined>; /** * Valid values are `10`, `19`, `21` and `23`. */ readonly width: pulumi.Output<number | undefined>; /** * Create a Rack 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: RackArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Rack resources. */ export interface RackState { assetTag?: pulumi.Input<string>; comments?: pulumi.Input<string>; customFields?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * If rack units are descending. Defaults to `false`. */ descUnits?: pulumi.Input<boolean>; description?: pulumi.Input<string>; facilityId?: pulumi.Input<string>; /** * Valid values are `2-post-frame`, `4-post-frame`, `4-post-cabinet`, `wall-frame`, `wall-frame-vertical`, `wall-cabinet` and `wall-cabinet-vertical`. */ formFactor?: pulumi.Input<string>; locationId?: pulumi.Input<number>; maxWeight?: pulumi.Input<number>; mountingDepth?: pulumi.Input<number>; name?: pulumi.Input<string>; outerDepth?: pulumi.Input<number>; /** * Valid values are `mm` and `in`. Required when `outerWidth` and `outerDepth` is set. */ outerUnit?: pulumi.Input<string>; outerWidth?: pulumi.Input<number>; roleId?: pulumi.Input<number>; serial?: pulumi.Input<string>; siteId?: pulumi.Input<number>; /** * Valid values are `reserved`, `available`, `planned`, `active` and `deprecated`. */ status?: pulumi.Input<string>; tags?: pulumi.Input<pulumi.Input<string>[]>; tenantId?: pulumi.Input<number>; uHeight?: pulumi.Input<number>; weight?: pulumi.Input<number>; /** * Valid values are `kg`, `g`, `lb` and `oz`. Required when `weight` and `maxWeight` is set. */ weightUnit?: pulumi.Input<string>; /** * Valid values are `10`, `19`, `21` and `23`. */ width?: pulumi.Input<number>; } /** * The set of arguments for constructing a Rack resource. */ export interface RackArgs { assetTag?: pulumi.Input<string>; comments?: pulumi.Input<string>; customFields?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * If rack units are descending. Defaults to `false`. */ descUnits?: pulumi.Input<boolean>; description?: pulumi.Input<string>; facilityId?: pulumi.Input<string>; /** * Valid values are `2-post-frame`, `4-post-frame`, `4-post-cabinet`, `wall-frame`, `wall-frame-vertical`, `wall-cabinet` and `wall-cabinet-vertical`. */ formFactor?: pulumi.Input<string>; locationId?: pulumi.Input<number>; maxWeight?: pulumi.Input<number>; mountingDepth?: pulumi.Input<number>; name?: pulumi.Input<string>; outerDepth?: pulumi.Input<number>; /** * Valid values are `mm` and `in`. Required when `outerWidth` and `outerDepth` is set. */ outerUnit?: pulumi.Input<string>; outerWidth?: pulumi.Input<number>; roleId?: pulumi.Input<number>; serial?: pulumi.Input<string>; siteId: pulumi.Input<number>; /** * Valid values are `reserved`, `available`, `planned`, `active` and `deprecated`. */ status: pulumi.Input<string>; tags?: pulumi.Input<pulumi.Input<string>[]>; tenantId?: pulumi.Input<number>; uHeight?: pulumi.Input<number>; weight?: pulumi.Input<number>; /** * Valid values are `kg`, `g`, `lb` and `oz`. Required when `weight` and `maxWeight` is set. */ weightUnit?: pulumi.Input<string>; /** * Valid values are `10`, `19`, `21` and `23`. */ width?: pulumi.Input<number>; }