UNPKG

1.18 kBTypeScriptView Raw
1import * as cdk from '@aws-cdk/core';
2/**
3 * A Token postprocesser for policy documents
4 *
5 * Removes duplicate statements, merges statements, and assign Sids if necessary
6 *
7 * Because policy documents can contain all kinds of crazy things,
8 * we do all the necessary work here after the document has been mostly resolved
9 * into a predictable CloudFormation form.
10 */
11export declare class PostProcessPolicyDocument implements cdk.IPostProcessor {
12 private readonly autoAssignSids;
13 private readonly minimize;
14 constructor(autoAssignSids: boolean, minimize: boolean);
15 postProcess(input: any, _context: cdk.IResolveContext): any;
16}
17export declare type IamValue = string | Record<string, any> | Array<string | Record<string, any>>;
18export interface StatementSchema {
19 readonly Sid?: string;
20 readonly Effect?: string;
21 readonly Principal?: Record<string, IamValue>;
22 readonly NotPrincipal?: Record<string, IamValue>;
23 readonly Resource?: IamValue;
24 readonly NotResource?: IamValue;
25 readonly Action?: IamValue;
26 readonly NotAction?: IamValue;
27 readonly Condition?: unknown;
28}
29export declare function normalizeStatement(s: StatementSchema): any;