Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides the Nlb Listeners of the current Alibaba Cloud user.
NOTE: Available since v1.191.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.nlb.getListeners({
ids: ["example_value"],
});
export const alicloudNlbListenerId1 = ids.then(ids => ids.listeners?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.nlb.get_listeners(ids=["example_value"])
pulumi.export("alicloudNlbListenerId1", ids.listeners[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nlb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := nlb.GetListeners(ctx, &nlb.GetListenersArgs{
Ids: []string{
"example_value",
},
}, nil)
if err != nil {
return err
}
ctx.Export("alicloudNlbListenerId1", ids.Listeners[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Nlb.GetListeners.Invoke(new()
{
Ids = new[]
{
"example_value",
},
});
return new Dictionary<string, object?>
{
["alicloudNlbListenerId1"] = ids.Apply(getListenersResult => getListenersResult.Listeners[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.nlb.NlbFunctions;
import com.pulumi.alicloud.nlb.inputs.GetListenersArgs;
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 ids = NlbFunctions.getListeners(GetListenersArgs.builder()
.ids("example_value")
.build());
ctx.export("alicloudNlbListenerId1", ids.listeners()[0].id());
}
}
variables:
ids:
fn::invoke:
function: alicloud:nlb:getListeners
arguments:
ids:
- example_value
outputs:
alicloudNlbListenerId1: ${ids.listeners[0].id}
Using getListeners
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 getListeners(args: GetListenersArgs, opts?: InvokeOptions): Promise<GetListenersResult>
function getListenersOutput(args: GetListenersOutputArgs, opts?: InvokeOptions): Output<GetListenersResult>def get_listeners(ids: Optional[Sequence[str]] = None,
listener_protocol: Optional[str] = None,
load_balancer_ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetListenersResult
def get_listeners_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
listener_protocol: Optional[pulumi.Input[str]] = None,
load_balancer_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetListenersResult]func GetListeners(ctx *Context, args *GetListenersArgs, opts ...InvokeOption) (*GetListenersResult, error)
func GetListenersOutput(ctx *Context, args *GetListenersOutputArgs, opts ...InvokeOption) GetListenersResultOutput> Note: This function is named GetListeners in the Go SDK.
public static class GetListeners
{
public static Task<GetListenersResult> InvokeAsync(GetListenersArgs args, InvokeOptions? opts = null)
public static Output<GetListenersResult> Invoke(GetListenersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetListenersResult> getListeners(GetListenersArgs args, InvokeOptions options)
public static Output<GetListenersResult> getListeners(GetListenersArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:nlb/getListeners:getListeners
arguments:
# arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of Listener IDs.
- Listener
Protocol string - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - Load
Balancer List<string>Ids - The ID of the NLB instance. You can specify at most 20 IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- Ids []string
- A list of Listener IDs.
- Listener
Protocol string - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - Load
Balancer []stringIds - The ID of the NLB instance. You can specify at most 20 IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- ids List<String>
- A list of Listener IDs.
- listener
Protocol String - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load
Balancer List<String>Ids - The ID of the NLB instance. You can specify at most 20 IDs.
- output
File String - File name where to save data source results (after running
pulumi preview).
- ids string[]
- A list of Listener IDs.
- listener
Protocol string - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load
Balancer string[]Ids - The ID of the NLB instance. You can specify at most 20 IDs.
- output
File string - File name where to save data source results (after running
pulumi preview).
- ids Sequence[str]
- A list of Listener IDs.
- listener_
protocol str - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load_
balancer_ Sequence[str]ids - The ID of the NLB instance. You can specify at most 20 IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview).
- ids List<String>
- A list of Listener IDs.
- listener
Protocol String - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load
Balancer List<String>Ids - The ID of the NLB instance. You can specify at most 20 IDs.
- output
File String - File name where to save data source results (after running
pulumi preview).
getListeners Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Listeners
List<Pulumi.
Ali Cloud. Nlb. Outputs. Get Listeners Listener> - A list of Nlb Listeners. Each element contains the following attributes:
- Listener
Protocol string - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - Load
Balancer List<string>Ids - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Listeners
[]Get
Listeners Listener - A list of Nlb Listeners. Each element contains the following attributes:
- Listener
Protocol string - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - Load
Balancer []stringIds - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- listeners
List<Get
Listeners Listener> - A list of Nlb Listeners. Each element contains the following attributes:
- listener
Protocol String - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load
Balancer List<String>Ids - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- listeners
Get
Listeners Listener[] - A list of Nlb Listeners. Each element contains the following attributes:
- listener
Protocol string - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load
Balancer string[]Ids - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- listeners
Sequence[Get
Listeners Listener] - A list of Nlb Listeners. Each element contains the following attributes:
- listener_
protocol str - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load_
balancer_ Sequence[str]ids - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- listeners List<Property Map>
- A list of Nlb Listeners. Each element contains the following attributes:
- listener
Protocol String - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load
Balancer List<String>Ids - output
File String
Supporting Types
GetListenersListener
- Alpn
Enabled bool - ndicates whether Application-Layer Protocol Negotiation (ALPN) is enabled.
- Alpn
Policy string - The ALPN policy.
- Ca
Certificate List<string>Ids - CA certificate list information. Currently, only one CA certificate can be added. NOTE: This parameter only takes effect for
TCPSSLlisteners. - Ca
Enabled bool - Whether to start two-way authentication.
- Certificate
Ids List<string> - Server certificate list information. Currently, only one server certificate can be added. This parameter only takes effect for
TCPSSLlisteners. - Cps int
- The new connection speed limit for a network-based load balancing instance per second. Valid values:
0~1000000.0indicates unlimited speed. - End
Port string - Full port listening end port. Valid values:
0~65535. The value of the end port is less than the start port. - Id string
- The ID of the Nlb Listener.
- Idle
Timeout int - Connection idle timeout time. Unit: seconds. Valid values:
1~900. - Listener
Description string - Custom listener name. The length is limited to 2 to 256 characters, supports Chinese and English letters, and can include numbers, commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- Listener
Id string - The ID of the listener.
- Listener
Port int - Listening port. Valid values:
0~65535.0: indicates that full port listening is used. When set to 0, you must configureStartPortandEndPort. - Listener
Protocol string - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - Load
Balancer stringId - The ID of the network-based server load balancer instance.
- Mss int
- The maximum segment size of the TCP message. Unit: Bytes. Valid values:
0~1500.0indicates that the MSS value of the TCP message is not modified. onlyTCPandTCPSSLlisteners support this field value. - Proxy
Protocol boolEnabled - Whether to enable the Proxy Protocol to carry the source address of the client to the backend server.
- Sec
Sensor boolEnabled - Indicates whether fine-grained monitoring is enabled.
- Security
Policy stringId - Security policy ID. Support system security policies and custom security policies. Valid values:
tls_cipher_policy_1_0,tls_cipher_policy_1_1,tls_cipher_policy_1_2,tls_cipher_policy_1_2_strict, ortls_cipher_policy_1_2_strict_with_1_3. Note: This parameter only takes effect forTCPSSLlisteners. - Server
Group stringId - The ID of the server group.
- Start
Port string - Full Port listens to the starting port. Valid values:
0~65535. - Status string
- The status of the resource.
- Alpn
Enabled bool - ndicates whether Application-Layer Protocol Negotiation (ALPN) is enabled.
- Alpn
Policy string - The ALPN policy.
- Ca
Certificate []stringIds - CA certificate list information. Currently, only one CA certificate can be added. NOTE: This parameter only takes effect for
TCPSSLlisteners. - Ca
Enabled bool - Whether to start two-way authentication.
- Certificate
Ids []string - Server certificate list information. Currently, only one server certificate can be added. This parameter only takes effect for
TCPSSLlisteners. - Cps int
- The new connection speed limit for a network-based load balancing instance per second. Valid values:
0~1000000.0indicates unlimited speed. - End
Port string - Full port listening end port. Valid values:
0~65535. The value of the end port is less than the start port. - Id string
- The ID of the Nlb Listener.
- Idle
Timeout int - Connection idle timeout time. Unit: seconds. Valid values:
1~900. - Listener
Description string - Custom listener name. The length is limited to 2 to 256 characters, supports Chinese and English letters, and can include numbers, commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- Listener
Id string - The ID of the listener.
- Listener
Port int - Listening port. Valid values:
0~65535.0: indicates that full port listening is used. When set to 0, you must configureStartPortandEndPort. - Listener
Protocol string - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - Load
Balancer stringId - The ID of the network-based server load balancer instance.
- Mss int
- The maximum segment size of the TCP message. Unit: Bytes. Valid values:
0~1500.0indicates that the MSS value of the TCP message is not modified. onlyTCPandTCPSSLlisteners support this field value. - Proxy
Protocol boolEnabled - Whether to enable the Proxy Protocol to carry the source address of the client to the backend server.
- Sec
Sensor boolEnabled - Indicates whether fine-grained monitoring is enabled.
- Security
Policy stringId - Security policy ID. Support system security policies and custom security policies. Valid values:
tls_cipher_policy_1_0,tls_cipher_policy_1_1,tls_cipher_policy_1_2,tls_cipher_policy_1_2_strict, ortls_cipher_policy_1_2_strict_with_1_3. Note: This parameter only takes effect forTCPSSLlisteners. - Server
Group stringId - The ID of the server group.
- Start
Port string - Full Port listens to the starting port. Valid values:
0~65535. - Status string
- The status of the resource.
- alpn
Enabled Boolean - ndicates whether Application-Layer Protocol Negotiation (ALPN) is enabled.
- alpn
Policy String - The ALPN policy.
- ca
Certificate List<String>Ids - CA certificate list information. Currently, only one CA certificate can be added. NOTE: This parameter only takes effect for
TCPSSLlisteners. - ca
Enabled Boolean - Whether to start two-way authentication.
- certificate
Ids List<String> - Server certificate list information. Currently, only one server certificate can be added. This parameter only takes effect for
TCPSSLlisteners. - cps Integer
- The new connection speed limit for a network-based load balancing instance per second. Valid values:
0~1000000.0indicates unlimited speed. - end
Port String - Full port listening end port. Valid values:
0~65535. The value of the end port is less than the start port. - id String
- The ID of the Nlb Listener.
- idle
Timeout Integer - Connection idle timeout time. Unit: seconds. Valid values:
1~900. - listener
Description String - Custom listener name. The length is limited to 2 to 256 characters, supports Chinese and English letters, and can include numbers, commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- listener
Id String - The ID of the listener.
- listener
Port Integer - Listening port. Valid values:
0~65535.0: indicates that full port listening is used. When set to 0, you must configureStartPortandEndPort. - listener
Protocol String - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load
Balancer StringId - The ID of the network-based server load balancer instance.
- mss Integer
- The maximum segment size of the TCP message. Unit: Bytes. Valid values:
0~1500.0indicates that the MSS value of the TCP message is not modified. onlyTCPandTCPSSLlisteners support this field value. - proxy
Protocol BooleanEnabled - Whether to enable the Proxy Protocol to carry the source address of the client to the backend server.
- sec
Sensor BooleanEnabled - Indicates whether fine-grained monitoring is enabled.
- security
Policy StringId - Security policy ID. Support system security policies and custom security policies. Valid values:
tls_cipher_policy_1_0,tls_cipher_policy_1_1,tls_cipher_policy_1_2,tls_cipher_policy_1_2_strict, ortls_cipher_policy_1_2_strict_with_1_3. Note: This parameter only takes effect forTCPSSLlisteners. - server
Group StringId - The ID of the server group.
- start
Port String - Full Port listens to the starting port. Valid values:
0~65535. - status String
- The status of the resource.
- alpn
Enabled boolean - ndicates whether Application-Layer Protocol Negotiation (ALPN) is enabled.
- alpn
Policy string - The ALPN policy.
- ca
Certificate string[]Ids - CA certificate list information. Currently, only one CA certificate can be added. NOTE: This parameter only takes effect for
TCPSSLlisteners. - ca
Enabled boolean - Whether to start two-way authentication.
- certificate
Ids string[] - Server certificate list information. Currently, only one server certificate can be added. This parameter only takes effect for
TCPSSLlisteners. - cps number
- The new connection speed limit for a network-based load balancing instance per second. Valid values:
0~1000000.0indicates unlimited speed. - end
Port string - Full port listening end port. Valid values:
0~65535. The value of the end port is less than the start port. - id string
- The ID of the Nlb Listener.
- idle
Timeout number - Connection idle timeout time. Unit: seconds. Valid values:
1~900. - listener
Description string - Custom listener name. The length is limited to 2 to 256 characters, supports Chinese and English letters, and can include numbers, commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- listener
Id string - The ID of the listener.
- listener
Port number - Listening port. Valid values:
0~65535.0: indicates that full port listening is used. When set to 0, you must configureStartPortandEndPort. - listener
Protocol string - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load
Balancer stringId - The ID of the network-based server load balancer instance.
- mss number
- The maximum segment size of the TCP message. Unit: Bytes. Valid values:
0~1500.0indicates that the MSS value of the TCP message is not modified. onlyTCPandTCPSSLlisteners support this field value. - proxy
Protocol booleanEnabled - Whether to enable the Proxy Protocol to carry the source address of the client to the backend server.
- sec
Sensor booleanEnabled - Indicates whether fine-grained monitoring is enabled.
- security
Policy stringId - Security policy ID. Support system security policies and custom security policies. Valid values:
tls_cipher_policy_1_0,tls_cipher_policy_1_1,tls_cipher_policy_1_2,tls_cipher_policy_1_2_strict, ortls_cipher_policy_1_2_strict_with_1_3. Note: This parameter only takes effect forTCPSSLlisteners. - server
Group stringId - The ID of the server group.
- start
Port string - Full Port listens to the starting port. Valid values:
0~65535. - status string
- The status of the resource.
- alpn_
enabled bool - ndicates whether Application-Layer Protocol Negotiation (ALPN) is enabled.
- alpn_
policy str - The ALPN policy.
- ca_
certificate_ Sequence[str]ids - CA certificate list information. Currently, only one CA certificate can be added. NOTE: This parameter only takes effect for
TCPSSLlisteners. - ca_
enabled bool - Whether to start two-way authentication.
- certificate_
ids Sequence[str] - Server certificate list information. Currently, only one server certificate can be added. This parameter only takes effect for
TCPSSLlisteners. - cps int
- The new connection speed limit for a network-based load balancing instance per second. Valid values:
0~1000000.0indicates unlimited speed. - end_
port str - Full port listening end port. Valid values:
0~65535. The value of the end port is less than the start port. - id str
- The ID of the Nlb Listener.
- idle_
timeout int - Connection idle timeout time. Unit: seconds. Valid values:
1~900. - listener_
description str - Custom listener name. The length is limited to 2 to 256 characters, supports Chinese and English letters, and can include numbers, commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- listener_
id str - The ID of the listener.
- listener_
port int - Listening port. Valid values:
0~65535.0: indicates that full port listening is used. When set to 0, you must configureStartPortandEndPort. - listener_
protocol str - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load_
balancer_ strid - The ID of the network-based server load balancer instance.
- mss int
- The maximum segment size of the TCP message. Unit: Bytes. Valid values:
0~1500.0indicates that the MSS value of the TCP message is not modified. onlyTCPandTCPSSLlisteners support this field value. - proxy_
protocol_ boolenabled - Whether to enable the Proxy Protocol to carry the source address of the client to the backend server.
- sec_
sensor_ boolenabled - Indicates whether fine-grained monitoring is enabled.
- security_
policy_ strid - Security policy ID. Support system security policies and custom security policies. Valid values:
tls_cipher_policy_1_0,tls_cipher_policy_1_1,tls_cipher_policy_1_2,tls_cipher_policy_1_2_strict, ortls_cipher_policy_1_2_strict_with_1_3. Note: This parameter only takes effect forTCPSSLlisteners. - server_
group_ strid - The ID of the server group.
- start_
port str - Full Port listens to the starting port. Valid values:
0~65535. - status str
- The status of the resource.
- alpn
Enabled Boolean - ndicates whether Application-Layer Protocol Negotiation (ALPN) is enabled.
- alpn
Policy String - The ALPN policy.
- ca
Certificate List<String>Ids - CA certificate list information. Currently, only one CA certificate can be added. NOTE: This parameter only takes effect for
TCPSSLlisteners. - ca
Enabled Boolean - Whether to start two-way authentication.
- certificate
Ids List<String> - Server certificate list information. Currently, only one server certificate can be added. This parameter only takes effect for
TCPSSLlisteners. - cps Number
- The new connection speed limit for a network-based load balancing instance per second. Valid values:
0~1000000.0indicates unlimited speed. - end
Port String - Full port listening end port. Valid values:
0~65535. The value of the end port is less than the start port. - id String
- The ID of the Nlb Listener.
- idle
Timeout Number - Connection idle timeout time. Unit: seconds. Valid values:
1~900. - listener
Description String - Custom listener name. The length is limited to 2 to 256 characters, supports Chinese and English letters, and can include numbers, commas (,), half-width periods (.), half-width semicolons (;), forward slashes (/), at(@), underscores (_), and dashes (-).
- listener
Id String - The ID of the listener.
- listener
Port Number - Listening port. Valid values:
0~65535.0: indicates that full port listening is used. When set to 0, you must configureStartPortandEndPort. - listener
Protocol String - The listening protocol. Valid values:
TCP,UDP, orTCPSSL. - load
Balancer StringId - The ID of the network-based server load balancer instance.
- mss Number
- The maximum segment size of the TCP message. Unit: Bytes. Valid values:
0~1500.0indicates that the MSS value of the TCP message is not modified. onlyTCPandTCPSSLlisteners support this field value. - proxy
Protocol BooleanEnabled - Whether to enable the Proxy Protocol to carry the source address of the client to the backend server.
- sec
Sensor BooleanEnabled - Indicates whether fine-grained monitoring is enabled.
- security
Policy StringId - Security policy ID. Support system security policies and custom security policies. Valid values:
tls_cipher_policy_1_0,tls_cipher_policy_1_1,tls_cipher_policy_1_2,tls_cipher_policy_1_2_strict, ortls_cipher_policy_1_2_strict_with_1_3. Note: This parameter only takes effect forTCPSSLlisteners. - server
Group StringId - The ID of the server group.
- start
Port String - Full Port listens to the starting port. Valid values:
0~65535. - status String
- The status of the resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
