选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

AWS::VpcLattice::Listener

聚焦模式

本页内容

AWS::VpcLattice::Listener - AWS CloudFormation
此页面尚未翻译为您的语言。 请求翻译
筛选器视图

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 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.

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。