aws-native.sns.Topic
Explore with Pulumi AI
Resource Type definition for AWS::SNS::Topic
Create Topic Resource
new Topic(name: string, args?: TopicArgs, opts?: CustomResourceOptions);
@overload
def Topic(resource_name: str,
opts: Optional[ResourceOptions] = None,
content_based_deduplication: Optional[bool] = None,
data_protection_policy: Optional[Any] = 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[TopicTagArgs]] = None,
topic_name: Optional[str] = None,
tracing_config: Optional[str] = None)
@overload
def Topic(resource_name: str,
args: Optional[TopicArgs] = None,
opts: Optional[ResourceOptions] = 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.
- 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
The Topic resource accepts the following input properties:
- Content
Based boolDeduplication 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, Amazon 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 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 30720
- Display
Name string The display name to use for an Amazon SNS topic with SMS subscriptions.
- Fifo
Topic bool Set to true to create a FIFO topic.
- Kms
Master stringKey Id The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms. For more examples, see KeyId in the AWS Key Management Service API Reference.
This property applies only to server-side-encryption.
- Signature
Version string Version of the Amazon SNS signature used. If the SignatureVersion is 1, Signature is a Base64-encoded SHA1withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values. If the SignatureVersion is 2, Signature is a Base64-encoded SHA256withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values.
- Subscription
List<Pulumi.
Aws Native. SNS. Inputs. Topic Subscription Args> The SNS subscriptions (endpoints) for this topic.
- List<Pulumi.
Aws Native. SNS. Inputs. Topic Tag Args> - Topic
Name 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, AWS CloudFormation generates a unique physical ID and uses that ID for the topic name. For more information, see Name Type.
- Tracing
Config string Tracing mode of an Amazon 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. Only supported on standard topics.
- Content
Based boolDeduplication 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, Amazon 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 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 30720
- Display
Name string The display name to use for an Amazon SNS topic with SMS subscriptions.
- Fifo
Topic bool Set to true to create a FIFO topic.
- Kms
Master stringKey Id The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms. For more examples, see KeyId in the AWS Key Management Service API Reference.
This property applies only to server-side-encryption.
- Signature
Version string Version of the Amazon SNS signature used. If the SignatureVersion is 1, Signature is a Base64-encoded SHA1withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values. If the SignatureVersion is 2, Signature is a Base64-encoded SHA256withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values.
- Subscription
[]Topic
Subscription Args The SNS subscriptions (endpoints) for this topic.
- []Topic
Tag Args - Topic
Name 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, AWS CloudFormation generates a unique physical ID and uses that ID for the topic name. For more information, see Name Type.
- Tracing
Config string Tracing mode of an Amazon 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. Only supported on standard topics.
- content
Based BooleanDeduplication 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, Amazon 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 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 30720
- display
Name String The display name to use for an Amazon SNS topic with SMS subscriptions.
- fifo
Topic Boolean Set to true to create a FIFO topic.
- kms
Master StringKey Id The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms. For more examples, see KeyId in the AWS Key Management Service API Reference.
This property applies only to server-side-encryption.
- signature
Version String Version of the Amazon SNS signature used. If the SignatureVersion is 1, Signature is a Base64-encoded SHA1withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values. If the SignatureVersion is 2, Signature is a Base64-encoded SHA256withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values.
- subscription
List<Topic
Subscription Args> The SNS subscriptions (endpoints) for this topic.
- List<Topic
Tag Args> - topic
Name 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, AWS CloudFormation generates a unique physical ID and uses that ID for the topic name. For more information, see Name Type.
- tracing
Config String Tracing mode of an Amazon 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. Only supported on standard topics.
- content
Based booleanDeduplication 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, Amazon 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 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 30720
- display
Name string The display name to use for an Amazon SNS topic with SMS subscriptions.
- fifo
Topic boolean Set to true to create a FIFO topic.
- kms
Master stringKey Id The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms. For more examples, see KeyId in the AWS Key Management Service API Reference.
This property applies only to server-side-encryption.
- signature
Version string Version of the Amazon SNS signature used. If the SignatureVersion is 1, Signature is a Base64-encoded SHA1withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values. If the SignatureVersion is 2, Signature is a Base64-encoded SHA256withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values.
- subscription
Topic
Subscription Args[] The SNS subscriptions (endpoints) for this topic.
- Topic
Tag Args[] - topic
Name 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, AWS CloudFormation generates a unique physical ID and uses that ID for the topic name. For more information, see Name Type.
- tracing
Config string Tracing mode of an Amazon 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. Only supported on standard topics.
- content_
based_ booldeduplication 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, Amazon 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_ 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 30720
- display_
name str The display name to use for an Amazon SNS topic with SMS subscriptions.
- 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 Amazon SNS or a custom CMK. For more information, see Key Terms. For more examples, see KeyId in the AWS Key Management Service API Reference.
This property applies only to server-side-encryption.
- signature_
version str Version of the Amazon SNS signature used. If the SignatureVersion is 1, Signature is a Base64-encoded SHA1withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values. If the SignatureVersion is 2, Signature is a Base64-encoded SHA256withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values.
- subscription
Sequence[Topic
Subscription Args] The SNS subscriptions (endpoints) for this topic.
- Sequence[Topic
Tag Args] - 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, AWS CloudFormation generates a unique physical ID and uses that ID for the topic name. For more information, see Name Type.
- tracing_
config str Tracing mode of an Amazon 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. Only supported on standard topics.
- content
Based BooleanDeduplication 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, Amazon 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 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 30720
- display
Name String The display name to use for an Amazon SNS topic with SMS subscriptions.
- fifo
Topic Boolean Set to true to create a FIFO topic.
- kms
Master StringKey Id The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms. For more examples, see KeyId in the AWS Key Management Service API Reference.
This property applies only to server-side-encryption.
- signature
Version String Version of the Amazon SNS signature used. If the SignatureVersion is 1, Signature is a Base64-encoded SHA1withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values. If the SignatureVersion is 2, Signature is a Base64-encoded SHA256withRSA signature of the Message, MessageId, Type, Timestamp, and TopicArn values.
- subscription List<Property Map>
The SNS subscriptions (endpoints) for this topic.
- List<Property Map>
- topic
Name 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, AWS CloudFormation generates a unique physical ID and uses that ID for the topic name. For more information, see Name Type.
- tracing
Config String Tracing mode of an Amazon 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. Only supported on standard topics.
Outputs
All input properties are implicitly available as output properties. Additionally, the Topic resource produces the following output properties:
Supporting Types
TopicSubscription
TopicTag
- Key string
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace,
_
,.
,/
,=
,+
, and-
.- Value string
The value for the tag. You can specify a value that is 0 to 256 characters in length.
- Key string
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace,
_
,.
,/
,=
,+
, and-
.- Value string
The value for the tag. You can specify a value that is 0 to 256 characters in length.
- key String
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace,
_
,.
,/
,=
,+
, and-
.- value String
The value for the tag. You can specify a value that is 0 to 256 characters in length.
- key string
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace,
_
,.
,/
,=
,+
, and-
.- value string
The value for the tag. You can specify a value that is 0 to 256 characters in length.
- key str
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace,
_
,.
,/
,=
,+
, and-
.- value str
The value for the tag. You can specify a value that is 0 to 256 characters in length.
- key String
The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace,
_
,.
,/
,=
,+
, and-
.- value String
The value for the tag. You can specify a value that is 0 to 256 characters in length.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0