Class TopicPolicy.Builder
java.lang.Object
software.amazon.awscdk.services.sns.TopicPolicy.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<TopicPolicy>
- Enclosing class:
TopicPolicy
@Stability(Stable)
public static final class TopicPolicy.Builder
extends Object
implements software.amazon.jsii.Builder<TopicPolicy>
A fluent builder for
TopicPolicy
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static TopicPolicy.Builder
enforceSsl
(Boolean enforceSsl) Adds a statement to enforce encryption of data in transit when publishing to the topic.policyDocument
(PolicyDocument policyDocument) IAM policy document to apply to topic(s).The set of topics this policy applies to.
-
Method Details
-
create
@Stability(Stable) public static TopicPolicy.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
TopicPolicy.Builder
.
-
topics
The set of topics this policy applies to.- Parameters:
topics
- The set of topics this policy applies to. This parameter is required.- Returns:
this
-
enforceSsl
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
- Parameters:
enforceSsl
- Adds a statement to enforce encryption of data in transit when publishing to the topic. This parameter is required.- Returns:
this
-
policyDocument
IAM policy document to apply to topic(s).Default: empty policy document
- Parameters:
policyDocument
- IAM policy document to apply to topic(s). This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<TopicPolicy>
- Returns:
- a newly built instance of
TopicPolicy
.
-