# EncryptionEntityProperty

A public key, its provider identity, and the field patterns CloudFront encrypts with that key.

- Source: Generated at build time
- Type last changed: v2.272.0 · 30 Sep 2026

## 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 encryptionEntityProperty: cloudfront.CfnFieldLevelEncryptionProfile.EncryptionEntityProperty = {
  fieldPatterns: ['fieldPatterns'],
  providerId: 'providerId',
  publicKeyId: 'publicKeyId',
};
```

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

encryption_entity_property = cloudfront.CfnFieldLevelEncryptionProfile.EncryptionEntityProperty(
    field_patterns=["fieldPatterns"],
    provider_id="providerId",
    public_key_id="publicKeyId"
)
```

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

EncryptionEntityProperty encryptionEntityProperty = EncryptionEntityProperty.builder()
        .fieldPatterns(List.of("fieldPatterns"))
        .providerId("providerId")
        .publicKeyId("publicKeyId")
        .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 encryptionEntityProperty = new EncryptionEntityProperty {
    FieldPatterns = new [] { "fieldPatterns" },
    ProviderId = "providerId",
    PublicKeyId = "publicKeyId"
};
```

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"

encryptionEntityProperty := &EncryptionEntityProperty{
	FieldPatterns: []*string{
		jsii.String("fieldPatterns"),
	},
	ProviderId: jsii.String("providerId"),
	PublicKeyId: jsii.String("publicKeyId"),
}
```

## Properties

- `fieldPatterns`: string[] (required) — The request-body field names to encrypt.

  A pattern is either a full field name or leading characters followed by a wildcard (*). Patterns are case-sensitive and must not overlap.

- `providerId`: string (required) — The provider associated with the public key.

  The same value must be supplied with the private key for an application to decrypt the data.

- `publicKeyId`: string (required) — The identifier of the CloudFront public key used to encrypt the fields that match the patterns.
