1. Packages
  2. AWS
  3. API Docs
  4. vpclattice
  5. getListener
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.vpclattice.getListener

Explore with Pulumi AI

AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

Data source for managing an AWS VPC Lattice Listener.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.vpclattice.getListener({});
Copy
import pulumi
import pulumi_aws as aws

example = aws.vpclattice.get_listener()
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpclattice.LookupListener(ctx, &vpclattice.LookupListenerArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.VpcLattice.GetListener.Invoke();

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpclattice.VpclatticeFunctions;
import com.pulumi.aws.vpclattice.inputs.GetListenerArgs;
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 = VpclatticeFunctions.getListener(GetListenerArgs.builder()
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:vpclattice:getListener
      arguments: {}
Copy

Using getListener

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 getListener(args: GetListenerArgs, opts?: InvokeOptions): Promise<GetListenerResult>
function getListenerOutput(args: GetListenerOutputArgs, opts?: InvokeOptions): Output<GetListenerResult>
Copy
def get_listener(listener_identifier: Optional[str] = None,
                 service_identifier: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetListenerResult
def get_listener_output(listener_identifier: Optional[pulumi.Input[str]] = None,
                 service_identifier: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetListenerResult]
Copy
func LookupListener(ctx *Context, args *LookupListenerArgs, opts ...InvokeOption) (*LookupListenerResult, error)
func LookupListenerOutput(ctx *Context, args *LookupListenerOutputArgs, opts ...InvokeOption) LookupListenerResultOutput
Copy

> Note: This function is named LookupListener in the Go SDK.

public static class GetListener 
{
    public static Task<GetListenerResult> InvokeAsync(GetListenerArgs args, InvokeOptions? opts = null)
    public static Output<GetListenerResult> Invoke(GetListenerInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetListenerResult> getListener(GetListenerArgs args, InvokeOptions options)
public static Output<GetListenerResult> getListener(GetListenerArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:vpclattice/getListener:getListener
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ListenerIdentifier This property is required. string
ID or Amazon Resource Name (ARN) of the listener
ServiceIdentifier This property is required. string
ID or Amazon Resource Name (ARN) of the service network
Tags Dictionary<string, string>
List of tags associated with the listener.
ListenerIdentifier This property is required. string
ID or Amazon Resource Name (ARN) of the listener
ServiceIdentifier This property is required. string
ID or Amazon Resource Name (ARN) of the service network
Tags map[string]string
List of tags associated with the listener.
listenerIdentifier This property is required. String
ID or Amazon Resource Name (ARN) of the listener
serviceIdentifier This property is required. String
ID or Amazon Resource Name (ARN) of the service network
tags Map<String,String>
List of tags associated with the listener.
listenerIdentifier This property is required. string
ID or Amazon Resource Name (ARN) of the listener
serviceIdentifier This property is required. string
ID or Amazon Resource Name (ARN) of the service network
tags {[key: string]: string}
List of tags associated with the listener.
listener_identifier This property is required. str
ID or Amazon Resource Name (ARN) of the listener
service_identifier This property is required. str
ID or Amazon Resource Name (ARN) of the service network
tags Mapping[str, str]
List of tags associated with the listener.
listenerIdentifier This property is required. String
ID or Amazon Resource Name (ARN) of the listener
serviceIdentifier This property is required. String
ID or Amazon Resource Name (ARN) of the service network
tags Map<String>
List of tags associated with the listener.

getListener Result

The following output properties are available:

Arn string
ARN of the listener.
CreatedAt string
The date and time that the listener was created.
DefaultActions List<GetListenerDefaultAction>
The actions for the default listener rule.
Id string
The provider-assigned unique ID for this managed resource.
LastUpdatedAt string
The date and time the listener was last updated.
ListenerId string
The ID of the listener.
ListenerIdentifier string
Name string
The name of the listener.
Port int
The listener port.
Protocol string
The listener protocol. Either HTTPS or HTTP.
ServiceArn string
The ARN of the service.
ServiceId string
The ID of the service.
ServiceIdentifier string
Tags Dictionary<string, string>
List of tags associated with the listener.
Arn string
ARN of the listener.
CreatedAt string
The date and time that the listener was created.
DefaultActions []GetListenerDefaultAction
The actions for the default listener rule.
Id string
The provider-assigned unique ID for this managed resource.
LastUpdatedAt string
The date and time the listener was last updated.
ListenerId string
The ID of the listener.
ListenerIdentifier string
Name string
The name of the listener.
Port int
The listener port.
Protocol string
The listener protocol. Either HTTPS or HTTP.
ServiceArn string
The ARN of the service.
ServiceId string
The ID of the service.
ServiceIdentifier string
Tags map[string]string
List of tags associated with the listener.
arn String
ARN of the listener.
createdAt String
The date and time that the listener was created.
defaultActions List<GetListenerDefaultAction>
The actions for the default listener rule.
id String
The provider-assigned unique ID for this managed resource.
lastUpdatedAt String
The date and time the listener was last updated.
listenerId String
The ID of the listener.
listenerIdentifier String
name String
The name of the listener.
port Integer
The listener port.
protocol String
The listener protocol. Either HTTPS or HTTP.
serviceArn String
The ARN of the service.
serviceId String
The ID of the service.
serviceIdentifier String
tags Map<String,String>
List of tags associated with the listener.
arn string
ARN of the listener.
createdAt string
The date and time that the listener was created.
defaultActions GetListenerDefaultAction[]
The actions for the default listener rule.
id string
The provider-assigned unique ID for this managed resource.
lastUpdatedAt string
The date and time the listener was last updated.
listenerId string
The ID of the listener.
listenerIdentifier string
name string
The name of the listener.
port number
The listener port.
protocol string
The listener protocol. Either HTTPS or HTTP.
serviceArn string
The ARN of the service.
serviceId string
The ID of the service.
serviceIdentifier string
tags {[key: string]: string}
List of tags associated with the listener.
arn str
ARN of the listener.
created_at str
The date and time that the listener was created.
default_actions Sequence[GetListenerDefaultAction]
The actions for the default listener rule.
id str
The provider-assigned unique ID for this managed resource.
last_updated_at str
The date and time the listener was last updated.
listener_id str
The ID of the listener.
listener_identifier str
name str
The name of the listener.
port int
The listener port.
protocol str
The listener protocol. Either HTTPS or HTTP.
service_arn str
The ARN of the service.
service_id str
The ID of the service.
service_identifier str
tags Mapping[str, str]
List of tags associated with the listener.
arn String
ARN of the listener.
createdAt String
The date and time that the listener was created.
defaultActions List<Property Map>
The actions for the default listener rule.
id String
The provider-assigned unique ID for this managed resource.
lastUpdatedAt String
The date and time the listener was last updated.
listenerId String
The ID of the listener.
listenerIdentifier String
name String
The name of the listener.
port Number
The listener port.
protocol String
The listener protocol. Either HTTPS or HTTP.
serviceArn String
The ARN of the service.
serviceId String
The ID of the service.
serviceIdentifier String
tags Map<String>
List of tags associated with the listener.

Supporting Types

GetListenerDefaultAction

fixedResponses This property is required. List<Property Map>
forwards This property is required. List<Property Map>

GetListenerDefaultActionFixedResponse

StatusCode This property is required. int
StatusCode This property is required. int
statusCode This property is required. Integer
statusCode This property is required. number
status_code This property is required. int
statusCode This property is required. Number

GetListenerDefaultActionForward

targetGroups This property is required. List<Property Map>

GetListenerDefaultActionForwardTargetGroup

TargetGroupIdentifier This property is required. string
Weight This property is required. int
TargetGroupIdentifier This property is required. string
Weight This property is required. int
targetGroupIdentifier This property is required. String
weight This property is required. Integer
targetGroupIdentifier This property is required. string
weight This property is required. number
target_group_identifier This property is required. str
weight This property is required. int
targetGroupIdentifier This property is required. String
weight This property is required. Number

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi