Class TopicGrants

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.sns.TopicGrants
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)", date="2025-11-20T23:37:30.644Z") @Stability(Stable) public class TopicGrants extends software.amazon.jsii.JsiiObject
Collection of grant methods for a ITopicRef.

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.sns.*;
 import software.amazon.awscdk.interfaces.sns.*;
 ITopicRef topicRef;
 TopicGrants topicGrants = TopicGrants.fromTopic(topicRef);
 
  • 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
    TopicGrants(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    TopicGrants(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fromTopic(ITopicRef resource)
    Creates grants for TopicGrants.
     
     
    protected ITopicRef
     
    Grant topic publishing permissions to the given identity.
    Grant topic subscribing permissions to the given identity.

    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

    • TopicGrants

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

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

    • fromTopic

      @Stability(Stable) @NotNull public static TopicGrants fromTopic(@NotNull ITopicRef resource)
      Creates grants for TopicGrants.

      Parameters:
      resource - This parameter is required.
    • publish

      @Stability(Stable) @NotNull public Grant publish(@NotNull IGrantable grantee)
      Grant topic publishing permissions to the given identity.

      Parameters:
      grantee - This parameter is required.
    • subscribe

      @Stability(Stable) @NotNull public Grant subscribe(@NotNull IGrantable grantee)
      Grant topic subscribing permissions to the given identity.

      Parameters:
      grantee - This parameter is required.
    • getResource

      @Stability(Stable) @NotNull protected ITopicRef getResource()
    • getEncryptedResource

      @Stability(Stable) @Nullable protected IEncryptedResource getEncryptedResource()
    • getPolicyResource

      @Stability(Stable) @Nullable protected IResourceWithPolicyV2 getPolicyResource()