We recommend new projects start with resources from the AWS provider.
aws-native.sns.Topic
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
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 * 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",
        },
    },
});
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",
        },
    })
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 * 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",
        },
    },
});
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",
        },
    })
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_throughput_scope: 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)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::Topicfor more information about the expected schema for this property.
- ContentBased boolDeduplication 
- Enables content-based deduplication for FIFO topics.- By default, ContentBasedDeduplicationis set tofalse. If you create a FIFO topic and this attribute isfalse, you must specify a value for theMessageDeduplicationIdparameter for the Publish action.
- When you set ContentBasedDeduplicationtotrue, SNS uses a SHA-256 hash to generate theMessageDeduplicationIdusing 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 theMessageDeduplicationIdparameter for thePublishaction.
 
- By default, 
- DataProtection objectPolicy 
- 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::Topicfor more information about the expected schema for this property.
- DeliveryStatus List<Pulumi.Logging Aws Native. Sns. Inputs. Topic Logging Config> 
- The - DeliveryStatusLoggingconfiguration 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.
- FifoThroughput stringScope 
- Specifies the throughput quota and deduplication behavior to apply for the FIFO topic. Valid values are TopicorMessageGroup.
- FifoTopic bool
- Set to true to create a FIFO topic.
- KmsMaster stringKey Id 
- 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 KeyIdin 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, SignatureVersionis set to1.
- Subscription
List<Pulumi.Aws Native. Sns. Inputs. Topic Subscription> 
- The SNS subscriptions (endpoints) for this topic.
If you specify the Subscriptionproperty in theAWS::SNS::Topicresource and it creates an associated subscription resource, the associated subscription is not deleted when theAWS::SNS::Topicresource is deleted.
- 
List<Pulumi.Aws Native. 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:CreateTopicandsns:TagResourcepermissions.
- 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 TracingConfigis set toPassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set toActive, 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::Topicfor more information about the expected schema for this property.
- ContentBased boolDeduplication 
- Enables content-based deduplication for FIFO topics.- By default, ContentBasedDeduplicationis set tofalse. If you create a FIFO topic and this attribute isfalse, you must specify a value for theMessageDeduplicationIdparameter for the Publish action.
- When you set ContentBasedDeduplicationtotrue, SNS uses a SHA-256 hash to generate theMessageDeduplicationIdusing 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 theMessageDeduplicationIdparameter for thePublishaction.
 
- By default, 
- DataProtection interface{}Policy 
- 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::Topicfor more information about the expected schema for this property.
- DeliveryStatus []TopicLogging Logging Config Args 
- The - DeliveryStatusLoggingconfiguration 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.
- FifoThroughput stringScope 
- Specifies the throughput quota and deduplication behavior to apply for the FIFO topic. Valid values are TopicorMessageGroup.
- FifoTopic bool
- Set to true to create a FIFO topic.
- KmsMaster stringKey Id 
- 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 KeyIdin 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, SignatureVersionis set to1.
- Subscription
[]TopicSubscription Args 
- The SNS subscriptions (endpoints) for this topic.
If you specify the Subscriptionproperty in theAWS::SNS::Topicresource and it creates an associated subscription resource, the associated subscription is not deleted when theAWS::SNS::Topicresource is deleted.
- 
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:CreateTopicandsns:TagResourcepermissions.
- 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 TracingConfigis set toPassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set toActive, 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::Topicfor more information about the expected schema for this property.
- contentBased BooleanDeduplication 
- Enables content-based deduplication for FIFO topics.- By default, ContentBasedDeduplicationis set tofalse. If you create a FIFO topic and this attribute isfalse, you must specify a value for theMessageDeduplicationIdparameter for the Publish action.
- When you set ContentBasedDeduplicationtotrue, SNS uses a SHA-256 hash to generate theMessageDeduplicationIdusing 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 theMessageDeduplicationIdparameter for thePublishaction.
 
