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.104.0 (build e79254c)",
date="2024-11-06T23:25:17.280Z")
@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 ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnSubscription(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnSubscription(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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDeliveryPolicy(Object value) The delivery policy JSON assigned to the subscription.voidsetEndpoint(String value) The subscription's endpoint.voidsetFilterPolicy(Object value) The filter policy JSON assigned to the subscription.voidsetFilterPolicyScope(String value) This attribute lets you choose the filtering scope by using one of the following string value types:.voidsetProtocol(String value) The subscription's protocol.voidsetRawMessageDelivery(Boolean value) When set totrue, enables raw message delivery.voidsetRawMessageDelivery(IResolvable value) When set totrue, enables raw message delivery.voidsetRedrivePolicy(Object value) When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue.voidFor cross-region subscriptions, the region in which the topic resides.voidsetReplayPolicy(Object value) Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.voidsetSubscriptionRoleArn(String value) This property applies only to Amazon Data Firehose delivery stream subscriptions.voidsetTopicArn(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, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
inspectin 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
Arn of the subscription. -
getCfnProperties
- Overrides:
getCfnPropertiesin 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.
-