CfnTopicPropsMixin

class aws_cdk.mixins_preview.aws_sns.mixins.CfnTopicPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::SNS::Topic resource creates a topic to which notifications can be published.

One account can create a maximum of 100,000 standard topics and 1,000 FIFO topics. For more information, see Amazon endpoints and quotas in the AWS General Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html

CloudformationResource:

AWS::SNS::Topic

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_sns import mixins as sns_mixins

# archive_policy: Any
# data_protection_policy: Any

cfn_topic_props_mixin = sns_mixins.CfnTopicPropsMixin(sns_mixins.CfnTopicMixinProps(
    archive_policy=archive_policy,
    content_based_deduplication=False,
    data_protection_policy=data_protection_policy,
    delivery_status_logging=[sns_mixins.CfnTopicPropsMixin.LoggingConfigProperty(
        failure_feedback_role_arn="failureFeedbackRoleArn",
        protocol="protocol",
        success_feedback_role_arn="successFeedbackRoleArn",
        success_feedback_sample_rate="successFeedbackSampleRate"
    )],
    display_name="displayName",
    fifo_throughput_scope="fifoThroughputScope",
    fifo_topic=False,
    kms_master_key_id="kmsMasterKeyId",
    signature_version="signatureVersion",
    subscription=[sns_mixins.CfnTopicPropsMixin.SubscriptionProperty(
        endpoint="endpoint",
        protocol="protocol"
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    topic_name="topicName",
    tracing_config="tracingConfig"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::SNS::Topic.

Parameters:
  • props (Union[CfnTopicMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['archivePolicy', 'contentBasedDeduplication', 'dataProtectionPolicy', 'deliveryStatusLogging', 'displayName', 'fifoThroughputScope', 'fifoTopic', 'kmsMasterKeyId', 'signatureVersion', 'subscription', 'tags', 'topicName', 'tracingConfig']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

LoggingConfigProperty

class CfnTopicPropsMixin.LoggingConfigProperty(*, failure_feedback_role_arn=None, protocol=None, success_feedback_role_arn=None, success_feedback_sample_rate=None)

Bases: object

The LoggingConfig property type specifies the Delivery status logging configuration for an `AWS::SNS::Topic <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html>`_ .

Parameters:
  • failure_feedback_role_arn (Optional[str]) – The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.

  • protocol (Optional[str]) – Indicates one of the supported protocols for the Amazon SNS topic. .. epigraph:: At least one of the other three LoggingConfig properties is recommend along with Protocol .

  • success_feedback_role_arn (Optional[str]) – The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.

  • success_feedback_sample_rate (Optional[str]) – The percentage of successful message deliveries to be logged in Amazon CloudWatch. Valid percentage values range from 0 to 100.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic-loggingconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_sns import mixins as sns_mixins

logging_config_property = sns_mixins.CfnTopicPropsMixin.LoggingConfigProperty(
    failure_feedback_role_arn="failureFeedbackRoleArn",
    protocol="protocol",
    success_feedback_role_arn="successFeedbackRoleArn",
    success_feedback_sample_rate="successFeedbackSampleRate"
)

Attributes

failure_feedback_role_arn

The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic-loggingconfig.html#cfn-sns-topic-loggingconfig-failurefeedbackrolearn

protocol

Indicates one of the supported protocols for the Amazon SNS topic.

At least one of the other three LoggingConfig properties is recommend along with Protocol .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic-loggingconfig.html#cfn-sns-topic-loggingconfig-protocol

success_feedback_role_arn

The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic-loggingconfig.html#cfn-sns-topic-loggingconfig-successfeedbackrolearn

success_feedback_sample_rate

The percentage of successful message deliveries to be logged in Amazon CloudWatch.

Valid percentage values range from 0 to 100.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic-loggingconfig.html#cfn-sns-topic-loggingconfig-successfeedbacksamplerate

SubscriptionProperty

class CfnTopicPropsMixin.SubscriptionProperty(*, endpoint=None, protocol=None)

Bases: object

Subscription is an embedded property that describes the subscription endpoints of an Amazon topic.

For full control over subscription behavior (for example, delivery policy, filtering, raw message delivery, and cross-region subscriptions), use the AWS::SNS::Subscription resource.

Parameters:
  • endpoint (Optional[str]) – The endpoint that receives notifications from the Amazon topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the [Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html) action in the Amazon API Reference .

  • protocol (Optional[str]) – The subscription’s protocol. For more information, see the Protocol parameter of the [Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html) action in the Amazon API Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic-subscription.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_sns import mixins as sns_mixins

subscription_property = sns_mixins.CfnTopicPropsMixin.SubscriptionProperty(
    endpoint="endpoint",
    protocol="protocol"
)

Attributes

endpoint

The endpoint that receives notifications from the Amazon topic.

The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the [Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html) action in the Amazon API Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic-subscription.html#cfn-sns-topic-subscription-endpoint

protocol

The subscription’s protocol.

For more information, see the Protocol parameter of the [Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html) action in the Amazon API Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic-subscription.html#cfn-sns-topic-subscription-protocol