AWS::SNS::Subscription¶
Resource Type definition for AWS::SNS::Subscription
Generated by cfn-typegen --out cfn_types AWS::SNS::Subscription into cfn_types/sns.py:
# Generated by cfn-typegen from the CloudFormation registry schemas. Do not edit.
# fmt: off
# ruff: noqa
"""AWS::SNS resources."""
from collections.abc import Mapping
from typing import Any, Literal, NotRequired, Unpack
from typing_extensions import TypedDict
from cfn_typed.base import DeletionPolicy, DependsOn, ResourceAttrs, UpdateReplacePolicy, build
from cfn_typed.intrinsics import Expr
CONSTRAINTS:dict[str,Any]={
}
ATTRIBUTES:dict[str,Any]={"AWS::SNS::Subscription":["Arn"]}
RULES:dict[str,Any]={}
Nested types (3)
These are defined above the properties in the generated module.
class SubscriptionProps(TypedDict, closed=True):
'Resource Type definition for AWS::SNS::Subscription'
ReplayPolicy: NotRequired[Expr[Mapping[str, Any]] | Expr[str]]
"Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes."
RawMessageDelivery: NotRequired[Expr[bool]]
'When set to true, enables raw message delivery.'
Endpoint: NotRequired[Expr[str]]
"The subscription's endpoint."
FilterPolicy: NotRequired[Expr[Mapping[str, Any]] | Expr[str]]
'The filter policy JSON assigned to the subscription.'
TopicArn: Expr[str]
'The ARN of the topic to subscribe to.'
RedrivePolicy: NotRequired[Expr[Mapping[str, Any]] | Expr[str]]
'When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue.'
DeliveryPolicy: NotRequired[Expr[Mapping[str, Any]] | Expr[str]]
'The delivery policy JSON assigned to the subscription.'
Region: NotRequired[Expr[str]]
'For cross-region subscriptions, the region in which the topic resides.If no region is specified, AWS CloudFormation uses the region of the caller as the defa...'
SubscriptionRoleArn: NotRequired[Expr[str]]
'This property applies only to Amazon Data Firehose delivery stream subscriptions.'
FilterPolicyScope: NotRequired[Expr[str]]
'This attribute lets you choose the filtering scope by using one of the following string value types: MessageAttributes (default) and MessageBody.'
Protocol: Expr[str]
"The subscription's protocol."
class Subscription(ResourceAttrs):
'Resource Type definition for AWS::SNS::Subscription'
Type: Literal['AWS::SNS::Subscription']
Properties: SubscriptionProps
def subscription(
*,
depends_on: DependsOn | None = None,
deletion_policy: DeletionPolicy | None = None,
update_replace_policy: UpdateReplacePolicy | None = None,
condition: str | None = None,
metadata: dict[str, Any] | None = None,
**props: Unpack[SubscriptionProps],
) -> Subscription:
return build('AWS::SNS::Subscription', props, depends_on, deletion_policy, update_replace_policy, condition, metadata)
Attributes¶
Read-only values for get_att(logical_id, attribute). They are not accepted as inputs.
Arn