Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.22.0 published on Monday, Jun 27, 2022 by Pulumi

getListeners

This data source provides the Global Accelerator (GA) Listeners of the current Alibaba Cloud user.

NOTE: Available in v1.111.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AliCloud.Ga.GetListeners.InvokeAsync(new AliCloud.Ga.GetListenersArgs
        {
            AcceleratorId = "example_value",
            Ids = 
            {
                "example_value",
            },
            NameRegex = "the_resource_name",
        }));
        this.FirstGaListenerId = example.Apply(example => example.Listeners?[0]?.Id);
    }

    [Output("firstGaListenerId")]
    public Output<string> FirstGaListenerId { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ga"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := ga.GetListeners(ctx, &ga.GetListenersArgs{
			AcceleratorId: "example_value",
			Ids: []string{
				"example_value",
			},
			NameRegex: pulumi.StringRef("the_resource_name"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstGaListenerId", example.Listeners[0].Id)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

example = alicloud.ga.get_listeners(accelerator_id="example_value",
    ids=["example_value"],
    name_regex="the_resource_name")
pulumi.export("firstGaListenerId", example.listeners[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = alicloud.ga.getListeners({
    acceleratorId: "example_value",
    ids: ["example_value"],
    nameRegex: "the_resource_name",
});
export const firstGaListenerId = example.then(example => example.listeners?[0]?.id);

Coming soon!

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(accelerator_id: Optional[str] = None,
                  ids: Optional[Sequence[str]] = None,
                  name_regex: Optional[str] = None,
                  output_file: Optional[str] = None,
                  status: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetListenersResult
def get_listeners_output(accelerator_id: Optional[pulumi.Input[str]] = None,
                  ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  name_regex: Optional[pulumi.Input[str]] = None,
                  output_file: Optional[pulumi.Input[str]] = None,
                  status: 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:ga/getListeners:getListeners
  Arguments:
    # Arguments dictionary

The following arguments are supported:

AcceleratorId string

The accelerator id.

Ids List<string>

A list of Listener IDs.

NameRegex string

A regex string to filter results by Listener name.

OutputFile string
Status string

The status of the listener.

AcceleratorId string

The accelerator id.

Ids []string

A list of Listener IDs.

NameRegex string

A regex string to filter results by Listener name.

OutputFile string
Status string

The status of the listener.

acceleratorId String

The accelerator id.

ids List<String>

A list of Listener IDs.

nameRegex String

A regex string to filter results by Listener name.

outputFile String
status String

The status of the listener.

acceleratorId string

The accelerator id.

ids string[]

A list of Listener IDs.

nameRegex string

A regex string to filter results by Listener name.

outputFile string
status string

The status of the listener.

accelerator_id str

The accelerator id.

ids Sequence[str]

A list of Listener IDs.

name_regex str

A regex string to filter results by Listener name.

output_file str
status str

The status of the listener.

acceleratorId String

The accelerator id.

ids List<String>

A list of Listener IDs.

nameRegex String

A regex string to filter results by Listener name.

outputFile String
status String

The status of the listener.

getListeners Result

The following output properties are available:

AcceleratorId string
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Listeners List<Pulumi.AliCloud.Ga.Outputs.GetListenersListener>
Names List<string>
NameRegex string
OutputFile string
Status string
AcceleratorId string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Listeners []GetListenersListener
Names []string
NameRegex string
OutputFile string
Status string
acceleratorId String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
listeners List<GetListenersListener>
names List<String>
nameRegex String
outputFile String
status String
acceleratorId string
id string

The provider-assigned unique ID for this managed resource.

ids string[]
listeners GetListenersListener[]
names string[]
nameRegex string
outputFile string
status string
accelerator_id str
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
listeners Sequence[GetListenersListener]
names Sequence[str]
name_regex str
output_file str
status str
acceleratorId String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
listeners List<Property Map>
names List<String>
nameRegex String
outputFile String
status String

Supporting Types

GetListenersListener

Certificates List<Pulumi.AliCloud.Ga.Inputs.GetListenersListenerCertificate>

The certificates of the listener.

ClientAffinity string

The clientAffinity of the listener.

Description string

The description of the listener.

Id string

The ID of the Listener.

ListenerId string

The listenerId of the listener.

Name string

The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.

PortRanges List<Pulumi.AliCloud.Ga.Inputs.GetListenersListenerPortRange>

The portRanges of the listener.

Protocol string

Type of network transport protocol monitored.

Status string

The status of the listener.

Certificates []GetListenersListenerCertificate

The certificates of the listener.

ClientAffinity string

The clientAffinity of the listener.

Description string

The description of the listener.

Id string

The ID of the Listener.

ListenerId string

The listenerId of the listener.

Name string

The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.

PortRanges []GetListenersListenerPortRange

The portRanges of the listener.

Protocol string

Type of network transport protocol monitored.

Status string

The status of the listener.

certificates List<GetListenersListenerCertificate>

The certificates of the listener.

clientAffinity String

The clientAffinity of the listener.

description String

The description of the listener.

id String

The ID of the Listener.

listenerId String

The listenerId of the listener.

name String

The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.

portRanges List<GetListenersListenerPortRange>

The portRanges of the listener.

protocol String

Type of network transport protocol monitored.

status String

The status of the listener.

certificates GetListenersListenerCertificate[]

The certificates of the listener.

clientAffinity string

The clientAffinity of the listener.

description string

The description of the listener.

id string

The ID of the Listener.

listenerId string

The listenerId of the listener.

name string

The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.

portRanges GetListenersListenerPortRange[]

The portRanges of the listener.

protocol string

Type of network transport protocol monitored.

status string

The status of the listener.

certificates Sequence[GetListenersListenerCertificate]

The certificates of the listener.

client_affinity str

The clientAffinity of the listener.

description str

The description of the listener.

id str

The ID of the Listener.

listener_id str

The listenerId of the listener.

name str

The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.

port_ranges Sequence[GetListenersListenerPortRange]

The portRanges of the listener.

protocol str

Type of network transport protocol monitored.

status str

The status of the listener.

certificates List<Property Map>

The certificates of the listener.

clientAffinity String

The clientAffinity of the listener.

description String

The description of the listener.

id String

The ID of the Listener.

listenerId String

The listenerId of the listener.

name String

The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.

portRanges List<Property Map>

The portRanges of the listener.

protocol String

Type of network transport protocol monitored.

status String

The status of the listener.

GetListenersListenerCertificate

Id string

The ID of the Listener.

Type string

The type of the certificate.

Id string

The ID of the Listener.

Type string

The type of the certificate.

id String

The ID of the Listener.

type String

The type of the certificate.

id string

The ID of the Listener.

type string

The type of the certificate.

id str

The ID of the Listener.

type str

The type of the certificate.

id String

The ID of the Listener.

type String

The type of the certificate.

GetListenersListenerPortRange

FromPort int

The initial listening port used to receive requests and forward them to terminal nodes.

ToPort int

The end listening port used to receive requests and forward them to terminal nodes.

FromPort int

The initial listening port used to receive requests and forward them to terminal nodes.

ToPort int

The end listening port used to receive requests and forward them to terminal nodes.

fromPort Integer

The initial listening port used to receive requests and forward them to terminal nodes.

toPort Integer

The end listening port used to receive requests and forward them to terminal nodes.

fromPort number

The initial listening port used to receive requests and forward them to terminal nodes.

toPort number

The end listening port used to receive requests and forward them to terminal nodes.

from_port int

The initial listening port used to receive requests and forward them to terminal nodes.

to_port int

The end listening port used to receive requests and forward them to terminal nodes.

fromPort Number

The initial listening port used to receive requests and forward them to terminal nodes.

toPort Number

The end listening port used to receive requests and forward them to terminal nodes.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.