AWS::VpcLattice::Listener - AWS CloudFormation

AWS::VpcLattice::Listener

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. For more information, see Listeners in the Amazon VPC Lattice User Guide.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::VpcLattice::Listener", "Properties" : { "DefaultAction" : DefaultAction, "Name" : String, "Port" : Integer, "Protocol" : String, "ServiceIdentifier" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::VpcLattice::Listener Properties: DefaultAction: DefaultAction Name: String Port: Integer Protocol: String ServiceIdentifier: String Tags: - Tag

Properties

DefaultAction

The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.

Required: Yes

Type: DefaultAction

Update requires: No interruption

Name

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.

Required: No

Type: String

Pattern: ^(?!listener-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$

Minimum: 3

Maximum: 63

Update requires: Replacement

Port

The listener port. You can specify a value from 1 to 65535. For HTTP, the default is 80. For HTTPS, the default is 443.

Required: No

Type: Integer

Minimum: 1

Maximum: 65535

Update requires: Replacement

Protocol

The listener protocol.

Required: Yes

Type: String

Allowed values: HTTP | HTTPS | TLS_PASSTHROUGH

Update requires: Replacement

ServiceIdentifier

The ID or Amazon Resource Name (ARN) of the service.

Required: No

Type: String

Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc-[0-9a-z]{17}))$

Minimum: 21

Maximum: 2048

Update requires: Replacement

Tags

The tags for the listener.

Required: No

Type: Array of Tag

Minimum: 0

Maximum: 50

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Amazon Resource Name (ARN) of the listener.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The Amazon Resource Name (ARN) of the listener.

Id

The ID of the listener.

ServiceArn

The Amazon Resource Name (ARN) of the service.

ServiceId

The ID of the service.