Interface ISubscriptionProps
Properties for creating a new subscription.
Inherited Members
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ISubscriptionProps : ISubscriptionOptions
Syntax (vb)
Public Interface ISubscriptionProps Inherits ISubscriptionOptions
Remarks
ExampleMetadata: infused
Examples
// producerStack defines an SNS topic
Topic topic;
// consumerStack subscribes to it with a weak reference,
// so the producer can be torn down without blocking on this consumer
var consumerStack = new Stack(app, "Consumer", new StackProps {
Env = new Environment { Account = "123456789012", Region = "us-east-1" }
});
new Subscription(consumerStack, "Subscription", new SubscriptionProps {
Topic = Topic.FromTopicArn(consumerStack, "Topic", Stack.ConsumeReference(topic.TopicArn)),
Endpoint = "https://example.com/webhook",
Protocol = SubscriptionProtocol.HTTPS
});
Synopsis
Properties
| Topic | The topic to subscribe to. |
Properties
Topic
The topic to subscribe to.
ITopic Topic { get; }
Property Value
Remarks
ExampleMetadata: infused