AWS CloudFormation
User Guide (API Version 2010-05-15)
AWS 服务或AWS文档中描述的功能,可能因地区/位置而异。请点击 Amazon AWS 入门,可查看中国地区的具体差异

AWS::ElasticLoadBalancingV2::ListenerCertificate

AWS::ElasticLoadBalancingV2::ListenerCertificate 资源为 Elastic Load Balancing 安全侦听器指定证书。有关更多信息,请参阅 Elastic Load Balancing 用户指南中的入门

语法

要在 AWS CloudFormation 模板中声明此实体,请使用以下语法:

JSON

{ "Type" : "AWS::ElasticLoadBalancingV2::ListenerCertificate", "Properties" : { "Certificates" : [ Certificate, ... ] "ListenerArn" : String } }

YAML

Type: "AWS::ElasticLoadBalancingV2::ListenerCertificate" Properties: Certificates: - Certificate ListenerArn: String

属性

Certificates

为侦听器指定的证书。不允许重复项。

必需:是

类型Elastic Load Balancing ListenerCertificate Certificate 的列表

更新要求替换

ListenerArn

侦听器的 Amazon 资源名称 (ARN)。

必需:是

类型:字符串

更新要求替换

示例

以下示例为负载均衡器侦听器指定包含单个证书的侦听器证书。

JSON

{ "Parameters": { "CertificateArn1": { "Type": "String" }, "CertificateArn2": { "Type": "String" }, "LoadBalancerArn": { "Type": "String" }, "TargetGroupArn": { "Type": "String" } }, "Resources": { "ListenerCertificate": { "Type": "AWS::ElasticLoadBalancingV2::ListenerCertificate", "Properties": { "Certificates": [ { "CertificateArn": { "Ref": "CertificateArn1" } } ], "ListenerArn": { "Ref": "Listener" } } }, "Listener": { "Type": "AWS::ElasticLoadBalancingV2::Listener", "Properties": { "DefaultActions": [ { "Type": "forward", "TargetGroupArn": { "Ref": "TargetGroupArn" } } ], "LoadBalancerArn": { "Ref": "LoadBalancerArn" }, "Port": "8000", "Protocol": "HTTPS", "Certificates": [ { "CertificateArn": { "Ref": "CertificateArn2" } } ] } } } }

YAML

Parameters: CertificateArn1: Type: String CertificateArn2: Type: String LoadBalancerArn: Type: String TargetGroupArn: Type: String Resources: ListenerCertificate: Type: 'AWS::ElasticLoadBalancingV2::ListenerCertificate' Properties: Certificates: - CertificateArn: !Ref CertificateArn1 ListenerArn: !Ref Listener Listener: Type: 'AWS::ElasticLoadBalancingV2::Listener' Properties: DefaultActions: - Type: forward TargetGroupArn: !Ref TargetGroupArn LoadBalancerArn: !Ref LoadBalancerArn Port: '8000' Protocol: HTTPS Certificates: - CertificateArn: !Ref CertificateArn2

本页内容: