@natzka-oss/pulumi-netbox
Version:
A Pulumi package for creating and managing Netbox cloud resources.
151 lines (150 loc) • 6.15 kB
TypeScript
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/features/device/#interface):
*
* > Interfaces in NetBox represent network interfaces used to exchange data with connected devices. On modern networks, these are most commonly Ethernet, but other types are supported as well. IP addresses and VLANs can be assigned to interfaces.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as netbox from "@natzka-oss/pulumi-netbox";
*
* // Assumes a device with ID 123 exists
* const test = new netbox.dcim.DeviceInterface("test", {
* name: "testinterface",
* deviceId: 123,
* type: "1000base-t",
* });
* ```
*/
export declare class DeviceInterface extends pulumi.CustomResource {
/**
* Get an existing DeviceInterface 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?: DeviceInterfaceState, opts?: pulumi.CustomResourceOptions): DeviceInterface;
/**
* Returns true if the given object is an instance of DeviceInterface. 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 DeviceInterface;
readonly description: pulumi.Output<string | undefined>;
readonly deviceId: pulumi.Output<number>;
/**
* Defaults to `true`.
*/
readonly enabled: pulumi.Output<boolean | undefined>;
readonly label: pulumi.Output<string | undefined>;
/**
* If this device is a member of a LAG group, you can reference the LAG interface here.
*/
readonly lagDeviceInterfaceId: pulumi.Output<number | undefined>;
/**
* The MAC address as string from the first MAC address assigned to this interface, if any.
*/
readonly macAddress: pulumi.Output<string>;
readonly macAddresses: pulumi.Output<outputs.dcim.DeviceInterfaceMacAddress[]>;
readonly mgmtonly: pulumi.Output<boolean | undefined>;
/**
* Valid values are `access`, `tagged`, `tagged-all` and `q-in-q`.
*/
readonly mode: pulumi.Output<string | undefined>;
readonly mtu: pulumi.Output<number | undefined>;
readonly name: pulumi.Output<string>;
/**
* The netbox*device*interface id of the parent interface. Useful if this interface is a logical interface.
*/
readonly parentDeviceInterfaceId: pulumi.Output<number | undefined>;
readonly speed: pulumi.Output<number | undefined>;
readonly taggedVlans: pulumi.Output<number[] | undefined>;
readonly tags: pulumi.Output<string[] | undefined>;
readonly tagsAlls: pulumi.Output<string[]>;
readonly type: pulumi.Output<string>;
readonly untaggedVlan: pulumi.Output<number | undefined>;
/**
* Create a DeviceInterface 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: DeviceInterfaceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DeviceInterface resources.
*/
export interface DeviceInterfaceState {
description?: pulumi.Input<string>;
deviceId?: pulumi.Input<number>;
/**
* Defaults to `true`.
*/
enabled?: pulumi.Input<boolean>;
label?: pulumi.Input<string>;
/**
* If this device is a member of a LAG group, you can reference the LAG interface here.
*/
lagDeviceInterfaceId?: pulumi.Input<number>;
/**
* The MAC address as string from the first MAC address assigned to this interface, if any.
*/
macAddress?: pulumi.Input<string>;
macAddresses?: pulumi.Input<pulumi.Input<inputs.dcim.DeviceInterfaceMacAddress>[]>;
mgmtonly?: pulumi.Input<boolean>;
/**
* Valid values are `access`, `tagged`, `tagged-all` and `q-in-q`.
*/
mode?: pulumi.Input<string>;
mtu?: pulumi.Input<number>;
name?: pulumi.Input<string>;
/**
* The netbox*device*interface id of the parent interface. Useful if this interface is a logical interface.
*/
parentDeviceInterfaceId?: pulumi.Input<number>;
speed?: pulumi.Input<number>;
taggedVlans?: pulumi.Input<pulumi.Input<number>[]>;
tags?: pulumi.Input<pulumi.Input<string>[]>;
tagsAlls?: pulumi.Input<pulumi.Input<string>[]>;
type?: pulumi.Input<string>;
untaggedVlan?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a DeviceInterface resource.
*/
export interface DeviceInterfaceArgs {
description?: pulumi.Input<string>;
deviceId: pulumi.Input<number>;
/**
* Defaults to `true`.
*/
enabled?: pulumi.Input<boolean>;
label?: pulumi.Input<string>;
/**
* If this device is a member of a LAG group, you can reference the LAG interface here.
*/
lagDeviceInterfaceId?: pulumi.Input<number>;
mgmtonly?: pulumi.Input<boolean>;
/**
* Valid values are `access`, `tagged`, `tagged-all` and `q-in-q`.
*/
mode?: pulumi.Input<string>;
mtu?: pulumi.Input<number>;
name?: pulumi.Input<string>;
/**
* The netbox*device*interface id of the parent interface. Useful if this interface is a logical interface.
*/
parentDeviceInterfaceId?: pulumi.Input<number>;
speed?: pulumi.Input<number>;
taggedVlans?: pulumi.Input<pulumi.Input<number>[]>;
tags?: pulumi.Input<pulumi.Input<string>[]>;
type: pulumi.Input<string>;
untaggedVlan?: pulumi.Input<number>;
}