Interface CfnSubscriptionProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnSubscriptionProps.Jsii$Proxy
CfnSubscription.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sns.*;
Object deliveryPolicy;
Object filterPolicy;
Object redrivePolicy;
CfnSubscriptionProps cfnSubscriptionProps = CfnSubscriptionProps.builder()
.protocol("protocol")
.topicArn("topicArn")
// the properties below are optional
.deliveryPolicy(deliveryPolicy)
.endpoint("endpoint")
.filterPolicy(filterPolicy)
.filterPolicyScope("filterPolicyScope")
.rawMessageDelivery(false)
.redrivePolicy(redrivePolicy)
.region("region")
.subscriptionRoleArn("subscriptionRoleArn")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnSubscriptionPropsstatic final classAn implementation forCfnSubscriptionProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnSubscriptionProps.Builderbuilder()default ObjectThe delivery policy JSON assigned to the subscription.default StringThe subscription's endpoint.default ObjectThe filter policy JSON assigned to the subscription.default StringThis attribute lets you choose the filtering scope by using one of the following string value types:.The subscription's protocol.default ObjectWhen set totrue, enables raw message delivery.default ObjectWhen specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue.default StringFor cross-region subscriptions, the region in which the topic resides.default StringThis property applies only to Amazon Kinesis Data Firehose delivery stream subscriptions.The ARN of the topic to subscribe to.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getProtocol
The subscription's protocol.For more information, see the
Protocolparameter of the[Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html)action in the Amazon SNS API Reference . -
getTopicArn
The ARN of the topic to subscribe to. -
getDeliveryPolicy
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 . -
getEndpoint
The subscription's endpoint.The endpoint value depends on the protocol that you specify. For more information, see the
Endpointparameter of the[Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html)action in the Amazon SNS API Reference . -
getFilterPolicy
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 . -
getFilterPolicyScope
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.
-
getRawMessageDelivery
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 . -
getRedrivePolicy
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 .
-
getRegion
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
Regionproperty of aAWS::SNS::Subscriptionresource, that operation will fail unless you are either:- Updating the
RegionfromNULLto the caller region. - Updating the
Regionfrom the caller region toNULL.
- Updating the
-
getSubscriptionRoleArn
This property applies only to Amazon Kinesis Data Firehose delivery stream subscriptions.Specify the ARN of the IAM role that has the following:
- Permission to write to the Amazon Kinesis Data Firehose delivery stream
- Amazon SNS listed as a trusted entity
Specifying a valid ARN for this attribute is required for Kinesis Data Firehose delivery stream subscriptions. For more information, see Fanout to Amazon Kinesis Data Firehose delivery streams in the Amazon SNS Developer Guide.
-
builder
- Returns:
- a
CfnSubscriptionProps.BuilderofCfnSubscriptionProps
-