1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. sns
  5. Topic

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

aws-native.sns.Topic

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

    The AWS::SNS::Topic resource creates a topic to which notifications can be published. One account can create a maximum of 100,000 standard topics and 1,000 FIFO topics. For more information, see endpoints and quotas in the General Reference. The structure of AUTHPARAMS depends on the .signature of the API request. For more information, see Examples of the complete Signature Version 4 signing process in the General Reference.

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var carSalesTopic = new AwsNative.Sns.Topic("carSalesTopic");
    
        var erpIntegrationQueue = new AwsNative.Sqs.Queue("erpIntegrationQueue");
    
        var erpSubscription = new AwsNative.Sns.Subscription("erpSubscription", new()
        {
            TopicArn = carSalesTopic.Id,
            Endpoint = erpIntegrationQueue.Arn,
            Protocol = "sqs",
            RawMessageDelivery = true,
        });
    
        var crmIntegrationQueue = new AwsNative.Sqs.Queue("crmIntegrationQueue");
    
        var crmSubscription = new AwsNative.Sns.Subscription("crmSubscription", new()
        {
            TopicArn = carSalesTopic.Id,
            Endpoint = crmIntegrationQueue.Arn,
            Protocol = "sqs",
            RawMessageDelivery = true,
            FilterPolicy = new Dictionary<string, object?>
            {
                ["buyer-class"] = new[]
                {
                    "vip",
                },
            },
        });
    
        var config = new Config();
        var myHttpEndpoint = config.Require("myHttpEndpoint");
        var scmSubscription = new AwsNative.Sns.Subscription("scmSubscription", new()
        {
            TopicArn = carSalesTopic.Id,
            Endpoint = myHttpEndpoint,
            Protocol = "https",
            DeliveryPolicy = new Dictionary<string, object?>
            {
                ["healthyRetryPolicy"] = new Dictionary<string, object?>
                {
                    ["numRetries"] = 20,
                    ["minDelayTarget"] = 10,
                    ["maxDelayTarget"] = 30,
                    ["numMinDelayRetries"] = 3,
                    ["numMaxDelayRetries"] = 17,
                    ["numNoDelayRetries"] = 0,
                    ["backoffFunction"] = "exponential",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/sns"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/sqs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		carSalesTopic, err := sns.NewTopic(ctx, "carSalesTopic", nil)
    		if err != nil {
    			return err
    		}
    		erpIntegrationQueue, err := sqs.NewQueue(ctx, "erpIntegrationQueue", nil)
    		if err != nil {
    			return err
    		}
    		_, err = sns.NewSubscription(ctx, "erpSubscription", &sns.SubscriptionArgs{
    			TopicArn:           carSalesTopic.ID(),
    			Endpoint:           erpIntegrationQueue.Arn,
    			Protocol:           pulumi.String("sqs"),
    			RawMessageDelivery: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		crmIntegrationQueue, err := sqs.NewQueue(ctx, "crmIntegrationQueue", nil)
    		if err != nil {
    			return err
    		}
    		_, err = sns.NewSubscription(ctx, "crmSubscription", &sns.SubscriptionArgs{
    			TopicArn:           carSalesTopic.ID(),
    			Endpoint:           crmIntegrationQueue.Arn,
    			Protocol:           pulumi.String("sqs"),
    			RawMessageDelivery: pulumi.Bool(true),
    			FilterPolicy: pulumi.Any(map[string]interface{}{
    				"buyer-class": []string{
    					"vip",
    				},
    			}),
    		})
    		if err != nil {
    			return err
    		}
    		cfg := config.New(ctx, "")
    		myHttpEndpoint := cfg.Require("myHttpEndpoint")
    		_, err = sns.NewSubscription(ctx, "scmSubscription", &sns.SubscriptionArgs{
    			TopicArn: carSalesTopic.ID(),
    			Endpoint: pulumi.String(myHttpEndpoint),
    			Protocol: pulumi.String("https"),
    			DeliveryPolicy: pulumi.Any(map[string]interface{}{
    				"healthyRetryPolicy": map[string]interface{}{
    					"numRetries":         20,
    					"minDelayTarget":     10,
    					"maxDelayTarget":     30,
    					"numMinDelayRetries": 3,
    					"numMaxDelayRetries": 17,
    					"numNoDelayRetries":  0,
    					"backoffFunction":    "exponential",
    				},
    			}),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    car_sales_topic = aws_native.sns.Topic("carSalesTopic")
    erp_integration_queue = aws_native.sqs.Queue("erpIntegrationQueue")
    erp_subscription = aws_native.sns.Subscription("erpSubscription",
        topic_arn=car_sales_topic.id,
        endpoint=erp_integration_queue.arn,
        protocol="sqs",
        raw_message_delivery=True)
    crm_integration_queue = aws_native.sqs.Queue("crmIntegrationQueue")
    crm_subscription = aws_native.sns.Subscription("crmSubscription",
        topic_arn=car_sales_topic.id,
        endpoint=crm_integration_queue.arn,
        protocol="sqs",
        raw_message_delivery=True,
        filter_policy={
            "buyer-class": ["vip"],
        })
    config = pulumi.Config()
    my_http_endpoint = config.require("myHttpEndpoint")
    scm_subscription = aws_native.sns.Subscription("scmSubscription",
        topic_arn=car_sales_topic.id,
        endpoint=my_http_endpoint,
        protocol="https",
        delivery_policy={
            "healthyRetryPolicy": {
                "numRetries": 20,
                "minDelayTarget": 10,
                "maxDelayTarget": 30,
                "numMinDelayRetries": 3,
                "numMaxDelayRetries": 17,
                "numNoDelayRetries": 0,
                "backoffFunction": "exponential",
            },
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const carSalesTopic = new aws_native.sns.Topic("carSalesTopic", {});
    const erpIntegrationQueue = new aws_native.sqs.Queue("erpIntegrationQueue", {});
    const erpSubscription = new aws_native.sns.Subscription("erpSubscription", {
        topicArn: carSalesTopic.id,
        endpoint: erpIntegrationQueue.arn,
        protocol: "sqs",
        rawMessageDelivery: true,
    });
    const crmIntegrationQueue = new aws_native.sqs.Queue("crmIntegrationQueue", {});
    const crmSubscription = new aws_native.sns.Subscription("crmSubscription", {
        topicArn: carSalesTopic.id,
        endpoint: crmIntegrationQueue.arn,
        protocol: "sqs",
        rawMessageDelivery: true,
        filterPolicy: {
            "buyer-class": ["vip"],
        },
    });
    const config = new pulumi.Config();
    const myHttpEndpoint = config.require("myHttpEndpoint");
    const scmSubscription = new aws_native.sns.Subscription("scmSubscription", {
        topicArn: carSalesTopic.id,
        endpoint: myHttpEndpoint,
        protocol: "https",
        deliveryPolicy: {
            healthyRetryPolicy: {
                numRetries: 20,
                minDelayTarget: 10,
                maxDelayTarget: 30,
                numMinDelayRetries: 3,
                numMaxDelayRetries: 17,
                numNoDelayRetries: 0,
                backoffFunction: "exponential",
            },
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var carSalesTopic = new AwsNative.Sns.Topic("carSalesTopic");
    
        var erpIntegrationQueue = new AwsNative.Sqs.Queue("erpIntegrationQueue");
    
        var erpSubscription = new AwsNative.Sns.Subscription("erpSubscription", new()
        {
            TopicArn = carSalesTopic.Id,
            Endpoint = erpIntegrationQueue.Arn,
            Protocol = "sqs",
            RawMessageDelivery = true,
        });
    
        var crmIntegrationQueue = new AwsNative.Sqs.Queue("crmIntegrationQueue");
    
        var crmSubscription = new AwsNative.Sns.Subscription("crmSubscription", new()
        {
            TopicArn = carSalesTopic.Id,
            Endpoint = crmIntegrationQueue.Arn,
            Protocol = "sqs",
            RawMessageDelivery = true,
            FilterPolicy = new Dictionary<string, object?>
            {
                ["buyer-class"] = new[]
                {
                    "vip",
                },
            },
        });
    
        var config = new Config();
        var myHttpEndpoint = config.Require("myHttpEndpoint");
        var scmSubscription = new AwsNative.Sns.Subscription("scmSubscription", new()
        {
            TopicArn = carSalesTopic.Id,
            Endpoint = myHttpEndpoint,
            Protocol = "https",
            DeliveryPolicy = new Dictionary<string, object?>
            {
                ["healthyRetryPolicy"] = new Dictionary<string, object?>
                {
                    ["numRetries"] = 20,
                    ["minDelayTarget"] = 10,
                    ["maxDelayTarget"] = 30,
                    ["numMinDelayRetries"] = 3,
                    ["numMaxDelayRetries"] = 17,
                    ["numNoDelayRetries"] = 0,
                    ["backoffFunction"] = "exponential",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/sns"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/sqs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		carSalesTopic, err := sns.NewTopic(ctx, "carSalesTopic", nil)
    		if err != nil {
    			return err
    		}
    		erpIntegrationQueue, err := sqs.NewQueue(ctx, "erpIntegrationQueue", nil)
    		if err != nil {
    			return err
    		}
    		_, err = sns.NewSubscription(ctx, "erpSubscription", &sns.SubscriptionArgs{
    			TopicArn:           carSalesTopic.ID(),
    			Endpoint:           erpIntegrationQueue.Arn,
    			Protocol:           pulumi.String("sqs"),
    			RawMessageDelivery: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		crmIntegrationQueue, err := sqs.NewQueue(ctx, "crmIntegrationQueue", nil)
    		if err != nil {
    			return err
    		}
    		_, err = sns.NewSubscription(ctx, "crmSubscription", &sns.SubscriptionArgs{
    			TopicArn:           carSalesTopic.ID(),
    			Endpoint:           crmIntegrationQueue.Arn,
    			Protocol:           pulumi.String("sqs"),
    			RawMessageDelivery: pulumi.Bool(true),
    			FilterPolicy: pulumi.Any(map[string]interface{}{
    				"buyer-class": []string{
    					"vip",
    				},
    			}),
    		})
    		if err != nil {
    			return err
    		}
    		cfg := config.New(ctx, "")
    		myHttpEndpoint := cfg.Require("myHttpEndpoint")
    		_, err = sns.NewSubscription(ctx, "scmSubscription", &sns.SubscriptionArgs{
    			TopicArn: carSalesTopic.ID(),
    			Endpoint: pulumi.String(myHttpEndpoint),
    			Protocol: pulumi.String("https"),
    			DeliveryPolicy: pulumi.Any(map[string]interface{}{
    				"healthyRetryPolicy": map[string]interface{}{
    					"numRetries":         20,
    					"minDelayTarget":     10,
    					"maxDelayTarget":     30,
    					"numMinDelayRetries": 3,
    					"numMaxDelayRetries": 17,
    					"numNoDelayRetries":  0,
    					"backoffFunction":    "exponential",
    				},
    			}),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    car_sales_topic = aws_native.sns.Topic("carSalesTopic")
    erp_integration_queue = aws_native.sqs.Queue("erpIntegrationQueue")
    erp_subscription = aws_native.sns.Subscription("erpSubscription",
        topic_arn=car_sales_topic.id,
        endpoint=erp_integration_queue.arn,
        protocol="sqs",
        raw_message_delivery=True)
    crm_integration_queue = aws_native.sqs.Queue("crmIntegrationQueue")
    crm_subscription = aws_native.sns.Subscription("crmSubscription",
        topic_arn=car_sales_topic.id,
        endpoint=crm_integration_queue.arn,
        protocol="sqs",
        raw_message_delivery=True,
        filter_policy={
            "buyer-class": ["vip"],
        })
    config = pulumi.Config()
    my_http_endpoint = config.require("myHttpEndpoint")
    scm_subscription = aws_native.sns.Subscription("scmSubscription",
        topic_arn=car_sales_topic.id,
        endpoint=my_http_endpoint,
        protocol="https",
        delivery_policy={
            "healthyRetryPolicy": {
                "numRetries": 20,
                "minDelayTarget": 10,
                "maxDelayTarget": 30,
                "numMinDelayRetries": 3,
                "numMaxDelayRetries": 17,
                "numNoDelayRetries": 0,
                "backoffFunction": "exponential",
            },
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const carSalesTopic = new aws_native.sns.Topic("carSalesTopic", {});
    const erpIntegrationQueue = new aws_native.sqs.Queue("erpIntegrationQueue", {});
    const erpSubscription = new aws_native.sns.Subscription("erpSubscription", {
        topicArn: carSalesTopic.id,
        endpoint: erpIntegrationQueue.arn,
        protocol: "sqs",
        rawMessageDelivery: true,
    });
    const crmIntegrationQueue = new aws_native.sqs.Queue("crmIntegrationQueue", {});
    const crmSubscription = new aws_native.sns.Subscription("crmSubscription", {
        topicArn: carSalesTopic.id,
        endpoint: crmIntegrationQueue.arn,
        protocol: "sqs",
        rawMessageDelivery: true,
        filterPolicy: {
            "buyer-class": ["vip"],
        },
    });
    const config = new pulumi.Config();
    const myHttpEndpoint = config.require("myHttpEndpoint");
    const scmSubscription = new aws_native.sns.Subscription("scmSubscription", {
        topicArn: carSalesTopic.id,
        endpoint: myHttpEndpoint,
        protocol: "https",
        deliveryPolicy: {
            healthyRetryPolicy: {
                numRetries: 20,
                minDelayTarget: 10,
                maxDelayTarget: 30,
                numMinDelayRetries: 3,
                numMaxDelayRetries: 17,
                numNoDelayRetries: 0,
                backoffFunction: "exponential",
            },
        },
    });
    

    Coming soon!

    Create Topic Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Topic(name: string, args?: TopicArgs, opts?: CustomResourceOptions);
    @overload
    def Topic(resource_name: str,
              args: Optional[TopicArgs] = None,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Topic(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              archive_policy: Optional[Any] = None,
              content_based_deduplication: Optional[bool] = None,
              data_protection_policy: Optional[Any] = None,
              delivery_status_logging: Optional[Sequence[TopicLoggingConfigArgs]] = None,
              display_name: Optional[str] = None,
              fifo_topic: Optional[bool] = None,
              kms_master_key_id: Optional[str] = None,
              signature_version: Optional[str] = None,
              subscription: Optional[Sequence[TopicSubscriptionArgs]] = None,
              tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
              topic_name: Optional[str] = None,
              tracing_config: Optional[str] = None)
    func NewTopic(ctx *Context, name string, args *TopicArgs, opts ...ResourceOption) (*Topic, error)
    public Topic(string name, TopicArgs? args = null, CustomResourceOptions? opts = null)
    public Topic(String name, TopicArgs args)
    public Topic(String name, TopicArgs args, CustomResourceOptions options)
    
    type: aws-native:sns:Topic
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TopicArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TopicArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TopicArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TopicArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TopicArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Topic Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Topic resource accepts the following input properties:

    ArchivePolicy object

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    ContentBasedDeduplication bool
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    DataProtectionPolicy object

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    DeliveryStatusLogging List<Pulumi.AwsNative.Sns.Inputs.TopicLoggingConfig>

    The DeliveryStatusLogging configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:

    • HTTP
    • Amazon Kinesis Data Firehose
    • AWS Lambda
    • Platform application endpoint
    • Amazon Simple Queue Service

    Once configured, log entries are sent to Amazon CloudWatch Logs.

    DisplayName string
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    FifoTopic bool
    Set to true to create a FIFO topic.
    KmsMasterKeyId string
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    SignatureVersion string
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    Subscription List<Pulumi.AwsNative.Sns.Inputs.TopicSubscription>
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    Tags List<Pulumi.AwsNative.Inputs.Tag>
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    TopicName string
    The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with .fifo. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see Name type. If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    TracingConfig string
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
    ArchivePolicy interface{}

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    ContentBasedDeduplication bool
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    DataProtectionPolicy interface{}

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    DeliveryStatusLogging []TopicLoggingConfigArgs

    The DeliveryStatusLogging configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:

    • HTTP
    • Amazon Kinesis Data Firehose
    • AWS Lambda
    • Platform application endpoint
    • Amazon Simple Queue Service

    Once configured, log entries are sent to Amazon CloudWatch Logs.

    DisplayName string
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    FifoTopic bool
    Set to true to create a FIFO topic.
    KmsMasterKeyId string
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    SignatureVersion string
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    Subscription []TopicSubscriptionArgs
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    Tags TagArgs
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    TopicName string
    The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with .fifo. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see Name type. If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    TracingConfig string
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
    archivePolicy Object

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    contentBasedDeduplication Boolean
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    dataProtectionPolicy Object

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    deliveryStatusLogging List<TopicLoggingConfig>

    The DeliveryStatusLogging configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:

    • HTTP
    • Amazon Kinesis Data Firehose
    • AWS Lambda
    • Platform application endpoint
    • Amazon Simple Queue Service

    Once configured, log entries are sent to Amazon CloudWatch Logs.

    displayName String
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    fifoTopic Boolean
    Set to true to create a FIFO topic.
    kmsMasterKeyId String
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    signatureVersion String
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    subscription List<TopicSubscription>
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    tags List<Tag>
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    topicName String
    The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with .fifo. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see Name type. If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    tracingConfig String
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
    archivePolicy any

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    contentBasedDeduplication boolean
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    dataProtectionPolicy any

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    deliveryStatusLogging TopicLoggingConfig[]

    The DeliveryStatusLogging configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:

    • HTTP
    • Amazon Kinesis Data Firehose
    • AWS Lambda
    • Platform application endpoint
    • Amazon Simple Queue Service

    Once configured, log entries are sent to Amazon CloudWatch Logs.

    displayName string
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    fifoTopic boolean
    Set to true to create a FIFO topic.
    kmsMasterKeyId string
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    signatureVersion string
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    subscription TopicSubscription[]
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    tags Tag[]
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    topicName string
    The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with .fifo. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see Name type. If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    tracingConfig string
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
    archive_policy Any

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    content_based_deduplication bool
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    data_protection_policy Any

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    delivery_status_logging Sequence[TopicLoggingConfigArgs]

    The DeliveryStatusLogging configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:

    • HTTP
    • Amazon Kinesis Data Firehose
    • AWS Lambda
    • Platform application endpoint
    • Amazon Simple Queue Service

    Once configured, log entries are sent to Amazon CloudWatch Logs.

    display_name str
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    fifo_topic bool
    Set to true to create a FIFO topic.
    kms_master_key_id str
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    signature_version str
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    subscription Sequence[TopicSubscriptionArgs]
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    tags Sequence[TagArgs]
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    topic_name str
    The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with .fifo. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see Name type. If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    tracing_config str
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
    archivePolicy Any

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    contentBasedDeduplication Boolean
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    dataProtectionPolicy Any

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    deliveryStatusLogging List<Property Map>

    The DeliveryStatusLogging configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:

    • HTTP
    • Amazon Kinesis Data Firehose
    • AWS Lambda
    • Platform application endpoint
    • Amazon Simple Queue Service

    Once configured, log entries are sent to Amazon CloudWatch Logs.

    displayName String
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    fifoTopic Boolean
    Set to true to create a FIFO topic.
    kmsMasterKeyId String
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    signatureVersion String
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    subscription List<Property Map>
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    tags List<Property Map>
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    topicName String
    The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with .fifo. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see Name type. If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
    tracingConfig String
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Topic resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    TopicArn string
    Returns the ARN of an Amazon SNS topic.
    Id string
    The provider-assigned unique ID for this managed resource.
    TopicArn string
    Returns the ARN of an Amazon SNS topic.
    id String
    The provider-assigned unique ID for this managed resource.
    topicArn String
    Returns the ARN of an Amazon SNS topic.
    id string
    The provider-assigned unique ID for this managed resource.
    topicArn string
    Returns the ARN of an Amazon SNS topic.
    id str
    The provider-assigned unique ID for this managed resource.
    topic_arn str
    Returns the ARN of an Amazon SNS topic.
    id String
    The provider-assigned unique ID for this managed resource.
    topicArn String
    Returns the ARN of an Amazon SNS topic.

    Supporting Types

    Tag, TagArgs

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    TopicLoggingConfig, TopicLoggingConfigArgs

    Protocol Pulumi.AwsNative.Sns.TopicLoggingConfigProtocol
    Indicates one of the supported protocols for the Amazon SNS topic. At least one of the other three LoggingConfig properties is recommend along with Protocol.
    FailureFeedbackRoleArn string
    The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
    SuccessFeedbackRoleArn string
    The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
    SuccessFeedbackSampleRate string
    The percentage of successful message deliveries to be logged in Amazon CloudWatch. Valid percentage values range from 0 to 100.
    Protocol TopicLoggingConfigProtocol
    Indicates one of the supported protocols for the Amazon SNS topic. At least one of the other three LoggingConfig properties is recommend along with Protocol.
    FailureFeedbackRoleArn string
    The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
    SuccessFeedbackRoleArn string
    The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
    SuccessFeedbackSampleRate string
    The percentage of successful message deliveries to be logged in Amazon CloudWatch. Valid percentage values range from 0 to 100.
    protocol TopicLoggingConfigProtocol
    Indicates one of the supported protocols for the Amazon SNS topic. At least one of the other three LoggingConfig properties is recommend along with Protocol.
    failureFeedbackRoleArn String
    The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
    successFeedbackRoleArn String
    The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
    successFeedbackSampleRate String
    The percentage of successful message deliveries to be logged in Amazon CloudWatch. Valid percentage values range from 0 to 100.
    protocol TopicLoggingConfigProtocol
    Indicates one of the supported protocols for the Amazon SNS topic. At least one of the other three LoggingConfig properties is recommend along with Protocol.
    failureFeedbackRoleArn string
    The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
    successFeedbackRoleArn string
    The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
    successFeedbackSampleRate string
    The percentage of successful message deliveries to be logged in Amazon CloudWatch. Valid percentage values range from 0 to 100.
    protocol TopicLoggingConfigProtocol
    Indicates one of the supported protocols for the Amazon SNS topic. At least one of the other three LoggingConfig properties is recommend along with Protocol.
    failure_feedback_role_arn str
    The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
    success_feedback_role_arn str
    The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
    success_feedback_sample_rate str
    The percentage of successful message deliveries to be logged in Amazon CloudWatch. Valid percentage values range from 0 to 100.
    protocol "http/s" | "sqs" | "lambda" | "firehose" | "application"
    Indicates one of the supported protocols for the Amazon SNS topic. At least one of the other three LoggingConfig properties is recommend along with Protocol.
    failureFeedbackRoleArn String
    The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
    successFeedbackRoleArn String
    The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
    successFeedbackSampleRate String
    The percentage of successful message deliveries to be logged in Amazon CloudWatch. Valid percentage values range from 0 to 100.

    TopicLoggingConfigProtocol, TopicLoggingConfigProtocolArgs

    Https
    http/s
    Sqs
    sqs
    Lambda
    lambda
    Firehose
    firehose
    Application
    application
    TopicLoggingConfigProtocolHttps
    http/s
    TopicLoggingConfigProtocolSqs
    sqs
    TopicLoggingConfigProtocolLambda
    lambda
    TopicLoggingConfigProtocolFirehose
    firehose
    TopicLoggingConfigProtocolApplication
    application
    Https
    http/s
    Sqs
    sqs
    Lambda
    lambda
    Firehose
    firehose
    Application
    application
    Https
    http/s
    Sqs
    sqs
    Lambda
    lambda
    Firehose
    firehose
    Application
    application
    HTTPS
    http/s
    SQS
    sqs
    LAMBDA_
    lambda
    FIREHOSE
    firehose
    APPLICATION
    application
    "http/s"
    http/s
    "sqs"
    sqs
    "lambda"
    lambda
    "firehose"
    firehose
    "application"
    application

    TopicSubscription, TopicSubscriptionArgs

    Endpoint string
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    Protocol string
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.
    Endpoint string
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    Protocol string
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.
    endpoint String
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    protocol String
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.
    endpoint string
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    protocol string
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.
    endpoint str
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    protocol str
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.
    endpoint String
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    protocol String
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi