# ApplicationListenerCertificate

Add certificates to a listener.

Extends: [Construct](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Construct.html) › ApplicationListenerCertificate
Implements: [IConstruct](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.IConstruct.html), [IDependable](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.IDependable.html)

- Source: [`aws-elasticloadbalancingv2/lib/alb/application-listener-certificate.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener-certificate.ts#L40)

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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 }
});
```

Golang:

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

TypeScript:

```ts
new ApplicationListenerCertificate(scope: Construct, id: string, props: ApplicationListenerCertificateProps)
```

Python:

```python
ApplicationListenerCertificate(scope: Construct, id: str, props: ApplicationListenerCertificateProps)
```

Java:

```java
new ApplicationListenerCertificate(Construct scope, String id, ApplicationListenerCertificateProps props)
```

C# / .NET:

```csharp
new ApplicationListenerCertificate(Construct scope, string id, ApplicationListenerCertificateProps props)
```

Golang:

```go
NewApplicationListenerCertificate(Scope Construct, Id *string, Props ApplicationListenerCertificateProps)
```

## Construct Props

- `certificates`: [IListenerCertificate](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.IListenerCertificate.html)[] — Certificates to attach.

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

  Duplicates are not allowed.

- `listener`: [IListenerRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_elasticloadbalancingv2.IListenerRef.html) (required) — The listener to attach the rule to.

## Properties

- `node`: [Node](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Node.html) — The tree node.

## Methods

- `isConstruct(x: any): boolean` (static) — Checks if `x` is a construct.

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

  - `x` — Any object.

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

- `toString(): string` — Returns a string representation of this construct.

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

  **Parameters**

  - `mixins` — The mixins to apply.

  **Returns:** This construct for chaining
