Class: AWSCDK::SNSSubscriptions::URLSubscription

Inherits:
Jsii::Object
  • Object
show all
Includes:
AWSCDK::SNS::ITopicSubscription
Defined in:
sns_subscriptions/url_subscription.rb

Overview

Use a URL as a subscription target.

The message will be POSTed to the given URL.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, props = nil) ⇒ URLSubscription

Returns a new instance of URLSubscription.

Parameters:



15
16
17
18
19
20
# File 'sns_subscriptions/url_subscription.rb', line 15

def initialize(url, props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::SNSSubscriptions::URLSubscriptionProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "url")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zX3N1YnNjcmlwdGlvbnMuVXJsU3Vic2NyaXB0aW9uUHJvcHMifQ==")), "props") unless props.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(url, props)
end

Class Method Details

.jsii_overridable_methodsObject



22
23
24
25
26
# File 'sns_subscriptions/url_subscription.rb', line 22

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

.PROPERTY_INJECTION_IDString

Uniquely identifies this class.

Returns:

  • (String)


31
32
33
# File 'sns_subscriptions/url_subscription.rb', line 31

def self.PROPERTY_INJECTION_ID()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_sns_subscriptions.UrlSubscription", "PROPERTY_INJECTION_ID")
end

Instance Method Details

#bind(_topic) ⇒ AWSCDK::SNS::TopicSubscriptionConfig

Returns a configuration for a URL to subscribe to an SNS topic.



39
40
41
42
# File 'sns_subscriptions/url_subscription.rb', line 39

def bind(_topic)
  Jsii::Type.check_type(_topic, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLklUb3BpYyJ9")), "_topic")
  jsii_call_method("bind", [_topic])
end