Interface SubscriptionOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
SubscriptionProps, TopicSubscriptionConfig
All Known Implementing Classes:
SubscriptionOptions.Jsii$Proxy, SubscriptionProps.Jsii$Proxy, TopicSubscriptionConfig.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:38.194Z") @Stability(Stable) public interface SubscriptionOptions extends software.amazon.jsii.JsiiSerializable
Options for creating a new subscription.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.sns.*;
 import software.amazon.awscdk.services.sqs.*;
 Queue queue;
 SubscriptionFilter subscriptionFilter;
 SubscriptionOptions subscriptionOptions = SubscriptionOptions.builder()
         .endpoint("endpoint")
         .protocol(SubscriptionProtocol.HTTP)
         // the properties below are optional
         .deadLetterQueue(queue)
         .filterPolicy(Map.of(
                 "filterPolicyKey", subscriptionFilter))
         .rawMessageDelivery(false)
         .region("region")
         .subscriptionRoleArn("subscriptionRoleArn")
         .build();
 
  • Method Details

    • getEndpoint

      @Stability(Stable) @NotNull String getEndpoint()
      The subscription endpoint.

      The meaning of this value depends on the value for 'protocol'.

    • getProtocol

      @Stability(Stable) @NotNull SubscriptionProtocol getProtocol()
      What type of subscription to add.
    • getDeadLetterQueue

      @Stability(Stable) @Nullable default IQueue getDeadLetterQueue()
      Queue to be used as dead letter queue.

      If not passed no dead letter queue is enabled.

      Default: - No dead letter queue enabled.

    • getFilterPolicy

      @Stability(Stable) @Nullable default Map<String,SubscriptionFilter> getFilterPolicy()
      The filter policy.

      Default: - all messages are delivered

    • getRawMessageDelivery

      @Stability(Stable) @Nullable default Boolean getRawMessageDelivery()
      true if raw message delivery is enabled for the subscription.

      Raw messages are free of JSON formatting and can be sent to HTTP/S and Amazon SQS endpoints. For more information, see GetSubscriptionAttributes in the Amazon Simple Notification Service API Reference.

      Default: false

    • getRegion

      @Stability(Stable) @Nullable default String getRegion()
      The region where the topic resides, in the case of cross-region subscriptions.

      Default: - the region where the CloudFormation stack is being deployed.

    • getSubscriptionRoleArn

      @Stability(Stable) @Nullable default String getSubscriptionRoleArn()
      Arn of role allowing access to firehose delivery stream.

      Required for a firehose subscription protocol.

      Default: - No subscription role is provided

    • builder

      @Stability(Stable) static SubscriptionOptions.Builder builder()
      Returns:
      a SubscriptionOptions.Builder of SubscriptionOptions