sns

package
v1.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LookupTopicArgs

type LookupTopicArgs struct {
	// The friendly name of the topic to match.
	Name string `pulumi:"name"`
}

A collection of arguments for invoking getTopic.

type LookupTopicResult

type LookupTopicResult struct {
	// Set to the ARN of the found topic, suitable for referencing in other resources that support SNS topics.
	Arn string `pulumi:"arn"`
	// id is the provider-assigned unique ID for this managed resource.
	Id   string `pulumi:"id"`
	Name string `pulumi:"name"`
}

A collection of values returned by getTopic.

func LookupTopic

func LookupTopic(ctx *pulumi.Context, args *LookupTopicArgs, opts ...pulumi.InvokeOption) (*LookupTopicResult, error)

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.

type PlatformApplication

type PlatformApplication struct {
	pulumi.CustomResourceState

	// The ARN of the SNS platform application
	Arn pulumi.StringOutput `pulumi:"arn"`
	// SNS Topic triggered when a delivery to any of the platform endpoints associated with your platform application encounters a permanent failure.
	EventDeliveryFailureTopicArn pulumi.StringPtrOutput `pulumi:"eventDeliveryFailureTopicArn"`
	// SNS Topic triggered when a new platform endpoint is added to your platform application.
	EventEndpointCreatedTopicArn pulumi.StringPtrOutput `pulumi:"eventEndpointCreatedTopicArn"`
	// SNS Topic triggered when an existing platform endpoint is deleted from your platform application.
	EventEndpointDeletedTopicArn pulumi.StringPtrOutput `pulumi:"eventEndpointDeletedTopicArn"`
	// SNS Topic triggered when an existing platform endpoint is changed from your platform application.
	EventEndpointUpdatedTopicArn pulumi.StringPtrOutput `pulumi:"eventEndpointUpdatedTopicArn"`
	// The IAM role permitted to receive failure feedback for this application.
	FailureFeedbackRoleArn pulumi.StringPtrOutput `pulumi:"failureFeedbackRoleArn"`
	// The friendly name for the SNS platform application
	Name pulumi.StringOutput `pulumi:"name"`
	// The platform that the app is registered with. See [Platform][1] for supported platforms.
	Platform pulumi.StringOutput `pulumi:"platform"`
	// Application Platform credential. See [Credential][1] 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.
	PlatformCredential pulumi.StringOutput `pulumi:"platformCredential"`
	// Application Platform principal. See [Principal][2] 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.
	PlatformPrincipal pulumi.StringPtrOutput `pulumi:"platformPrincipal"`
	// The IAM role permitted to receive success feedback for this application.
	SuccessFeedbackRoleArn pulumi.StringPtrOutput `pulumi:"successFeedbackRoleArn"`
	// The percentage of success to sample (0-100)
	SuccessFeedbackSampleRate pulumi.StringPtrOutput `pulumi:"successFeedbackSampleRate"`
}

Provides an SNS platform application resource

func GetPlatformApplication

func GetPlatformApplication(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *PlatformApplicationState, opts ...pulumi.ResourceOption) (*PlatformApplication, error)

GetPlatformApplication gets an existing PlatformApplication resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewPlatformApplication

func NewPlatformApplication(ctx *pulumi.Context,
	name string, args *PlatformApplicationArgs, opts ...pulumi.ResourceOption) (*PlatformApplication, error)

NewPlatformApplication registers a new resource with the given unique name, arguments, and options.

type PlatformApplicationArgs

type PlatformApplicationArgs struct {
	// SNS Topic triggered when a delivery to any of the platform endpoints associated with your platform application encounters a permanent failure.
	EventDeliveryFailureTopicArn pulumi.StringPtrInput
	// SNS Topic triggered when a new platform endpoint is added to your platform application.
	EventEndpointCreatedTopicArn pulumi.StringPtrInput
	// SNS Topic triggered when an existing platform endpoint is deleted from your platform application.
	EventEndpointDeletedTopicArn pulumi.StringPtrInput
	// SNS Topic triggered when an existing platform endpoint is changed from your platform application.
	EventEndpointUpdatedTopicArn pulumi.StringPtrInput
	// The IAM role permitted to receive failure feedback for this application.
	FailureFeedbackRoleArn pulumi.StringPtrInput
	// The friendly name for the SNS platform application
	Name pulumi.StringPtrInput
	// The platform that the app is registered with. See [Platform][1] for supported platforms.
	Platform pulumi.StringInput
	// Application Platform credential. See [Credential][1] 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.
	PlatformCredential pulumi.StringInput
	// Application Platform principal. See [Principal][2] 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.
	PlatformPrincipal pulumi.StringPtrInput
	// The IAM role permitted to receive success feedback for this application.
	SuccessFeedbackRoleArn pulumi.StringPtrInput
	// The percentage of success to sample (0-100)
	SuccessFeedbackSampleRate pulumi.StringPtrInput
}

The set of arguments for constructing a PlatformApplication resource.

func (PlatformApplicationArgs) ElementType

func (PlatformApplicationArgs) ElementType() reflect.Type

type PlatformApplicationState

type PlatformApplicationState struct {
	// The ARN of the SNS platform application
	Arn pulumi.StringPtrInput
	// SNS Topic triggered when a delivery to any of the platform endpoints associated with your platform application encounters a permanent failure.
	EventDeliveryFailureTopicArn pulumi.StringPtrInput
	// SNS Topic triggered when a new platform endpoint is added to your platform application.
	EventEndpointCreatedTopicArn pulumi.StringPtrInput
	// SNS Topic triggered when an existing platform endpoint is deleted from your platform application.
	EventEndpointDeletedTopicArn pulumi.StringPtrInput
	// SNS Topic triggered when an existing platform endpoint is changed from your platform application.
	EventEndpointUpdatedTopicArn pulumi.StringPtrInput
	// The IAM role permitted to receive failure feedback for this application.
	FailureFeedbackRoleArn pulumi.StringPtrInput
	// The friendly name for the SNS platform application
	Name pulumi.StringPtrInput
	// The platform that the app is registered with. See [Platform][1] for supported platforms.
	Platform pulumi.StringPtrInput
	// Application Platform credential. See [Credential][1] 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.
	PlatformCredential pulumi.StringPtrInput
	// Application Platform principal. See [Principal][2] 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.
	PlatformPrincipal pulumi.StringPtrInput
	// The IAM role permitted to receive success feedback for this application.
	SuccessFeedbackRoleArn pulumi.StringPtrInput
	// The percentage of success to sample (0-100)
	SuccessFeedbackSampleRate pulumi.StringPtrInput
}

func (PlatformApplicationState) ElementType

func (PlatformApplicationState) ElementType() reflect.Type

type SmsPreferences

type SmsPreferences struct {
	pulumi.CustomResourceState

	// A string, such as your business brand, that is displayed as the sender on the receiving device.
	DefaultSenderId pulumi.StringPtrOutput `pulumi:"defaultSenderId"`
	// The type of SMS message that you will send by default. Possible values are: Promotional, Transactional
	DefaultSmsType pulumi.StringPtrOutput `pulumi:"defaultSmsType"`
	// The ARN of the IAM role that allows Amazon SNS to write logs about SMS deliveries in CloudWatch Logs.
	DeliveryStatusIamRoleArn pulumi.StringPtrOutput `pulumi:"deliveryStatusIamRoleArn"`
	// The percentage of successful SMS deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value must be between 0 and 100.
	DeliveryStatusSuccessSamplingRate pulumi.StringPtrOutput `pulumi:"deliveryStatusSuccessSamplingRate"`
	// The maximum amount in USD that you are willing to spend each month to send SMS messages.
	MonthlySpendLimit pulumi.StringPtrOutput `pulumi:"monthlySpendLimit"`
	// The name of the Amazon S3 bucket to receive daily SMS usage reports from Amazon SNS.
	UsageReportS3Bucket pulumi.StringPtrOutput `pulumi:"usageReportS3Bucket"`
}

Provides a way to set SNS SMS preferences.

func GetSmsPreferences

func GetSmsPreferences(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SmsPreferencesState, opts ...pulumi.ResourceOption) (*SmsPreferences, error)

GetSmsPreferences gets an existing SmsPreferences resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewSmsPreferences

func NewSmsPreferences(ctx *pulumi.Context,
	name string, args *SmsPreferencesArgs, opts ...pulumi.ResourceOption) (*SmsPreferences, error)

