UNPKG

1.26 kBTypeScriptView Raw
1import { IConstruct } from 'constructs';
2import { PolicyStatement } from './policy-statement';
3import { AddToPrincipalPolicyResult, IPrincipal, PrincipalPolicyFragment } from './principals';
4/**
5 * Properties for an UnknownPrincipal
6 */
7export interface UnknownPrincipalProps {
8 /**
9 * The resource the role proxy is for
10 */
11 readonly resource: IConstruct;
12}
13/**
14 * A principal for use in resources that need to have a role but it's unknown
15 *
16 * Some resources have roles associated with them which they assume, such as
17 * Lambda Functions, CodeBuild projects, StepFunctions machines, etc.
18 *
19 * When those resources are imported, their actual roles are not always
20 * imported with them. When that happens, we use an instance of this class
21 * instead, which will add user warnings when statements are attempted to be
22 * added to it.
23 */
24export declare class UnknownPrincipal implements IPrincipal {
25 readonly assumeRoleAction: string;
26 readonly grantPrincipal: IPrincipal;
27 private readonly resource;
28 constructor(props: UnknownPrincipalProps);
29 get policyFragment(): PrincipalPolicyFragment;
30 addToPrincipalPolicy(statement: PolicyStatement): AddToPrincipalPolicyResult;
31 addToPolicy(statement: PolicyStatement): boolean;
32}