public static final class CfnSubscription.Builder
extends java.lang.Object
CfnSubscription
.Modifier and Type | Method and Description |
---|---|
CfnSubscription |
build() |
static CfnSubscription.Builder |
create(Construct scope,
java.lang.String id) |
CfnSubscription.Builder |
deliveryPolicy(java.lang.Object deliveryPolicy)
The delivery policy JSON assigned to the subscription.
|
CfnSubscription.Builder |
endpoint(java.lang.String endpoint)
The subscription's endpoint.
|
CfnSubscription.Builder |
filterPolicy(java.lang.Object filterPolicy)
The filter policy JSON assigned to the subscription.
|
CfnSubscription.Builder |
filterPolicyScope(java.lang.String filterPolicyScope)
This attribute lets you choose the filtering scope by using one of the following string value types:.
|
CfnSubscription.Builder |
protocol(java.lang.String protocol)
The subscription's protocol.
|
CfnSubscription.Builder |
rawMessageDelivery(java.lang.Boolean rawMessageDelivery)
When set to `true` , enables raw message delivery.
|
CfnSubscription.Builder |
rawMessageDelivery(IResolvable rawMessageDelivery)
When set to `true` , enables raw message delivery.
|
CfnSubscription.Builder |
redrivePolicy(java.lang.Object redrivePolicy)
When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue.
|
CfnSubscription.Builder |
region(java.lang.String region)
For cross-region subscriptions, the region in which the topic resides.
|
CfnSubscription.Builder |
subscriptionRoleArn(java.lang.String subscriptionRoleArn)
This property applies only to Amazon Kinesis Data Firehose delivery stream subscriptions.
|
CfnSubscription.Builder |
topicArn(java.lang.String topicArn)
The ARN of the topic to subscribe to.
|
public static CfnSubscription.Builder create(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.CfnSubscription.Builder
.public CfnSubscription.Builder protocol(java.lang.String 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 .
protocol
- The subscription's protocol. This parameter is required.this
public CfnSubscription.Builder topicArn(java.lang.String topicArn)
topicArn
- The ARN of the topic to subscribe to. This parameter is required.this
public CfnSubscription.Builder deliveryPolicy(java.lang.Object deliveryPolicy)
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 .
deliveryPolicy
- The delivery policy JSON assigned to the subscription. This parameter is required.this
public CfnSubscription.Builder endpoint(java.lang.String 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 .
endpoint
- The subscription's endpoint. This parameter is required.this
public CfnSubscription.Builder filterPolicy(java.lang.Object filterPolicy)
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 .
filterPolicy
- The filter policy JSON assigned to the subscription. This parameter is required.this
public CfnSubscription.Builder filterPolicyScope(java.lang.String filterPolicyScope)
MessageAttributes
(default) - The filter is applied on the message attributes.MessageBody
- The filter is applied on the message body.filterPolicyScope
- This attribute lets you choose the filtering scope by using one of the following string value types:. This parameter is required.this
public CfnSubscription.Builder rawMessageDelivery(java.lang.Boolean rawMessageDelivery)
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 .
rawMessageDelivery
- When set to `true` , enables raw message delivery. This parameter is required.this
public CfnSubscription.Builder rawMessageDelivery(IResolvable rawMessageDelivery)
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 .
rawMessageDelivery
- When set to `true` , enables raw message delivery. This parameter is required.this
public CfnSubscription.Builder redrivePolicy(java.lang.Object redrivePolicy)
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 .
redrivePolicy
- When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. This parameter is required.this
public CfnSubscription.Builder region(java.lang.String region)
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 a AWS::SNS::Subscription
resource, that operation will fail unless you are either:
Region
from NULL
to the caller region.Region
from the caller region to NULL
.region
- For cross-region subscriptions, the region in which the topic resides. This parameter is required.this
public CfnSubscription.Builder subscriptionRoleArn(java.lang.String subscriptionRoleArn)
Specify the ARN of the IAM role that has the following:
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.
subscriptionRoleArn
- This property applies only to Amazon Kinesis Data Firehose delivery stream subscriptions. This parameter is required.this
public CfnSubscription build()