We recommend new projects start with resources from the AWS provider.
aws-native.vpclattice.Listener
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
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.
Create Listener Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Listener(name: string, args: ListenerArgs, opts?: CustomResourceOptions);@overload
def Listener(resource_name: str,
             args: ListenerArgs,
             opts: Optional[ResourceOptions] = None)
@overload
def Listener(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             default_action: Optional[ListenerDefaultActionArgs] = None,
             protocol: Optional[ListenerProtocol] = None,
             name: Optional[str] = None,
             port: Optional[int] = None,
             service_identifier: Optional[str] = None,
             tags: Optional[Sequence[_root_inputs.TagArgs]] = None)func NewListener(ctx *Context, name string, args ListenerArgs, opts ...ResourceOption) (*Listener, error)public Listener(string name, ListenerArgs args, CustomResourceOptions? opts = null)
public Listener(String name, ListenerArgs args)
public Listener(String name, ListenerArgs args, CustomResourceOptions options)
type: aws-native:vpclattice:Listener
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Listener Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Listener resource accepts the following input properties:
- DefaultAction Pulumi.Aws Native. Vpc Lattice. Inputs. Listener Default Action 
- The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.
- Protocol
Pulumi.Aws Native. Vpc Lattice. Listener Protocol 
- The listener protocol.
- Name string
- The name of the listener. A listener name must be unique within a service. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. - If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name. 
- Port int
- The listener port. You can specify a value from 1 to 65535. For HTTP, the default is 80. For HTTPS, the default is 443.
- ServiceIdentifier string
- The ID or ARN of the service.
- 
List<Pulumi.Aws Native. Inputs. Tag> 
- The tags for the listener.
- DefaultAction ListenerDefault Action Args 
- The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.
- Protocol
ListenerProtocol 
- The listener protocol.
- Name string
- The name of the listener. A listener name must be unique within a service. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. - If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name. 
- Port int
- The listener port. You can specify a value from 1 to 65535. For HTTP, the default is 80. For HTTPS, the default is 443.
- ServiceIdentifier string
- The ID or ARN of the service.
- 
TagArgs 
- The tags for the listener.
- defaultAction ListenerDefault Action 
- The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.
- protocol
ListenerProtocol 
- The listener protocol.
- name String
- The name of the listener. A listener name must be unique within a service. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. - If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name. 
- port Integer
- The listener port. You can specify a value from 1 to 65535. For HTTP, the default is 80. For HTTPS, the default is 443.
- serviceIdentifier String
- The ID or ARN of the service.
- List<Tag>
- The tags for the listener.
- defaultAction ListenerDefault Action 
- The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.
- protocol
ListenerProtocol 
- The listener protocol.
- name string
- The name of the listener. A listener name must be unique within a service. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. - If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name. 
- port number
- The listener port. You can specify a value from 1 to 65535. For HTTP, the default is 80. For HTTPS, the default is 443.
- serviceIdentifier string
- The ID or ARN of the service.
- Tag[]
- The tags for the listener.
- default_action ListenerDefault Action Args 
- The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.
- protocol
ListenerProtocol 
- The listener protocol.
- name str
- The name of the listener. A listener name must be unique within a service. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. - If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name. 
- port int
- The listener port. You can specify a value from 1 to 65535. For HTTP, the default is 80. For HTTPS, the default is 443.
- service_identifier str
- The ID or ARN of the service.
- 
Sequence[TagArgs] 
- The tags for 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.
- protocol "HTTP" | "HTTPS" | "TLS_PASSTHROUGH"
- The listener protocol.
- name String
- The name of the listener. A listener name must be unique within a service. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. - If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name. 
- port Number
- The listener port. You can specify a value from 1 to 65535. For HTTP, the default is 80. For HTTPS, the default is 443.
- serviceIdentifier String
- The ID or ARN of the service.
- List<Property Map>
- The tags for the listener.
Outputs
All input properties are implicitly available as output properties. Additionally, the Listener resource produces the following output properties:
- Arn string
- The Amazon Resource Name (ARN) of the listener.
- AwsId string
- The ID of the listener.
- Id string
- The provider-assigned unique ID for this managed resource.
- ServiceArn string
- The Amazon Resource Name (ARN) of the service.
- ServiceId string
- The ID of the service.
- Arn string
- The Amazon Resource Name (ARN) of the listener.
- AwsId string
- The ID of the listener.
- Id string
- The provider-assigned unique ID for this managed resource.
- ServiceArn string
- The Amazon Resource Name (ARN) of the service.
- ServiceId string
- The ID of the service.
- arn String
- The Amazon Resource Name (ARN) of the listener.
- awsId String
- The ID of the listener.
- id String
- The provider-assigned unique ID for this managed resource.
- serviceArn String
- The Amazon Resource Name (ARN) of the service.
- serviceId String
- The ID of the service.
- arn string
- The Amazon Resource Name (ARN) of the listener.
- awsId string
- The ID of the listener.
- id string
- The provider-assigned unique ID for this managed resource.
- serviceArn string
- The Amazon Resource Name (ARN) of the service.
- serviceId string
- The ID of the service.
- arn str
- The Amazon Resource Name (ARN) of the listener.
- aws_id str
- The ID of the listener.
- id str
- The provider-assigned unique ID for this managed resource.
- service_arn str
- The Amazon Resource Name (ARN) of the service.
- service_id str
- The ID of the service.
- arn String
- The Amazon Resource Name (ARN) of the listener.
- awsId String
- The ID of the listener.
- id String
- The provider-assigned unique ID for this managed resource.
- serviceArn String
- The Amazon Resource Name (ARN) of the service.
- serviceId String
- The ID of the service.
Supporting Types
ListenerDefaultAction, ListenerDefaultActionArgs      
- FixedResponse Pulumi.Aws Native. Vpc Lattice. Inputs. Listener Fixed Response 
- Describes an action that returns a custom HTTP response.
- Forward
Pulumi.Aws Native. Vpc Lattice. Inputs. Listener Forward 
- Describes a forward action. You can use forward actions to route requests to one or more target groups.
- FixedResponse ListenerFixed Response 
- 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 ListenerFixed Response 
- 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 ListenerFixed Response 
- 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 ListenerFixed Response 
- 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, ListenerFixedResponseArgs      
- StatusCode int
- The HTTP response code.
- StatusCode int
- The HTTP response code.
- statusCode Integer
- The HTTP response code.
- statusCode number
- The HTTP response code.
- status_code int
- The HTTP response code.
- statusCode Number
- The HTTP response code.
ListenerForward, ListenerForwardArgs    
- TargetGroups List<Pulumi.Aws Native. Vpc Lattice. Inputs. Listener Weighted Target Group> 
- 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 []ListenerWeighted Target Group 
- 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 List<ListenerWeighted Target Group> 
- 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 ListenerWeighted Target Group[] 
- 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 Sequence[ListenerWeighted Target Group] 
- 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 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. 
ListenerProtocol, ListenerProtocolArgs    
- Http
- HTTP
- Https
- HTTPS
- TlsPassthrough 
- TLS_PASSTHROUGH
- ListenerProtocol Http 
- HTTP
- ListenerProtocol Https 
- HTTPS
- ListenerProtocol Tls Passthrough 
- TLS_PASSTHROUGH
- Http
- HTTP
- Https
- HTTPS
- TlsPassthrough 
- TLS_PASSTHROUGH
- Http
- HTTP
- Https
- HTTPS
- TlsPassthrough 
- TLS_PASSTHROUGH
- HTTP
- HTTP
- HTTPS
- HTTPS
- TLS_PASSTHROUGH
- TLS_PASSTHROUGH
- "HTTP"
- HTTP
- "HTTPS"
- HTTPS
- "TLS_PASSTHROUGH"
- TLS_PASSTHROUGH
ListenerWeightedTargetGroup, ListenerWeightedTargetGroupArgs        
- TargetGroup stringIdentifier 
- 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.
- TargetGroup stringIdentifier 
- 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.
- targetGroup StringIdentifier 
- 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.
- targetGroup stringIdentifier 
- 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_ stridentifier 
- 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.
- targetGroup StringIdentifier 
- 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, TagArgs  
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.