Class PermissionsBoundary

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.iam.PermissionsBoundary
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:08.171Z") @Stability(Stable) public class PermissionsBoundary extends software.amazon.jsii.JsiiObject
Modify the Permissions Boundaries of Users and Roles in a construct tree.

 IManagedPolicy policy = ManagedPolicy.fromAwsManagedPolicyName("ReadOnlyAccess");
 PermissionsBoundary.of(this).apply(policy);
 

Example:

 Project project;
 PermissionsBoundary.of(project).apply(new UntrustedCodeBoundaryPolicy(this, "Boundary"));
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    PermissionsBoundary(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    PermissionsBoundary(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(IManagedPolicy boundaryPolicy)
    Apply the given policy as Permissions Boundary to all Roles and Users in the scope.
    void
    Remove previously applied Permissions Boundaries.
    of(software.constructs.IConstruct scope)
    Access the Permissions Boundaries of a construct tree.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • PermissionsBoundary

      protected PermissionsBoundary(software.amazon.jsii.JsiiObjectRef objRef)
    • PermissionsBoundary

      protected PermissionsBoundary(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • of

      @Stability(Stable) @NotNull public static PermissionsBoundary of(@NotNull software.constructs.IConstruct scope)
      Access the Permissions Boundaries of a construct tree.

      Parameters:
      scope - This parameter is required.
    • apply

      @Stability(Stable) public void apply(@NotNull IManagedPolicy boundaryPolicy)
      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.

      Parameters:
      boundaryPolicy - This parameter is required.
    • clear

      @Stability(Stable) public void clear()
      Remove previously applied Permissions Boundaries.