Skip to content
v2.274.0

PermissionsBoundary Class ​

Modify the Permissions Boundaries of Users and Roles in a construct tree.

ts
const policy = iam.ManagedPolicy.fromAwsManagedPolicyName('ReadOnlyAccess');
iam.PermissionsBoundary.of(this).apply(policy);

Example ​

ts
declare const project: codebuild.Project;
iam.PermissionsBoundary.of(project).apply(new codebuild.UntrustedCodeBoundaryPolicy(this, 'Boundary'));

Methods ​

apply(boundaryPolicy: IManagedPolicy): voiddef apply(self, boundary_policy: IManagedPolicy) -> Nonepublic void apply(IManagedPolicy boundaryPolicy)public void Apply(IManagedPolicy boundaryPolicy)func Apply(BoundaryPolicy IManagedPolicy)#
Apply the given policy as Permissions Boundary to all Roles and Users in the scope.

Will override any Permissions Boundaries configured previously; in case a Permission Boundary is applied in multiple scopes, the Boundary applied closest to the Role wins.

clear(): voiddef clear(self, ) -> Nonepublic void clear()public void Clear()func Clear()#
Remove previously applied Permissions Boundaries.
of(scope: IConstruct): PermissionsBoundary // chainable@staticmethod def of(scope: IConstruct) -> PermissionsBoundarypublic static PermissionsBoundary of(IConstruct scope)public static PermissionsBoundary Of(IConstruct scope)func Of(Scope IConstruct) PermissionsBoundarystatic#
Access the Permissions Boundaries of a construct tree.