1. Packages
  2. Scaleway
  3. API Docs
  4. getLoadbalancer
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

scaleway.getLoadbalancer

Explore with Pulumi AI

scaleway logo
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

    Gets information about a Load Balancer.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const byName = scaleway.getLoadbalancer({
        name: "foobar",
    });
    const byId = scaleway.getLoadbalancer({
        lbId: "11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    by_name = scaleway.get_loadbalancer(name="foobar")
    by_id = scaleway.get_loadbalancer(lb_id="11111111-1111-1111-1111-111111111111")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.LookupLoadbalancer(ctx, &scaleway.LookupLoadbalancerArgs{
    			Name: pulumi.StringRef("foobar"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.LookupLoadbalancer(ctx, &scaleway.LookupLoadbalancerArgs{
    			LbId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var byName = Scaleway.GetLoadbalancer.Invoke(new()
        {
            Name = "foobar",
        });
    
        var byId = Scaleway.GetLoadbalancer.Invoke(new()
        {
            LbId = "11111111-1111-1111-1111-111111111111",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.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) {
            final var byName = ScalewayFunctions.getLoadbalancer(GetLoadbalancerArgs.builder()
                .name("foobar")
                .build());
    
            final var byId = ScalewayFunctions.getLoadbalancer(GetLoadbalancerArgs.builder()
                .lbId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    variables:
      byName:
        fn::invoke:
          Function: scaleway:getLoadbalancer
          Arguments:
            name: foobar
      byId:
        fn::invoke:
          Function: scaleway:getLoadbalancer
          Arguments:
            lbId: 11111111-1111-1111-1111-111111111111
    

    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>
    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]
    func LookupLoadbalancer(ctx *Context, args *LookupLoadbalancerArgs, opts ...InvokeOption) (*LookupLoadbalancerResult, error)
    func LookupLoadbalancerOutput(ctx *Context, args *LookupLoadbalancerOutputArgs, opts ...InvokeOption) LookupLoadbalancerResultOutput

    > 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)
    }
    public static CompletableFuture<GetLoadbalancerResult> getLoadbalancer(GetLoadbalancerArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getLoadbalancer:getLoadbalancer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    LbId string
    Name string
    The load balancer name.
    ProjectId string
    The ID of the project the LB is associated with.
    ReleaseIp bool
    Zone string
    (Defaults to provider zone) The zone in which the LB exists.
    LbId string
    Name string
    The load balancer name.
    ProjectId string
    The ID of the project the LB is associated with.
    ReleaseIp bool
    Zone string
    (Defaults to provider zone) The zone in which the LB exists.
    lbId String
    name String
    The load balancer name.
    projectId String
    The ID of the project the LB is associated with.
    releaseIp Boolean
    zone String
    (Defaults to provider zone) The zone in which the LB exists.
    lbId string
    name string
    The load balancer name.
    projectId string
    The ID of the project the LB is associated with.
    releaseIp boolean
    zone string
    (Defaults to provider zone) The zone in which the LB exists.
    lb_id str
    name str
    The load balancer name.
    project_id str
    The ID of the project the LB is associated with.
    release_ip bool
    zone str
    (Defaults to provider zone) The zone in which the LB exists.
    lbId String
    name String
    The load balancer name.
    projectId String
    The ID of the project the LB is associated with.
    releaseIp Boolean
    zone String
    (Defaults to provider zone) The zone in which the LB 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 type of the load-balancer.
    LbId string
    Name string
    ProjectId string
    ReleaseIp bool
    Zone string
    (Defaults to provider zone) The zone in which the LB 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 type of the load-balancer.
    LbId string
    Name string
    ProjectId string
    ReleaseIp bool
    Zone string
    (Defaults to provider zone) The zone in which the LB 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 type of the load-balancer.
    lbId String
    name String
    projectId String
    releaseIp Boolean
    zone String
    (Defaults to provider zone) The zone in which the LB 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 type of the load-balancer.
    lbId string
    name string
    projectId string
    releaseIp boolean
    zone string
    (Defaults to provider zone) The zone in which the LB 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 type of the load-balancer.
    lb_id str
    name str
    project_id str
    release_ip bool
    zone str
    (Defaults to provider zone) The zone in which the LB 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 type of the load-balancer.
    lbId String
    name String
    projectId String
    releaseIp Boolean
    zone String
    (Defaults to provider zone) The zone in which the LB exists.

    Supporting Types

    GetLoadbalancerPrivateNetwork

    DhcpConfig bool
    Set to true if you want to let DHCP assign IP addresses
    PrivateNetworkId string
    The Private Network ID
    StaticConfigs List<string>
    Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
    Status string
    The status of private network connection
    Zone string
    (Defaults to provider zone) The zone in which the LB exists.
    DhcpConfig bool
    Set to true if you want to let DHCP assign IP addresses
    PrivateNetworkId string
    The Private Network ID
    StaticConfigs []string
    Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
    Status string
    The status of private network connection
    Zone string
    (Defaults to provider zone) The zone in which the LB exists.
    dhcpConfig Boolean
    Set to true if you want to let DHCP assign IP addresses
    privateNetworkId String
    The Private Network ID
    staticConfigs List<String>
    Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
    status String
    The status of private network connection
    zone String
    (Defaults to provider zone) The zone in which the LB exists.
    dhcpConfig boolean
    Set to true if you want to let DHCP assign IP addresses
    privateNetworkId string
    The Private Network ID
    staticConfigs string[]
    Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
    status string
    The status of private network connection
    zone string
    (Defaults to provider zone) The zone in which the LB exists.
    dhcp_config bool
    Set to true if you want to let DHCP assign IP addresses
    private_network_id str
    The Private Network ID
    static_configs Sequence[str]
    Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
    status str
    The status of private network connection
    zone str
    (Defaults to provider zone) The zone in which the LB exists.
    dhcpConfig Boolean
    Set to true if you want to let DHCP assign IP addresses
    privateNetworkId String
    The Private Network ID
    staticConfigs List<String>
    Define an IP address in the subnet of your private network that will be assigned to your load balancer instance
    status String
    The status of private network connection
    zone String
    (Defaults to provider zone) The zone in which the LB exists.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse