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.127.0 (build 2117ad5)",
date="2026-04-02T21:55:20.226Z")
@Stability(Stable)
public class TopicGrants
extends software.amazon.jsii.JsiiObject
Collection of grant methods for a ITopicRef.
Example:
Topic topic = new Topic(this, "Topic"); // This would work the same way if topic was a CfnTopic (L1) TopicGrants.fromTopic(topic).subscribe(new AnyPrincipal());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTopicGrants(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedTopicGrants(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionactions(IGrantable grantee, List<String> actions) Grant the given identity custom permissions.actions(IGrantable grantee, List<String> actions, EncryptedPermissionsOptions options) Grant the given identity custom permissions.static TopicGrantsCreates grants for TopicGrants.protected IEncryptedResourceprotected IResourceWithPolicyV2protected ITopicRefpublish(IGrantable grantee) Grant topic publishing permissions to the given identity.subscribe(IGrantable grantee) 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, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
Creates grants for TopicGrants.- Parameters:
resource- This parameter is required.
-
actions
@Stability(Stable) @NotNull public Grant actions(@NotNull IGrantable grantee, @NotNull List<String> actions, @Nullable EncryptedPermissionsOptions options) Grant the given identity custom permissions.- Parameters:
grantee- This parameter is required.actions- This parameter is required.options-
-
actions
@Stability(Stable) @NotNull public Grant actions(@NotNull IGrantable grantee, @NotNull List<String> actions) Grant the given identity custom permissions.- Parameters:
grantee- This parameter is required.actions- This parameter is required.
-
publish
Grant topic publishing permissions to the given identity.- Parameters:
grantee- This parameter is required.
-
subscribe
Grant topic subscribing permissions to the given identity.- Parameters:
grantee- This parameter is required.
-
getResource
-
getEncryptedResource
-
getPolicyResource
-