Hetzner Cloud v1.21.0 published on Tuesday, Nov 12, 2024 by Pulumi
hcloud.getLoadBalancerType
Explore with Pulumi AI
Provides details about a specific Hetzner Cloud Load Balancer Type. Use this resource to get detailed information about specific Load Balancer Type.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const byName = hcloud.getLoadBalancerType({
name: "cx22",
});
const byId = hcloud.getLoadBalancerType({
id: 1,
});
const loadBalancer = new hcloud.LoadBalancer("load_balancer", {
name: "my-load-balancer",
loadBalancerType: name,
location: "nbg1",
});
import pulumi
import pulumi_hcloud as hcloud
by_name = hcloud.get_load_balancer_type(name="cx22")
by_id = hcloud.get_load_balancer_type(id=1)
load_balancer = hcloud.LoadBalancer("load_balancer",
name="my-load-balancer",
load_balancer_type=name,
location="nbg1")
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.GetLoadBalancerType(ctx, &hcloud.GetLoadBalancerTypeArgs{
Name: pulumi.StringRef("cx22"),
}, nil)
if err != nil {
return err
}
_, err = hcloud.GetLoadBalancerType(ctx, &hcloud.GetLoadBalancerTypeArgs{
Id: pulumi.IntRef(1),
}, nil)
if err != nil {
return err
}
_, err = hcloud.NewLoadBalancer(ctx, "load_balancer", &hcloud.LoadBalancerArgs{
Name: pulumi.String("my-load-balancer"),
LoadBalancerType: pulumi.Any(name),
Location: pulumi.String("nbg1"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using HCloud = Pulumi.HCloud;
return await Deployment.RunAsync(() =>
{
var byName = HCloud.GetLoadBalancerType.Invoke(new()
{
Name = "cx22",
});
var byId = HCloud.GetLoadBalancerType.Invoke(new()
{
Id = 1,
});
var loadBalancer = new HCloud.LoadBalancer("load_balancer", new()
{
Name = "my-load-balancer",
LoadBalancerType = name,
Location = "nbg1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hcloud.HcloudFunctions;
import com.pulumi.hcloud.inputs.GetLoadBalancerTypeArgs;
import com.pulumi.hcloud.LoadBalancer;
import com.pulumi.hcloud.LoadBalancerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var byName = HcloudFunctions.getLoadBalancerType(GetLoadBalancerTypeArgs.builder()
.name("cx22")
.build());
final var byId = HcloudFunctions.getLoadBalancerType(GetLoadBalancerTypeArgs.builder()
.id(1)
.build());
var loadBalancer = new LoadBalancer("loadBalancer", LoadBalancerArgs.builder()
.name("my-load-balancer")
.loadBalancerType(name)
.location("nbg1")
.build());
}
}
resources:
loadBalancer:
type: hcloud:LoadBalancer
name: load_balancer
properties:
name: my-load-balancer
loadBalancerType: ${name}
location: nbg1
variables:
byName:
fn::invoke:
Function: hcloud:getLoadBalancerType
Arguments:
name: cx22
byId:
fn::invoke:
Function: hcloud:getLoadBalancerType
Arguments:
id: 1
Using getLoadBalancerType
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 getLoadBalancerType(args: GetLoadBalancerTypeArgs, opts?: InvokeOptions): Promise<GetLoadBalancerTypeResult>
function getLoadBalancerTypeOutput(args: GetLoadBalancerTypeOutputArgs, opts?: InvokeOptions): Output<GetLoadBalancerTypeResult>
def get_load_balancer_type(id: Optional[int] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLoadBalancerTypeResult
def get_load_balancer_type_output(id: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLoadBalancerTypeResult]
func GetLoadBalancerType(ctx *Context, args *GetLoadBalancerTypeArgs, opts ...InvokeOption) (*GetLoadBalancerTypeResult, error)
func GetLoadBalancerTypeOutput(ctx *Context, args *GetLoadBalancerTypeOutputArgs, opts ...InvokeOption) GetLoadBalancerTypeResultOutput
> Note: This function is named GetLoadBalancerType
in the Go SDK.
public static class GetLoadBalancerType
{
public static Task<GetLoadBalancerTypeResult> InvokeAsync(GetLoadBalancerTypeArgs args, InvokeOptions? opts = null)
public static Output<GetLoadBalancerTypeResult> Invoke(GetLoadBalancerTypeInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLoadBalancerTypeResult> getLoadBalancerType(GetLoadBalancerTypeArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: hcloud:index/getLoadBalancerType:getLoadBalancerType
arguments:
# arguments dictionary
The following arguments are supported:
getLoadBalancerType Result
The following output properties are available:
- Description string
- (string) Description of the load_balancer_type.
- Id int
- (int) Unique ID of the load_balancer_type.
- Max
Assigned intCertificates - (int) Maximum number of SSL Certificates that can be assigned to the Load Balancer of this type.
- Max
Connections int - (int) Maximum number of simultaneous open connections for the Load Balancer of this type.
- Max
Services int - (int) Maximum number of services for the Load Balancer of this type.
- Max
Targets int - (int) Maximum number of targets for the Load Balancer of this type.
- Name string
- (string) Name of the load_balancer_type.
- Description string
- (string) Description of the load_balancer_type.
- Id int
- (int) Unique ID of the load_balancer_type.
- Max
Assigned intCertificates - (int) Maximum number of SSL Certificates that can be assigned to the Load Balancer of this type.
- Max
Connections int - (int) Maximum number of simultaneous open connections for the Load Balancer of this type.
- Max
Services int - (int) Maximum number of services for the Load Balancer of this type.
- Max
Targets int - (int) Maximum number of targets for the Load Balancer of this type.
- Name string
- (string) Name of the load_balancer_type.
- description String
- (string) Description of the load_balancer_type.
- id Integer
- (int) Unique ID of the load_balancer_type.
- max
Assigned IntegerCertificates - (int) Maximum number of SSL Certificates that can be assigned to the Load Balancer of this type.
- max
Connections Integer - (int) Maximum number of simultaneous open connections for the Load Balancer of this type.
- max
Services Integer - (int) Maximum number of services for the Load Balancer of this type.
- max
Targets Integer - (int) Maximum number of targets for the Load Balancer of this type.
- name String
- (string) Name of the load_balancer_type.
- description string
- (string) Description of the load_balancer_type.
- id number
- (int) Unique ID of the load_balancer_type.
- max
Assigned numberCertificates - (int) Maximum number of SSL Certificates that can be assigned to the Load Balancer of this type.
- max
Connections number - (int) Maximum number of simultaneous open connections for the Load Balancer of this type.
- max
Services number - (int) Maximum number of services for the Load Balancer of this type.
- max
Targets number - (int) Maximum number of targets for the Load Balancer of this type.
- name string
- (string) Name of the load_balancer_type.
- description str
- (string) Description of the load_balancer_type.
- id int
- (int) Unique ID of the load_balancer_type.
- max_
assigned_ intcertificates - (int) Maximum number of SSL Certificates that can be assigned to the Load Balancer of this type.
- max_
connections int - (int) Maximum number of simultaneous open connections for the Load Balancer of this type.
- max_
services int - (int) Maximum number of services for the Load Balancer of this type.
- max_
targets int - (int) Maximum number of targets for the Load Balancer of this type.
- name str
- (string) Name of the load_balancer_type.
- description String
- (string) Description of the load_balancer_type.
- id Number
- (int) Unique ID of the load_balancer_type.
- max
Assigned NumberCertificates - (int) Maximum number of SSL Certificates that can be assigned to the Load Balancer of this type.
- max
Connections Number - (int) Maximum number of simultaneous open connections for the Load Balancer of this type.
- max
Services Number - (int) Maximum number of services for the Load Balancer of this type.
- max
Targets Number - (int) Maximum number of targets for the Load Balancer of this type.
- name String
- (string) Name of the load_balancer_type.
Package Details
- Repository
- Hetzner Cloud pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcloud
Terraform Provider.