- By default, 
- dataProtection ObjectPolicy 
- 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::Topicfor more information about the expected schema for this property.
- deliveryStatus List<TopicLogging Logging Config> 
- The - DeliveryStatusLoggingconfiguration 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.
- fifoThroughput StringScope 
- Specifies the throughput quota and deduplication behavior to apply for the FIFO topic. Valid values are TopicorMessageGroup.
- fifoTopic Boolean
- Set to true to create a FIFO topic.
- kmsMaster StringKey Id 
- 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 KeyIdin 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, SignatureVersionis set to1.
- subscription
List<TopicSubscription> 
- The SNS subscriptions (endpoints) for this topic.
If you specify the Subscriptionproperty in theAWS::SNS::Topicresource and it creates an associated subscription resource, the associated subscription is not deleted when theAWS::SNS::Topicresource is deleted.
- 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:CreateTopicandsns:TagResourcepermissions.
- 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 TracingConfigis set toPassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set toActive, 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::Topicfor more information about the expected schema for this property.
- contentBased booleanDeduplication 
- Enables content-based deduplication for FIFO topics.- By default, ContentBasedDeduplicationis set tofalse. If you create a FIFO topic and this attribute isfalse, you must specify a value for theMessageDeduplicationIdparameter for the Publish action.
- When you set ContentBasedDeduplicationtotrue, SNS uses a SHA-256 hash to generate theMessageDeduplicationIdusing 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 theMessageDeduplicationIdparameter for thePublishaction.
 
- By default, 
- dataProtection anyPolicy 
- 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::Topicfor more information about the expected schema for this property.
- deliveryStatus TopicLogging Logging Config[] 
- The - DeliveryStatusLoggingconfiguration 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.
- fifoThroughput stringScope 
- Specifies the throughput quota and deduplication behavior to apply for the FIFO topic. Valid values are TopicorMessageGroup.
- fifoTopic boolean
- Set to true to create a FIFO topic.
- kmsMaster stringKey Id 
- 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 KeyIdin 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, SignatureVersionis set to1.
- subscription
TopicSubscription[] 
- The SNS subscriptions (endpoints) for this topic.
If you specify the Subscriptionproperty in theAWS::SNS::Topicresource and it creates an associated subscription resource, the associated subscription is not deleted when theAWS::SNS::Topicresource is deleted.
- 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:CreateTopicandsns:TagResourcepermissions.
- 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 TracingConfigis set toPassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set toActive, 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::Topicfor more information about the expected schema for this property.
- content_based_ booldeduplication 
- Enables content-based deduplication for FIFO topics.- By default, ContentBasedDeduplicationis set tofalse. If you create a FIFO topic and this attribute isfalse, you must specify a value for theMessageDeduplicationIdparameter for the Publish action.
- When you set ContentBasedDeduplicationtotrue, SNS uses a SHA-256 hash to generate theMessageDeduplicationIdusing 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 theMessageDeduplicationIdparameter for thePublishaction.
 
- By default, 
- data_protection_ Anypolicy 
- 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::Topicfor more information about the expected schema for this property.
- delivery_status_ Sequence[Topiclogging Logging Config Args] 
- The - DeliveryStatusLoggingconfiguration 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_throughput_ strscope 
- Specifies the throughput quota and deduplication behavior to apply for the FIFO topic. Valid values are TopicorMessageGroup.
- fifo_topic bool
- Set to true to create a FIFO topic.
- kms_master_ strkey_ id 
- 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 KeyIdin 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, SignatureVersionis set to1.
- subscription
Sequence[TopicSubscription Args] 
- The SNS subscriptions (endpoints) for this topic.
If you specify the Subscriptionproperty in theAWS::SNS::Topicresource and it creates an associated subscription resource, the associated subscription is not deleted when theAWS::SNS::Topicresource is deleted.
- 
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:CreateTopicandsns:TagResourcepermissions.
- 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 TracingConfigis set toPassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set toActive, 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::Topicfor more information about the expected schema for this property.
- contentBased BooleanDeduplication 
- Enables content-based deduplication for FIFO topics.- By default, ContentBasedDeduplicationis set tofalse. If you create a FIFO topic and this attribute isfalse, you must specify a value for theMessageDeduplicationIdparameter for the Publish action.
- When you set ContentBasedDeduplicationtotrue, SNS uses a SHA-256 hash to generate theMessageDeduplicationIdusing 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 theMessageDeduplicationIdparameter for thePublishaction.
 
