Class CfnSubscriptionProps.Builder

java.lang.Object
software.amazon.awscdk.services.sns.CfnSubscriptionProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSubscriptionProps>
Enclosing interface:
CfnSubscriptionProps

@Stability(Stable) public static final class CfnSubscriptionProps.Builder extends Object implements software.amazon.jsii.Builder<CfnSubscriptionProps>
A builder for CfnSubscriptionProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • protocol

      @Stability(Stable) public CfnSubscriptionProps.Builder protocol(String protocol)
      Parameters:
      protocol - The subscription's protocol. This parameter is required. 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 .
      Returns:
      this
    • topicArn

      @Stability(Stable) public CfnSubscriptionProps.Builder topicArn(String topicArn)
      Parameters:
      topicArn - The ARN of the topic to subscribe to. This parameter is required.
      Returns:
      this
    • deliveryPolicy

      @Stability(Stable) public CfnSubscriptionProps.Builder deliveryPolicy(Object deliveryPolicy)
      Parameters:
      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 .
      Returns:
      this
    • endpoint

      @Stability(Stable) public CfnSubscriptionProps.Builder endpoint(String endpoint)
      Parameters:
      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 .
      Returns:
      this
    • filterPolicy

      @Stability(Stable) public CfnSubscriptionProps.Builder filterPolicy(Object filterPolicy)
      Parameters:
      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 .
      Returns:
      this
    • filterPolicyScope

      @Stability(Stable) public CfnSubscriptionProps.Builder filterPolicyScope(String filterPolicyScope)
      Parameters:
      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.
      Returns:
      this
    • rawMessageDelivery

      @Stability(Stable) public CfnSubscriptionProps.Builder rawMessageDelivery(Boolean rawMessageDelivery)
      Parameters:
      rawMessageDelivery - 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 SNS API Reference .
      Returns:
      this
    • rawMessageDelivery

      @Stability(Stable) public CfnSubscriptionProps.Builder rawMessageDelivery(IResolvable rawMessageDelivery)
      Parameters:
      rawMessageDelivery - 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 SNS API Reference .
      Returns:
      this
    • redrivePolicy

      @Stability(Stable) public CfnSubscriptionProps.Builder redrivePolicy(Object redrivePolicy)
      Parameters:
      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 .

      Returns:
      this
    • region

      @Stability(Stable) public CfnSubscriptionProps.Builder region(String region)
      Parameters:
      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 a AWS::SNS::Subscription resource, that operation will fail unless you are either:

      • Updating the Region from NULL to the caller region.
      • Updating the Region from the caller region to NULL .
      Returns:
      this
    • subscriptionRoleArn

      @Stability(Stable) public CfnSubscriptionProps.Builder subscriptionRoleArn(String subscriptionRoleArn)
      Parameters:
      subscriptionRoleArn - 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.

      Returns:
      this
    • build

      @Stability(Stable) public CfnSubscriptionProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnSubscriptionProps>
      Returns:
      a new instance of CfnSubscriptionProps
      Throws:
      NullPointerException - if any required attribute was not provided