AWS v6.71.0 published on Friday, Mar 7, 2025 by Pulumi
aws.vpclattice.getListener
Explore with Pulumi AI
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({});
import pulumi
import pulumi_aws as aws
example = aws.vpclattice.get_listener()
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
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.VpcLattice.GetListener.Invoke();
});
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();
    }
}
variables:
  example:
    fn::invoke:
      function: aws:vpclattice:getListener
      arguments: {}
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>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]func LookupListener(ctx *Context, args *LookupListenerArgs, opts ...InvokeOption) (*LookupListenerResult, error)
func LookupListenerOutput(ctx *Context, args *LookupListenerOutputArgs, opts ...InvokeOption) LookupListenerResultOutput> 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)
}public static CompletableFuture<GetListenerResult> getListener(GetListenerArgs args, InvokeOptions options)
public static Output<GetListenerResult> getListener(GetListenerArgs args, InvokeOptions options)
fn::invoke:
  function: aws:vpclattice/getListener:getListener
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ListenerIdentifier string
- ID or Amazon Resource Name (ARN) of the listener
- ServiceIdentifier string
- ID or Amazon Resource Name (ARN) of the service network
- Dictionary<string, string>
- List of tags associated with the listener.
- ListenerIdentifier string
- ID or Amazon Resource Name (ARN) of the listener
- ServiceIdentifier string
- ID or Amazon Resource Name (ARN) of the service network
- map[string]string
- List of tags associated with the listener.
- listenerIdentifier String
- ID or Amazon Resource Name (ARN) of the listener
- serviceIdentifier String
- ID or Amazon Resource Name (ARN) of the service network
- Map<String,String>
- List of tags associated with the listener.
- listenerIdentifier string
- ID or Amazon Resource Name (ARN) of the listener
- serviceIdentifier string
- ID or Amazon Resource Name (ARN) of the service network
- {[key: string]: string}
- List of tags associated with the listener.
- listener_identifier str
- ID or Amazon Resource Name (ARN) of the listener
- service_identifier str
- ID or Amazon Resource Name (ARN) of the service network
- Mapping[str, str]
- List of tags associated with the listener.
- listenerIdentifier String
- ID or Amazon Resource Name (ARN) of the listener
- serviceIdentifier String
- ID or Amazon Resource Name (ARN) of the service network
- 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<GetListener Default Action> 
- The actions for the default listener rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- LastUpdated stringAt 
- 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 HTTPSorHTTP.
- ServiceArn string
- The ARN of the service.
- ServiceId string
- The ID of the service.
- ServiceIdentifier string
- 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 []GetListener Default Action 
- The actions for the default listener rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- LastUpdated stringAt 
- 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 HTTPSorHTTP.
- ServiceArn string
- The ARN of the service.
- ServiceId string
- The ID of the service.
- ServiceIdentifier string
- 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<GetListener Default Action> 
- The actions for the default listener rule.
- id String
- The provider-assigned unique ID for this managed resource.
- lastUpdated StringAt 
- 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 HTTPSorHTTP.
- serviceArn String
- The ARN of the service.
- serviceId String
- The ID of the service.
- serviceIdentifier String
- 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 GetListener Default Action[] 
- The actions for the default listener rule.
- id string
- The provider-assigned unique ID for this managed resource.
- lastUpdated stringAt 
- 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 HTTPSorHTTP.
- serviceArn string
- The ARN of the service.
- serviceId string
- The ID of the service.
- serviceIdentifier string
- {[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[GetListener Default Action] 
- The actions for the default listener rule.
- id str
- The provider-assigned unique ID for this managed resource.
- last_updated_ strat 
- 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 HTTPSorHTTP.
- service_arn str
- The ARN of the service.
- service_id str
- The ID of the service.
- service_identifier str
- 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.
- lastUpdated StringAt 
- 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 HTTPSorHTTP.
- serviceArn String
- The ARN of the service.
- serviceId String
- The ID of the service.
- serviceIdentifier String
- Map<String>
- List of tags associated with the listener.
Supporting Types
GetListenerDefaultAction   
GetListenerDefaultActionFixedResponse     
- StatusCode int
- StatusCode int
- statusCode Integer
- statusCode number
- status_code int
- statusCode Number
GetListenerDefaultActionForward    
GetListenerDefaultActionForwardTargetGroup      
- TargetGroup stringIdentifier 
- Weight int
- TargetGroup stringIdentifier 
- Weight int
- targetGroup StringIdentifier 
- weight Integer
- targetGroup stringIdentifier 
- weight number
- target_group_ stridentifier 
- weight int
- targetGroup StringIdentifier 
- weight Number
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.