Class RoleGrants

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

@Generated(value="jsii-pacmak/1.125.0 (build fdbe357)", date="2026-01-19T12:03:55.639Z") @Stability(Stable) public class RoleGrants extends software.amazon.jsii.JsiiObject
Collection of grant methods for a IRoleRef.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.iam.*;
 import software.amazon.awscdk.interfaces.iam.*;
 IRoleRef roleRef;
 RoleGrants roleGrants = RoleGrants.fromRole(roleRef);
 
  • 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
    RoleGrants(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    RoleGrants(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Grant permissions to the given principal to assume this role.
    static RoleGrants
    Creates grants for IRoleRef.
    passRole(IPrincipal identity)
    Grant permissions to the given principal to pass this role.

    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

    • RoleGrants

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

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

    • fromRole

      @Stability(Stable) @NotNull public static RoleGrants fromRole(@NotNull IRoleRef role)
      Creates grants for IRoleRef.

      Parameters:
      role - This parameter is required.
    • assumeRole

      @Stability(Stable) @NotNull public Grant assumeRole(@NotNull IPrincipal identity)
      Grant permissions to the given principal to assume this role.

      Parameters:
      identity - This parameter is required.
    • passRole

      @Stability(Stable) @NotNull public Grant passRole(@NotNull IPrincipal identity)
      Grant permissions to the given principal to pass this role.

      Parameters:
      identity - This parameter is required.