Class: AWSCDK::SNS::DeliveryPolicy
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SNS::DeliveryPolicy
- Defined in:
- sns/delivery_policy.rb
Overview
Options for customising the delivery of SNS messages to HTTP/S endpoints.
Instance Attribute Summary collapse
-
#healthy_retry_policy ⇒ AWSCDK::SNS::HealthyRetryPolicy?
readonly
The retry policy of the delivery of SNS messages to HTTP/S endpoints.
-
#request_policy ⇒ AWSCDK::SNS::RequestPolicy?
readonly
The request of the content sent in AWS SNS HTTP/S requests.
-
#throttle_policy ⇒ AWSCDK::SNS::ThrottlePolicy?
readonly
The throttling policy of the delivery of SNS messages to HTTP/S endpoints.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(healthy_retry_policy: nil, request_policy: nil, throttle_policy: nil) ⇒ DeliveryPolicy
constructor
A new instance of DeliveryPolicy.
- #to_jsii ⇒ Object
Constructor Details
#initialize(healthy_retry_policy: nil, request_policy: nil, throttle_policy: nil) ⇒ DeliveryPolicy
Returns a new instance of DeliveryPolicy.
10 11 12 13 14 15 16 17 |
# File 'sns/delivery_policy.rb', line 10 def initialize(healthy_retry_policy: nil, request_policy: nil, throttle_policy: nil) @healthy_retry_policy = healthy_retry_policy.is_a?(Hash) ? ::AWSCDK::SNS::HealthyRetryPolicy.new(**healthy_retry_policy.transform_keys(&:to_sym)) : healthy_retry_policy Jsii::Type.check_type(@healthy_retry_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLkhlYWx0aHlSZXRyeVBvbGljeSJ9")), "healthyRetryPolicy") unless @healthy_retry_policy.nil? @request_policy = request_policy.is_a?(Hash) ? ::AWSCDK::SNS::RequestPolicy.new(**request_policy.transform_keys(&:to_sym)) : request_policy Jsii::Type.check_type(@request_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLlJlcXVlc3RQb2xpY3kifQ==")), "requestPolicy") unless @request_policy.nil? @throttle_policy = throttle_policy.is_a?(Hash) ? ::AWSCDK::SNS::ThrottlePolicy.new(**throttle_policy.transform_keys(&:to_sym)) : throttle_policy Jsii::Type.check_type(@throttle_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLlRocm90dGxlUG9saWN5In0=")), "throttlePolicy") unless @throttle_policy.nil? end |
Instance Attribute Details
#healthy_retry_policy ⇒ AWSCDK::SNS::HealthyRetryPolicy? (readonly)
Note:
Default: - Amazon SNS attempts up to three retries with a delay between failed attempts set at 20 seconds
The retry policy of the delivery of SNS messages to HTTP/S endpoints.
23 24 25 |
# File 'sns/delivery_policy.rb', line 23 def healthy_retry_policy @healthy_retry_policy end |
#request_policy ⇒ AWSCDK::SNS::RequestPolicy? (readonly)
Note:
Default: - The content type is set to 'text/plain; charset=UTF-8'
The request of the content sent in AWS SNS HTTP/S requests.
28 29 30 |
# File 'sns/delivery_policy.rb', line 28 def request_policy @request_policy end |
#throttle_policy ⇒ AWSCDK::SNS::ThrottlePolicy? (readonly)
Note:
Default: - No throttling
The throttling policy of the delivery of SNS messages to HTTP/S endpoints.
33 34 35 |
# File 'sns/delivery_policy.rb', line 33 def throttle_policy @throttle_policy end |
Class Method Details
.jsii_properties ⇒ Object
35 36 37 38 39 40 41 |
# File 'sns/delivery_policy.rb', line 35 def self.jsii_properties { :healthy_retry_policy => "healthyRetryPolicy", :request_policy => "requestPolicy", :throttle_policy => "throttlePolicy", } end |
Instance Method Details
#to_jsii ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'sns/delivery_policy.rb', line 43 def to_jsii result = {} result.merge!({ "healthyRetryPolicy" => @healthy_retry_policy, "requestPolicy" => @request_policy, "throttlePolicy" => @throttle_policy, }) result.compact end |