1. Packages
  2. Scaleway
  3. API Docs
  4. getLbBackend
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

scaleway.getLbBackend

Explore with Pulumi AI

scaleway logo
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

    Get information about Scaleway Load-Balancer Backends. For more information, see the documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const mainLoadbalancerIp = new scaleway.LoadbalancerIp("mainLoadbalancerIp", {});
    const mainLoadbalancer = new scaleway.Loadbalancer("mainLoadbalancer", {
        ipId: mainLoadbalancerIp.id,
        type: "LB-S",
    });
    const mainLoadbalancerBackend = new scaleway.LoadbalancerBackend("mainLoadbalancerBackend", {
        lbId: mainLoadbalancer.id,
        forwardProtocol: "http",
        forwardPort: 80,
    });
    const byID = scaleway.getLbBackendOutput({
        backendId: mainLoadbalancerBackend.id,
    });
    const byName = scaleway.getLbBackendOutput({
        name: mainLoadbalancerBackend.name,
        lbId: mainLoadbalancer.id,
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway
    
    main_loadbalancer_ip = scaleway.LoadbalancerIp("mainLoadbalancerIp")
    main_loadbalancer = scaleway.Loadbalancer("mainLoadbalancer",
        ip_id=main_loadbalancer_ip.id,
        type="LB-S")
    main_loadbalancer_backend = scaleway.LoadbalancerBackend("mainLoadbalancerBackend",
        lb_id=main_loadbalancer.id,
        forward_protocol="http",
        forward_port=80)
    by_id = scaleway.get_lb_backend_output(backend_id=main_loadbalancer_backend.id)
    by_name = scaleway.get_lb_backend_output(name=main_loadbalancer_backend.name,
        lb_id=main_loadbalancer.id)
    
    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 {
    		mainLoadbalancerIp, err := scaleway.NewLoadbalancerIp(ctx, "mainLoadbalancerIp", nil)
    		if err != nil {
    			return err
    		}
    		mainLoadbalancer, err := scaleway.NewLoadbalancer(ctx, "mainLoadbalancer", &scaleway.LoadbalancerArgs{
    			IpId: mainLoadbalancerIp.ID(),
    			Type: pulumi.String("LB-S"),
    		})
    		if err != nil {
    			return err
    		}
    		mainLoadbalancerBackend, err := scaleway.NewLoadbalancerBackend(ctx, "mainLoadbalancerBackend", &scaleway.LoadbalancerBackendArgs{
    			LbId:            mainLoadbalancer.ID(),
    			ForwardProtocol: pulumi.String("http"),
    			ForwardPort:     pulumi.Int(80),
    		})
    		if err != nil {
    			return err
    		}
    		_ = scaleway.GetLbBackendOutput(ctx, scaleway.GetLbBackendOutputArgs{
    			BackendId: mainLoadbalancerBackend.ID(),
    		}, nil)
    		_ = scaleway.GetLbBackendOutput(ctx, scaleway.GetLbBackendOutputArgs{
    			Name: mainLoadbalancerBackend.Name,
    			LbId: mainLoadbalancer.ID(),
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var mainLoadbalancerIp = new Scaleway.LoadbalancerIp("mainLoadbalancerIp");
    
        var mainLoadbalancer = new Scaleway.Loadbalancer("mainLoadbalancer", new()
        {
            IpId = mainLoadbalancerIp.Id,
            Type = "LB-S",
        });
    
        var mainLoadbalancerBackend = new Scaleway.LoadbalancerBackend("mainLoadbalancerBackend", new()
        {
            LbId = mainLoadbalancer.Id,
            ForwardProtocol = "http",
            ForwardPort = 80,
        });
    
        var byID = Scaleway.GetLbBackend.Invoke(new()
        {
            BackendId = mainLoadbalancerBackend.Id,
        });
    
        var byName = Scaleway.GetLbBackend.Invoke(new()
        {
            Name = mainLoadbalancerBackend.Name,
            LbId = mainLoadbalancer.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.LoadbalancerIp;
    import com.pulumi.scaleway.Loadbalancer;
    import com.pulumi.scaleway.LoadbalancerArgs;
    import com.pulumi.scaleway.LoadbalancerBackend;
    import com.pulumi.scaleway.LoadbalancerBackendArgs;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetLbBackendArgs;
    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) {
            var mainLoadbalancerIp = new LoadbalancerIp("mainLoadbalancerIp");
    
            var mainLoadbalancer = new Loadbalancer("mainLoadbalancer", LoadbalancerArgs.builder()        
                .ipId(mainLoadbalancerIp.id())
                .type("LB-S")
                .build());
    
            var mainLoadbalancerBackend = new LoadbalancerBackend("mainLoadbalancerBackend", LoadbalancerBackendArgs.builder()        
                .lbId(mainLoadbalancer.id())
                .forwardProtocol("http")
                .forwardPort("80")
                .build());
    
            final var byID = ScalewayFunctions.getLbBackend(GetLbBackendArgs.builder()
                .backendId(mainLoadbalancerBackend.id())
                .build());
    
            final var byName = ScalewayFunctions.getLbBackend(GetLbBackendArgs.builder()
                .name(mainLoadbalancerBackend.name())
                .lbId(mainLoadbalancer.id())
                .build());
    
        }
    }
    
    resources:
      mainLoadbalancerIp:
        type: scaleway:LoadbalancerIp
      mainLoadbalancer:
        type: scaleway:Loadbalancer
        properties:
          ipId: ${mainLoadbalancerIp.id}
          type: LB-S
      mainLoadbalancerBackend:
        type: scaleway:LoadbalancerBackend
        properties:
          lbId: ${mainLoadbalancer.id}
          forwardProtocol: http
          forwardPort: '80'
    variables:
      byID:
        fn::invoke:
          Function: scaleway:getLbBackend
          Arguments:
            backendId: ${mainLoadbalancerBackend.id}
      byName:
        fn::invoke:
          Function: scaleway:getLbBackend
          Arguments:
            name: ${mainLoadbalancerBackend.name}
            lbId: ${mainLoadbalancer.id}
    

    Using getLbBackend

    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 getLbBackend(args: GetLbBackendArgs, opts?: InvokeOptions): Promise<GetLbBackendResult>
    function getLbBackendOutput(args: GetLbBackendOutputArgs, opts?: InvokeOptions): Output<GetLbBackendResult>
    def get_lb_backend(backend_id: Optional[str] = None,
                       lb_id: Optional[str] = None,
                       name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetLbBackendResult
    def get_lb_backend_output(backend_id: Optional[pulumi.Input[str]] = None,
                       lb_id: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetLbBackendResult]
    func GetLbBackend(ctx *Context, args *GetLbBackendArgs, opts ...InvokeOption) (*GetLbBackendResult, error)
    func GetLbBackendOutput(ctx *Context, args *GetLbBackendOutputArgs, opts ...InvokeOption) GetLbBackendResultOutput

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

    public static class GetLbBackend 
    {
        public static Task<GetLbBackendResult> InvokeAsync(GetLbBackendArgs args, InvokeOptions? opts = null)
        public static Output<GetLbBackendResult> Invoke(GetLbBackendInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLbBackendResult> getLbBackend(GetLbBackendArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getLbBackend:getLbBackend
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BackendId string
    The backend id.

    • Only one of name and backend_id should be specified.
    LbId string
    The load-balancer ID this backend is attached to.
    Name string
    The name of the backend.

    • When using the name you should specify the lb-id
    BackendId string
    The backend id.

    • Only one of name and backend_id should be specified.
    LbId string
    The load-balancer ID this backend is attached to.
    Name string
    The name of the backend.

    • When using the name you should specify the lb-id
    backendId String
    The backend id.

    • Only one of name and backend_id should be specified.
    lbId String
    The load-balancer ID this backend is attached to.
    name String
    The name of the backend.

    • When using the name you should specify the lb-id
    backendId string
    The backend id.

    • Only one of name and backend_id should be specified.
    lbId string
    The load-balancer ID this backend is attached to.
    name string
    The name of the backend.

    • When using the name you should specify the lb-id
    backend_id str
    The backend id.

    • Only one of name and backend_id should be specified.
    lb_id str
    The load-balancer ID this backend is attached to.
    name str
    The name of the backend.

    • When using the name you should specify the lb-id
    backendId String
    The backend id.

    • Only one of name and backend_id should be specified.
    lbId String
    The load-balancer ID this backend is attached to.
    name String
    The name of the backend.

    • When using the name you should specify the lb-id

    getLbBackend Result

    The following output properties are available:

    FailoverHost string
    ForwardPort int
    ForwardPortAlgorithm string
    ForwardProtocol string
    HealthCheckDelay string
    HealthCheckHttp List<Pulumiverse.Scaleway.Outputs.GetLbBackendHealthCheckHttp>
    HealthCheckHttps List<Pulumiverse.Scaleway.Outputs.GetLbBackendHealthCheckHttp>
    HealthCheckMaxRetries int
    HealthCheckPort int
    HealthCheckSendProxy bool
    HealthCheckTcps List<Pulumiverse.Scaleway.Outputs.GetLbBackendHealthCheckTcp>
    HealthCheckTimeout string
    HealthCheckTransientDelay string
    Id string
    The provider-assigned unique ID for this managed resource.
    IgnoreSslServerVerify bool
    MaxConnections int
    MaxRetries int
    OnMarkedDownAction string
    ProxyProtocol string
    RedispatchAttemptCount int
    SendProxyV2 bool
    ServerIps List<string>
    SslBridging bool
    StickySessions string
    StickySessionsCookieName string
    TimeoutConnect string
    TimeoutQueue string
    TimeoutServer string
    TimeoutTunnel string
    BackendId string
    LbId string
    Name string
    failoverHost String
    forwardPort Integer
    forwardPortAlgorithm String
    forwardProtocol String
    healthCheckDelay String
    healthCheckHttp List<GetLbBackendHealthCheckHttp>
    healthCheckHttps List<GetLbBackendHealthCheckHttp>
    healthCheckMaxRetries Integer
    healthCheckPort Integer
    healthCheckSendProxy Boolean
    healthCheckTcps List<GetLbBackendHealthCheckTcp>
    healthCheckTimeout String
    healthCheckTransientDelay String
    id String
    The provider-assigned unique ID for this managed resource.
    ignoreSslServerVerify Boolean
    maxConnections Integer
    maxRetries Integer
    onMarkedDownAction String
    proxyProtocol String
    redispatchAttemptCount Integer
    sendProxyV2 Boolean
    serverIps List<String>
    sslBridging Boolean
    stickySessions String
    stickySessionsCookieName String
    timeoutConnect String
    timeoutQueue String
    timeoutServer String
    timeoutTunnel String
    backendId String
    lbId String
    name String
    failoverHost string
    forwardPort number
    forwardPortAlgorithm string
    forwardProtocol string
    healthCheckDelay string
    healthCheckHttp GetLbBackendHealthCheckHttp[]
    healthCheckHttps GetLbBackendHealthCheckHttp[]
    healthCheckMaxRetries number
    healthCheckPort number
    healthCheckSendProxy boolean
    healthCheckTcps GetLbBackendHealthCheckTcp[]
    healthCheckTimeout string
    healthCheckTransientDelay string
    id string
    The provider-assigned unique ID for this managed resource.
    ignoreSslServerVerify boolean
    maxConnections number
    maxRetries number
    onMarkedDownAction string
    proxyProtocol string
    redispatchAttemptCount number
    sendProxyV2 boolean
    serverIps string[]
    sslBridging boolean
    stickySessions string
    stickySessionsCookieName string
    timeoutConnect string
    timeoutQueue string
    timeoutServer string
    timeoutTunnel string
    backendId string
    lbId string
    name string
    failover_host str
    forward_port int
    forward_port_algorithm str
    forward_protocol str
    health_check_delay str
    health_check_http Sequence[GetLbBackendHealthCheckHttp]
    health_check_https Sequence[GetLbBackendHealthCheckHttp]
    health_check_max_retries int
    health_check_port int
    health_check_send_proxy bool
    health_check_tcps Sequence[GetLbBackendHealthCheckTcp]
    health_check_timeout str
    health_check_transient_delay str
    id str
    The provider-assigned unique ID for this managed resource.
    ignore_ssl_server_verify bool
    max_connections int
    max_retries int
    on_marked_down_action str
    proxy_protocol str
    redispatch_attempt_count int
    send_proxy_v2 bool
    server_ips Sequence[str]
    ssl_bridging bool
    sticky_sessions str
    sticky_sessions_cookie_name str
    timeout_connect str
    timeout_queue str
    timeout_server str
    timeout_tunnel str
    backend_id str
    lb_id str
    name str

    Supporting Types

    GetLbBackendHealthCheckHttp

    Code int
    The expected HTTP status code
    HostHeader string
    The HTTP host header to use for HC requests
    Method string
    The HTTP method to use for HC requests
    Sni string
    The SNI to use for HC requests over SSL
    Uri string
    The HTTPS endpoint URL to call for HC requests
    Code int
    The expected HTTP status code
    HostHeader string
    The HTTP host header to use for HC requests
    Method string
    The HTTP method to use for HC requests
    Sni string
    The SNI to use for HC requests over SSL
    Uri string
    The HTTPS endpoint URL to call for HC requests
    code Integer
    The expected HTTP status code
    hostHeader String
    The HTTP host header to use for HC requests
    method String
    The HTTP method to use for HC requests
    sni String
    The SNI to use for HC requests over SSL
    uri String
    The HTTPS endpoint URL to call for HC requests
    code number
    The expected HTTP status code
    hostHeader string
    The HTTP host header to use for HC requests
    method string
    The HTTP method to use for HC requests
    sni string
    The SNI to use for HC requests over SSL
    uri string
    The HTTPS endpoint URL to call for HC requests
    code int
    The expected HTTP status code
    host_header str
    The HTTP host header to use for HC requests
    method str
    The HTTP method to use for HC requests
    sni str
    The SNI to use for HC requests over SSL
    uri str
    The HTTPS endpoint URL to call for HC requests
    code Number
    The expected HTTP status code
    hostHeader String
    The HTTP host header to use for HC requests
    method String
    The HTTP method to use for HC requests
    sni String
    The SNI to use for HC requests over SSL
    uri String
    The HTTPS endpoint URL to call for HC requests

    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.12.1 published on Monday, Apr 15, 2024 by pulumiverse