NewSmsPreferences registers a new resource with the given unique name, arguments, and options.

type SmsPreferencesArgs

type SmsPreferencesArgs struct {
	// A string, such as your business brand, that is displayed as the sender on the receiving device.
	DefaultSenderId pulumi.StringPtrInput
	// The type of SMS message that you will send by default. Possible values are: Promotional, Transactional
	DefaultSmsType pulumi.StringPtrInput
	// The ARN of the IAM role that allows Amazon SNS to write logs about SMS deliveries in CloudWatch Logs.
	DeliveryStatusIamRoleArn pulumi.StringPtrInput
	// The percentage of successful SMS deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value must be between 0 and 100.
	DeliveryStatusSuccessSamplingRate pulumi.StringPtrInput
	// The maximum amount in USD that you are willing to spend each month to send SMS messages.
	MonthlySpendLimit pulumi.StringPtrInput
	// The name of the Amazon S3 bucket to receive daily SMS usage reports from Amazon SNS.
	UsageReportS3Bucket pulumi.StringPtrInput
}

The set of arguments for constructing a SmsPreferences resource.

func (SmsPreferencesArgs) ElementType

func (SmsPreferencesArgs) ElementType() reflect.Type

type SmsPreferencesState

type SmsPreferencesState struct {
	// A string, such as your business brand, that is displayed as the sender on the receiving device.
	DefaultSenderId pulumi.StringPtrInput
	// The type of SMS message that you will send by default. Possible values are: Promotional, Transactional
	DefaultSmsType pulumi.StringPtrInput
	// The ARN of the IAM role that allows Amazon SNS to write logs about SMS deliveries in CloudWatch Logs.
	DeliveryStatusIamRoleArn pulumi.StringPtrInput
	// The percentage of successful SMS deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value must be between 0 and 100.
	DeliveryStatusSuccessSamplingRate pulumi.StringPtrInput
	// The maximum amount in USD that you are willing to spend each month to send SMS messages.
	MonthlySpendLimit pulumi.StringPtrInput
	// The name of the Amazon S3 bucket to receive daily SMS usage reports from Amazon SNS.
	UsageReportS3Bucket pulumi.StringPtrInput
}

func (SmsPreferencesState) ElementType

func (SmsPreferencesState) ElementType() reflect.Type

type Topic

