Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse
scaleway.getLbBackend
Explore with Pulumi AI
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 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:
- backend_
id str - The backend ID.
- Only one of
name
andbackend_id
should be specified.
- Only one of
- lb_
id str - Load Balancer ID this backend is attached to.
- name str
- The name of the backend.
- When using
name
you should specify thelb-id
- When using
getLbBackend Result
The following output properties are available:
- Failover
Host string - Forward
Port int - Forward
Port stringAlgorithm - Forward
Protocol string - Health
Check stringDelay - Health
Check List<Pulumiverse.Http Scaleway. Outputs. Get Lb Backend Health Check Http> - Health
Check List<Pulumiverse.Https Scaleway. Outputs. Get Lb Backend Health Check Http> - Health
Check intMax Retries - Health
Check intPort - Health
Check boolSend Proxy - Health
Check List<Pulumiverse.Tcps Scaleway. Outputs. Get Lb Backend Health Check Tcp> - Health
Check stringTimeout - Health
Check stringTransient Delay - Id string
- The provider-assigned unique ID for this managed resource.
- Ignore
Ssl boolServer Verify - Max
Connections int - Max
Retries int - On
Marked stringDown Action - Proxy
Protocol string - Redispatch
Attempt intCount - Send
Proxy boolV2 - Server
Ips List<string> - Ssl
Bridging bool - Sticky
Sessions string - string
- Timeout
Connect string - Timeout
Queue string - Timeout
Server string - Timeout
Tunnel string - Backend
Id string - Lb
Id string - Name string
- Failover
Host string - Forward
Port int - Forward
Port stringAlgorithm - Forward
Protocol string - Health
Check stringDelay - Health
Check []GetHttp Lb Backend Health Check Http - Health
Check []GetHttps Lb Backend Health Check Http - Health
Check intMax Retries - Health
Check intPort - Health
Check boolSend Proxy - Health
Check []GetTcps Lb Backend Health Check Tcp - Health
Check stringTimeout - Health
Check stringTransient Delay - Id string
- The provider-assigned unique ID for this managed resource.
- Ignore
Ssl boolServer Verify - Max
Connections int - Max
Retries int - On
Marked stringDown Action - Proxy
Protocol string - Redispatch
Attempt intCount - Send
Proxy boolV2 - Server
Ips []string - Ssl
Bridging bool - Sticky
Sessions string - string
- Timeout
Connect string - Timeout
Queue string - Timeout
Server string - Timeout
Tunnel string - Backend
Id string - Lb
Id string - Name string
- failover
Host String - forward
Port Integer - forward
Port StringAlgorithm - forward
Protocol String - health
Check StringDelay - health
Check List<GetHttp Lb Backend Health Check Http> - health
Check List<GetHttps Lb Backend Health Check Http> - health
Check IntegerMax Retries - health
Check IntegerPort - health
Check BooleanSend Proxy - health
Check List<GetTcps Lb Backend Health Check Tcp> - health
Check StringTimeout - health
Check StringTransient Delay - id String
- The provider-assigned unique ID for this managed resource.
- ignore
Ssl BooleanServer Verify - max
Connections Integer - max
Retries Integer - on
Marked StringDown Action - proxy
Protocol String - redispatch
Attempt IntegerCount - send
Proxy BooleanV2 - server
Ips List<String> - ssl
Bridging Boolean - sticky
Sessions String - String
- timeout
Connect String - timeout
Queue String - timeout
Server String - timeout
Tunnel String - backend
Id String - lb
Id String - name String
- failover
Host string - forward
Port number - forward
Port stringAlgorithm - forward
Protocol string - health
Check stringDelay - health
Check GetHttp Lb Backend Health Check Http[] - health
Check GetHttps Lb Backend Health Check Http[] - health
Check numberMax Retries - health
Check numberPort - health
Check booleanSend Proxy - health
Check GetTcps Lb Backend Health Check Tcp[] - health
Check stringTimeout - health
Check stringTransient Delay - id string
- The provider-assigned unique ID for this managed resource.
- ignore
Ssl booleanServer Verify - max
Connections number - max
Retries number - on
Marked stringDown Action - proxy
Protocol string - redispatch
Attempt numberCount - send
Proxy booleanV2 - server
Ips string[] - ssl
Bridging boolean - sticky
Sessions string - string
- timeout
Connect string - timeout
Queue string - timeout
Server string - timeout
Tunnel string - backend
Id string - lb
Id string - name string
- failover_
host str - forward_
port int - forward_
port_ stralgorithm - forward_
protocol str - health_
check_ strdelay - health_
check_ Sequence[Gethttp Lb Backend Health Check Http] - health_
check_ Sequence[Gethttps Lb Backend Health Check Http] - health_
check_ intmax_ retries - health_
check_ intport - health_
check_ boolsend_ proxy - health_
check_ Sequence[Gettcps Lb Backend Health Check Tcp] - health_
check_ strtimeout - health_
check_ strtransient_ delay - id str
- The provider-assigned unique ID for this managed resource.
- ignore_
ssl_ boolserver_ verify - max_
connections int - max_
retries int - on_
marked_ strdown_ action - proxy_
protocol str - redispatch_
attempt_ intcount - send_
proxy_ boolv2 - server_
ips Sequence[str] - ssl_
bridging bool - sticky_
sessions str - str
- timeout_
connect str - timeout_
queue str - timeout_
server str - timeout_
tunnel str - backend_
id str - lb_
id str - name str
- failover
Host String - forward
Port Number - forward
Port StringAlgorithm - forward
Protocol String - health
Check StringDelay - health
Check List<Property Map>Http - health
Check List<Property Map>Https - health
Check NumberMax Retries - health
Check NumberPort - health
Check BooleanSend Proxy - health
Check List<Property Map>Tcps - health
Check StringTimeout - health
Check StringTransient Delay - id String
- The provider-assigned unique ID for this managed resource.
- ignore
Ssl BooleanServer Verify - max
Connections Number - max
Retries Number - on
Marked StringDown Action - proxy
Protocol String - redispatch
Attempt NumberCount - send
Proxy BooleanV2 - server
Ips List<String> - ssl
Bridging Boolean - sticky
Sessions String - String
- timeout
Connect String - timeout
Queue String - timeout
Server String - timeout
Tunnel String - backend
Id String - lb
Id String - name String
Supporting Types
GetLbBackendHealthCheckHttp
- Code int
- The expected HTTP status code
- Host
Header 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 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
- host
Header 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
- host
Header 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
- host
Header 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.