Interface TopicPolicyProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
TopicPolicyProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-25T14:21:24.051Z")
@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"); PolicyDocument policyDocument = PolicyDocument.Builder.create() .assignSids(true) .statements(List.of( PolicyStatement.Builder.create() .actions(List.of("sns:Subscribe")) .principals(List.of(new AnyPrincipal())) .resources(List.of(topic.getTopicArn())) .build())) .build(); TopicPolicy topicPolicy = TopicPolicy.Builder.create(this, "Policy") .topics(List.of(topic)) .policyDocument(policyDocument) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forTopicPolicyProps
static final class
An implementation forTopicPolicyProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic TopicPolicyProps.Builder
builder()
default Boolean
Adds a statement to enforce encryption of data in transit when publishing to the topic.default PolicyDocument
IAM 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. -
getEnforceSSL
Adds a statement to enforce encryption of data in transit when publishing to the topic.For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit.
Default: false
-
getPolicyDocument
IAM policy document to apply to topic(s).Default: empty policy document
-
builder
- Returns:
- a
TopicPolicyProps.Builder
ofTopicPolicyProps
-