# ViewerMtlsConfigProperty

A viewer mTLS configuration.

- Source: Generated at build time
- Type last changed: v2.230.0 · 26 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';
const viewerMtlsConfigProperty: cloudfront.CfnDistribution.ViewerMtlsConfigProperty = {
  mode: 'mode',
  trustStoreConfig: {
    trustStoreId: 'trustStoreId',

    // the properties below are optional
    advertiseTrustStoreCaNames: false,
    ignoreCertificateExpiry: false,
  },
};
```

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_cloudfront as cloudfront

viewer_mtls_config_property = cloudfront.CfnDistribution.ViewerMtlsConfigProperty(
    mode="mode",
    trust_store_config=cloudfront.CfnDistribution.TrustStoreConfigProperty(
        trust_store_id="trustStoreId",

        # the properties below are optional
        advertise_trust_store_ca_names=False,
        ignore_certificate_expiry=False
    )
)
```

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.cloudfront.*;

ViewerMtlsConfigProperty viewerMtlsConfigProperty = ViewerMtlsConfigProperty.builder()
        .mode("mode")
        .trustStoreConfig(TrustStoreConfigProperty.builder()
                .trustStoreId("trustStoreId")

                // the properties below are optional
                .advertiseTrustStoreCaNames(false)
                .ignoreCertificateExpiry(false)
                .build())
        .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.CloudFront;

var viewerMtlsConfigProperty = new ViewerMtlsConfigProperty {
    Mode = "mode",
    TrustStoreConfig = new TrustStoreConfigProperty {
        TrustStoreId = "trustStoreId",

        // the properties below are optional
        AdvertiseTrustStoreCaNames = false,
        IgnoreCertificateExpiry = false
    }
};
```

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"

viewerMtlsConfigProperty := &ViewerMtlsConfigProperty{
	Mode: jsii.String("mode"),
	TrustStoreConfig: &TrustStoreConfigProperty{
		TrustStoreId: jsii.String("trustStoreId"),

		// the properties below are optional
		AdvertiseTrustStoreCaNames: jsii.Boolean(false),
		IgnoreCertificateExpiry: jsii.Boolean(false),
	},
}
```

## Properties

- `mode`: string — The viewer mTLS mode.

- `trustStoreConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDistribution.TrustStoreConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.CfnDistribution.TrustStoreConfigProperty.html) — The trust store configuration associated with the viewer mTLS configuration.
