Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::ElasticLoadBalancingV2::ListenerCertificate

The AWS::ElasticLoadBalancingV2::ListenerCertificate resource specifies certificates for an Elastic Load Balancing secure listener. For more information, see Getting Started in the Elastic Load Balancing User Guide.

Syntax

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

JSON

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

YAML

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

Properties

Certificates

Certificates specified for the listener. Duplicates not allowed.

Required: Yes

Type: List of Elastic Load Balancing ListenerCertificate Certificate

Update requires: Replacement

ListenerArn

The Amazon Resource Name (ARN) of the listener.

Required: Yes

Type: String

Update requires: Replacement

Example

The following example specifies a listener certificate, containing a single certificate, for a load balancer listener.

JSON

Copy
{ "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

Copy
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

On this page: