UNPKG

@natzka-oss/pulumi-netbox

Version:

A Pulumi package for creating and managing Netbox cloud resources.

153 lines (152 loc) 6.07 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * From the [official documentation](https://docs.netbox.dev/en/stable/models/dcim/cable/): * * > All connections between device components in NetBox are represented using cables. A cable represents a direct physical connection between two sets of endpoints (A and B), such as a console port and a patch panel port, or between two network interfaces. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as netbox from "@natzka-oss/pulumi-netbox"; * * // assumes that the referenced console port resources exist * const test = new netbox.dcim.Cable("test", { * aTerminations: [ * { * objectType: "dcim.consoleserverport", * objectId: kvm1.id, * }, * { * objectType: "dcim.consoleserverport", * objectId: kvm2.id, * }, * ], * bTerminations: [ * { * objectType: "dcim.consoleport", * objectId: server1.id, * }, * { * objectType: "dcim.consoleport", * objectId: server2.id, * }, * ], * status: "connected", * label: "KVM cable", * type: "cat8", * colorHex: "123456", * length: 10, * lengthUnit: "m", * }); * ``` */ export declare class Cable extends pulumi.CustomResource { /** * Get an existing Cable 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?: CableState, opts?: pulumi.CustomResourceOptions): Cable; /** * Returns true if the given object is an instance of Cable. 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 Cable; readonly aTerminations: pulumi.Output<outputs.dcim.CableATermination[]>; readonly bTerminations: pulumi.Output<outputs.dcim.CableBTermination[]>; readonly colorHex: 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 label: pulumi.Output<string | undefined>; readonly length: pulumi.Output<number | undefined>; /** * One of [km, m, cm, mi, ft, in]. Required when `length` is set. */ readonly lengthUnit: pulumi.Output<string | undefined>; /** * One of [connected, planned, decommissioning]. */ readonly status: pulumi.Output<string>; readonly tags: pulumi.Output<string[] | undefined>; readonly tenantId: pulumi.Output<number | undefined>; /** * One of [cat3, cat5, cat5e, cat6, cat6a, cat7, cat7a, cat8, dac-active, dac-passive, mrj21-trunk, coaxial, mmf, mmf-om1, mmf-om2, mmf-om3, mmf-om4, mmf-om5, smf, smf-os1, smf-os2, aoc, power]. */ readonly type: pulumi.Output<string | undefined>; /** * Create a Cable 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: CableArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Cable resources. */ export interface CableState { aTerminations?: pulumi.Input<pulumi.Input<inputs.dcim.CableATermination>[]>; bTerminations?: pulumi.Input<pulumi.Input<inputs.dcim.CableBTermination>[]>; colorHex?: pulumi.Input<string>; comments?: pulumi.Input<string>; customFields?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; description?: pulumi.Input<string>; label?: pulumi.Input<string>; length?: pulumi.Input<number>; /** * One of [km, m, cm, mi, ft, in]. Required when `length` is set. */ lengthUnit?: pulumi.Input<string>; /** * One of [connected, planned, decommissioning]. */ status?: pulumi.Input<string>; tags?: pulumi.Input<pulumi.Input<string>[]>; tenantId?: pulumi.Input<number>; /** * One of [cat3, cat5, cat5e, cat6, cat6a, cat7, cat7a, cat8, dac-active, dac-passive, mrj21-trunk, coaxial, mmf, mmf-om1, mmf-om2, mmf-om3, mmf-om4, mmf-om5, smf, smf-os1, smf-os2, aoc, power]. */ type?: pulumi.Input<string>; } /** * The set of arguments for constructing a Cable resource. */ export interface CableArgs { aTerminations: pulumi.Input<pulumi.Input<inputs.dcim.CableATermination>[]>; bTerminations: pulumi.Input<pulumi.Input<inputs.dcim.CableBTermination>[]>; colorHex?: pulumi.Input<string>; comments?: pulumi.Input<string>; customFields?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; description?: pulumi.Input<string>; label?: pulumi.Input<string>; length?: pulumi.Input<number>; /** * One of [km, m, cm, mi, ft, in]. Required when `length` is set. */ lengthUnit?: pulumi.Input<string>; /** * One of [connected, planned, decommissioning]. */ status: pulumi.Input<string>; tags?: pulumi.Input<pulumi.Input<string>[]>; tenantId?: pulumi.Input<number>; /** * One of [cat3, cat5, cat5e, cat6, cat6a, cat7, cat7a, cat8, dac-active, dac-passive, mrj21-trunk, coaxial, mmf, mmf-om1, mmf-om2, mmf-om3, mmf-om4, mmf-om5, smf, smf-os1, smf-os2, aoc, power]. */ type?: pulumi.Input<string>; }