Interface TopicPolicyProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
TopicPolicyProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:38.202Z")
@Stability(Stable)
public interface TopicPolicyProps
extends software.amazon.jsii.JsiiSerializable
Properties to associate SNS topics with a policy.
Example:
Topic topic = new Topic(this, "Topic");
TopicPolicy topicPolicy = TopicPolicy.Builder.create(this, "TopicPolicy")
.topics(List.of(topic))
.build();
topicPolicy.document.addStatements(PolicyStatement.Builder.create()
.actions(List.of("sns:Subscribe"))
.principals(List.of(new AnyPrincipal()))
.resources(List.of(topic.getTopicArn()))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forTopicPolicyPropsstatic final classAn implementation forTopicPolicyProps -
Method Summary
Modifier and TypeMethodDescriptionstatic TopicPolicyProps.Builderbuilder()default PolicyDocumentIAM policy document to apply to topic(s).The set of topics this policy applies to.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getTopics
The set of topics this policy applies to. -
getPolicyDocument
IAM policy document to apply to topic(s).Default: empty policy document
-
builder
- Returns:
- a
TopicPolicyProps.BuilderofTopicPolicyProps
-