1. Packages
  2. Scaleway
  3. API Docs
  4. getLbBackend
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

scaleway.getLbBackend

Explore with Pulumi AI

scaleway logo
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

    Get information about Scaleway Load Balancer backends.

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.LoadbalancerIp("main", {});
    const mainLoadbalancer = new scaleway.Loadbalancer("main", {
        ipId: main.id,
        name: "data-test-lb-backend",
        type: "LB-S",
    });
    const mainLoadbalancerBackend = new scaleway.LoadbalancerBackend("main", {
        lbId: mainLoadbalancer.id,
        name: "backend01",
        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 = scaleway.LoadbalancerIp("main")
    main_loadbalancer = scaleway.Loadbalancer("main",
        ip_id=main.id,
        name="data-test-lb-backend",
        type="LB-S")
    main_loadbalancer_backend = scaleway.LoadbalancerBackend("main",
        lb_id=main_loadbalancer.id,
        name="backend01",
        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 {
    		main, err := scaleway.NewLoadbalancerIp(ctx, "main", nil)
    		if err != nil {
    			return err
    		}
    		mainLoadbalancer, err := scaleway.NewLoadbalancer(ctx, "main", &scaleway.LoadbalancerArgs{
    			IpId: main.ID(),
    			Name: pulumi.String("data-test-lb-backend"),
    			Type: pulumi.String("LB-S"),
    		})
    		if err != nil {
    			return err
    		}
    		mainLoadbalancerBackend, err := scaleway.NewLoadbalancerBackend(ctx, "main", &scaleway.LoadbalancerBackendArgs{
    			LbId:            mainLoadbalancer.ID(),
    			Name:            pulumi.String("backend01"),
    			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 main = new Scaleway.LoadbalancerIp("main");
    
        var mainLoadbalancer = new Scaleway.Loadbalancer("main", new()
        {
            IpId = main.Id,
            Name = "data-test-lb-backend",
            Type = "LB-S",
        });
    
        var mainLoadbalancerBackend = new Scaleway.LoadbalancerBackend("main", new()
        {
            LbId = mainLoadbalancer.Id,
            Name = "backend01",
            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 main = new LoadbalancerIp("main");
    
            var mainLoadbalancer = new Loadbalancer("mainLoadbalancer", LoadbalancerArgs.builder()
                .ipId(main.id())
                .name("data-test-lb-backend")
                .type("LB-S")
                .build());
    
            var mainLoadbalancerBackend = new LoadbalancerBackend("mainLoadbalancerBackend", LoadbalancerBackendArgs.builder()
                .lbId(mainLoadbalancer.id())
                .name("backend01")
                .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:
      main:
        type: scaleway:LoadbalancerIp
      mainLoadbalancer:
        type: scaleway:Loadbalancer
        name: main
        properties:
          ipId: ${main.id}
          name: data-test-lb-backend
          type: LB-S
      mainLoadbalancerBackend:
        type: scaleway:LoadbalancerBackend
        name: main
        properties:
          lbId: ${mainLoadbalancer.id}
          name: backend01
          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
    Load Balancer ID this backend is attached to.
    Name string
    The name of the backend.

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

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

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

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

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

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

    • When using 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
    Load Balancer ID this backend is attached to.
    name str
    The name of the backend.

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

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

    • When using 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.20.0 published on Monday, Nov 4, 2024 by pulumiverse