Class CfnSubscription
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.sns.CfnSubscription
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-11T15:56:06.390Z")
@Stability(Stable)
public class CfnSubscription
extends CfnResource
implements IInspectable
The
AWS::SNS::Subscription
resource subscribes an endpoint to an Amazon SNS topic.
For a subscription to be created, the owner of the endpoint must` confirm the subscription.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.sns.*; Object deliveryPolicy; Object filterPolicy; Object redrivePolicy; Object replayPolicy; CfnSubscription cfnSubscription = CfnSubscription.Builder.create(this, "MyCfnSubscription") .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") .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnSubscription
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnSubscription
(software.amazon.jsii.JsiiObjectRef objRef) CfnSubscription
(software.constructs.Construct scope, String id, CfnSubscriptionProps props) -
Method Summary
Modifier and TypeMethodDescriptionArn of the subscription.The delivery policy JSON assigned to the subscription.The subscription's endpoint.The filter policy JSON assigned to the subscription.This attribute lets you choose the filtering scope by using one of the following string value types:.The subscription's protocol.When set totrue
, enables raw message delivery.When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue.For cross-region subscriptions, the region in which the topic resides.Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.This property applies only to Amazon Data Firehose delivery stream subscriptions.The ARN of the topic to subscribe to.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDeliveryPolicy
(Object value) The delivery policy JSON assigned to the subscription.void
setEndpoint
(String value) The subscription's endpoint.void
setFilterPolicy
(Object value) The filter policy JSON assigned to the subscription.void
setFilterPolicyScope
(String value) This attribute lets you choose the filtering scope by using one of the following string value types:.void
setProtocol
(String value) The subscription's protocol.void
setRawMessageDelivery
(Boolean value) When set totrue
, enables raw message delivery.void
setRawMessageDelivery
(IResolvable value) When set totrue
, enables raw message delivery.void
setRedrivePolicy
(Object value) When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue.void
For cross-region subscriptions, the region in which the topic resides.void
setReplayPolicy
(Object value) Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.void
setSubscriptionRoleArn
(String value) This property applies only to Amazon Data Firehose delivery stream subscriptions.void
setTopicArn
(String value) The ARN of the topic to subscribe to.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnSubscription
protected CfnSubscription(software.amazon.jsii.JsiiObjectRef objRef) -
CfnSubscription
protected CfnSubscription(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnSubscription
@Stability(Stable) public CfnSubscription(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnSubscriptionProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
Arn of the subscription. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getProtocol
The subscription's protocol. -
setProtocol
The subscription's protocol. -
getTopicArn
The ARN of the topic to subscribe to. -
setTopicArn
The ARN of the topic to subscribe to. -
getDeliveryPolicy
The delivery policy JSON assigned to the subscription. -
setDeliveryPolicy
The delivery policy JSON assigned to the subscription. -
getEndpoint
The subscription's endpoint. -
setEndpoint
The subscription's endpoint. -
getFilterPolicy
The filter policy JSON assigned to the subscription. -
setFilterPolicy
The filter policy JSON assigned to the subscription. -
getFilterPolicyScope
This attribute lets you choose the filtering scope by using one of the following string value types:. -
setFilterPolicyScope
This attribute lets you choose the filtering scope by using one of the following string value types:. -
getRawMessageDelivery
When set totrue
, enables raw message delivery. -
setRawMessageDelivery
When set totrue
, enables raw message delivery. -
setRawMessageDelivery
When set totrue
, enables raw message delivery. -
getRedrivePolicy
When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. -
setRedrivePolicy
When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. -
getRegion
For cross-region subscriptions, the region in which the topic resides. -
setRegion
For cross-region subscriptions, the region in which the topic resides. -
getReplayPolicy
Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes. -
setReplayPolicy
Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes. -
getSubscriptionRoleArn
This property applies only to Amazon Data Firehose delivery stream subscriptions. -
setSubscriptionRoleArn
This property applies only to Amazon Data Firehose delivery stream subscriptions.
-