UNPKG

1.52 kBTypeScriptView Raw
1import { IResource, Resource } from '@aws-cdk/core';
2import { Construct } from 'constructs';
3/**
4 * Represents a Public Key
5 */
6export interface IPublicKey extends IResource {
7 /**
8 * The ID of the key group.
9 * @attribute
10 */
11 readonly publicKeyId: string;
12}
13/**
14 * Properties for creating a Public Key
15 */
16export interface PublicKeyProps {
17 /**
18 * A name to identify the public key.
19 * @default - generated from the `id`
20 */
21 readonly publicKeyName?: string;
22 /**
23 * A comment to describe the public key.
24 * @default - no comment
25 */
26 readonly comment?: string;
27 /**
28 * The public key that you can use with signed URLs and signed cookies, or with field-level encryption.
29 * The `encodedKey` parameter must include `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----` lines.
30 * @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html
31 * @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html
32 */
33 readonly encodedKey: string;
34}
35/**
36 * A Public Key Configuration
37 *
38 * @resource AWS::CloudFront::PublicKey
39 */
40export declare class PublicKey extends Resource implements IPublicKey {
41 /** Imports a Public Key from its id. */
42 static fromPublicKeyId(scope: Construct, id: string, publicKeyId: string): IPublicKey;
43 readonly publicKeyId: string;
44 constructor(scope: Construct, id: string, props: PublicKeyProps);
45 private generateName;
46}