ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud
ucloud.getLbListeners
Explore with Pulumi AI
This data source provides a list of Load Balancer Listener resources according to their Load Balancer Listener ID.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const example = ucloud.getLbListeners({
loadBalancerId: "ulb-xxx",
});
export const first = example.then(example => example.lbListeners?.[0]?.id);
import pulumi
import pulumi_ucloud as ucloud
example = ucloud.get_lb_listeners(load_balancer_id="ulb-xxx")
pulumi.export("first", example.lb_listeners[0].id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ucloud.GetLbListeners(ctx, &ucloud.GetLbListenersArgs{
LoadBalancerId: "ulb-xxx",
}, nil)
if err != nil {
return err
}
ctx.Export("first", example.LbListeners[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var example = Ucloud.GetLbListeners.Invoke(new()
{
LoadBalancerId = "ulb-xxx",
});
return new Dictionary<string, object?>
{
["first"] = example.Apply(getLbListenersResult => getLbListenersResult.LbListeners[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.UcloudFunctions;
import com.pulumi.ucloud.inputs.GetLbListenersArgs;
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 example = UcloudFunctions.getLbListeners(GetLbListenersArgs.builder()
.loadBalancerId("ulb-xxx")
.build());
ctx.export("first", example.applyValue(getLbListenersResult -> getLbListenersResult.lbListeners()[0].id()));
}
}
variables:
example:
fn::invoke:
function: ucloud:getLbListeners
arguments:
loadBalancerId: ulb-xxx
outputs:
first: ${example.lbListeners[0].id}
Using getLbListeners
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 getLbListeners(args: GetLbListenersArgs, opts?: InvokeOptions): Promise<GetLbListenersResult>
function getLbListenersOutput(args: GetLbListenersOutputArgs, opts?: InvokeOptions): Output<GetLbListenersResult>def get_lb_listeners(id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
load_balancer_id: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLbListenersResult
def get_lb_listeners_output(id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
load_balancer_id: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLbListenersResult]func GetLbListeners(ctx *Context, args *GetLbListenersArgs, opts ...InvokeOption) (*GetLbListenersResult, error)
func GetLbListenersOutput(ctx *Context, args *GetLbListenersOutputArgs, opts ...InvokeOption) GetLbListenersResultOutput> Note: This function is named GetLbListeners in the Go SDK.
public static class GetLbListeners
{
public static Task<GetLbListenersResult> InvokeAsync(GetLbListenersArgs args, InvokeOptions? opts = null)
public static Output<GetLbListenersResult> Invoke(GetLbListenersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLbListenersResult> getLbListeners(GetLbListenersArgs args, InvokeOptions options)
public static Output<GetLbListenersResult> getLbListeners(GetLbListenersArgs args, InvokeOptions options)
fn::invoke:
function: ucloud:index/getLbListeners:getLbListeners
arguments:
# arguments dictionaryThe following arguments are supported:
- Load
Balancer stringId - The ID of a load balancer.
- Id string
- The ID of LB Listener.
- Ids List<string>
- A list of LB Listener IDs, all the LB Listeners belong to this region will be retrieved if the ID is
[]. - Name
Regex string - A regex string to filter resulting lb listeners by name.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- Load
Balancer stringId - The ID of a load balancer.
- Id string
- The ID of LB Listener.
- Ids []string
- A list of LB Listener IDs, all the LB Listeners belong to this region will be retrieved if the ID is
[]. - Name
Regex string - A regex string to filter resulting lb listeners by name.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- load
Balancer StringId - The ID of a load balancer.
- id String
- The ID of LB Listener.
- ids List<String>
- A list of LB Listener IDs, all the LB Listeners belong to this region will be retrieved if the ID is
[]. - name
Regex String - A regex string to filter resulting lb listeners by name.
- output
File String - File name where to save data source results (after running
pulumi preview).
- load
Balancer stringId - The ID of a load balancer.
- id string
- The ID of LB Listener.
- ids string[]
- A list of LB Listener IDs, all the LB Listeners belong to this region will be retrieved if the ID is
[]. - name
Regex string - A regex string to filter resulting lb listeners by name.
- output
File string - File name where to save data source results (after running
pulumi preview).
- load_
balancer_ strid - The ID of a load balancer.
- id str
- The ID of LB Listener.
- ids Sequence[str]
- A list of LB Listener IDs, all the LB Listeners belong to this region will be retrieved if the ID is
[]. - name_
regex str - A regex string to filter resulting lb listeners by name.
- output_
file str - File name where to save data source results (after running
pulumi preview).
- load
Balancer StringId - The ID of a load balancer.
- id String
- The ID of LB Listener.
- ids List<String>
- A list of LB Listener IDs, all the LB Listeners belong to this region will be retrieved if the ID is
[]. - name
Regex String - A regex string to filter resulting lb listeners by name.
- output
File String - File name where to save data source results (after running
pulumi preview).
getLbListeners Result
The following output properties are available:
- Id string
- The ID of LB Listener.
- Ids List<string>
- Lb
Listeners List<GetLb Listeners Lb Listener> - It is a nested type which documented below.
- Load
Balancer stringId - Total
Count double - Total number of LB listeners that satisfy the condition.
- Name
Regex string - Output
File string
- Id string
- The ID of LB Listener.
- Ids []string
- Lb
Listeners []GetLb Listeners Lb Listener - It is a nested type which documented below.
- Load
Balancer stringId - Total
Count float64 - Total number of LB listeners that satisfy the condition.
- Name
Regex string - Output
File string
- id String
- The ID of LB Listener.
- ids List<String>
- lb
Listeners List<GetLb Listeners Lb Listener> - It is a nested type which documented below.
- load
Balancer StringId - total
Count Double - Total number of LB listeners that satisfy the condition.
- name
Regex String - output
File String
- id string
- The ID of LB Listener.
- ids string[]
- lb
Listeners GetLb Listeners Lb Listener[] - It is a nested type which documented below.
- load
Balancer stringId - total
Count number - Total number of LB listeners that satisfy the condition.
- name
Regex string - output
File string
- id str
- The ID of LB Listener.
- ids Sequence[str]
- lb_
listeners Sequence[GetLb Listeners Lb Listener] - It is a nested type which documented below.
- load_
balancer_ strid - total_
count float - Total number of LB listeners that satisfy the condition.
- name_
regex str - output_
file str
- id String
- The ID of LB Listener.
- ids List<String>
- lb
Listeners List<Property Map> - It is a nested type which documented below.
- load
Balancer StringId - total
Count Number - Total number of LB listeners that satisfy the condition.
- name
Regex String - output
File String
Supporting Types
GetLbListenersLbListener
- Domain string
- Health check domain checking.
- Health
Check stringType - Health check method. Possible values are
portas port checking andpathas http checking. - Id string
- The ID of LB Listener.
- Idle
Timeout double - Amount of time in seconds to wait for the response for in between two sessions if
listen_typeisrequest_proxy, range: 0-86400. Amount of time in seconds to wait for one session iflisten_typeispackets_transmit, range: 60-900. The session will be closed as soon as no response if it is0. - Listen
Type string - The type of LB Listener. Possible values are
request_proxyandpackets_transmit. - Method string
- The load balancer method in which the listener is. Possible values are:
roundrobin,source,consistent_hash,source_port,consistent_hash_port,weight_roundrobinandleastconn.- The
consistent_hash,source_port,consistent_hash_port,roundrobin,sourceandweight_roundrobinare valid iflisten_typeispackets_transmit. - The
rundrobin,sourceandweight_roundrobinandleastconnare vaild iflisten_typeisrequest_proxy.
- The
- Name string
- The name of LB Listener.
- Path string
- Health check path checking.
- Persistence string
- Indicate whether the persistence session is enabled, it is invaild if
persistence_typeisnone, an auto-generated string will be exported ifpersistence_typeisserver_insert, a custom string will be exported ifpersistence_typeisuser_defined. - Persistence
Type string - The type of session persistence of LB Listener. Possible values are:
noneas disabled,server_insertas auto-generated string anduser_definedas cutom string. (Default:none). - Port double
- Port opened on the LB Listener to receive requests, range: 1-65535.
- Protocol string
- LB Listener protocol. Possible values:
http,httpsiflisten_typeisrequest_proxy,tcpandudpiflisten_typeispackets_transmit. - Status string
- LB Listener status. Possible values are:
allNormalfor all resource functioning well,partNormalfor partial resource functioning well andallExceptionfor all resource functioning exceptional.
- Domain string
- Health check domain checking.
- Health
Check stringType - Health check method. Possible values are
portas port checking andpathas http checking. - Id string
- The ID of LB Listener.
- Idle
Timeout float64 - Amount of time in seconds to wait for the response for in between two sessions if
listen_typeisrequest_proxy, range: 0-86400. Amount of time in seconds to wait for one session iflisten_typeispackets_transmit, range: 60-900. The session will be closed as soon as no response if it is0. - Listen
Type string - The type of LB Listener. Possible values are
request_proxyandpackets_transmit. - Method string
- The load balancer method in which the listener is. Possible values are:
roundrobin,source,consistent_hash,source_port,consistent_hash_port,weight_roundrobinandleastconn.- The
consistent_hash,source_port,consistent_hash_port,roundrobin,sourceandweight_roundrobinare valid iflisten_typeispackets_transmit. - The
rundrobin,sourceandweight_roundrobinandleastconnare vaild iflisten_typeisrequest_proxy.
- The
- Name string
- The name of LB Listener.
- Path string
- Health check path checking.
- Persistence string
- Indicate whether the persistence session is enabled, it is invaild if
persistence_typeisnone, an auto-generated string will be exported ifpersistence_typeisserver_insert, a custom string will be exported ifpersistence_typeisuser_defined. - Persistence
Type string - The type of session persistence of LB Listener. Possible values are:
noneas disabled,server_insertas auto-generated string anduser_definedas cutom string. (Default:none). - Port float64
- Port opened on the LB Listener to receive requests, range: 1-65535.
- Protocol string
- LB Listener protocol. Possible values:
http,httpsiflisten_typeisrequest_proxy,tcpandudpiflisten_typeispackets_transmit. - Status string
- LB Listener status. Possible values are:
allNormalfor all resource functioning well,partNormalfor partial resource functioning well andallExceptionfor all resource functioning exceptional.
- domain String
- Health check domain checking.
- health
Check StringType - Health check method. Possible values are
portas port checking andpathas http checking. - id String
- The ID of LB Listener.
- idle
Timeout Double - Amount of time in seconds to wait for the response for in between two sessions if
listen_typeisrequest_proxy, range: 0-86400. Amount of time in seconds to wait for one session iflisten_typeispackets_transmit, range: 60-900. The session will be closed as soon as no response if it is0. - listen
Type String - The type of LB Listener. Possible values are
request_proxyandpackets_transmit. - method String
- The load balancer method in which the listener is. Possible values are:
roundrobin,source,consistent_hash,source_port,consistent_hash_port,weight_roundrobinandleastconn.- The
consistent_hash,source_port,consistent_hash_port,roundrobin,sourceandweight_roundrobinare valid iflisten_typeispackets_transmit. - The
rundrobin,sourceandweight_roundrobinandleastconnare vaild iflisten_typeisrequest_proxy.
- The
- name String
- The name of LB Listener.
- path String
- Health check path checking.
- persistence String
- Indicate whether the persistence session is enabled, it is invaild if
persistence_typeisnone, an auto-generated string will be exported ifpersistence_typeisserver_insert, a custom string will be exported ifpersistence_typeisuser_defined. - persistence
Type String - The type of session persistence of LB Listener. Possible values are:
noneas disabled,server_insertas auto-generated string anduser_definedas cutom string. (Default:none). - port Double
- Port opened on the LB Listener to receive requests, range: 1-65535.
- protocol String
- LB Listener protocol. Possible values:
http,httpsiflisten_typeisrequest_proxy,tcpandudpiflisten_typeispackets_transmit. - status String
- LB Listener status. Possible values are:
allNormalfor all resource functioning well,partNormalfor partial resource functioning well andallExceptionfor all resource functioning exceptional.
- domain string
- Health check domain checking.
- health
Check stringType - Health check method. Possible values are
portas port checking andpathas http checking. - id string
- The ID of LB Listener.
- idle
Timeout number - Amount of time in seconds to wait for the response for in between two sessions if
listen_typeisrequest_proxy, range: 0-86400. Amount of time in seconds to wait for one session iflisten_typeispackets_transmit, range: 60-900. The session will be closed as soon as no response if it is0. - listen
Type string - The type of LB Listener. Possible values are
request_proxyandpackets_transmit. - method string
- The load balancer method in which the listener is. Possible values are:
roundrobin,source,consistent_hash,source_port,consistent_hash_port,weight_roundrobinandleastconn.- The
consistent_hash,source_port,consistent_hash_port,roundrobin,sourceandweight_roundrobinare valid iflisten_typeispackets_transmit. - The
rundrobin,sourceandweight_roundrobinandleastconnare vaild iflisten_typeisrequest_proxy.
- The
- name string
- The name of LB Listener.
- path string
- Health check path checking.
- persistence string
- Indicate whether the persistence session is enabled, it is invaild if
persistence_typeisnone, an auto-generated string will be exported ifpersistence_typeisserver_insert, a custom string will be exported ifpersistence_typeisuser_defined. - persistence
Type string - The type of session persistence of LB Listener. Possible values are:
noneas disabled,server_insertas auto-generated string anduser_definedas cutom string. (Default:none). - port number
- Port opened on the LB Listener to receive requests, range: 1-65535.
- protocol string
- LB Listener protocol. Possible values:
http,httpsiflisten_typeisrequest_proxy,tcpandudpiflisten_typeispackets_transmit. - status string
- LB Listener status. Possible values are:
allNormalfor all resource functioning well,partNormalfor partial resource functioning well andallExceptionfor all resource functioning exceptional.
- domain str
- Health check domain checking.
- health_
check_ strtype - Health check method. Possible values are
portas port checking andpathas http checking. - id str
- The ID of LB Listener.
- idle_
timeout float - Amount of time in seconds to wait for the response for in between two sessions if
listen_typeisrequest_proxy, range: 0-86400. Amount of time in seconds to wait for one session iflisten_typeispackets_transmit, range: 60-900. The session will be closed as soon as no response if it is0. - listen_
type str - The type of LB Listener. Possible values are
request_proxyandpackets_transmit. - method str
- The load balancer method in which the listener is. Possible values are:
roundrobin,source,consistent_hash,source_port,consistent_hash_port,weight_roundrobinandleastconn.- The
consistent_hash,source_port,consistent_hash_port,roundrobin,sourceandweight_roundrobinare valid iflisten_typeispackets_transmit. - The
rundrobin,sourceandweight_roundrobinandleastconnare vaild iflisten_typeisrequest_proxy.
- The
- name str
- The name of LB Listener.
- path str
- Health check path checking.
- persistence str
- Indicate whether the persistence session is enabled, it is invaild if
persistence_typeisnone, an auto-generated string will be exported ifpersistence_typeisserver_insert, a custom string will be exported ifpersistence_typeisuser_defined. - persistence_
type str - The type of session persistence of LB Listener. Possible values are:
noneas disabled,server_insertas auto-generated string anduser_definedas cutom string. (Default:none). - port float
- Port opened on the LB Listener to receive requests, range: 1-65535.
- protocol str
- LB Listener protocol. Possible values:
http,httpsiflisten_typeisrequest_proxy,tcpandudpiflisten_typeispackets_transmit. - status str
- LB Listener status. Possible values are:
allNormalfor all resource functioning well,partNormalfor partial resource functioning well andallExceptionfor all resource functioning exceptional.
- domain String
- Health check domain checking.
- health
Check StringType - Health check method. Possible values are
portas port checking andpathas http checking. - id String
- The ID of LB Listener.
- idle
Timeout Number - Amount of time in seconds to wait for the response for in between two sessions if
listen_typeisrequest_proxy, range: 0-86400. Amount of time in seconds to wait for one session iflisten_typeispackets_transmit, range: 60-900. The session will be closed as soon as no response if it is0. - listen
Type String - The type of LB Listener. Possible values are
request_proxyandpackets_transmit. - method String
- The load balancer method in which the listener is. Possible values are:
roundrobin,source,consistent_hash,source_port,consistent_hash_port,weight_roundrobinandleastconn.- The
consistent_hash,source_port,consistent_hash_port,roundrobin,sourceandweight_roundrobinare valid iflisten_typeispackets_transmit. - The
rundrobin,sourceandweight_roundrobinandleastconnare vaild iflisten_typeisrequest_proxy.
- The
- name String
- The name of LB Listener.
- path String
- Health check path checking.
- persistence String
- Indicate whether the persistence session is enabled, it is invaild if
persistence_typeisnone, an auto-generated string will be exported ifpersistence_typeisserver_insert, a custom string will be exported ifpersistence_typeisuser_defined. - persistence
Type String - The type of session persistence of LB Listener. Possible values are:
noneas disabled,server_insertas auto-generated string anduser_definedas cutom string. (Default:none). - port Number
- Port opened on the LB Listener to receive requests, range: 1-65535.
- protocol String
- LB Listener protocol. Possible values:
http,httpsiflisten_typeisrequest_proxy,tcpandudpiflisten_typeispackets_transmit. - status String
- LB Listener status. Possible values are:
allNormalfor all resource functioning well,partNormalfor partial resource functioning well andallExceptionfor all resource functioning exceptional.
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloudTerraform Provider.