Hetzner Cloud

Pulumi Official
Package maintained by Pulumi
v1.8.0 published on Wednesday, Mar 9, 2022 by Pulumi

getLoadBalancers

Provides details about multiple Hetzner Cloud Load Balancers.

Example Usage

using Pulumi;
using HCloud = Pulumi.HCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var lb2 = Output.Create(HCloud.GetLoadBalancers.InvokeAsync());
        var lb3 = Output.Create(HCloud.GetLoadBalancers.InvokeAsync(new HCloud.GetLoadBalancersArgs
        {
            WithSelector = "key=value",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hcloud.GetLoadBalancers(ctx, nil, nil)
		if err != nil {
			return err
		}
		opt0 := "key=value"
		_, err = hcloud.GetLoadBalancers(ctx, &GetLoadBalancersArgs{
			WithSelector: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_hcloud as hcloud

lb2 = hcloud.get_load_balancers()
lb3 = hcloud.get_load_balancers(with_selector="key=value")
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";

const lb2 = pulumi.output(hcloud.getLoadBalancers());
const lb3 = pulumi.output(hcloud.getLoadBalancers({
    withSelector: "key=value",
}));

Coming soon!

Using getLoadBalancers

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getLoadBalancers(args: GetLoadBalancersArgs, opts?: InvokeOptions): Promise<GetLoadBalancersResult>
function getLoadBalancersOutput(args: GetLoadBalancersOutputArgs, opts?: InvokeOptions): Output<GetLoadBalancersResult>
def get_load_balancers(with_selector: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetLoadBalancersResult
def get_load_balancers_output(with_selector: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetLoadBalancersResult]
func GetLoadBalancers(ctx *Context, args *GetLoadBalancersArgs, opts ...InvokeOption) (*GetLoadBalancersResult, error)
func GetLoadBalancersOutput(ctx *Context, args *GetLoadBalancersOutputArgs, opts ...InvokeOption) GetLoadBalancersResultOutput

> Note: This function is named GetLoadBalancers in the Go SDK.

public static class GetLoadBalancers 
{
    public static Task<GetLoadBalancersResult> InvokeAsync(GetLoadBalancersArgs args, InvokeOptions? opts = null)
    public static Output<GetLoadBalancersResult> Invoke(GetLoadBalancersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLoadBalancersResult> getLoadBalancers(GetLoadBalancersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: hcloud:index/getLoadBalancers:getLoadBalancers
  Arguments:
    # Arguments dictionary

The following arguments are supported:

getLoadBalancers Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

LoadBalancers List<Pulumi.HCloud.Outputs.GetLoadBalancersLoadBalancer>

(list) List of all matching load balancers. See data.hcloud_load_balancer for schema.

WithSelector string
Id string

The provider-assigned unique ID for this managed resource.

LoadBalancers []GetLoadBalancersLoadBalancer

(list) List of all matching load balancers. See data.hcloud_load_balancer for schema.

WithSelector string
id String

The provider-assigned unique ID for this managed resource.

loadBalancers ListLoadBalancersLoadBalancer>

(list) List of all matching load balancers. See data.hcloud_load_balancer for schema.

withSelector String
id string

The provider-assigned unique ID for this managed resource.

loadBalancers GetLoadBalancersLoadBalancer[]

(list) List of all matching load balancers. See data.hcloud_load_balancer for schema.

withSelector string
id str

The provider-assigned unique ID for this managed resource.

load_balancers Sequence[GetLoadBalancersLoadBalancer]

(list) List of all matching load balancers. See data.hcloud_load_balancer for schema.

with_selector str
id String

The provider-assigned unique ID for this managed resource.

loadBalancers List

(list) List of all matching load balancers. See data.hcloud_load_balancer for schema.

withSelector String

Supporting Types

GetLoadBalancersLoadBalancer

GetLoadBalancersLoadBalancerAlgorithm

Type string
Type string
type String
type string
type str
type String

GetLoadBalancersLoadBalancerService

GetLoadBalancersLoadBalancerServiceHealthCheck

https List
interval Number
port Number
protocol String
retries Number
timeout Number

GetLoadBalancersLoadBalancerServiceHealthCheckHttp

Domain string
Path string
Response string
StatusCodes List<int>
Tls bool
Domain string
Path string
Response string
StatusCodes []int
Tls bool
domain String
path String
response String
statusCodes List
tls Boolean
domain string
path string
response string
statusCodes number[]
tls boolean
domain str
path str
response str
status_codes Sequence[int]
tls bool
domain String
path String
response String
statusCodes List
tls Boolean

GetLoadBalancersLoadBalancerServiceHttp

GetLoadBalancersLoadBalancerTarget

LabelSelector string
ServerId int
Type string
LabelSelector string
ServerId int
Type string
labelSelector String
serverId Integer
type String
labelSelector string
serverId number
type string
labelSelector String
serverId Number
type String

Package Details

Repository
https://github.com/pulumi/pulumi-hcloud
License
Apache-2.0
Notes

This Pulumi package is based on the hcloud Terraform Provider.