Class Topic
Provides an SNS topic resource
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var userUpdates = new Aws.Sns.Topic("userUpdates", new Aws.Sns.TopicArgs
{
});
}
}
Example with Delivery Policy
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var userUpdates = new Aws.Sns.Topic("userUpdates", new Aws.Sns.TopicArgs
{
DeliveryPolicy = @"{
""http"": {
""defaultHealthyRetryPolicy"": {
""minDelayTarget"": 20,
""maxDelayTarget"": 20,
""numRetries"": 3,
""numMaxDelayRetries"": 0,
""numNoDelayRetries"": 0,
""numMinDelayRetries"": 0,
""backoffFunction"": ""linear""
},
""disableSubscriptionOverrides"": false,
""defaultThrottlePolicy"": {
""maxReceivesPerSecond"": 1
}
}
}
",
});
}
}
Example with Server-side encryption (SSE)
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var userUpdates = new Aws.Sns.Topic("userUpdates", new Aws.Sns.TopicArgs
{
KmsMasterKeyId = "alias/aws/sns",
});
}
}
Message Delivery Status Arguments
The <endpoint>_success_feedback_role_arn and <endpoint>_failure_feedback_role_arn arguments are used to give Amazon SNS write access to use CloudWatch Logs on your behalf. The <endpoint>_success_feedback_sample_rate argument is for specifying the sample rate percentage (0-100) of successfully delivered messages. After you configure the <endpoint>_failure_feedback_role_arn argument, then all failed message deliveries generate CloudWatch Logs.
Inherited Members
Namespace: Pulumi.Aws.Sns
Assembly: Pulumi.Aws.dll
Syntax
public class Topic : CustomResource
Constructors
View SourceTopic(String, TopicArgs, CustomResourceOptions)
Create a Topic resource with the given unique name, arguments, and options.
Declaration
public Topic(string name, TopicArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| TopicArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceApplicationFailureFeedbackRoleArn
IAM role for failure feedback
Declaration
public Output<string> ApplicationFailureFeedbackRoleArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ApplicationSuccessFeedbackRoleArn
The IAM role permitted to receive success feedback for this topic
Declaration
public Output<string> ApplicationSuccessFeedbackRoleArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ApplicationSuccessFeedbackSampleRate
Percentage of success to sample
Declaration
public Output<int?> ApplicationSuccessFeedbackSampleRate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Arn
The ARN of the SNS topic, as a more obvious property (clone of id)
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DeliveryPolicy
The SNS delivery policy. More on AWS documentation
Declaration
public Output<string> DeliveryPolicy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DisplayName
The display name for the SNS topic
Declaration
public Output<string> DisplayName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
HttpFailureFeedbackRoleArn
IAM role for failure feedback
Declaration
public Output<string> HttpFailureFeedbackRoleArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
HttpSuccessFeedbackRoleArn
The IAM role permitted to receive success feedback for this topic
Declaration
public Output<string> HttpSuccessFeedbackRoleArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
HttpSuccessFeedbackSampleRate
Percentage of success to sample
Declaration
public Output<int?> HttpSuccessFeedbackSampleRate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
KmsMasterKeyId
The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms
Declaration
public Output<string> KmsMasterKeyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LambdaFailureFeedbackRoleArn
IAM role for failure feedback
Declaration
public Output<string> LambdaFailureFeedbackRoleArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LambdaSuccessFeedbackRoleArn
The IAM role permitted to receive success feedback for this topic
Declaration
public Output<string> LambdaSuccessFeedbackRoleArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LambdaSuccessFeedbackSampleRate
Percentage of success to sample
Declaration
public Output<int?> LambdaSuccessFeedbackSampleRate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Name
The friendly name for the SNS topic. By default generated by this provider.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamePrefix
The friendly name for the SNS topic. Conflicts with name.
Declaration
public Output<string> NamePrefix { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Policy
The fully-formed AWS policy as JSON.
Declaration
public Output<string> Policy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SqsFailureFeedbackRoleArn
IAM role for failure feedback
Declaration
public Output<string> SqsFailureFeedbackRoleArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SqsSuccessFeedbackRoleArn
The IAM role permitted to receive success feedback for this topic
Declaration
public Output<string> SqsSuccessFeedbackRoleArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SqsSuccessFeedbackSampleRate
Percentage of success to sample
Declaration
public Output<int?> SqsSuccessFeedbackSampleRate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Tags
Key-value map of resource tags
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Methods
View SourceGet(String, Input<String>, TopicState, CustomResourceOptions)
Get an existing Topic resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Topic Get(string name, Input<string> id, TopicState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| TopicState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Topic |