type Topic struct {
	pulumi.CustomResourceState

	// IAM role for failure feedback
	ApplicationFailureFeedbackRoleArn pulumi.StringPtrOutput `pulumi:"applicationFailureFeedbackRoleArn"`
	// The IAM role permitted to receive success feedback for this topic
	ApplicationSuccessFeedbackRoleArn pulumi.StringPtrOutput `pulumi:"applicationSuccessFeedbackRoleArn"`
	// Percentage of success to sample
	ApplicationSuccessFeedbackSampleRate pulumi.IntPtrOutput `pulumi:"applicationSuccessFeedbackSampleRate"`
	// The ARN of the SNS topic, as a more obvious property (clone of id)
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The SNS delivery policy. More on [AWS documentation](https://docs.aws.amazon.com/sns/latest/dg/DeliveryPolicies.html)
	DeliveryPolicy pulumi.StringPtrOutput `pulumi:"deliveryPolicy"`
	// The display name for the SNS topic
	DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
	// IAM role for failure feedback
	HttpFailureFeedbackRoleArn pulumi.StringPtrOutput `pulumi:"httpFailureFeedbackRoleArn"`
	// The IAM role permitted to receive success feedback for this topic
	HttpSuccessFeedbackRoleArn pulumi.StringPtrOutput `pulumi:"httpSuccessFeedbackRoleArn"`
	// Percentage of success to sample
	HttpSuccessFeedbackSampleRate pulumi.IntPtrOutput `pulumi:"httpSuccessFeedbackSampleRate"`
	// The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see [Key Terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms)
	KmsMasterKeyId pulumi.StringPtrOutput `pulumi:"kmsMasterKeyId"`
	// IAM role for failure feedback
	LambdaFailureFeedbackRoleArn pulumi.StringPtrOutput `pulumi:"lambdaFailureFeedbackRoleArn"`
	// The IAM role permitted to receive success feedback for this topic
	LambdaSuccessFeedbackRoleArn pulumi.StringPtrOutput `pulumi:"lambdaSuccessFeedbackRoleArn"`
	// Percentage of success to sample
	LambdaSuccessFeedbackSampleRate pulumi.IntPtrOutput `pulumi:"lambdaSuccessFeedbackSampleRate"`
	// The friendly name for the SNS topic. By default generated by this provider.
	Name pulumi.StringOutput `pulumi:"name"`
	// The friendly name for the SNS topic. Conflicts with `name`.
	NamePrefix pulumi.StringPtrOutput `pulumi:"namePrefix"`
	// The fully-formed AWS policy as JSON.
	Policy pulumi.StringOutput `pulumi:"policy"`
	// IAM role for failure feedback
	SqsFailureFeedbackRoleArn pulumi.StringPtrOutput `pulumi:"sqsFailureFeedbackRoleArn"`
	// The IAM role permitted to receive success feedback for this topic
	SqsSuccessFeedbackRoleArn pulumi.StringPtrOutput `pulumi:"sqsSuccessFeedbackRoleArn"`
	// Percentage of success to sample
	SqsSuccessFeedbackSampleRate pulumi.IntPtrOutput `pulumi:"sqsSuccessFeedbackSampleRate"`
	// Key-value mapping of resource tags
	Tags pulumi.MapOutput `pulumi:"tags"`
}

Provides an SNS topic resource

## 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.

func GetTopic

func GetTopic(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TopicState, opts ...pulumi.ResourceOption) (*Topic, error)

GetTopic gets an existing Topic resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTopic

func NewTopic(ctx *pulumi.Context,
	name string, args *TopicArgs, opts ...pulumi.ResourceOption) (*Topic, error)

NewTopic registers a new resource with the given unique name, arguments, and options.

type TopicArgs

type TopicArgs struct {
	// IAM role for failure feedback
	ApplicationFailureFeedbackRoleArn pulumi.StringPtrInput
	// The IAM role permitted to receive success feedback for this topic
	ApplicationSuccessFeedbackRoleArn pulumi.StringPtrInput
	// Percentage of success to sample
	ApplicationSuccessFeedbackSampleRate pulumi.IntPtrInput
	// The SNS delivery policy. More on [AWS documentation](https://docs.aws.amazon.com/sns/latest/dg/DeliveryPolicies.html)
	DeliveryPolicy pulumi.StringPtrInput
	// The display name for the SNS topic
	DisplayName pulumi.StringPtrInput
	// IAM role for failure feedback
	HttpFailureFeedbackRoleArn pulumi.StringPtrInput
	// The IAM role permitted to receive success feedback for this topic
	HttpSuccessFeedbackRoleArn pulumi.StringPtrInput
	// Percentage of success to sample
	HttpSuccessFeedbackSampleRate pulumi.IntPtrInput
	// The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see [Key Terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms)
	KmsMasterKeyId pulumi.StringPtrInput
	// IAM role for failure feedback
	LambdaFailureFeedbackRoleArn pulumi.StringPtrInput
	// The IAM role permitted to receive success feedback for this topic
	LambdaSuccessFeedbackRoleArn pulumi.StringPtrInput
	// Percentage of success to sample
	LambdaSuccessFeedbackSampleRate pulumi.IntPtrInput
	// The friendly name for the SNS topic. By default generated by this provider.
	Name pulumi.StringPtrInput
	// The friendly name for the SNS topic. Conflicts with `name`.
	NamePrefix pulumi.StringPtrInput
	// The fully-formed AWS policy as JSON.
	Policy pulumi.StringPtrInput
	// IAM role for failure feedback
	SqsFailureFeedbackRoleArn pulumi.StringPtrInput
	// The IAM role permitted to receive success feedback for this topic
	SqsSuccessFeedbackRoleArn pulumi.StringPtrInput
	// Percentage of success to sample
	SqsSuccessFeedbackSampleRate pulumi.IntPtrInput
	// Key-value mapping of resource tags
	Tags pulumi.MapInput
}

The set of arguments for constructing a Topic resource.

func (TopicArgs) ElementType

func (TopicArgs) ElementType() reflect.Type

type TopicPolicy

type TopicPolicy struct {
	pulumi.CustomResourceState

	// The ARN of the SNS topic
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The fully-formed AWS policy as JSON.
	Policy pulumi.StringOutput `pulumi:"policy"`
}

Provides 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`

func GetTopicPolicy

func GetTopicPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TopicPolicyState, opts ...pulumi.ResourceOption) (*TopicPolicy, error)

GetTopicPolicy gets an existing TopicPolicy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTopicPolicy

func NewTopicPolicy(ctx *pulumi.Context,
	name string, args *TopicPolicyArgs, opts ...pulumi.ResourceOption) (*TopicPolicy, error)

NewTopicPolicy registers a new resource with the given unique name, arguments, and options.

type TopicPolicyArgs

type TopicPolicyArgs struct {
	// The ARN of the SNS topic
	Arn pulumi.StringInput
	// The fully-formed AWS policy as JSON.
	Policy pulumi.StringInput
}

The set of arguments for constructing a TopicPolicy resource.

func (TopicPolicyArgs) ElementType

func (TopicPolicyArgs) ElementType() reflect.Type

type TopicPolicyState

type TopicPolicyState struct {
	// The ARN of the SNS topic
	Arn pulumi.StringPtrInput
	// The fully-formed AWS policy as JSON.
	Policy pulumi.StringPtrInput
}

func (TopicPolicyState) ElementType

func (TopicPolicyState) ElementType() reflect.Type

type TopicState

type TopicState struct {
	// IAM role for failure feedback
	ApplicationFailureFeedbackRoleArn pulumi.StringPtrInput
	// The IAM role permitted to receive success feedback for this topic
	ApplicationSuccessFeedbackRoleArn pulumi.StringPtrInput
	// Percentage of success to sample
	ApplicationSuccessFeedbackSampleRate pulumi.IntPtrInput
	// The ARN of the SNS topic, as a more obvious property (clone of id)
	Arn pulumi.StringPtrInput
	// The SNS delivery policy. More on [AWS documentation](https://docs.aws.amazon.com/sns/latest/dg/DeliveryPolicies.html)
	DeliveryPolicy pulumi.StringPtrInput
	// The display name for the SNS topic
	DisplayName pulumi.StringPtrInput
	// IAM role for failure feedback
	HttpFailureFeedbackRoleArn pulumi.StringPtrInput
	// The IAM role permitted to receive success feedback for this topic
	HttpSuccessFeedbackRoleArn pulumi.StringPtrInput
	// Percentage of success to sample
	HttpSuccessFeedbackSampleRate pulumi.IntPtrInput
	// The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see [Key Terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms)
	KmsMasterKeyId pulumi.StringPtrInput
	// IAM role for failure feedback
	LambdaFailureFeedbackRoleArn pulumi.StringPtrInput
	// The IAM role permitted to receive success feedback for this topic
	LambdaSuccessFeedbackRoleArn pulumi.StringPtrInput
	// Percentage of success to sample
	LambdaSuccessFeedbackSampleRate pulumi.IntPtrInput
	// The friendly name for the SNS topic. By default generated by this provider.
	Name pulumi.StringPtrInput
	// The friendly name for the SNS topic. Conflicts with `name`.
	NamePrefix pulumi.StringPtrInput
	// The fully-formed AWS policy as JSON.
	Policy pulumi.StringPtrInput
	// IAM role for failure feedback
	SqsFailureFeedbackRoleArn pulumi.StringPtrInput
	// The IAM role permitted to receive success feedback for this topic
	SqsSuccessFeedbackRoleArn pulumi.StringPtrInput
	// Percentage of success to sample
	SqsSuccessFeedbackSampleRate pulumi.IntPtrInput
	// Key-value mapping of resource tags
	Tags pulumi.MapInput
}

func (TopicState) ElementType

func (TopicState) ElementType() reflect.Type

type TopicSubscription

type TopicSubscription struct {
	pulumi.CustomResourceState

	// The ARN of the subscription stored as a more user-friendly property
	Arn pulumi.StringOutput `pulumi:"arn"`
	// 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).
	ConfirmationTimeoutInMinutes pulumi.IntPtrOutput `pulumi:"confirmationTimeoutInMinutes"`
	// 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](https://docs.aws.amazon.com/sns/latest/dg/DeliveryPolicies.html) for more details.
	DeliveryPolicy pulumi.StringPtrOutput `pulumi:"deliveryPolicy"`
	// The endpoint to send data to, the contents will vary with the protocol. (see below for more information)
	Endpoint pulumi.StringOutput `pulumi:"endpoint"`
	// Boolean indicating whether the end point is capable of [auto confirming subscription](http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html#SendMessageToHttp.prepare) e.g., PagerDuty (default is false)
	EndpointAutoConfirms pulumi.BoolPtrOutput `pulumi:"endpointAutoConfirms"`
	// 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](https://docs.aws.amazon.com/sns/latest/dg/message-filtering.html) for more details.
	FilterPolicy pulumi.StringPtrOutput `pulumi:"filterPolicy"`
	// 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).
	Protocol pulumi.StringOutput `pulumi:"protocol"`
	// 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).
	RawMessageDelivery pulumi.BoolPtrOutput `pulumi:"rawMessageDelivery"`
	// The ARN of the SNS topic to subscribe to
	Topic pulumi.StringOutput `pulumi:"topic"`
}
Provides 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 "sns.TopicSubscription" to use an AWS provider that is in the same region of the SNS topic. If the "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 "sns.TopicSubscription" to use the AWS provider of the account with the SQS queue. If "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.

func GetTopicSubscription

func GetTopicSubscription(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TopicSubscriptionState, opts ...pulumi.ResourceOption) (*TopicSubscription, error)

GetTopicSubscription gets an existing TopicSubscription resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTopicSubscription

func NewTopicSubscription(ctx *pulumi.Context,
	name string, args *TopicSubscriptionArgs, opts ...pulumi.ResourceOption) (*TopicSubscription, error)

NewTopicSubscription registers a new resource with the given unique name, arguments, and options.

type TopicSubscriptionArgs

type TopicSubscriptionArgs struct {
	// 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).
	ConfirmationTimeoutInMinutes pulumi.IntPtrInput
	// 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](https://docs.aws.amazon.com/sns/latest/dg/DeliveryPolicies.html) for more details.
	DeliveryPolicy pulumi.StringPtrInput
	// The endpoint to send data to, the contents will vary with the protocol. (see below for more information)
	Endpoint pulumi.StringInput
	// Boolean indicating whether the end point is capable of [auto confirming subscription](http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html#SendMessageToHttp.prepare) e.g., PagerDuty (default is false)
	EndpointAutoConfirms pulumi.BoolPtrInput
	// 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](https://docs.aws.amazon.com/sns/latest/dg/message-filtering.html) for more details.
	FilterPolicy pulumi.StringPtrInput
	// 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).
	Protocol pulumi.StringInput
	// 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).
	RawMessageDelivery pulumi.BoolPtrInput
	// The ARN of the SNS topic to subscribe to
	Topic pulumi.Input
}

The set of arguments for constructing a TopicSubscription resource.

func (TopicSubscriptionArgs) ElementType

func (TopicSubscriptionArgs) ElementType() reflect.Type

type TopicSubscriptionState

type TopicSubscriptionState struct {
	// The ARN of the subscription stored as a more user-friendly property
	Arn pulumi.StringPtrInput
	// 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).
	ConfirmationTimeoutInMinutes pulumi.IntPtrInput
	// 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](https://docs.aws.amazon.com/sns/latest/dg/DeliveryPolicies.html) for more details.
	DeliveryPolicy pulumi.StringPtrInput
	// The endpoint to send data to, the contents will vary with the protocol. (see below for more information)
	Endpoint pulumi.StringPtrInput
	// Boolean indicating whether the end point is capable of [auto confirming subscription](http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html#SendMessageToHttp.prepare) e.g., PagerDuty (default is false)
	EndpointAutoConfirms pulumi.BoolPtrInput
	// 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](https://docs.aws.amazon.com/sns/latest/dg/message-filtering.html) for more details.
	FilterPolicy pulumi.StringPtrInput
	// 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).
	Protocol pulumi.StringPtrInput
	// 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).
	RawMessageDelivery pulumi.BoolPtrInput
	// The ARN of the SNS topic to subscribe to
	Topic pulumi.StringPtrInput
}

func (TopicSubscriptionState) ElementType

func (TopicSubscriptionState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL