Interface IIdentity

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IDependable, IGrantable, IPrincipal, IResource, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
IGroup, IGroup.Jsii$Default, IIdentity.Jsii$Default, IRole, IRole.Jsii$Default, IUser, IUser.Jsii$Default
All Known Implementing Classes:
Group, IGroup.Jsii$Proxy, IIdentity.Jsii$Proxy, IRole.Jsii$Proxy, IUser.Jsii$Proxy, LazyRole, Role, User

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-24T02:42:39.121Z") @Stability(Stable) public interface IIdentity extends software.amazon.jsii.JsiiSerializable, IPrincipal, IResource
A construct that represents an IAM principal, such as a user, group or role.
  • Method Details

    • addManagedPolicy

      @Stability(Stable) void addManagedPolicy(@NotNull IManagedPolicy policy)
      Attaches a managed policy to this principal.

      Parameters:
      policy - The managed policy. This parameter is required.
    • attachInlinePolicy

      @Stability(Stable) void attachInlinePolicy(@NotNull Policy policy)
      Attaches an inline policy to this principal.

      This is the same as calling policy.addToXxx(principal).

      Parameters:
      policy - The policy resource to attach to this principal [disable-awslint:ref-via-interface]. This parameter is required.