interface PublicKeyProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CloudFront.PublicKeyProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#PublicKeyProps |
Java | software.amazon.awscdk.services.cloudfront.PublicKeyProps |
Python | aws_cdk.aws_cloudfront.PublicKeyProps |
TypeScript (source) | aws-cdk-lib » aws_cloudfront » PublicKeyProps |
Properties for creating a Public Key.
Example
// Validating signed URLs or signed cookies with Trusted Key Groups
// public key in PEM format
declare const publicKey: string;
const pubKey = new cloudfront.PublicKey(this, 'MyPubKey', {
encodedKey: publicKey,
});
const keyGroup = new cloudfront.KeyGroup(this, 'MyKeyGroup', {
items: [
pubKey,
],
});
new cloudfront.Distribution(this, 'Dist', {
defaultBehavior: {
origin: new origins.HttpOrigin('www.example.com'),
trustedKeyGroups: [
keyGroup,
],
},
});
Properties
Name | Type | Description |
---|---|---|
encoded | string | The public key that you can use with signed URLs and signed cookies, or with field-level encryption. |
comment? | string | A comment to describe the public key. |
public | string | A name to identify the public key. |
encodedKey
Type:
string
The public key that you can use with signed URLs and signed cookies, or with field-level encryption.
The encodedKey
parameter must include -----BEGIN PUBLIC KEY-----
and -----END PUBLIC KEY-----
lines.
comment?
Type:
string
(optional, default: no comment)
A comment to describe the public key.
publicKeyName?
Type:
string
(optional, default: generated from the id
)
A name to identify the public key.