- By default, 
- dataProtection AnyPolicy 
- 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::Topicfor more information about the expected schema for this property.
- deliveryStatus List<Property Map>Logging 
- The - DeliveryStatusLoggingconfiguration 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.
- fifoThroughput StringScope 
- Specifies the throughput quota and deduplication behavior to apply for the FIFO topic. Valid values are TopicorMessageGroup.
- fifoTopic Boolean
- Set to true to create a FIFO topic.
- kmsMaster StringKey Id 
- 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 KeyIdin 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, SignatureVersionis set to1.
- subscription List<Property Map>
- The SNS subscriptions (endpoints) for this topic.
If you specify the Subscriptionproperty in theAWS::SNS::Topicresource and it creates an associated subscription resource, the associated subscription is not deleted when theAWS::SNS::Topicresource is deleted.
- 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:CreateTopicandsns:TagResourcepermissions.
- 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 TracingConfigis set toPassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set toActive, 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:
Supporting Types
Tag, TagArgs  
TopicLoggingConfig, TopicLoggingConfigArgs      
- Protocol
Pulumi.Aws Native. Sns. Topic Logging Config Protocol 
- Indicates one of the supported protocols for the Amazon SNS topic.
At least one of the other three LoggingConfigproperties is recommend along withProtocol.
- FailureFeedback stringRole Arn 
- The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
- SuccessFeedback stringRole Arn 
- The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
- SuccessFeedback stringSample Rate 
- The percentage of successful message deliveries to be logged in Amazon CloudWatch. Valid percentage values range from 0 to 100.
- Protocol
TopicLogging Config Protocol 
- Indicates one of the supported protocols for the Amazon SNS topic.
At least one of the other three LoggingConfigproperties is recommend along withProtocol.
- FailureFeedback stringRole Arn 
- The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
- SuccessFeedback stringRole Arn 
- The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
- SuccessFeedback stringSample Rate 
- The percentage of successful message deliveries to be logged in Amazon CloudWatch. Valid percentage values range from 0 to 100.
- protocol
TopicLogging Config Protocol 
- Indicates one of the supported protocols for the Amazon SNS topic.
At least one of the other three LoggingConfigproperties is recommend along withProtocol.
- failureFeedback StringRole Arn 
- The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
- successFeedback StringRole Arn 
- The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
- successFeedback StringSample Rate 
- The percentage of successful message deliveries to be logged in Amazon CloudWatch. Valid percentage values range from 0 to 100.
- protocol
TopicLogging Config Protocol 
- Indicates one of the supported protocols for the Amazon SNS topic.
At least one of the other three LoggingConfigproperties is recommend along withProtocol.
- failureFeedback stringRole Arn 
- The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
- successFeedback stringRole Arn 
- The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
- successFeedback stringSample Rate 
- The percentage of successful message deliveries to be logged in Amazon CloudWatch. Valid percentage values range from 0 to 100.
- protocol
TopicLogging Config Protocol 
- Indicates one of the supported protocols for the Amazon SNS topic.
At least one of the other three LoggingConfigproperties is recommend along withProtocol.
- failure_feedback_ strrole_ arn 
- The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
- success_feedback_ strrole_ arn 
- The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
- success_feedback_ strsample_ rate 
- 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 LoggingConfigproperties is recommend along withProtocol.
- failureFeedback StringRole Arn 
- The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.
- successFeedback StringRole Arn 
- The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.
- successFeedback StringSample Rate 
- 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
- TopicLogging Config Protocol Https 
- http/s
- TopicLogging Config Protocol Sqs 
- sqs
- TopicLogging Config Protocol Lambda 
- lambda
- TopicLogging Config Protocol Firehose 
- firehose
- TopicLogging Config Protocol Application 
- 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 Endpointparameter of theSubscribeaction in the API Reference.
- Protocol string
- The subscription's protocol. For more information, see the Protocolparameter of theSubscribeaction 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 Endpointparameter of theSubscribeaction in the API Reference.
- Protocol string
- The subscription's protocol. For more information, see the Protocolparameter of theSubscribeaction 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 Endpointparameter of theSubscribeaction in the API Reference.
- protocol String
- The subscription's protocol. For more information, see the Protocolparameter of theSubscribeaction 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 Endpointparameter of theSubscribeaction in the API Reference.
- protocol string
- The subscription's protocol. For more information, see the Protocolparameter of theSubscribeaction 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 Endpointparameter of theSubscribeaction in the API Reference.
- protocol str
- The subscription's protocol. For more information, see the Protocolparameter of theSubscribeaction 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 Endpointparameter of theSubscribeaction in the API Reference.
- protocol String
- The subscription's protocol. For more information, see the Protocolparameter of theSubscribeaction in the API Reference.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.