1 | import { IResource } from '@aws-cdk/core';
|
2 | import { IManagedPolicy } from './managed-policy';
|
3 | import { Policy } from './policy';
|
4 | import { IPrincipal } from './principals';
|
5 | /**
|
6 | * A construct that represents an IAM principal, such as a user, group or role.
|
7 | */
|
8 | export interface IIdentity extends IPrincipal, IResource {
|
9 | /**
|
10 | * Attaches an inline policy to this principal.
|
11 | * This is the same as calling `policy.addToXxx(principal)`.
|
12 | * @param policy The policy resource to attach to this principal [disable-awslint:ref-via-interface]
|
13 | */
|
14 | attachInlinePolicy(policy: Policy): void;
|
15 | /**
|
16 | * Attaches a managed policy to this principal.
|
17 | * @param policy The managed policy
|
18 | */
|
19 | addManagedPolicy(policy: IManagedPolicy): void;
|
20 | }
|