Module sns
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
Resources
Functions
Others
- GetTopicArgs
- GetTopicResult
- PlatformApplicationArgs
- PlatformApplicationState
- SmsPreferencesArgs
- SmsPreferencesState
- SNSItem
- SNSMessageAttribute
- TopicArgs
- TopicEvent
- TopicEventHandler
- TopicEventSubscription
- TopicEventSubscriptionArgs
- TopicPolicyArgs
- TopicPolicyState
- TopicRecord
- TopicState
- TopicSubscriptionArgs
- TopicSubscriptionState
Resources
Resource PlatformApplication
class PlatformApplication extends CustomResourceProvides an SNS platform application resource
Example Usage
Apple Push Notification Service (APNS)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const apnsApplication = new aws.sns.PlatformApplication("apns_application", {
platform: "APNS",
platformCredential: "<APNS PRIVATE KEY>",
platformPrincipal: "<APNS CERTIFICATE>",
});Google Cloud Messaging (GCM)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const gcmApplication = new aws.sns.PlatformApplication("gcm_application", {
platform: "GCM",
platformCredential: "<GCM API KEY>",
});constructor
new PlatformApplication(name: string, args: PlatformApplicationArgs, opts?: pulumi.CustomResourceOptions)Create a PlatformApplication resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PlatformApplicationState, opts?: pulumi.CustomResourceOptions): PlatformApplicationGet an existing PlatformApplication resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is PlatformApplicationReturns true if the given object is an instance of PlatformApplication. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The ARN of the SNS platform application
property eventDeliveryFailureTopicArn
public eventDeliveryFailureTopicArn: pulumi.Output<string | undefined>;SNS Topic triggered when a delivery to any of the platform endpoints associated with your platform application encounters a permanent failure.
property eventEndpointCreatedTopicArn
public eventEndpointCreatedTopicArn: pulumi.Output<string | undefined>;SNS Topic triggered when a new platform endpoint is added to your platform application.
property eventEndpointDeletedTopicArn
public eventEndpointDeletedTopicArn: pulumi.Output<string | undefined>;SNS Topic triggered when an existing platform endpoint is deleted from your platform application.
property eventEndpointUpdatedTopicArn
public eventEndpointUpdatedTopicArn: pulumi.Output<string | undefined>;SNS Topic triggered when an existing platform endpoint is changed from your platform application.
property failureFeedbackRoleArn
public failureFeedbackRoleArn: pulumi.Output<string | undefined>;The IAM role permitted to receive failure feedback for this application.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The friendly name for the SNS platform application
property platform
public platform: pulumi.Output<string>;The platform that the app is registered with. See Platform for supported platforms.
property platformCredential
public platformCredential: pulumi.Output<string>;Application Platform credential. See Credential for type of credential required for platform. The value of this attribute when stored into the state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources.
property platformPrincipal
public platformPrincipal: pulumi.Output<string | undefined>;Application Platform principal. See Principal for type of principal required for platform. The value of this attribute when stored into the state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources.
property successFeedbackRoleArn
public successFeedbackRoleArn: pulumi.Output<string | undefined>;The IAM role permitted to receive success feedback for this application.
property successFeedbackSampleRate
public successFeedbackSampleRate: pulumi.Output<string | undefined>;The percentage of success to sample (0-100)
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource SmsPreferences
class SmsPreferences extends CustomResourceProvides a way to set SNS SMS preferences.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const updateSmsPrefs = new aws.sns.SmsPreferences("update_sms_prefs", {});constructor
new SmsPreferences(name: string, args?: SmsPreferencesArgs, opts?: pulumi.CustomResourceOptions)Create a SmsPreferences resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SmsPreferencesState, opts?: pulumi.CustomResourceOptions): SmsPreferencesGet an existing SmsPreferences resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is SmsPreferencesReturns true if the given object is an instance of SmsPreferences. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property defaultSenderId
public defaultSenderId: pulumi.Output<string | undefined>;A string, such as your business brand, that is displayed as the sender on the receiving device.
property defaultSmsType
public defaultSmsType: pulumi.Output<string | undefined>;The type of SMS message that you will send by default. Possible values are: Promotional, Transactional
property deliveryStatusIamRoleArn
public deliveryStatusIamRoleArn: pulumi.Output<string | undefined>;The ARN of the IAM role that allows Amazon SNS to write logs about SMS deliveries in CloudWatch Logs.
property deliveryStatusSuccessSamplingRate
public deliveryStatusSuccessSamplingRate: pulumi.Output<string | undefined>;The percentage of successful SMS deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value must be between 0 and 100.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property monthlySpendLimit
public monthlySpendLimit: pulumi.Output<string | undefined>;The maximum amount in USD that you are willing to spend each month to send SMS messages.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property usageReportS3Bucket
public usageReportS3Bucket: pulumi.Output<string | undefined>;The name of the Amazon S3 bucket to receive daily SMS usage reports from Amazon SNS.
Resource Topic
class Topic extends CustomResourceProvides an SNS topic resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const userUpdates = new aws.sns.Topic("user_updates", {});Example with Delivery Policy
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const userUpdates = new aws.sns.Topic("user_updates", {
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)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const userUpdates = new aws.sns.Topic("user_updates", {
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.
constructor
new Topic(name: string, args?: TopicArgs, opts?: pulumi.CustomResourceOptions)Create a Topic resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TopicState, opts?: pulumi.CustomResourceOptions): TopicGet an existing Topic resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is TopicReturns true if the given object is an instance of Topic. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method onEvent
onEvent(name: string, handler: TopicEventHandler, args?: TopicEventSubscriptionArgs, opts?: pulumi.ComponentResourceOptions): TopicEventSubscriptionCreates a new subscription to events fired from this Topic to the handler provided, along with options to control the behavior of the subscription.
property applicationFailureFeedbackRoleArn
public applicationFailureFeedbackRoleArn: pulumi.Output<string | undefined>;IAM role for failure feedback
property applicationSuccessFeedbackRoleArn
public applicationSuccessFeedbackRoleArn: pulumi.Output<string | undefined>;The IAM role permitted to receive success feedback for this topic
property applicationSuccessFeedbackSampleRate
public applicationSuccessFeedbackSampleRate: pulumi.Output<number | undefined>;Percentage of success to sample
property arn
public arn: pulumi.Output<ARN>;The ARN of the SNS topic, as a more obvious property (clone of id)
property deliveryPolicy
public deliveryPolicy: pulumi.Output<string | undefined>;The SNS delivery policy. More on AWS documentation
property displayName
public displayName: pulumi.Output<string | undefined>;The display name for the SNS topic
property httpFailureFeedbackRoleArn
public httpFailureFeedbackRoleArn: pulumi.Output<string | undefined>;IAM role for failure feedback
property httpSuccessFeedbackRoleArn
public httpSuccessFeedbackRoleArn: pulumi.Output<string | undefined>;The IAM role permitted to receive success feedback for this topic
property httpSuccessFeedbackSampleRate
public httpSuccessFeedbackSampleRate: pulumi.Output<number | undefined>;Percentage of success to sample
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property kmsMasterKeyId
public kmsMasterKeyId: pulumi.Output<string | undefined>;The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms
property lambdaFailureFeedbackRoleArn
public lambdaFailureFeedbackRoleArn: pulumi.Output<string | undefined>;IAM role for failure feedback
property lambdaSuccessFeedbackRoleArn
public lambdaSuccessFeedbackRoleArn: pulumi.Output<string | undefined>;The IAM role permitted to receive success feedback for this topic
property lambdaSuccessFeedbackSampleRate
public lambdaSuccessFeedbackSampleRate: pulumi.Output<number | undefined>;Percentage of success to sample
property name
public name: pulumi.Output<string>;The friendly name for the SNS topic. By default generated by this provider.
property namePrefix
public namePrefix: pulumi.Output<string | undefined>;The friendly name for the SNS topic. Conflicts with name.
property policy
public policy: pulumi.Output<string>;The fully-formed AWS policy as JSON.
property sqsFailureFeedbackRoleArn
public sqsFailureFeedbackRoleArn: pulumi.Output<string | undefined>;IAM role for failure feedback
property sqsSuccessFeedbackRoleArn
public sqsSuccessFeedbackRoleArn: pulumi.Output<string | undefined>;The IAM role permitted to receive success feedback for this topic
property sqsSuccessFeedbackSampleRate
public sqsSuccessFeedbackSampleRate: pulumi.Output<number | undefined>;Percentage of success to sample
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;Key-value map of resource tags
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource TopicPolicy
class TopicPolicy extends CustomResourceProvides an SNS topic policy resource
NOTE: If a Principal is specified as just an AWS account ID rather than an ARN, AWS silently converts it to the ARN for the root user, causing future deployments to differ. To avoid this problem, just specify the full ARN, e.g.
arn:aws:iam::123456789012:root
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.sns.Topic("test", {});
const snsTopicPolicy = test.arn.apply(arn => aws.iam.getPolicyDocument({
policyId: "__default_policy_ID",
statements: [{
actions: [
"SNS:Subscribe",
"SNS:SetTopicAttributes",
"SNS:RemovePermission",
"SNS:Receive",
"SNS:Publish",
"SNS:ListSubscriptionsByTopic",
"SNS:GetTopicAttributes",
"SNS:DeleteTopic",
"SNS:AddPermission",
],
conditions: [{
test: "StringEquals",
values: [var_account_id],
variable: "AWS:SourceOwner",
}],
effect: "Allow",
principals: [{
identifiers: ["*"],
type: "AWS",
}],
resources: [arn],
sid: "__default_statement_ID",
}],
}, { async: true }));
const defaultTopicPolicy = new aws.sns.TopicPolicy("default", {
arn: test.arn,
policy: snsTopicPolicy.json,
});constructor
new TopicPolicy(name: string, args: TopicPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a TopicPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TopicPolicyState, opts?: pulumi.CustomResourceOptions): TopicPolicyGet an existing TopicPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is TopicPolicyReturns true if the given object is an instance of TopicPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The ARN of the SNS topic
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property policy
public policy: pulumi.Output<string>;The fully-formed AWS policy as JSON.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource TopicSubscription
class TopicSubscription extends CustomResourceProvides a resource for subscribing to SNS topics. Requires that an SNS topic exist for the subscription to attach to. This resource allows you to automatically place messages sent to SNS topics in SQS queues, send them as HTTP(S) POST requests to a given endpoint, send SMS messages, or notify devices / applications. The most likely use case will probably be SQS queues.
NOTE: If the SNS topic and SQS queue are in different AWS regions, it is important for the “aws.sns.TopicSubscription” to use an AWS provider that is in the same region of the SNS topic. If the “aws.sns.TopicSubscription” is using a provider with a different region than the SNS topic, the subscription will fail to create.
NOTE: Setup of cross-account subscriptions from SNS topics to SQS queues requires the provider to have access to BOTH accounts.
NOTE: If SNS topic and SQS queue are in different AWS accounts but the same region it is important for the “aws.sns.TopicSubscription” to use the AWS provider of the account with the SQS queue. If “aws.sns.TopicSubscription” is using a Provider with a different account than the SQS queue, the provider creates the subscriptions but does not keep state and tries to re-create the subscription at every apply.
NOTE: If SNS topic and SQS queue are in different AWS accounts and different AWS regions it is important to recognize that the subscription needs to be initiated from the account with the SQS queue but in the region of the SNS topic.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const userUpdatesSqsTarget = new aws.sns.TopicSubscription("user_updates_sqs_target", {
endpoint: "arn:aws:sqs:us-west-2:432981146916:queue-too",
protocol: "sqs",
topic: "arn:aws:sns:us-west-2:432981146916:user-updates-topic",
});constructor
new TopicSubscription(name: string, args: TopicSubscriptionArgs, opts?: pulumi.CustomResourceOptions)Create a TopicSubscription resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TopicSubscriptionState, opts?: pulumi.CustomResourceOptions): TopicSubscriptionGet an existing TopicSubscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is TopicSubscriptionReturns true if the given object is an instance of TopicSubscription. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The ARN of the subscription stored as a more user-friendly property
property confirmationTimeoutInMinutes
public confirmationTimeoutInMinutes: pulumi.Output<number | undefined>;Integer indicating number of minutes to wait in retying mode for fetching subscription arn before marking it as failure. Only applicable for http and https protocols (default is 1 minute).
property deliveryPolicy
public deliveryPolicy: pulumi.Output<string | undefined>;JSON String with the delivery policy (retries, backoff, etc.) that will be used in the subscription - this only applies to HTTP/S subscriptions. Refer to the SNS docs for more details.
property endpoint
public endpoint: pulumi.Output<string>;The endpoint to send data to, the contents will vary with the protocol. (see below for more information)
property endpointAutoConfirms
public endpointAutoConfirms: pulumi.Output<boolean | undefined>;Boolean indicating whether the end point is capable of auto confirming subscription e.g., PagerDuty (default is false)
property filterPolicy
public filterPolicy: pulumi.Output<string | undefined>;JSON String with the filter policy that will be used in the subscription to filter messages seen by the target resource. Refer to the SNS docs for more details.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property protocol
public protocol: pulumi.Output<string>;The protocol to use. The possible values for this are: sqs, sms, lambda, application. (http or https are partially supported, see below) (email is an option but is unsupported, see below).
property rawMessageDelivery
public rawMessageDelivery: pulumi.Output<boolean | undefined>;Boolean indicating whether or not to enable raw message delivery (the original message is directly passed, not wrapped in JSON with the original message in the message property) (default is false).
property topic
public topic: pulumi.Output<string>;The ARN of the SNS topic to subscribe to
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getTopic
getTopic(args: GetTopicArgs, opts?: pulumi.InvokeOptions): Promise<GetTopicResult>Use this data source to get the ARN of a topic in AWS Simple Notification Service (SNS). By using this data source, you can reference SNS topics without having to hard code the ARNs as input.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.sns.getTopic({
name: "an_example_topic",
}, { async: true }));Others
interface GetTopicArgs
interface GetTopicArgsA collection of arguments for invoking getTopic.
property name
name: string;The friendly name of the topic to match.
interface GetTopicResult
interface GetTopicResultA collection of values returned by getTopic.
property arn
arn: string;Set to the ARN of the found topic, suitable for referencing in other resources that support SNS topics.
property id
id: string;The provider-assigned unique ID for this managed resource.
property name
name: string;interface PlatformApplicationArgs
interface PlatformApplicationArgsThe set of arguments for constructing a PlatformApplication resource.
property eventDeliveryFailureTopicArn
eventDeliveryFailureTopicArn?: pulumi.Input<string>;SNS Topic triggered when a delivery to any of the platform endpoints associated with your platform application encounters a permanent failure.
property eventEndpointCreatedTopicArn
eventEndpointCreatedTopicArn?: pulumi.Input<string>;SNS Topic triggered when a new platform endpoint is added to your platform application.
property eventEndpointDeletedTopicArn
eventEndpointDeletedTopicArn?: pulumi.Input<string>;SNS Topic triggered when an existing platform endpoint is deleted from your platform application.
property eventEndpointUpdatedTopicArn
eventEndpointUpdatedTopicArn?: pulumi.Input<string>;SNS Topic triggered when an existing platform endpoint is changed from your platform application.
property failureFeedbackRoleArn
failureFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive failure feedback for this application.
property name
name?: pulumi.Input<string>;The friendly name for the SNS platform application
property platform
platform: pulumi.Input<string>;The platform that the app is registered with. See Platform for supported platforms.
property platformCredential
platformCredential: pulumi.Input<string>;Application Platform credential. See Credential for type of credential required for platform. The value of this attribute when stored into the state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources.
property platformPrincipal
platformPrincipal?: pulumi.Input<string>;Application Platform principal. See Principal for type of principal required for platform. The value of this attribute when stored into the state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources.
property successFeedbackRoleArn
successFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive success feedback for this application.
property successFeedbackSampleRate
successFeedbackSampleRate?: pulumi.Input<string>;The percentage of success to sample (0-100)
interface PlatformApplicationState
interface PlatformApplicationStateInput properties used for looking up and filtering PlatformApplication resources.
property arn
arn?: pulumi.Input<string>;The ARN of the SNS platform application
property eventDeliveryFailureTopicArn
eventDeliveryFailureTopicArn?: pulumi.Input<string>;SNS Topic triggered when a delivery to any of the platform endpoints associated with your platform application encounters a permanent failure.
property eventEndpointCreatedTopicArn
eventEndpointCreatedTopicArn?: pulumi.Input<string>;SNS Topic triggered when a new platform endpoint is added to your platform application.
property eventEndpointDeletedTopicArn
eventEndpointDeletedTopicArn?: pulumi.Input<string>;SNS Topic triggered when an existing platform endpoint is deleted from your platform application.
property eventEndpointUpdatedTopicArn
eventEndpointUpdatedTopicArn?: pulumi.Input<string>;SNS Topic triggered when an existing platform endpoint is changed from your platform application.
property failureFeedbackRoleArn
failureFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive failure feedback for this application.
property name
name?: pulumi.Input<string>;The friendly name for the SNS platform application
property platform
platform?: pulumi.Input<string>;The platform that the app is registered with. See Platform for supported platforms.
property platformCredential
platformCredential?: pulumi.Input<string>;Application Platform credential. See Credential for type of credential required for platform. The value of this attribute when stored into the state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources.
property platformPrincipal
platformPrincipal?: pulumi.Input<string>;Application Platform principal. See Principal for type of principal required for platform. The value of this attribute when stored into the state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources.
property successFeedbackRoleArn
successFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive success feedback for this application.
property successFeedbackSampleRate
successFeedbackSampleRate?: pulumi.Input<string>;The percentage of success to sample (0-100)
interface SmsPreferencesArgs
interface SmsPreferencesArgsThe set of arguments for constructing a SmsPreferences resource.
property defaultSenderId
defaultSenderId?: pulumi.Input<string>;A string, such as your business brand, that is displayed as the sender on the receiving device.
property defaultSmsType
defaultSmsType?: pulumi.Input<string>;The type of SMS message that you will send by default. Possible values are: Promotional, Transactional
property deliveryStatusIamRoleArn
deliveryStatusIamRoleArn?: pulumi.Input<string>;The ARN of the IAM role that allows Amazon SNS to write logs about SMS deliveries in CloudWatch Logs.
property deliveryStatusSuccessSamplingRate
deliveryStatusSuccessSamplingRate?: pulumi.Input<string>;The percentage of successful SMS deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value must be between 0 and 100.
property monthlySpendLimit
monthlySpendLimit?: pulumi.Input<string>;The maximum amount in USD that you are willing to spend each month to send SMS messages.
property usageReportS3Bucket
usageReportS3Bucket?: pulumi.Input<string>;The name of the Amazon S3 bucket to receive daily SMS usage reports from Amazon SNS.
interface SmsPreferencesState
interface SmsPreferencesStateInput properties used for looking up and filtering SmsPreferences resources.
property defaultSenderId
defaultSenderId?: pulumi.Input<string>;A string, such as your business brand, that is displayed as the sender on the receiving device.
property defaultSmsType
defaultSmsType?: pulumi.Input<string>;The type of SMS message that you will send by default. Possible values are: Promotional, Transactional
property deliveryStatusIamRoleArn
deliveryStatusIamRoleArn?: pulumi.Input<string>;The ARN of the IAM role that allows Amazon SNS to write logs about SMS deliveries in CloudWatch Logs.
property deliveryStatusSuccessSamplingRate
deliveryStatusSuccessSamplingRate?: pulumi.Input<string>;The percentage of successful SMS deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value must be between 0 and 100.
property monthlySpendLimit
monthlySpendLimit?: pulumi.Input<string>;The maximum amount in USD that you are willing to spend each month to send SMS messages.
property usageReportS3Bucket
usageReportS3Bucket?: pulumi.Input<string>;The name of the Amazon S3 bucket to receive daily SMS usage reports from Amazon SNS.
interface SNSItem
interface SNSItemproperty Message
Message: string;property MessageAttributes
MessageAttributes: {[key: string]: SNSMessageAttribute};property MessageId
MessageId: string;property Signature
Signature: string;property SignatureVersion
SignatureVersion: string;property SigningCertUrl
SigningCertUrl: string;property Subject
Subject: string;property Timestamp
Timestamp: string;property TopicArn
TopicArn: string;property Type
Type: string;property UnsubscribeUrl
UnsubscribeUrl: string;interface SNSMessageAttribute
interface SNSMessageAttributeproperty Type
Type: string;property Value
Value: string;interface TopicArgs
interface TopicArgsThe set of arguments for constructing a Topic resource.
property applicationFailureFeedbackRoleArn
applicationFailureFeedbackRoleArn?: pulumi.Input<string>;IAM role for failure feedback
property applicationSuccessFeedbackRoleArn
applicationSuccessFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive success feedback for this topic
property applicationSuccessFeedbackSampleRate
applicationSuccessFeedbackSampleRate?: pulumi.Input<number>;Percentage of success to sample
property deliveryPolicy
deliveryPolicy?: pulumi.Input<string>;The SNS delivery policy. More on AWS documentation
property displayName
displayName?: pulumi.Input<string>;The display name for the SNS topic
property httpFailureFeedbackRoleArn
httpFailureFeedbackRoleArn?: pulumi.Input<string>;IAM role for failure feedback
property httpSuccessFeedbackRoleArn
httpSuccessFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive success feedback for this topic
property httpSuccessFeedbackSampleRate
httpSuccessFeedbackSampleRate?: pulumi.Input<number>;Percentage of success to sample
property kmsMasterKeyId
kmsMasterKeyId?: pulumi.Input<string>;The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms
property lambdaFailureFeedbackRoleArn
lambdaFailureFeedbackRoleArn?: pulumi.Input<string>;IAM role for failure feedback
property lambdaSuccessFeedbackRoleArn
lambdaSuccessFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive success feedback for this topic
property lambdaSuccessFeedbackSampleRate
lambdaSuccessFeedbackSampleRate?: pulumi.Input<number>;Percentage of success to sample
property name
name?: pulumi.Input<string>;The friendly name for the SNS topic. By default generated by this provider.
property namePrefix
namePrefix?: pulumi.Input<string>;The friendly name for the SNS topic. Conflicts with name.
property policy
policy?: pulumi.Input<string>;The fully-formed AWS policy as JSON.
property sqsFailureFeedbackRoleArn
sqsFailureFeedbackRoleArn?: pulumi.Input<string>;IAM role for failure feedback
property sqsSuccessFeedbackRoleArn
sqsSuccessFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive success feedback for this topic
property sqsSuccessFeedbackSampleRate
sqsSuccessFeedbackSampleRate?: pulumi.Input<number>;Percentage of success to sample
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
interface TopicEvent
interface TopicEventproperty Records
Records: TopicRecord[];type TopicEventHandler
type TopicEventHandler = lambda.EventHandler<TopicEvent, void>;class TopicEventSubscription
class TopicEventSubscription extends EventSubscriptionconstructor
public new TopicEventSubscription(name: string, topic: Topic, handler: TopicEventHandler, args: TopicEventSubscriptionArgs, opts: ComponentResourceOptions)method getData
protected getData(): Promise<TData>Retrieves the data produces by [initialize]. The data is immediately available in a
derived class’s constructor after the super(...) call to ComponentResource.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod initialize
protected initialize(args: Inputs): Promise<TData>Can be overridden by a subclass to asynchronously initialize data for this Component
automatically when constructed. The data will be available immediately for subclass
constructors to use. To access the data use .getData.
method isInstance
static isInstance(obj: any): obj is ComponentResourceReturns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method registerOutputs
protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): voidregisterOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
ComponentResources can call this at the end of their constructor to indicate that they are
done creating child resources. This is not strictly necessary as this will automatically be
called after the initialize method completes.
property func
public func: LambdaFunction;property permission
public permission: Permission;property subscription
public subscription: TopicSubscription;The underlying sns object created for the subscription.
property topic
public topic: Topic;property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
type TopicEventSubscriptionArgs
type TopicEventSubscriptionArgs = { ... };Arguments to control the topic subscription. Currently empty, but still defined in case of future need.
interface TopicPolicyArgs
interface TopicPolicyArgsThe set of arguments for constructing a TopicPolicy resource.
property arn
arn: pulumi.Input<string>;The ARN of the SNS topic
property policy
policy: pulumi.Input<string>;The fully-formed AWS policy as JSON.
interface TopicPolicyState
interface TopicPolicyStateInput properties used for looking up and filtering TopicPolicy resources.
property arn
arn?: pulumi.Input<string>;The ARN of the SNS topic
property policy
policy?: pulumi.Input<string>;The fully-formed AWS policy as JSON.
interface TopicRecord
interface TopicRecordproperty EventSource
EventSource: string;property EventSubscriptionArn
EventSubscriptionArn: string;property EventVersion
EventVersion: string;property Sns
Sns: SNSItem;interface TopicState
interface TopicStateInput properties used for looking up and filtering Topic resources.
property applicationFailureFeedbackRoleArn
applicationFailureFeedbackRoleArn?: pulumi.Input<string>;IAM role for failure feedback
property applicationSuccessFeedbackRoleArn
applicationSuccessFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive success feedback for this topic
property applicationSuccessFeedbackSampleRate
applicationSuccessFeedbackSampleRate?: pulumi.Input<number>;Percentage of success to sample
property arn
arn?: pulumi.Input<ARN>;The ARN of the SNS topic, as a more obvious property (clone of id)
property deliveryPolicy
deliveryPolicy?: pulumi.Input<string>;The SNS delivery policy. More on AWS documentation
property displayName
displayName?: pulumi.Input<string>;The display name for the SNS topic
property httpFailureFeedbackRoleArn
httpFailureFeedbackRoleArn?: pulumi.Input<string>;IAM role for failure feedback
property httpSuccessFeedbackRoleArn
httpSuccessFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive success feedback for this topic
property httpSuccessFeedbackSampleRate
httpSuccessFeedbackSampleRate?: pulumi.Input<number>;Percentage of success to sample
property kmsMasterKeyId
kmsMasterKeyId?: pulumi.Input<string>;The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms
property lambdaFailureFeedbackRoleArn
lambdaFailureFeedbackRoleArn?: pulumi.Input<string>;IAM role for failure feedback
property lambdaSuccessFeedbackRoleArn
lambdaSuccessFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive success feedback for this topic
property lambdaSuccessFeedbackSampleRate
lambdaSuccessFeedbackSampleRate?: pulumi.Input<number>;Percentage of success to sample
property name
name?: pulumi.Input<string>;The friendly name for the SNS topic. By default generated by this provider.
property namePrefix
namePrefix?: pulumi.Input<string>;The friendly name for the SNS topic. Conflicts with name.
property policy
policy?: pulumi.Input<string>;The fully-formed AWS policy as JSON.
property sqsFailureFeedbackRoleArn
sqsFailureFeedbackRoleArn?: pulumi.Input<string>;IAM role for failure feedback
property sqsSuccessFeedbackRoleArn
sqsSuccessFeedbackRoleArn?: pulumi.Input<string>;The IAM role permitted to receive success feedback for this topic
property sqsSuccessFeedbackSampleRate
sqsSuccessFeedbackSampleRate?: pulumi.Input<number>;Percentage of success to sample
property tags
tags?: pulumi.Input<{[key: string]: any}>;Key-value map of resource tags
interface TopicSubscriptionArgs
interface TopicSubscriptionArgsThe set of arguments for constructing a TopicSubscription resource.
property confirmationTimeoutInMinutes
confirmationTimeoutInMinutes?: pulumi.Input<number>;Integer indicating number of minutes to wait in retying mode for fetching subscription arn before marking it as failure. Only applicable for http and https protocols (default is 1 minute).
property deliveryPolicy
deliveryPolicy?: pulumi.Input<string>;JSON String with the delivery policy (retries, backoff, etc.) that will be used in the subscription - this only applies to HTTP/S subscriptions. Refer to the SNS docs for more details.
property endpoint
endpoint: pulumi.Input<string>;The endpoint to send data to, the contents will vary with the protocol. (see below for more information)
property endpointAutoConfirms
endpointAutoConfirms?: pulumi.Input<boolean>;Boolean indicating whether the end point is capable of auto confirming subscription e.g., PagerDuty (default is false)
property filterPolicy
filterPolicy?: pulumi.Input<string>;JSON String with the filter policy that will be used in the subscription to filter messages seen by the target resource. Refer to the SNS docs for more details.
property protocol
protocol: pulumi.Input<string>;The protocol to use. The possible values for this are: sqs, sms, lambda, application. (http or https are partially supported, see below) (email is an option but is unsupported, see below).
property rawMessageDelivery
rawMessageDelivery?: pulumi.Input<boolean>;Boolean indicating whether or not to enable raw message delivery (the original message is directly passed, not wrapped in JSON with the original message in the message property) (default is false).
property topic
topic: pulumi.Input<string | Topic>;The ARN of the SNS topic to subscribe to
interface TopicSubscriptionState
interface TopicSubscriptionStateInput properties used for looking up and filtering TopicSubscription resources.
property arn
arn?: pulumi.Input<string>;The ARN of the subscription stored as a more user-friendly property
property confirmationTimeoutInMinutes
confirmationTimeoutInMinutes?: pulumi.Input<number>;Integer indicating number of minutes to wait in retying mode for fetching subscription arn before marking it as failure. Only applicable for http and https protocols (default is 1 minute).
property deliveryPolicy
deliveryPolicy?: pulumi.Input<string>;JSON String with the delivery policy (retries, backoff, etc.) that will be used in the subscription - this only applies to HTTP/S subscriptions. Refer to the SNS docs for more details.
property endpoint
endpoint?: pulumi.Input<string>;The endpoint to send data to, the contents will vary with the protocol. (see below for more information)
property endpointAutoConfirms
endpointAutoConfirms?: pulumi.Input<boolean>;Boolean indicating whether the end point is capable of auto confirming subscription e.g., PagerDuty (default is false)
property filterPolicy
filterPolicy?: pulumi.Input<string>;JSON String with the filter policy that will be used in the subscription to filter messages seen by the target resource. Refer to the SNS docs for more details.
property protocol
protocol?: pulumi.Input<string>;The protocol to use. The possible values for this are: sqs, sms, lambda, application. (http or https are partially supported, see below) (email is an option but is unsupported, see below).
property rawMessageDelivery
rawMessageDelivery?: pulumi.Input<boolean>;Boolean indicating whether or not to enable raw message delivery (the original message is directly passed, not wrapped in JSON with the original message in the message property) (default is false).
property topic
topic?: pulumi.Input<string | Topic>;The ARN of the SNS topic to subscribe to