Class AnyPrincipal

All Implemented Interfaces:
IAssumeRolePrincipal, IComparablePrincipal, IGrantable, IPrincipal,

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:19.822Z") @Stability(Stable) public class AnyPrincipal extends ArnPrincipal
A principal representing all AWS identities in all accounts.

Some services behave differently when you specify Principal: '*' or Principal: { AWS: "*" } in their resource policy.

AnyPrincipal renders to Principal: { AWS: "*" }. This is correct most of the time, but in cases where you need the other principal, use StarPrincipal instead.


 Topic topic = new Topic(this, "Topic");
 TopicPolicy topicPolicy = TopicPolicy.Builder.create(this, "TopicPolicy")
         .principals(List.of(new AnyPrincipal()))
  • Constructor Details

    • AnyPrincipal

      protected AnyPrincipal( objRef)
    • AnyPrincipal

      protected AnyPrincipal( initializationMode)
    • AnyPrincipal

      @Stability(Stable) public AnyPrincipal()
  • Method Details

    • toString

      @Stability(Stable) @NotNull public String toString()
      Returns a string representation of an object.
      toString in class ArnPrincipal