Class CfnSubscription
The AWS::SNS::Subscription
resource subscribes an endpoint to an Amazon SNS topic.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnSubscription : CfnResource, IInspectable
Syntax (vb)
Public Class CfnSubscription
Inherits CfnResource
Implements IInspectable
Remarks
For a subscription to be created, the owner of the endpoint must confirm the subscription.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html
CloudformationResource: AWS::SNS::Subscription
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SNS;
var deliveryPolicy;
var filterPolicy;
var redrivePolicy;
var replayPolicy;
var cfnSubscription = new CfnSubscription(this, "MyCfnSubscription", new CfnSubscriptionProps {
Protocol = "protocol",
TopicArn = "topicArn",
// the properties below are optional
DeliveryPolicy = deliveryPolicy,
Endpoint = "endpoint",
FilterPolicy = filterPolicy,
FilterPolicyScope = "filterPolicyScope",
RawMessageDelivery = false,
RedrivePolicy = redrivePolicy,
Region = "region",
ReplayPolicy = replayPolicy,
SubscriptionRoleArn = "subscriptionRoleArn"
});
Synopsis
Constructors
CfnSubscription(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnSubscription(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnSubscription(Construct, String, ICfnSubscriptionProps) |
Properties
AttrId | |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
DeliveryPolicy | The delivery policy JSON assigned to the subscription. |
Endpoint | The subscription's endpoint. |
FilterPolicy | The filter policy JSON assigned to the subscription. |
FilterPolicyScope | This attribute lets you choose the filtering scope by using one of the following string value types:. |
Protocol | The subscription's protocol. |
RawMessageDelivery | When set to |
RedrivePolicy | When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. |
Region | For cross-region subscriptions, the region in which the topic resides. |
ReplayPolicy | |
SubscriptionRoleArn | This property applies only to Amazon Data Firehose delivery stream subscriptions. |
TopicArn | The ARN of the topic to subscribe to. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnSubscription(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnSubscription(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnSubscription(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnSubscription(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnSubscription(Construct, String, ICfnSubscriptionProps)
public CfnSubscription(Construct scope, string id, ICfnSubscriptionProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnSubscriptionProps
Resource properties.
Properties
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DeliveryPolicy
The delivery policy JSON assigned to the subscription.
public virtual object DeliveryPolicy { get; set; }
Property Value
System.Object
Endpoint
The subscription's endpoint.
public virtual string Endpoint { get; set; }
Property Value
System.String
FilterPolicy
The filter policy JSON assigned to the subscription.
public virtual object FilterPolicy { get; set; }
Property Value
System.Object
FilterPolicyScope
This attribute lets you choose the filtering scope by using one of the following string value types:.
public virtual string FilterPolicyScope { get; set; }
Property Value
System.String
Protocol
The subscription's protocol.
public virtual string Protocol { get; set; }
Property Value
System.String
RawMessageDelivery
When set to true
, enables raw message delivery.
public virtual object RawMessageDelivery { get; set; }
Property Value
System.Object
RedrivePolicy
When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue.
public virtual object RedrivePolicy { get; set; }
Property Value
System.Object
Region
For cross-region subscriptions, the region in which the topic resides.
public virtual string Region { get; set; }
Property Value
System.String
ReplayPolicy
public virtual object ReplayPolicy { get; set; }
Property Value
System.Object
SubscriptionRoleArn
This property applies only to Amazon Data Firehose delivery stream subscriptions.
public virtual string SubscriptionRoleArn { get; set; }
Property Value
System.String
TopicArn
The ARN of the topic to subscribe to.
public virtual string TopicArn { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>