Interface UrlSubscriptionProps

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:09.920Z") @Stability(Stable) public interface UrlSubscriptionProps extends software.amazon.jsii.JsiiSerializable, SubscriptionProps
Options for URL subscriptions.

Example:

 Topic myTopic = new Topic(this, "MyTopic");
 myTopic.addSubscription(
 UrlSubscription.Builder.create("https://foobar.com/")
         .deliveryPolicy(DeliveryPolicy.builder()
                 .healthyRetryPolicy(HealthyRetryPolicy.builder()
                         .minDelayTarget(Duration.seconds(5))
                         .maxDelayTarget(Duration.seconds(10))
                         .numRetries(6)
                         .backoffFunction(BackoffFunction.EXPONENTIAL)
                         .build())
                 .throttlePolicy(ThrottlePolicy.builder()
                         .maxReceivesPerSecond(10)
                         .build())
                 .requestPolicy(RequestPolicy.builder()
                         .headerContentType("application/json")
                         .build())
                 .build())
         .build());
 
  • Method Details

    • getDeliveryPolicy

      @Stability(Stable) @Nullable default DeliveryPolicy getDeliveryPolicy()
      The delivery policy.

      Default: - if the initial delivery of the message fails, three retries with a delay between failed attempts set at 20 seconds

    • getProtocol

      @Stability(Stable) @Nullable default SubscriptionProtocol getProtocol()
      The subscription's protocol.

      Default: - Protocol is derived from url

    • getRawMessageDelivery

      @Stability(Stable) @Nullable default Boolean getRawMessageDelivery()
      The message to the queue is the same as it was sent to the topic.

      If false, the message will be wrapped in an SNS envelope.

      Default: false

    • builder

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