# PublicKeyConfigProperty

Configuration information about a public key that you can use with [signed URLs and signed cookies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) , or with [field-level encryption](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html) .

CloudFront supports signed URLs and signed cookies with RSA 2048 or ECDSA 256 key signatures. Field-level encryption is only compatible with RSA 2048 key signatures.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## 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 publicKeyConfigProperty: cloudfront.CfnPublicKey.PublicKeyConfigProperty = {
  callerReference: 'callerReference',
  encodedKey: 'encodedKey',
  name: 'name',

  // the properties below are optional
  comment: 'comment',
};
```

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

public_key_config_property = cloudfront.CfnPublicKey.PublicKeyConfigProperty(
    caller_reference="callerReference",
    encoded_key="encodedKey",
    name="name",

    # the properties below are optional
    comment="comment"
)
```

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

PublicKeyConfigProperty publicKeyConfigProperty = PublicKeyConfigProperty.builder()
        .callerReference("callerReference")
        .encodedKey("encodedKey")
        .name("name")

        // the properties below are optional
        .comment("comment")
        .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 publicKeyConfigProperty = new PublicKeyConfigProperty {
    CallerReference = "callerReference",
    EncodedKey = "encodedKey",
    Name = "name",

    // the properties below are optional
    Comment = "comment"
};
```

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"

publicKeyConfigProperty := &PublicKeyConfigProperty{
	CallerReference: jsii.String("callerReference"),
	EncodedKey: jsii.String("encodedKey"),
	Name: jsii.String("name"),

	// the properties below are optional
	Comment: jsii.String("comment"),
}
```

## Properties

- `callerReference`: string (required) — A string included in the request to help make sure that the request can't be replayed.

- `comment`: string — A comment to describe the public key.

  The comment cannot be longer than 128 characters.

- `encodedKey`: string (required) — The public key that you can use with [signed URLs and signed cookies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) , or with [field-level encryption](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html) .

- `name`: string (required) — A name to help identify the public key.
