1. Packages
  2. Scaleway
  3. API Docs
  4. getLoadbalancer
Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse

scaleway.getLoadbalancer

Explore with Pulumi AI

Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse
Deprecated: scaleway.index/getloadbalancer.getLoadbalancer has been deprecated in favor of scaleway.loadbalancers/getloadbalancer.getLoadBalancer

Gets information about a Load Balancer.

For more information, see the main documentation or API documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";

// Get info by name
const byName = scaleway.loadbalancers.getLoadBalancer({
    name: "foobar",
});
// Get info by ID
const byId = scaleway.loadbalancers.getLoadBalancer({
    lbId: "11111111-1111-1111-1111-111111111111",
});
Copy
import pulumi
import pulumi_scaleway as scaleway

# Get info by name
by_name = scaleway.loadbalancers.get_load_balancer(name="foobar")
# Get info by ID
by_id = scaleway.loadbalancers.get_load_balancer(lb_id="11111111-1111-1111-1111-111111111111")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/loadbalancers"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Get info by name
		_, err := loadbalancers.LookupLoadBalancer(ctx, &loadbalancers.LookupLoadBalancerArgs{
			Name: pulumi.StringRef("foobar"),
		}, nil)
		if err != nil {
			return err
		}
		// Get info by ID
		_, err = loadbalancers.LookupLoadBalancer(ctx, &loadbalancers.LookupLoadBalancerArgs{
			LbId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

return await Deployment.RunAsync(() => 
{
    // Get info by name
    var byName = Scaleway.Loadbalancers.GetLoadBalancer.Invoke(new()
    {
        Name = "foobar",
    });

    // Get info by ID
    var byId = Scaleway.Loadbalancers.GetLoadBalancer.Invoke(new()
    {
        LbId = "11111111-1111-1111-1111-111111111111",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.loadbalancers.LoadbalancersFunctions;
import com.pulumi.scaleway.loadbalancers.inputs.GetLoadBalancerArgs;
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) {
        // Get info by name
        final var byName = LoadbalancersFunctions.getLoadBalancer(GetLoadBalancerArgs.builder()
            .name("foobar")
            .build());

        // Get info by ID
        final var byId = LoadbalancersFunctions.getLoadBalancer(GetLoadBalancerArgs.builder()
            .lbId("11111111-1111-1111-1111-111111111111")
            .build());

    }
}
Copy
variables:
  # Get info by name
  byName:
    fn::invoke:
      function: scaleway:loadbalancers:getLoadBalancer
      arguments:
        name: foobar
  # Get info by ID
  byId:
    fn::invoke:
      function: scaleway:loadbalancers:getLoadBalancer
      arguments:
        lbId: 11111111-1111-1111-1111-111111111111
Copy

Using getLoadbalancer

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 getLoadbalancer(args: GetLoadbalancerArgs, opts?: InvokeOptions): Promise<GetLoadbalancerResult>
function getLoadbalancerOutput(args: GetLoadbalancerOutputArgs, opts?: InvokeOptions): Output<GetLoadbalancerResult>
Copy
def get_loadbalancer(lb_id: Optional[str] = None,
                     name: Optional[str] = None,
                     project_id: Optional[str] = None,
                     release_ip: Optional[bool] = None,
                     zone: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetLoadbalancerResult
def get_loadbalancer_output(lb_id: Optional[pulumi.Input[str]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     project_id: Optional[pulumi.Input[str]] = None,
                     release_ip: Optional[pulumi.Input[bool]] = None,
                     zone: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetLoadbalancerResult]
Copy
func LookupLoadbalancer(ctx *Context, args *LookupLoadbalancerArgs, opts ...InvokeOption) (*LookupLoadbalancerResult, error)
func LookupLoadbalancerOutput(ctx *Context, args *LookupLoadbalancerOutputArgs, opts ...InvokeOption) LookupLoadbalancerResultOutput
Copy

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

public static class GetLoadbalancer 
{
    public static Task<GetLoadbalancerResult> InvokeAsync(GetLoadbalancerArgs args, InvokeOptions? opts = null)
    public static Output<GetLoadbalancerResult> Invoke(GetLoadbalancerInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLoadbalancerResult> getLoadbalancer(GetLoadbalancerArgs args, InvokeOptions options)
public static Output<GetLoadbalancerResult> getLoadbalancer(GetLoadbalancerArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:index/getLoadbalancer:getLoadbalancer
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

LbId string
Name string
The Load Balancer name.
ProjectId string
The ID of the Project the Load Balancer is associated with.
ReleaseIp bool
Zone string
(Defaults to provider zone) The zone in which the Load Balancer exists.
LbId string
Name string
The Load Balancer name.
ProjectId string
The ID of the Project the Load Balancer is associated with.
ReleaseIp bool
Zone string
(Defaults to provider zone) The zone in which the Load Balancer exists.
lbId String
name String
The Load Balancer name.
projectId String
The ID of the Project the Load Balancer is associated with.
releaseIp Boolean
zone String
(Defaults to provider zone) The zone in which the Load Balancer exists.
lbId string
name string
The Load Balancer name.
projectId string
The ID of the Project the Load Balancer is associated with.
releaseIp boolean
zone string
(Defaults to provider zone) The zone in which the Load Balancer exists.
lb_id str
name str
The Load Balancer name.
project_id str
The ID of the Project the Load Balancer is associated with.
release_ip bool
zone str
(Defaults to provider zone) The zone in which the Load Balancer exists.
lbId String
name String
The Load Balancer name.
projectId String
The ID of the Project the Load Balancer is associated with.
releaseIp Boolean
zone String
(Defaults to provider zone) The zone in which the Load Balancer exists.

getLoadbalancer Result

The following output properties are available:

AssignFlexibleIp bool
AssignFlexibleIpv6 bool
Description string
Id string
The provider-assigned unique ID for this managed resource.
IpAddress string
The Load Balancer public IP address.
IpId string
IpIds List<string>
Ipv6Address string
OrganizationId string
PrivateNetworks List<Pulumiverse.Scaleway.Outputs.GetLoadbalancerPrivateNetwork>
Region string
SslCompatibilityLevel string
Tags List<string>
The tags associated with the Load Balancer.
Type string
The Load Balancer type.
LbId string
Name string
ProjectId string
ReleaseIp bool
Zone string
(Defaults to provider zone) The zone in which the Load Balancer exists.
AssignFlexibleIp bool
AssignFlexibleIpv6 bool
Description string
Id string
The provider-assigned unique ID for this managed resource.
IpAddress string
The Load Balancer public IP address.
IpId string
IpIds []string
Ipv6Address string
OrganizationId string
PrivateNetworks []GetLoadbalancerPrivateNetwork
Region string
SslCompatibilityLevel string
Tags []string
The tags associated with the Load Balancer.
Type string
The Load Balancer type.
LbId string
Name string
ProjectId string
ReleaseIp bool
Zone string
(Defaults to provider zone) The zone in which the Load Balancer exists.
assignFlexibleIp Boolean
assignFlexibleIpv6 Boolean
description String
id String
The provider-assigned unique ID for this managed resource.
ipAddress String
The Load Balancer public IP address.
ipId String
ipIds List<String>
ipv6Address String
organizationId String
privateNetworks List<GetLoadbalancerPrivateNetwork>
region String
sslCompatibilityLevel String
tags List<String>
The tags associated with the Load Balancer.
type String
The Load Balancer type.
lbId String
name String
projectId String
releaseIp Boolean
zone String
(Defaults to provider zone) The zone in which the Load Balancer exists.
assignFlexibleIp boolean
assignFlexibleIpv6 boolean
description string
id string
The provider-assigned unique ID for this managed resource.
ipAddress string
The Load Balancer public IP address.
ipId string
ipIds string[]
ipv6Address string
organizationId string
privateNetworks GetLoadbalancerPrivateNetwork[]
region string
sslCompatibilityLevel string
tags string[]
The tags associated with the Load Balancer.
type string
The Load Balancer type.
lbId string
name string
projectId string
releaseIp boolean
zone string
(Defaults to provider zone) The zone in which the Load Balancer exists.
assign_flexible_ip bool
assign_flexible_ipv6 bool
description str
id str
The provider-assigned unique ID for this managed resource.
ip_address str
The Load Balancer public IP address.
ip_id str
ip_ids Sequence[str]
ipv6_address str
organization_id str
private_networks Sequence[GetLoadbalancerPrivateNetwork]
region str
ssl_compatibility_level str
tags Sequence[str]
The tags associated with the Load Balancer.
type str
The Load Balancer type.
lb_id str
name str
project_id str
release_ip bool
zone str
(Defaults to provider zone) The zone in which the Load Balancer exists.
assignFlexibleIp Boolean
assignFlexibleIpv6 Boolean
description String
id String
The provider-assigned unique ID for this managed resource.
ipAddress String
The Load Balancer public IP address.
ipId String
ipIds List<String>
ipv6Address String
organizationId String
privateNetworks List<Property Map>
region String
sslCompatibilityLevel String
tags List<String>
The tags associated with the Load Balancer.
type String
The Load Balancer type.
lbId String
name String
projectId String
releaseIp Boolean
zone String
(Defaults to provider zone) The zone in which the Load Balancer exists.

Supporting Types

GetLoadbalancerPrivateNetwork

DhcpConfig This property is required. bool
Set to true if you want to let DHCP assign IP addresses
IpamIds This property is required. List<string>
IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network
PrivateNetworkId This property is required. string
The Private Network ID
StaticConfigs This property is required. List<string>
Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
Status This property is required. string
The status of private network connection
Zone This property is required. string
(Defaults to provider zone) The zone in which the Load Balancer exists.
DhcpConfig This property is required. bool
Set to true if you want to let DHCP assign IP addresses
IpamIds This property is required. []string
IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network
PrivateNetworkId This property is required. string
The Private Network ID
StaticConfigs This property is required. []string
Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
Status This property is required. string
The status of private network connection
Zone This property is required. string
(Defaults to provider zone) The zone in which the Load Balancer exists.
dhcpConfig This property is required. Boolean
Set to true if you want to let DHCP assign IP addresses
ipamIds This property is required. List<String>
IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network
privateNetworkId This property is required. String
The Private Network ID
staticConfigs This property is required. List<String>
Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
status This property is required. String
The status of private network connection
zone This property is required. String
(Defaults to provider zone) The zone in which the Load Balancer exists.
dhcpConfig This property is required. boolean
Set to true if you want to let DHCP assign IP addresses
ipamIds This property is required. string[]
IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network
privateNetworkId This property is required. string
The Private Network ID
staticConfigs This property is required. string[]
Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
status This property is required. string
The status of private network connection
zone This property is required. string
(Defaults to provider zone) The zone in which the Load Balancer exists.
dhcp_config This property is required. bool
Set to true if you want to let DHCP assign IP addresses
ipam_ids This property is required. Sequence[str]
IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network
private_network_id This property is required. str
The Private Network ID
static_configs This property is required. Sequence[str]
Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
status This property is required. str
The status of private network connection
zone This property is required. str
(Defaults to provider zone) The zone in which the Load Balancer exists.
dhcpConfig This property is required. Boolean
Set to true if you want to let DHCP assign IP addresses
ipamIds This property is required. List<String>
IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network
privateNetworkId This property is required. String
The Private Network ID
staticConfigs This property is required. List<String>
Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
status This property is required. String
The status of private network connection
zone This property is required. String
(Defaults to provider zone) The zone in which the Load Balancer exists.

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.
Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse