GetLoadBalancer

Provides details about a specific Hetzner Cloud Server.

Example Usage

using Pulumi;
using HCloud = Pulumi.HCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var lb1 = Output.Create(HCloud.GetLoadBalancer.InvokeAsync(new HCloud.GetLoadBalancerArgs
        {
            Name = "my-load-balancer",
        }));
        var lb2 = Output.Create(HCloud.GetLoadBalancer.InvokeAsync(new HCloud.GetLoadBalancerArgs
        {
            Id = 123,
        }));
        var lb3 = Output.Create(HCloud.GetLoadBalancer.InvokeAsync(new HCloud.GetLoadBalancerArgs
        {
            WithSelector = "key=value",
        }));
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "my-load-balancer"
        _, err := hcloud.LookupLoadBalancer(ctx, &hcloud.LookupLoadBalancerArgs{
            Name: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        opt1 := 123
        _, err = hcloud.LookupLoadBalancer(ctx, &hcloud.LookupLoadBalancerArgs{
            Id: &opt1,
        }, nil)
        if err != nil {
            return err
        }
        opt2 := "key=value"
        _, err = hcloud.LookupLoadBalancer(ctx, &hcloud.LookupLoadBalancerArgs{
            WithSelector: &opt2,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_hcloud as hcloud

lb1 = hcloud.get_load_balancer(name="my-load-balancer")
lb2 = hcloud.get_load_balancer(id="123")
lb3 = hcloud.get_load_balancer(with_selector="key=value")
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";

const lb1 = pulumi.output(hcloud.getLoadBalancer({
    name: "my-load-balancer",
}, { async: true }));
const lb2 = pulumi.output(hcloud.getLoadBalancer({
    id: 123,
}, { async: true }));
const lb3 = pulumi.output(hcloud.getLoadBalancer({
    withSelector: "key=value",
}, { async: true }));

Using GetLoadBalancer

function getLoadBalancer(args: GetLoadBalancerArgs, opts?: InvokeOptions): Promise<GetLoadBalancerResult>
function  get_load_balancer(id=None, name=None, with_selector=None, opts=None)
func LookupLoadBalancer(ctx *Context, args *LookupLoadBalancerArgs, opts ...InvokeOption) (*LookupLoadBalancerResult, error)

Note: This function is named LookupLoadBalancer in the Go SDK.

public static class GetLoadBalancer {
    public static Task<GetLoadBalancerResult> InvokeAsync(GetLoadBalancerArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Id int
Name string
WithSelector string
Id int
Name string
WithSelector string
id number
name string
withSelector string
id float
name str
with_selector str

GetLoadBalancer Result

The following output properties are available:

Algorithm Pulumi.HCloud.Outputs.GetLoadBalancerAlgorithm
Ipv4 string
Ipv6 string
Labels Dictionary<string, object>
LoadBalancerType string
Location string
NetworkZone string
Services List<Pulumi.HCloud.Outputs.GetLoadBalancerService>
Targets List<Pulumi.HCloud.Outputs.GetLoadBalancerTarget>
Id int
Name string
WithSelector string
Algorithm GetLoadBalancerAlgorithm
Ipv4 string
Ipv6 string
Labels map[string]interface{}
LoadBalancerType string
Location string
NetworkZone string
Services []GetLoadBalancerServiceType
Targets []GetLoadBalancerTargetType
Id int
Name string
WithSelector string
algorithm GetLoadBalancerAlgorithm
ipv4 string
ipv6 string
labels {[key: string]: any}
loadBalancerType string
location string
networkZone string
services GetLoadBalancerService[]
targets GetLoadBalancerTarget[]
id number
name string
withSelector string
algorithm Dict[GetLoadBalancerAlgorithm]
ipv4 str
ipv6 str
labels Dict[str, Any]
load_balancer_type str
location str
network_zone str
services List[GetLoadBalancerService]
targets List[GetLoadBalancerTarget]
id float
name str
with_selector str

Supporting Types

GetLoadBalancerAlgorithm

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Type string
Type string
type string
type str

GetLoadBalancerService

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

DestinationPort int
HealthCheck Pulumi.HCloud.Inputs.GetLoadBalancerServiceHealthCheckArgs
Http Pulumi.HCloud.Inputs.GetLoadBalancerServiceHttpArgs
ListenPort int
Protocol string
Proxyprotocol bool
DestinationPort int
HealthCheck GetLoadBalancerServiceHealthCheck
Http GetLoadBalancerServiceHttp
ListenPort int
Protocol string
Proxyprotocol bool
destinationPort number
healthCheck GetLoadBalancerServiceHealthCheck
http GetLoadBalancerServiceHttp
listenPort number
protocol string
proxyprotocol boolean
destination_port float
health_check Dict[GetLoadBalancerServiceHealthCheck]
http Dict[GetLoadBalancerServiceHttp]
listen_port float
protocol str
proxyprotocol bool

GetLoadBalancerServiceHealthCheck

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Http Pulumi.HCloud.Inputs.GetLoadBalancerServiceHealthCheckHttpArgs
Interval int
Port int
Protocol string
Retries int
Timeout int
Http GetLoadBalancerServiceHealthCheckHttp
Interval int
Port int
Protocol string
Retries int
Timeout int
http GetLoadBalancerServiceHealthCheckHttp
interval number
port number
protocol string
retries number
timeout number
http Dict[GetLoadBalancerServiceHealthCheckHttp]
interval float
port float
protocol str
retries float
timeout float

GetLoadBalancerServiceHealthCheckHttp

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

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 number[]
tls boolean
domain str
path str
response str
statusCodes List[Integer]
tls bool

GetLoadBalancerServiceHttp

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Certificates List<string>
CookieLifetime int
CookieName string
RedirectHttp bool
StickySessions bool
Certificates []string
CookieLifetime int
CookieName string
RedirectHttp bool
StickySessions bool
certificates string[]
cookieLifetime number
cookieName string
redirectHttp boolean
stickySessions boolean
certificates List[str]
cookieLifetime float
cookieName str
redirectHttp bool
stickySessions bool

GetLoadBalancerTarget

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

LabelSelector string
ServerId int
Type string
LabelSelector string
ServerId int
Type string
labelSelector string
serverId number
type string
labelSelector str
server_id float
type str

Package Details

Repository
https://github.com/pulumi/pulumi-hcloud
License
Apache-2.0
Notes
This Pulumi package is based on the hcloud Terraform Provider.