Show / Hide Table of Contents

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.

Inheritance
System.Object
Resource
CustomResource
Topic
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Sns
Assembly: Pulumi.Aws.dll
Syntax
public class Topic : CustomResource

Constructors

View Source

Topic(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 Source

ApplicationFailureFeedbackRoleArn

IAM role for failure feedback

Declaration
public Output<string> ApplicationFailureFeedbackRoleArn { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

ApplicationSuccessFeedbackSampleRate

Percentage of success to sample

Declaration
public Output<int?> ApplicationSuccessFeedbackSampleRate { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

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>
View Source

DeliveryPolicy

The SNS delivery policy. More on AWS documentation

Declaration
public Output<string> DeliveryPolicy { get; }
Property Value
Type Description
Output<System.String>
View Source

DisplayName

The display name for the SNS topic

Declaration
public Output<string> DisplayName { get; }
Property Value
Type Description
Output<System.String>
View Source

HttpFailureFeedbackRoleArn

IAM role for failure feedback

Declaration
public Output<string> HttpFailureFeedbackRoleArn { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

HttpSuccessFeedbackSampleRate

Percentage of success to sample

Declaration
public Output<int?> HttpSuccessFeedbackSampleRate { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

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>
View Source

LambdaFailureFeedbackRoleArn

IAM role for failure feedback

Declaration
public Output<string> LambdaFailureFeedbackRoleArn { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

LambdaSuccessFeedbackSampleRate

Percentage of success to sample

Declaration
public Output<int?> LambdaSuccessFeedbackSampleRate { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

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>
View Source

NamePrefix

The friendly name for the SNS topic. Conflicts with name.

Declaration
public Output<string> NamePrefix { get; }
Property Value
Type Description
Output<System.String>
View Source

Policy

The fully-formed AWS policy as JSON.

Declaration
public Output<string> Policy { get; }
Property Value
Type Description
Output<System.String>
View Source

SqsFailureFeedbackRoleArn

IAM role for failure feedback

Declaration
public Output<string> SqsFailureFeedbackRoleArn { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

SqsSuccessFeedbackSampleRate

Percentage of success to sample

Declaration
public Output<int?> SqsSuccessFeedbackSampleRate { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.