Class PermissionsBoundary
Modify the Permissions Boundaries of Users and Roles in a construct tree.
public class PermissionsBoundary : DeputyBase
- Inheritance
-
PermissionsBoundary
Examples
Project project;
PermissionsBoundary.Of(project).Apply(new UntrustedCodeBoundaryPolicy(this, "Boundary"));
Remarks
var policy = ManagedPolicy.FromAwsManagedPolicyName("ReadOnlyAccess");
PermissionsBoundary.Of(this).Apply(policy);
ExampleMetadata: infused
Methods
Apply(IManagedPolicy)
Apply the given policy as Permissions Boundary to all Roles and Users in the scope.
public virtual void Apply(IManagedPolicy boundaryPolicy)
Parameters
boundaryPolicy
IManagedPolicy
Remarks
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()
Remove previously applied Permissions Boundaries.
public virtual void Clear()
Of(IConstruct)
Access the Permissions Boundaries of a construct tree.
public static PermissionsBoundary Of(IConstruct scope)
Parameters
scope
IConstruct