Class CfnSubscription.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSubscription>
- Enclosing class:
CfnSubscription
CfnSubscription
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static CfnSubscription.Builder
deliveryPolicy
(Object deliveryPolicy) The delivery policy JSON assigned to the subscription.The subscription's endpoint.filterPolicy
(Object filterPolicy) The filter policy JSON assigned to the subscription.filterPolicyScope
(String filterPolicyScope) This attribute lets you choose the filtering scope by using one of the following string value types:.The subscription's protocol.rawMessageDelivery
(Boolean rawMessageDelivery) When set totrue
, enables raw message delivery.rawMessageDelivery
(IResolvable rawMessageDelivery) When set totrue
, enables raw message delivery.redrivePolicy
(Object redrivePolicy) When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue.For cross-region subscriptions, the region in which the topic resides.replayPolicy
(Object replayPolicy) Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.subscriptionRoleArn
(String subscriptionRoleArn) This property applies only to Amazon Data Firehose delivery stream subscriptions.The ARN of the topic to subscribe to.
-
Method Details
-
create
@Stability(Stable) public static CfnSubscription.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnSubscription.Builder
.
-
protocol
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 SNS API Reference .- Parameters:
protocol
- The subscription's protocol. This parameter is required.- Returns:
this
- See Also:
-
topicArn
The ARN of the topic to subscribe to.- Parameters:
topicArn
- The ARN of the topic to subscribe to. This parameter is required.- Returns:
this
- See Also:
-
deliveryPolicy
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 SNS API Reference and Message delivery retries in the Amazon SNS Developer Guide .- Parameters:
deliveryPolicy
- The delivery policy JSON assigned to the subscription. This parameter is required.- Returns:
this
- See Also:
-
endpoint
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 SNS API Reference .- Parameters:
endpoint
- The subscription's endpoint. This parameter is required.- Returns:
this
- See Also:
-
filterPolicy
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 SNS API Reference and Message filtering in the Amazon SNS Developer Guide .- Parameters:
filterPolicy
- The filter policy JSON assigned to the subscription. This parameter is required.- Returns:
this
- See Also:
-
filterPolicyScope
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.
- Parameters:
filterPolicyScope
- This attribute lets you choose the filtering scope by using one of the following string value types:. This parameter is required.- Returns:
this
- See Also:
-
rawMessageDelivery
When set totrue
, 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 SNS API Reference .- Parameters:
rawMessageDelivery
- When set totrue
, enables raw message delivery. This parameter is required.- Returns:
this
- See Also:
-
rawMessageDelivery
@Stability(Stable) public CfnSubscription.Builder rawMessageDelivery(IResolvable rawMessageDelivery) When set totrue
, 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 SNS API Reference .- Parameters:
rawMessageDelivery
- When set totrue
, enables raw message delivery. This parameter is required.- Returns:
this
- See Also:
-
redrivePolicy
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 .
- Parameters:
redrivePolicy
- When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. This parameter is required.- Returns:
this
- See Also:
-
region
For cross-region subscriptions, the region in which the topic resides.If no region is specified, AWS CloudFormation uses the region of the caller as the default.
If you perform an update operation that only updates the
Region
property of aAWS::SNS::Subscription
resource, that operation will fail unless you are either:- Updating the
Region
fromNULL
to the caller region. - Updating the
Region
from the caller region toNULL
.
- Parameters:
region
- For cross-region subscriptions, the region in which the topic resides. This parameter is required.- Returns:
this
- See Also:
- Updating the
-
replayPolicy
Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.- Parameters:
replayPolicy
- Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes. This parameter is required.- Returns:
this
- See Also:
-
subscriptionRoleArn
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 SNS 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 SNS Developer Guide.
- Parameters:
subscriptionRoleArn
- This property applies only to Amazon Data Firehose delivery stream subscriptions. This parameter is required.- Returns:
this
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnSubscription>
- Returns:
- a newly built instance of
CfnSubscription
.
-