Files
pulumi-incus/sdk/nodejs/getNetworkLoadBalancer.ts
2025-12-08 10:47:09 -05:00

185 lines
5.7 KiB
TypeScript
Generated

// *** 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";
/**
* ## # incus.getNetworkLoadBalancer
*
* Provides information about an Incus network load balancer.
* See Incus network load balancer [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_load_balancers/) for more details.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as incus from "@kiterun/incus";
*
* const _this = incus.getNetworkLoadBalancer({
* listenAddress: "127.0.0.1",
* network: "parent",
* });
* export const networkLoadBalancerListenAddress = _this.then(_this => _this.listenAddress);
* ```
*/
export function getNetworkLoadBalancer(args: GetNetworkLoadBalancerArgs, opts?: pulumi.InvokeOptions): Promise<GetNetworkLoadBalancerResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("incus:index/getNetworkLoadBalancer:getNetworkLoadBalancer", {
"backends": args.backends,
"description": args.description,
"listenAddress": args.listenAddress,
"location": args.location,
"network": args.network,
"ports": args.ports,
"project": args.project,
"remote": args.remote,
}, opts);
}
/**
* A collection of arguments for invoking getNetworkLoadBalancer.
*/
export interface GetNetworkLoadBalancerArgs {
/**
* List of load balancer backends.
*/
backends?: inputs.GetNetworkLoadBalancerBackend[];
/**
* Description of the load balancer port.
*/
description?: string;
/**
* **Required** - Listen Address of the network load balancer.
*/
listenAddress: string;
/**
* Location of the network load balancer.
*/
location?: string;
/**
* **Required** - Name of the parent network.
*/
network: string;
/**
* List of load balancer ports.
*/
ports?: inputs.GetNetworkLoadBalancerPort[];
/**
* *Optional* - Name of the project where the network load balancer is be stored.
*/
project?: string;
/**
* *Optional* - The remote in which the resource was created. If
* not provided, the provider's default remote will be used.
*/
remote?: string;
}
/**
* A collection of values returned by getNetworkLoadBalancer.
*/
export interface GetNetworkLoadBalancerResult {
/**
* List of load balancer backends.
*/
readonly backends: outputs.GetNetworkLoadBalancerBackend[];
/**
* Map of key/value pairs of config settings.
*/
readonly config: {[key: string]: string};
/**
* Description of the load balancer port.
*/
readonly description: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly listenAddress: string;
/**
* Location of the network load balancer.
*/
readonly location: string;
readonly network: string;
/**
* List of load balancer ports.
*/
readonly ports: outputs.GetNetworkLoadBalancerPort[];
readonly project?: string;
readonly remote?: string;
}
/**
* ## # incus.getNetworkLoadBalancer
*
* Provides information about an Incus network load balancer.
* See Incus network load balancer [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_load_balancers/) for more details.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as incus from "@kiterun/incus";
*
* const _this = incus.getNetworkLoadBalancer({
* listenAddress: "127.0.0.1",
* network: "parent",
* });
* export const networkLoadBalancerListenAddress = _this.then(_this => _this.listenAddress);
* ```
*/
export function getNetworkLoadBalancerOutput(args: GetNetworkLoadBalancerOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetNetworkLoadBalancerResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("incus:index/getNetworkLoadBalancer:getNetworkLoadBalancer", {
"backends": args.backends,
"description": args.description,
"listenAddress": args.listenAddress,
"location": args.location,
"network": args.network,
"ports": args.ports,
"project": args.project,
"remote": args.remote,
}, opts);
}
/**
* A collection of arguments for invoking getNetworkLoadBalancer.
*/
export interface GetNetworkLoadBalancerOutputArgs {
/**
* List of load balancer backends.
*/
backends?: pulumi.Input<pulumi.Input<inputs.GetNetworkLoadBalancerBackendArgs>[]>;
/**
* Description of the load balancer port.
*/
description?: pulumi.Input<string>;
/**
* **Required** - Listen Address of the network load balancer.
*/
listenAddress: pulumi.Input<string>;
/**
* Location of the network load balancer.
*/
location?: pulumi.Input<string>;
/**
* **Required** - Name of the parent network.
*/
network: pulumi.Input<string>;
/**
* List of load balancer ports.
*/
ports?: pulumi.Input<pulumi.Input<inputs.GetNetworkLoadBalancerPortArgs>[]>;
/**
* *Optional* - Name of the project where the network load balancer is be stored.
*/
project?: pulumi.Input<string>;
/**
* *Optional* - The remote in which the resource was created. If
* not provided, the provider's default remote will be used.
*/
remote?: pulumi.Input<string>;
}