Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.nlb.getListeners
Explore with Pulumi AI
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.applyValue(getListenersResult -> getListenersResult.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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:nlb/getListeners:getListeners
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of Listener IDs.
- ListenerProtocol string
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- LoadBalancer List<string>Ids 
- The ID of the NLB instance. You can specify at most 20 IDs.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Ids []string
- A list of Listener IDs.
- ListenerProtocol string
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- LoadBalancer []stringIds 
- The ID of the NLB instance. You can specify at most 20 IDs.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- ids List<String>
- A list of Listener IDs.
- listenerProtocol String
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- loadBalancer List<String>Ids 
- The ID of the NLB instance. You can specify at most 20 IDs.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- ids string[]
- A list of Listener IDs.
- listenerProtocol string
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- loadBalancer string[]Ids 
- The ID of the NLB instance. You can specify at most 20 IDs.
- outputFile 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.
- listenerProtocol String
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- loadBalancer List<String>Ids 
- The ID of the NLB instance. You can specify at most 20 IDs.
- outputFile 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:
- ListenerProtocol string
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- LoadBalancer List<string>Ids 
- OutputFile string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Listeners
[]GetListeners Listener 
- A list of Nlb Listeners. Each element contains the following attributes:
- ListenerProtocol string
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- LoadBalancer []stringIds 
- OutputFile string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- listeners
List<GetListeners Listener> 
- A list of Nlb Listeners. Each element contains the following attributes:
- listenerProtocol String
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- loadBalancer List<String>Ids 
- outputFile String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- listeners
GetListeners Listener[] 
- A list of Nlb Listeners. Each element contains the following attributes:
- listenerProtocol string
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- loadBalancer string[]Ids 
- outputFile string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- listeners
Sequence[GetListeners 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:
- listenerProtocol String
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- loadBalancer List<String>Ids 
- outputFile String
Supporting Types
GetListenersListener  
- AlpnEnabled bool
- ndicates whether Application-Layer Protocol Negotiation (ALPN) is enabled.
- AlpnPolicy string
- The ALPN policy.
- CaCertificate List<string>Ids 
- CA certificate list information. Currently, only one CA certificate can be added. NOTE: This parameter only takes effect for TCPSSLlisteners.
- CaEnabled bool
- Whether to start two-way authentication.
- CertificateIds 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.
- EndPort 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.
- IdleTimeout int
- Connection idle timeout time. Unit: seconds. Valid values: 1~900.
- ListenerDescription 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 (-).
- ListenerId string
- The ID of the listener.
- ListenerPort int
- Listening port. Valid values: 0~65535.0: indicates that full port listening is used. When set to 0, you must configureStartPortandEndPort.
- ListenerProtocol string
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- LoadBalancer 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.
- ProxyProtocol boolEnabled 
- Whether to enable the Proxy Protocol to carry the source address of the client to the backend server.
- SecSensor boolEnabled 
- Indicates whether fine-grained monitoring is enabled.
- SecurityPolicy 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.
- ServerGroup stringId 
- The ID of the server group.
- StartPort string
- Full Port listens to the starting port. Valid values: 0~65535.
- Status string
- The status of the resource.
- AlpnEnabled bool
- ndicates whether Application-Layer Protocol Negotiation (ALPN) is enabled.
- AlpnPolicy string
- The ALPN policy.
- CaCertificate []stringIds 
- CA certificate list information. Currently, only one CA certificate can be added. NOTE: This parameter only takes effect for TCPSSLlisteners.
- CaEnabled bool
- Whether to start two-way authentication.
- CertificateIds []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.
- EndPort 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.
- IdleTimeout int
- Connection idle timeout time. Unit: seconds. Valid values: 1~900.
- ListenerDescription 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 (-).
- ListenerId string
- The ID of the listener.
- ListenerPort int
- Listening port. Valid values: 0~65535.0: indicates that full port listening is used. When set to 0, you must configureStartPortandEndPort.
- ListenerProtocol string
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- LoadBalancer 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.
- ProxyProtocol boolEnabled 
- Whether to enable the Proxy Protocol to carry the source address of the client to the backend server.
- SecSensor boolEnabled 
- Indicates whether fine-grained monitoring is enabled.
- SecurityPolicy 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.
- ServerGroup stringId 
- The ID of the server group.
- StartPort string
- Full Port listens to the starting port. Valid values: 0~65535.
- Status string
- The status of the resource.
- alpnEnabled Boolean
- ndicates whether Application-Layer Protocol Negotiation (ALPN) is enabled.
- alpnPolicy String
- The ALPN policy.
- caCertificate List<String>Ids 
- CA certificate list information. Currently, only one CA certificate can be added. NOTE: This parameter only takes effect for TCPSSLlisteners.
- caEnabled Boolean
- Whether to start two-way authentication.
- certificateIds 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.
- endPort 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.
- idleTimeout Integer
- Connection idle timeout time. Unit: seconds. Valid values: 1~900.
- listenerDescription 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 (-).
- listenerId String
- The ID of the listener.
- listenerPort Integer
- Listening port. Valid values: 0~65535.0: indicates that full port listening is used. When set to 0, you must configureStartPortandEndPort.
- listenerProtocol String
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- loadBalancer 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.
- proxyProtocol BooleanEnabled 
- Whether to enable the Proxy Protocol to carry the source address of the client to the backend server.
- secSensor BooleanEnabled 
- Indicates whether fine-grained monitoring is enabled.
- securityPolicy 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.
- serverGroup StringId 
- The ID of the server group.
- startPort String
- Full Port listens to the starting port. Valid values: 0~65535.
- status String
- The status of the resource.
- alpnEnabled boolean
- ndicates whether Application-Layer Protocol Negotiation (ALPN) is enabled.
- alpnPolicy string
- The ALPN policy.
- caCertificate string[]Ids 
- CA certificate list information. Currently, only one CA certificate can be added. NOTE: This parameter only takes effect for TCPSSLlisteners.
- caEnabled boolean
- Whether to start two-way authentication.
- certificateIds 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.
- endPort 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.
- idleTimeout number
- Connection idle timeout time. Unit: seconds. Valid values: 1~900.
- listenerDescription 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 (-).
- listenerId string
- The ID of the listener.
- listenerPort number
- Listening port. Valid values: 0~65535.0: indicates that full port listening is used. When set to 0, you must configureStartPortandEndPort.
- listenerProtocol string
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- loadBalancer 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.
- proxyProtocol booleanEnabled 
- Whether to enable the Proxy Protocol to carry the source address of the client to the backend server.
- secSensor booleanEnabled 
- Indicates whether fine-grained monitoring is enabled.
- securityPolicy 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.
- serverGroup stringId 
- The ID of the server group.
- startPort 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.
- alpnEnabled Boolean
- ndicates whether Application-Layer Protocol Negotiation (ALPN) is enabled.
- alpnPolicy String
- The ALPN policy.
- caCertificate List<String>Ids 
- CA certificate list information. Currently, only one CA certificate can be added. NOTE: This parameter only takes effect for TCPSSLlisteners.
- caEnabled Boolean
- Whether to start two-way authentication.
- certificateIds 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.
- endPort 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.
- idleTimeout Number
- Connection idle timeout time. Unit: seconds. Valid values: 1~900.
- listenerDescription 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 (-).
- listenerId String
- The ID of the listener.
- listenerPort Number
- Listening port. Valid values: 0~65535.0: indicates that full port listening is used. When set to 0, you must configureStartPortandEndPort.
- listenerProtocol String
- The listening protocol. Valid values: TCP,UDP, orTCPSSL.
- loadBalancer 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.
- proxyProtocol BooleanEnabled 
- Whether to enable the Proxy Protocol to carry the source address of the client to the backend server.
- secSensor BooleanEnabled 
- Indicates whether fine-grained monitoring is enabled.
- securityPolicy 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.
- serverGroup StringId 
- The ID of the server group.
- startPort 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.