UNPKG

1.01 kBTypeScriptView Raw
1import { IConstruct } from 'constructs';
2import { IManagedPolicy } from './managed-policy';
3/**
4 * Modify the Permissions Boundaries of Users and Roles in a construct tree
5 *
6 * ```ts
7 * const policy = iam.ManagedPolicy.fromAwsManagedPolicyName('ReadOnlyAccess');
8 * iam.PermissionsBoundary.of(this).apply(policy);
9 * ```
10 */
11export declare class PermissionsBoundary {
12 private readonly scope;
13 /**
14 * Access the Permissions Boundaries of a construct tree
15 */
16 static of(scope: IConstruct): PermissionsBoundary;
17 private constructor();
18 /**
19 * Apply the given policy as Permissions Boundary to all Roles and Users in
20 * the scope.
21 *
22 * Will override any Permissions Boundaries configured previously; in case
23 * a Permission Boundary is applied in multiple scopes, the Boundary applied
24 * closest to the Role wins.
25 */
26 apply(boundaryPolicy: IManagedPolicy): void;
27 /**
28 * Remove previously applied Permissions Boundaries
29 */
30 clear(): void;
31}