1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. vpclattice
  5. getListener

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.vpclattice.getListener

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

Creates a listener for a service. Before you start using your Amazon VPC Lattice service, you must add one or more listeners. A listener is a process that checks for connection requests to your services.

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(arn: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetListenerResult
def get_listener_output(arn: Optional[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-native:vpclattice:getListener
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Arn This property is required. string
The Amazon Resource Name (ARN) of the listener.
Arn This property is required. string
The Amazon Resource Name (ARN) of the listener.
arn This property is required. String
The Amazon Resource Name (ARN) of the listener.
arn This property is required. string
The Amazon Resource Name (ARN) of the listener.
arn This property is required. str
The Amazon Resource Name (ARN) of the listener.
arn This property is required. String
The Amazon Resource Name (ARN) of the listener.

getListener Result

The following output properties are available:

Arn string
The Amazon Resource Name (ARN) of the listener.
DefaultAction Pulumi.AwsNative.VpcLattice.Outputs.ListenerDefaultAction
The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.
Id string
The ID of the listener.
ServiceArn string
The Amazon Resource Name (ARN) of the service.
ServiceId string
The ID of the service.
Tags List<Pulumi.AwsNative.Outputs.Tag>
The tags for the listener.
Arn string
The Amazon Resource Name (ARN) of the listener.
DefaultAction ListenerDefaultAction
The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.
Id string
The ID of the listener.
ServiceArn string
The Amazon Resource Name (ARN) of the service.
ServiceId string
The ID of the service.
Tags Tag
The tags for the listener.
arn String
The Amazon Resource Name (ARN) of the listener.
defaultAction ListenerDefaultAction
The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.
id String
The ID of the listener.
serviceArn String
The Amazon Resource Name (ARN) of the service.
serviceId String
The ID of the service.
tags List<Tag>
The tags for the listener.
arn string
The Amazon Resource Name (ARN) of the listener.
defaultAction ListenerDefaultAction
The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.
id string
The ID of the listener.
serviceArn string
The Amazon Resource Name (ARN) of the service.
serviceId string
The ID of the service.
tags Tag[]
The tags for the listener.
arn str
The Amazon Resource Name (ARN) of the listener.
default_action ListenerDefaultAction
The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.
id str
The ID of the listener.
service_arn str
The Amazon Resource Name (ARN) of the service.
service_id str
The ID of the service.
tags Sequence[root_Tag]
The tags for the listener.
arn String
The Amazon Resource Name (ARN) of the listener.
defaultAction Property Map
The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.
id String
The ID of the listener.
serviceArn String
The Amazon Resource Name (ARN) of the service.
serviceId String
The ID of the service.
tags List<Property Map>
The tags for the listener.

Supporting Types

ListenerDefaultAction

FixedResponse Pulumi.AwsNative.VpcLattice.Inputs.ListenerFixedResponse
Describes an action that returns a custom HTTP response.
Forward Pulumi.AwsNative.VpcLattice.Inputs.ListenerForward
Describes a forward action. You can use forward actions to route requests to one or more target groups.
FixedResponse ListenerFixedResponse
Describes an action that returns a custom HTTP response.
Forward ListenerForward
Describes a forward action. You can use forward actions to route requests to one or more target groups.
fixedResponse ListenerFixedResponse
Describes an action that returns a custom HTTP response.
forward ListenerForward
Describes a forward action. You can use forward actions to route requests to one or more target groups.
fixedResponse ListenerFixedResponse
Describes an action that returns a custom HTTP response.
forward ListenerForward
Describes a forward action. You can use forward actions to route requests to one or more target groups.
fixed_response ListenerFixedResponse
Describes an action that returns a custom HTTP response.
forward ListenerForward
Describes a forward action. You can use forward actions to route requests to one or more target groups.
fixedResponse Property Map
Describes an action that returns a custom HTTP response.
forward Property Map
Describes a forward action. You can use forward actions to route requests to one or more target groups.

ListenerFixedResponse

StatusCode This property is required. int
The HTTP response code.
StatusCode This property is required. int
The HTTP response code.
statusCode This property is required. Integer
The HTTP response code.
statusCode This property is required. number
The HTTP response code.
status_code This property is required. int
The HTTP response code.
statusCode This property is required. Number
The HTTP response code.

ListenerForward

TargetGroups This property is required. List<Pulumi.AwsNative.VpcLattice.Inputs.ListenerWeightedTargetGroup>

The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

TargetGroups This property is required. []ListenerWeightedTargetGroup

The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

targetGroups This property is required. List<ListenerWeightedTargetGroup>

The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

targetGroups This property is required. ListenerWeightedTargetGroup[]

The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

target_groups This property is required. Sequence[ListenerWeightedTargetGroup]

The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

targetGroups This property is required. List<Property Map>

The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

ListenerWeightedTargetGroup

TargetGroupIdentifier This property is required. string
The ID of the target group.
Weight int
Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
TargetGroupIdentifier This property is required. string
The ID of the target group.
Weight int
Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
targetGroupIdentifier This property is required. String
The ID of the target group.
weight Integer
Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
targetGroupIdentifier This property is required. string
The ID of the target group.
weight number
Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
target_group_identifier This property is required. str
The ID of the target group.
weight int
Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
targetGroupIdentifier This property is required. String
The ID of the target group.
weight Number
Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.

Tag

Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag
key This property is required. string
The key name of the tag
value This property is required. string
The value of the tag
key This property is required. str
The key name of the tag
value This property is required. str
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi