Interface FromRoleArnOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
FromRoleNameOptions
All Known Implementing Classes:
FromRoleArnOptions.Jsii$Proxy, FromRoleNameOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:18.075Z") @Stability(Stable) public interface FromRoleArnOptions extends software.amazon.jsii.JsiiSerializable
Options allowing customizing the behavior of Role.fromRoleArn.

Example:

 IRole role = Role.fromRoleArn(this, "Role", "arn:aws:iam::123456789012:role/MyExistingRole", FromRoleArnOptions.builder()
         // Set 'mutable' to 'false' to use the role as-is and prevent adding new
         // policies to it. The default is 'true', which means the role may be
         // modified as part of the deployment.
         .mutable(false)
         .build());
 
  • Method Details

    • getAddGrantsToResources

      @Stability(Stable) @Nullable default Boolean getAddGrantsToResources()
      For immutable roles: add grants to resources instead of dropping them.

      If this is false or not specified, grant permissions added to this role are ignored. It is your own responsibility to make sure the role has the required permissions.

      If this is true, any grant permissions will be added to the resource instead.

      Default: false

    • getDefaultPolicyName

      @Stability(Stable) @Nullable default String getDefaultPolicyName()
      Any policies created by this role will use this value as their ID, if specified.

      Specify this if importing the same role in multiple stacks, and granting it different permissions in at least two stacks. If this is not specified (or if the same name is specified in more than one stack), a CloudFormation issue will result in the policy created in whichever stack is deployed last overwriting the policies created by the others.

      Default: 'Policy'

    • getMutable

      @Stability(Stable) @Nullable default Boolean getMutable()
      Whether the imported role can be modified by attaching policy resources to it.

      Default: true

    • builder

      @Stability(Stable) static FromRoleArnOptions.Builder builder()
      Returns:
      a FromRoleArnOptions.Builder of FromRoleArnOptions