Hetzner Cloud
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:
- With
Selector string
- With
Selector string
- with
Selector String
- with
Selector string
- with
Selector String
getLoadBalancers Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Load
Balancers List<Pulumi.HCloud. Outputs. Get Load Balancers Load Balancer> (list) List of all matching load balancers. See
data.hcloud_load_balancer
for schema.- With
Selector string
- Id string
The provider-assigned unique ID for this managed resource.
- Load
Balancers []GetLoad Balancers Load Balancer (list) List of all matching load balancers. See
data.hcloud_load_balancer
for schema.- With
Selector string
- id String
The provider-assigned unique ID for this managed resource.
- load
Balancers ListLoad Balancers Load Balancer> (list) List of all matching load balancers. See
data.hcloud_load_balancer
for schema.- with
Selector String
- id string
The provider-assigned unique ID for this managed resource.
- load
Balancers GetLoad Balancers Load Balancer[] (list) List of all matching load balancers. See
data.hcloud_load_balancer
for schema.- with
Selector string
- id str
The provider-assigned unique ID for this managed resource.
- load_
balancers Sequence[GetLoad Balancers Load Balancer] (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.
- load
Balancers List (list) List of all matching load balancers. See
data.hcloud_load_balancer
for schema.- with
Selector String
Supporting Types
GetLoadBalancersLoadBalancer
- Algorithms
List<Pulumi.
HCloud. Inputs. Get Load Balancers Load Balancer Algorithm> - Delete
Protection bool - Id int
- Ipv4 string
- Ipv6 string
- Labels Dictionary<string, object>
- Load
Balancer stringType - Location string
- Network
Zone string - Services
List<Pulumi.
HCloud. Inputs. Get Load Balancers Load Balancer Service> - Targets
List<Pulumi.
HCloud. Inputs. Get Load Balancers Load Balancer Target> - Name string
- Algorithms
[]Get
Load Balancers Load Balancer Algorithm - Delete
Protection bool - Id int
- Ipv4 string
- Ipv6 string
- Labels map[string]interface{}
- Load
Balancer stringType - Location string
- Network
Zone string - Services
[]Get
Load Balancers Load Balancer Service - Targets
[]Get
Load Balancers Load Balancer Target - Name string
- algorithms
List
Load Balancers Load Balancer Algorithm> - delete
Protection Boolean - id Integer
- ipv4 String
- ipv6 String
- labels
Map
- load
Balancer StringType - location String
- network
Zone String - services
List
Load Balancers Load Balancer Service> - targets
List
Load Balancers Load Balancer Target> - name String
- algorithms
Get
Load Balancers Load Balancer Algorithm[] - delete
Protection boolean - id number
- ipv4 string
- ipv6 string
- labels {[key: string]: any}
- load
Balancer stringType - location string
- network
Zone string - services
Get
Load Balancers Load Balancer Service[] - targets
Get
Load Balancers Load Balancer Target[] - name string
- algorithms
List
- delete
Protection Boolean - id Number
- ipv4 String
- ipv6 String
- labels
Map
- load
Balancer StringType - location String
- network
Zone String - services
List
- targets
List
- name String
GetLoadBalancersLoadBalancerAlgorithm
- Type string
- Type string
- type String
- type string
- type str
- type String
GetLoadBalancersLoadBalancerService
- destination
Port Number - health
Checks List - https
List
- listen
Port Number - protocol String
- proxyprotocol Boolean
GetLoadBalancersLoadBalancerServiceHealthCheck
GetLoadBalancersLoadBalancerServiceHealthCheckHttp
- Domain string
- Path string
- Response string
- Status
Codes List<int> - Tls bool
- Domain string
- Path string
- Response string
- Status
Codes []int - Tls bool
- domain String
- path String
- response String
- status
Codes List - tls Boolean
- domain string
- path string
- response string
- status
Codes number[] - tls boolean
- domain str
- path str
- response str
- status_
codes Sequence[int] - tls bool
- domain String
- path String
- response String
- status
Codes List - tls Boolean
GetLoadBalancersLoadBalancerServiceHttp
- Certificates List<string>
- int
- string
- Redirect
Http bool - Sticky
Sessions bool
- Certificates []string
- int
- string
- Redirect
Http bool - Sticky
Sessions bool
- certificates
List
- Integer
- String
- redirect
Http Boolean - sticky
Sessions Boolean
- certificates string[]
- number
- string
- redirect
Http boolean - sticky
Sessions boolean
- certificates Sequence[str]
- int
- str
- redirect_
http bool - sticky_
sessions bool
- certificates
List
- Number
- String
- redirect
Http Boolean - sticky
Sessions Boolean
GetLoadBalancersLoadBalancerTarget
- Label
Selector string - Server
Id int - Type string
- Label
Selector string - Server
Id int - Type string
- label
Selector String - server
Id Integer - type String
- label
Selector string - server
Id number - type string
- label_
selector str - server_
id int - type str
- label
Selector String - server
Id 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.