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 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

      @Stability(Stable) public TopicPolicy.Builder topics(List<? extends ITopic> 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

      @Stability(Stable) public TopicPolicy.Builder enforceSsl(Boolean 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

      @Stability(Stable) public TopicPolicy.Builder policyDocument(PolicyDocument 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

      @Stability(Stable) public TopicPolicy build()
      Specified by:
      build in interface software.amazon.jsii.Builder<TopicPolicy>
      Returns:
      a newly built instance of TopicPolicy.