Class: AWSCDK::SNS::CfnSubscriptionProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SNS::CfnSubscriptionProps
- Defined in:
- sns/cfn_subscription_props.rb
Overview
Properties for defining a CfnSubscription.
Instance Attribute Summary collapse
-
#delivery_policy ⇒ Object?
readonly
The delivery policy JSON assigned to the subscription.
-
#endpoint ⇒ String, ...
readonly
The subscription's endpoint.
-
#filter_policy ⇒ Object?
readonly
The filter policy JSON assigned to the subscription.
-
#filter_policy_scope ⇒ String?
readonly
This attribute lets you choose the filtering scope by using one of the following string value types:.
-
#protocol ⇒ String
readonly
The subscription's protocol.
-
#raw_message_delivery ⇒ Boolean, ...
readonly
When set to
true, enables raw message delivery. -
#redrive_policy ⇒ Object?
readonly
When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue.
-
#region ⇒ String?
readonly
For cross-region subscriptions, the region in which the topic resides.
-
#replay_policy ⇒ Object?
readonly
Specifies whether Amazon resends the notification to the subscription when a message's attribute changes.
-
#subscription_role_arn ⇒ String, ...
readonly
This property applies only to Amazon Data Firehose delivery stream subscriptions.
-
#topic_arn ⇒ String, AWSCDK::Interfaces::AWSSNS::ITopicRef
readonly
The ARN of the topic to subscribe to.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(protocol:, topic_arn:, delivery_policy: nil, endpoint: nil, filter_policy: nil, filter_policy_scope: nil, raw_message_delivery: nil, redrive_policy: nil, region: nil, replay_policy: nil, subscription_role_arn: nil) ⇒ CfnSubscriptionProps
constructor
A new instance of CfnSubscriptionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(protocol:, topic_arn:, delivery_policy: nil, endpoint: nil, filter_policy: nil, filter_policy_scope: nil, raw_message_delivery: nil, redrive_policy: nil, region: nil, replay_policy: nil, subscription_role_arn: nil) ⇒ CfnSubscriptionProps
Returns a new instance of CfnSubscriptionProps.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'sns/cfn_subscription_props.rb', line 20 def initialize(protocol:, topic_arn:, delivery_policy: nil, endpoint: nil, filter_policy: nil, filter_policy_scope: nil, raw_message_delivery: nil, redrive_policy: nil, region: nil, replay_policy: nil, subscription_role_arn: nil) @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol") @topic_arn = topic_arn Jsii::Type.check_type(@topic_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19zbnMuSVRvcGljUmVmIn1dfX0=")), "topicArn") @delivery_policy = delivery_policy Jsii::Type.check_type(@delivery_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "deliveryPolicy") unless @delivery_policy.nil? @endpoint = endpoint Jsii::Type.check_type(@endpoint, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19raW5lc2lzZmlyZWhvc2UuSURlbGl2ZXJ5U3RyZWFtUmVmIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sYW1iZGEuSUZ1bmN0aW9uUmVmIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sYW1iZGEuSVZlcnNpb25SZWYifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX3Nxcy5JUXVldWVSZWYifV19fQ==")), "endpoint") unless @endpoint.nil? @filter_policy = filter_policy Jsii::Type.check_type(@filter_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "filterPolicy") unless @filter_policy.nil? @filter_policy_scope = filter_policy_scope Jsii::Type.check_type(@filter_policy_scope, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "filterPolicyScope") unless @filter_policy_scope.nil? @raw_message_delivery = Jsii::Type.check_type(@raw_message_delivery, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "rawMessageDelivery") unless @raw_message_delivery.nil? @redrive_policy = redrive_policy Jsii::Type.check_type(@redrive_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "redrivePolicy") unless @redrive_policy.nil? @region = region Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless @region.nil? @replay_policy = replay_policy Jsii::Type.check_type(@replay_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "replayPolicy") unless @replay_policy.nil? @subscription_role_arn = subscription_role_arn Jsii::Type.check_type(@subscription_role_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "subscriptionRoleArn") unless @subscription_role_arn.nil? end |
Instance Attribute Details
#delivery_policy ⇒ Object? (readonly)
The delivery policy JSON assigned to the subscription.
Enables the subscriber to define the message delivery retry strategy in the case of an HTTP/S endpoint subscribed to the topic. For more information, see [GetSubscriptionAttributes](https://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html) in the Amazon API Reference and Message delivery retries in the Amazon Developer Guide .
63 64 65 |
# File 'sns/cfn_subscription_props.rb', line 63 def delivery_policy @delivery_policy end |
#endpoint ⇒ String, ... (readonly)
The subscription's endpoint.
The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the [Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html) action in the Amazon API Reference .
70 71 72 |
# File 'sns/cfn_subscription_props.rb', line 70 def endpoint @endpoint end |
#filter_policy ⇒ Object? (readonly)
The filter policy JSON assigned to the subscription.
Enables the subscriber to filter out unwanted messages. For more information, see [GetSubscriptionAttributes](https://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html) in the Amazon API Reference and Message filtering in the Amazon Developer Guide .
77 78 79 |
# File 'sns/cfn_subscription_props.rb', line 77 def filter_policy @filter_policy end |
#filter_policy_scope ⇒ String? (readonly)
This attribute lets you choose the filtering scope by using one of the following string value types:.
MessageAttributes(default) - The filter is applied on the message attributes.MessageBody- The filter is applied on the message body.
Nullis not a valid value forFilterPolicyScope. To delete a filter policy, delete theFilterPolicyproperty but keepFilterPolicyScopeproperty as is.
87 88 89 |
# File 'sns/cfn_subscription_props.rb', line 87 def filter_policy_scope @filter_policy_scope end |
#protocol ⇒ String (readonly)
The subscription's protocol.
For more information, see the Protocol parameter of the [Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html) action in the Amazon API Reference .
51 52 53 |
# File 'sns/cfn_subscription_props.rb', line 51 def protocol @protocol end |
#raw_message_delivery ⇒ Boolean, ... (readonly)
When set to true , enables raw message delivery.
Raw messages don't contain any JSON formatting and can be sent to Amazon SQS and HTTP/S endpoints. For more information, see [GetSubscriptionAttributes](https://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html) in the Amazon API Reference .
94 95 96 |
# File 'sns/cfn_subscription_props.rb', line 94 def @raw_message_delivery end |
#redrive_policy ⇒ Object? (readonly)
When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue.
Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable) or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held in the dead-letter queue for further analysis or reprocessing.
For more information about the redrive policy and dead-letter queues, see Amazon SQS dead-letter queues in the Amazon SQS Developer Guide .
103 104 105 |
# File 'sns/cfn_subscription_props.rb', line 103 def redrive_policy @redrive_policy end |
#region ⇒ String? (readonly)
For cross-region subscriptions, the region in which the topic resides.
If no region is specified, CloudFormation uses the region of the caller as the default.
If you perform an update operation that only updates the Region property of a AWS::SNS::Subscription resource, that operation will fail unless you are either:
- Updating the
RegionfromNULLto the caller region. - Updating the
Regionfrom the caller region toNULL.
115 116 117 |
# File 'sns/cfn_subscription_props.rb', line 115 def region @region end |
#replay_policy ⇒ Object? (readonly)
Specifies whether Amazon resends the notification to the subscription when a message's attribute changes.
120 121 122 |
# File 'sns/cfn_subscription_props.rb', line 120 def replay_policy @replay_policy end |
#subscription_role_arn ⇒ String, ... (readonly)
This property applies only to Amazon Data Firehose delivery stream subscriptions.
Specify the ARN of the IAM role that has the following:
- Permission to write to the Amazon Data Firehose delivery stream
- Amazon listed as a trusted entity
Specifying a valid ARN for this attribute is required for Firehose delivery stream subscriptions. For more information, see Fanout to Amazon Data Firehose delivery streams in the Amazon Developer Guide.
132 133 134 |
# File 'sns/cfn_subscription_props.rb', line 132 def subscription_role_arn @subscription_role_arn end |
#topic_arn ⇒ String, AWSCDK::Interfaces::AWSSNS::ITopicRef (readonly)
The ARN of the topic to subscribe to.
56 57 58 |
# File 'sns/cfn_subscription_props.rb', line 56 def topic_arn @topic_arn end |
Class Method Details
.jsii_properties ⇒ Object
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'sns/cfn_subscription_props.rb', line 134 def self.jsii_properties { :protocol => "protocol", :topic_arn => "topicArn", :delivery_policy => "deliveryPolicy", :endpoint => "endpoint", :filter_policy => "filterPolicy", :filter_policy_scope => "filterPolicyScope", :raw_message_delivery => "rawMessageDelivery", :redrive_policy => "redrivePolicy", :region => "region", :replay_policy => "replayPolicy", :subscription_role_arn => "subscriptionRoleArn", } end |
Instance Method Details
#to_jsii ⇒ Object
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'sns/cfn_subscription_props.rb', line 150 def to_jsii result = {} result.merge!({ "protocol" => @protocol, "topicArn" => @topic_arn, "deliveryPolicy" => @delivery_policy, "endpoint" => @endpoint, "filterPolicy" => @filter_policy, "filterPolicyScope" => @filter_policy_scope, "rawMessageDelivery" => @raw_message_delivery, "redrivePolicy" => @redrive_policy, "region" => @region, "replayPolicy" => @replay_policy, "subscriptionRoleArn" => @subscription_role_arn, }) result.compact end |