Skip to content
v2.278.0

ApplicationListenerCertificate ​

Add certificates to a listener.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
import { aws_elasticloadbalancingv2 as interfaces_elasticloadbalancingv2 } from 'aws-cdk-lib/interfaces';

declare const listenerCertificate: elbv2.ListenerCertificate;
declare const listenerRef: interfaces_elasticloadbalancingv2.IListenerRef;
const applicationListenerCertificate = new elbv2.ApplicationListenerCertificate(this, 'MyApplicationListenerCertificate', {
  listener: listenerRef,

  // the properties below are optional
  certificates: [listenerCertificate],
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_elasticloadbalancingv2 as elbv2
from aws_cdk.interfaces import aws_elasticloadbalancingv2 as interfaces_elasticloadbalancingv2

# listener_certificate: elbv2.ListenerCertificate
# listener_ref: interfaces_elasticloadbalancingv2.IListenerRef

application_listener_certificate = elbv2.ApplicationListenerCertificate(self, "MyApplicationListenerCertificate",
    listener=listener_ref,

    # the properties below are optional
    certificates=[listener_certificate]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.elasticloadbalancingv2.*;
import software.amazon.awscdk.interfaces.elasticloadbalancingv2.*;

ListenerCertificate listenerCertificate;
IListenerRef listenerRef;

ApplicationListenerCertificate applicationListenerCertificate = ApplicationListenerCertificate.Builder.create(this, "MyApplicationListenerCertificate")
        .listener(listenerRef)

        // the properties below are optional
        .certificates(List.of(listenerCertificate))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
using Amazon.CDK.Interfaces.ElasticLoadBalancingV2;

ListenerCertificate listenerCertificate;
IListenerRef listenerRef;

var applicationListenerCertificate = new ApplicationListenerCertificate(this, "MyApplicationListenerCertificate", new ApplicationListenerCertificateProps {
    Listener = listenerRef,

    // the properties below are optional
    Certificates = new [] { listenerCertificate }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var listenerCertificate ListenerCertificate
var listenerRef IListenerRef

applicationListenerCertificate := awscdk.Aws_elasticloadbalancingv2.NewApplicationListenerCertificate(this, jsii.String("MyApplicationListenerCertificate"), &ApplicationListenerCertificateProps{
	Listener: listenerRef,

	// the properties below are optional
	Certificates: []IListenerCertificate{
		listenerCertificate,
	},
})

Initializer ​

ts
new ApplicationListenerCertificate(scope: Construct, id: string, props: ApplicationListenerCertificateProps)
python
ApplicationListenerCertificate(scope: Construct, id: str, props: ApplicationListenerCertificateProps)
java
new ApplicationListenerCertificate(Construct scope, String id, ApplicationListenerCertificateProps props)
csharp
new ApplicationListenerCertificate(Construct scope, string id, ApplicationListenerCertificateProps props)
go
NewApplicationListenerCertificate(Scope Construct, Id *string, Props ApplicationListenerCertificateProps)

Construct Props ​

certificatesoptionalIListenerCertificate[]certificatesoptionaltyping.List[IListenerCertificate]certificatesoptionalList<IListenerCertificate>CertificatesoptionalIListenerCertificate[]Certificatesoptional*[]IListenerCertificate #
Certificates to attach.

Default: One of 'certificates' and 'certificateArns' is required.

Duplicates are not allowed.

listenerIListenerReflistenerIListenerReflistenerIListenerRefListenerIListenerRefListenerIListenerRef required #
The listener to attach the rule to.

Properties ​

nodeNodenodeNodenodeNodeNodeNodeNodeNode #
The tree node.

Methods ​

isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *bool static #
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string #
Returns a string representation of this construct.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct #
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining