Class AnyPrincipal

All Implemented Interfaces:
IAssumeRolePrincipal, IComparablePrincipal, IGrantable, IPrincipal,
Direct Known Subclasses:

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:57.222Z") @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