UNPKG

2.37 kBTypeScriptView Raw
1import * as iam from '@aws-cdk/aws-iam';
2import * as cdk from '@aws-cdk/core';
3import { Construct } from 'constructs';
4/**
5 * Properties of CloudFront OriginAccessIdentity
6 */
7export interface OriginAccessIdentityProps {
8 /**
9 * Any comments you want to include about the origin access identity.
10 *
11 * @default "Allows CloudFront to reach the bucket"
12 */
13 readonly comment?: string;
14}
15/**
16 * Interface for CloudFront OriginAccessIdentity
17 */
18export interface IOriginAccessIdentity extends cdk.IResource, iam.IGrantable {
19 /**
20 * The Origin Access Identity Name
21 */
22 readonly originAccessIdentityName: string;
23}
24declare abstract class OriginAccessIdentityBase extends cdk.Resource {
25 /**
26 * The Origin Access Identity Name (physical id)
27 */
28 abstract readonly originAccessIdentityName: string;
29 /**
30 * Derived principal value for bucket access
31 */
32 abstract readonly grantPrincipal: iam.IPrincipal;
33 /**
34 * The ARN to include in S3 bucket policy to allow CloudFront access
35 */
36 protected arn(): string;
37}
38/**
39 * An origin access identity is a special CloudFront user that you can
40 * associate with Amazon S3 origins, so that you can secure all or just some of
41 * your Amazon S3 content.
42 *
43 * @resource AWS::CloudFront::CloudFrontOriginAccessIdentity
44 */
45export declare class OriginAccessIdentity extends OriginAccessIdentityBase implements IOriginAccessIdentity {
46 /**
47 * Creates a OriginAccessIdentity by providing the OriginAccessIdentityName
48 */
49 static fromOriginAccessIdentityName(scope: Construct, id: string, originAccessIdentityName: string): IOriginAccessIdentity;
50 /**
51 * The Amazon S3 canonical user ID for the origin access identity, used when
52 * giving the origin access identity read permission to an object in Amazon
53 * S3.
54 *
55 * @attribute
56 */
57 readonly cloudFrontOriginAccessIdentityS3CanonicalUserId: string;
58 /**
59 * Derived principal value for bucket access
60 */
61 readonly grantPrincipal: iam.IPrincipal;
62 /**
63 * The Origin Access Identity Name (physical id)
64 *
65 * @attribute
66 */
67 readonly originAccessIdentityName: string;
68 /**
69 * CDK L1 resource
70 */
71 private readonly resource;
72 constructor(scope: Construct, id: string, props?: OriginAccessIdentityProps);
73}
74export {};