UNPKG

@natzka-oss/pulumi-netbox

Version:

A Pulumi package for creating and managing Netbox cloud resources.

128 lines (127 loc) 4.95 kB
import * as pulumi from "@pulumi/pulumi"; /** * From the [official documentation](https://docs.netbox.dev/en/stable/features/services/#services): * * > A service represents a layer four TCP or UDP service available on a device or virtual machine. For example, you might want to document that an HTTP service is running on a device. Each service includes a name, protocol, and port number; for example, "SSH (TCP/22)" or "DNS (UDP/53)." * > * > A service may optionally be bound to one or more specific IP addresses belonging to its parent device or VM. (If no IP addresses are bound, the service is assumed to be reachable via any assigned IP address. */ export declare class Service extends pulumi.CustomResource { /** * Get an existing Service 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?: ServiceState, opts?: pulumi.CustomResourceOptions): Service; /** * Returns true if the given object is an instance of Service. 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 Service; readonly customFields: pulumi.Output<{ [key: string]: string; } | undefined>; readonly description: pulumi.Output<string | undefined>; /** * Exactly one of `virtualMachineId` or `deviceId` must be given. */ readonly deviceId: pulumi.Output<number | undefined>; readonly name: pulumi.Output<string>; /** * Exactly one of `port` or `ports` must be given. * * @deprecated This field is deprecated. Please use the new "ports" attribute instead. */ readonly port: pulumi.Output<number | undefined>; /** * Exactly one of `port` or `ports` must be given. */ readonly ports: pulumi.Output<number[] | undefined>; /** * Valid values are `tcp`, `udp` and `sctp`. */ readonly protocol: pulumi.Output<string>; readonly tags: pulumi.Output<string[] | undefined>; /** * Exactly one of `virtualMachineId` or `deviceId` must be given. */ readonly virtualMachineId: pulumi.Output<number | undefined>; /** * Create a Service 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: ServiceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Service resources. */ export interface ServiceState { customFields?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; description?: pulumi.Input<string>; /** * Exactly one of `virtualMachineId` or `deviceId` must be given. */ deviceId?: pulumi.Input<number>; name?: pulumi.Input<string>; /** * Exactly one of `port` or `ports` must be given. * * @deprecated This field is deprecated. Please use the new "ports" attribute instead. */ port?: pulumi.Input<number>; /** * Exactly one of `port` or `ports` must be given. */ ports?: pulumi.Input<pulumi.Input<number>[]>; /** * Valid values are `tcp`, `udp` and `sctp`. */ protocol?: pulumi.Input<string>; tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Exactly one of `virtualMachineId` or `deviceId` must be given. */ virtualMachineId?: pulumi.Input<number>; } /** * The set of arguments for constructing a Service resource. */ export interface ServiceArgs { customFields?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; description?: pulumi.Input<string>; /** * Exactly one of `virtualMachineId` or `deviceId` must be given. */ deviceId?: pulumi.Input<number>; name?: pulumi.Input<string>; /** * Exactly one of `port` or `ports` must be given. * * @deprecated This field is deprecated. Please use the new "ports" attribute instead. */ port?: pulumi.Input<number>; /** * Exactly one of `port` or `ports` must be given. */ ports?: pulumi.Input<pulumi.Input<number>[]>; /** * Valid values are `tcp`, `udp` and `sctp`. */ protocol: pulumi.Input<string>; tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Exactly one of `virtualMachineId` or `deviceId` must be given. */ virtualMachineId?: pulumi.Input<number>; }