AWS v6.77.1 published on Friday, Apr 18, 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(GetListenerArgs.builder()
            .build());
    }
}
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:
- Listener
Identifier string - ID or Amazon Resource Name (ARN) of the listener
 - Service
Identifier string - ID or Amazon Resource Name (ARN) of the service network
 - Dictionary<string, string>
 - List of tags associated with the listener.
 
- Listener
Identifier string - ID or Amazon Resource Name (ARN) of the listener
 - Service
Identifier string - ID or Amazon Resource Name (ARN) of the service network
 - map[string]string
 - List of tags associated with the listener.
 
- listener
Identifier String - ID or Amazon Resource Name (ARN) of the listener
 - service
Identifier String - ID or Amazon Resource Name (ARN) of the service network
 - Map<String,String>
 - List of tags associated with the listener.
 
- listener
Identifier string - ID or Amazon Resource Name (ARN) of the listener
 - service
Identifier 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.
 
- listener
Identifier String - ID or Amazon Resource Name (ARN) of the listener
 - service
Identifier 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.
 - Created
At string - The date and time that the listener was created.
 - Default
Actions List<GetListener Default Action>  - The actions for the default listener rule.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Last
Updated stringAt  - The date and time the listener was last updated.
 - Listener
Id string - The ID of the listener.
 - Listener
Identifier string - Name string
 - The name of the listener.
 - Port int
 - The listener port.
 - Protocol string
 - The listener protocol. Either 
HTTPSorHTTP. - Service
Arn string - The ARN of the service.
 - Service
Id string - The ID of the service.
 - Service
Identifier string - Dictionary<string, string>
 - List of tags associated with the listener.
 
- Arn string
 - ARN of the listener.
 - Created
At string - The date and time that the listener was created.
 - Default
Actions []GetListener Default Action  - The actions for the default listener rule.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Last
Updated stringAt  - The date and time the listener was last updated.
 - Listener
Id string - The ID of the listener.
 - Listener
Identifier string - Name string
 - The name of the listener.
 - Port int
 - The listener port.
 - Protocol string
 - The listener protocol. Either 
HTTPSorHTTP. - Service
Arn string - The ARN of the service.
 - Service
Id string - The ID of the service.
 - Service
Identifier string - map[string]string
 - List of tags associated with the listener.
 
- arn String
 - ARN of the listener.
 - created
At String - The date and time that the listener was created.
 - default
Actions List<GetListener Default Action>  - The actions for the default listener rule.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - last
Updated StringAt  - The date and time the listener was last updated.
 - listener
Id String - The ID of the listener.
 - listener
Identifier String - name String
 - The name of the listener.
 - port Integer
 - The listener port.
 - protocol String
 - The listener protocol. Either 
HTTPSorHTTP. - service
Arn String - The ARN of the service.
 - service
Id String - The ID of the service.
 - service
Identifier String - Map<String,String>
 - List of tags associated with the listener.
 
- arn string
 - ARN of the listener.
 - created
At string - The date and time that the listener was created.
 - default
Actions GetListener Default Action[]  - The actions for the default listener rule.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - last
Updated stringAt  - The date and time the listener was last updated.
 - listener
Id string - The ID of the listener.
 - listener
Identifier string - name string
 - The name of the listener.
 - port number
 - The listener port.
 - protocol string
 - The listener protocol. Either 
HTTPSorHTTP. - service
Arn string - The ARN of the service.
 - service
Id string - The ID of the service.
 - service
Identifier 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.
 - created
At String - The date and time that the listener was created.
 - default
Actions List<Property Map> - The actions for the default listener rule.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - last
Updated StringAt  - The date and time the listener was last updated.
 - listener
Id String - The ID of the listener.
 - listener
Identifier String - name String
 - The name of the listener.
 - port Number
 - The listener port.
 - protocol String
 - The listener protocol. Either 
HTTPSorHTTP. - service
Arn String - The ARN of the service.
 - service
Id String - The ID of the service.
 - service
Identifier String - Map<String>
 - List of tags associated with the listener.
 
Supporting Types
GetListenerDefaultAction   
GetListenerDefaultActionFixedResponse     
- Status
Code int 
- Status
Code int 
- status
Code Integer 
- status
Code number 
- status_
code int 
- status
Code Number 
GetListenerDefaultActionForward    
GetListenerDefaultActionForwardTargetGroup      
- Target
Group stringIdentifier  - Weight int
 
- Target
Group stringIdentifier  - Weight int
 
- target
Group StringIdentifier  - weight Integer
 
- target
Group stringIdentifier  - weight number
 
- target_
group_ stridentifier  - weight int
 
- target
Group 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.