UNPKG

@natzka-oss/pulumi-netbox

Version:

A Pulumi package for creating and managing Netbox cloud resources.

94 lines (93 loc) 3.66 kB
import * as pulumi from "@pulumi/pulumi"; /** * From the [official documentation](https://docs.netbox.dev/en/stable/models/dcim/rackreservation/): * * > Users can reserve specific units within a rack for future use. An arbitrary set of units within a rack can be associated with a single reservation, but reservations cannot span multiple racks. A description is required for each reservation, reservations may optionally be associated with a specific tenant. * * ## 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: "active", * width: 10, * uHeight: 40, * }); * const testRackReservation = new netbox.dcim.RackReservation("test", { * rackId: testRack.id, * units: [ * 1, * 2, * 3, * 4, * 5, * ], * userId: 1, * description: "my description", * }); * ``` */ export declare class RackReservation extends pulumi.CustomResource { /** * Get an existing RackReservation 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?: RackReservationState, opts?: pulumi.CustomResourceOptions): RackReservation; /** * Returns true if the given object is an instance of RackReservation. 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 RackReservation; readonly comments: pulumi.Output<string | undefined>; readonly description: pulumi.Output<string>; readonly rackId: pulumi.Output<number>; readonly tags: pulumi.Output<string[] | undefined>; readonly tenantId: pulumi.Output<number | undefined>; readonly units: pulumi.Output<number[]>; readonly userId: pulumi.Output<number>; /** * Create a RackReservation 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: RackReservationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RackReservation resources. */ export interface RackReservationState { comments?: pulumi.Input<string>; description?: pulumi.Input<string>; rackId?: pulumi.Input<number>; tags?: pulumi.Input<pulumi.Input<string>[]>; tenantId?: pulumi.Input<number>; units?: pulumi.Input<pulumi.Input<number>[]>; userId?: pulumi.Input<number>; } /** * The set of arguments for constructing a RackReservation resource. */ export interface RackReservationArgs { comments?: pulumi.Input<string>; description: pulumi.Input<string>; rackId: pulumi.Input<number>; tags?: pulumi.Input<pulumi.Input<string>[]>; tenantId?: pulumi.Input<number>; units: pulumi.Input<pulumi.Input<number>[]>; userId: pulumi.Input<number>; }