// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; import * as utilities from "./utilities"; export class NetworkForward extends pulumi.CustomResource { /** * Get an existing NetworkForward 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. */ public static get(name: string, id: pulumi.Input, state?: NetworkForwardState, opts?: pulumi.CustomResourceOptions): NetworkForward { return new NetworkForward(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'incus:index/networkForward:NetworkForward'; /** * Returns true if the given object is an instance of NetworkForward. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is NetworkForward { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === NetworkForward.__pulumiType; } /** * *Optional* - Map of key/value pairs of * network forward config settings. */ declare public readonly config: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of port(s) */ declare public readonly description: pulumi.Output; /** * **Required** - IP address to listen on. */ declare public readonly listenAddress: pulumi.Output; /** * **Required** - Name of the network. */ declare public readonly network: pulumi.Output; /** * *Optional* - List of port specifications. See reference below. * * The network forward port supports: */ declare public readonly ports: pulumi.Output; /** * *Optional* - Name of the project where the network forward will be created. */ declare public readonly project: pulumi.Output; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. */ declare public readonly remote: pulumi.Output; /** * Create a NetworkForward 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: NetworkForwardArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: NetworkForwardArgs | NetworkForwardState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as NetworkForwardState | undefined; resourceInputs["config"] = state?.config; resourceInputs["description"] = state?.description; resourceInputs["listenAddress"] = state?.listenAddress; resourceInputs["network"] = state?.network; resourceInputs["ports"] = state?.ports; resourceInputs["project"] = state?.project; resourceInputs["remote"] = state?.remote; } else { const args = argsOrState as NetworkForwardArgs | undefined; if (args?.listenAddress === undefined && !opts.urn) { throw new Error("Missing required property 'listenAddress'"); } if (args?.network === undefined && !opts.urn) { throw new Error("Missing required property 'network'"); } resourceInputs["config"] = args?.config; resourceInputs["description"] = args?.description; resourceInputs["listenAddress"] = args?.listenAddress; resourceInputs["network"] = args?.network; resourceInputs["ports"] = args?.ports; resourceInputs["project"] = args?.project; resourceInputs["remote"] = args?.remote; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NetworkForward.__pulumiType, name, resourceInputs, opts); } } /** * Input properties used for looking up and filtering NetworkForward resources. */ export interface NetworkForwardState { /** * *Optional* - Map of key/value pairs of * network forward config settings. */ config?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * *Optional* - Description of port(s) */ description?: pulumi.Input; /** * **Required** - IP address to listen on. */ listenAddress?: pulumi.Input; /** * **Required** - Name of the network. */ network?: pulumi.Input; /** * *Optional* - List of port specifications. See reference below. * * The network forward port supports: */ ports?: pulumi.Input[]>; /** * *Optional* - Name of the project where the network forward will be created. */ project?: pulumi.Input; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. */ remote?: pulumi.Input; } /** * The set of arguments for constructing a NetworkForward resource. */ export interface NetworkForwardArgs { /** * *Optional* - Map of key/value pairs of * network forward config settings. */ config?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * *Optional* - Description of port(s) */ description?: pulumi.Input; /** * **Required** - IP address to listen on. */ listenAddress: pulumi.Input; /** * **Required** - Name of the network. */ network: pulumi.Input; /** * *Optional* - List of port specifications. See reference below. * * The network forward port supports: */ ports?: pulumi.Input[]>; /** * *Optional* - Name of the project where the network forward will be created. */ project?: pulumi.Input; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. */ remote?: pulumi.Input; }