CfnNotificationRulePropsMixin

class aws_cdk.cfn_property_mixins.aws_codestarnotifications.CfnNotificationRulePropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a notification rule for a resource.

The rule specifies the events you want notifications about and the targets (such as Amazon Simple Notification Service topics or clients configured for Slack) where you want to receive them.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html

CloudformationResource:

AWS::CodeStarNotifications::NotificationRule

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.cfn_property_mixins import aws_codestarnotifications as codestarnotifications
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy

cfn_notification_rule_props_mixin = codestarnotifications.CfnNotificationRulePropsMixin(codestarnotifications.CfnNotificationRuleMixinProps(
    created_by="createdBy",
    detail_type="detailType",
    event_type_id="eventTypeId",
    event_type_ids=["eventTypeIds"],
    name="name",
    resource="resource",
    status="status",
    tags={
        "tags_key": "tags"
    },
    target_address="targetAddress",
    targets=[codestarnotifications.CfnNotificationRulePropsMixin.TargetProperty(
        target_address="targetAddress",
        target_type="targetType"
    )]
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::CodeStarNotifications::NotificationRule.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['createdBy', 'detailType', 'eventTypeId', 'eventTypeIds', 'name', 'resource', 'status', 'tags', 'targetAddress', 'targets']

Static Methods

classmethod is_mixin(x)

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.

TargetProperty

class CfnNotificationRulePropsMixin.TargetProperty(*, target_address=None, target_type=None)

Bases: object

Information about the topics or clients associated with a notification rule.

Parameters:
  • target_address (Union[str, ITopicRef, None]) – The Amazon Resource Name (ARN) of the topic or client.

  • target_type (Optional[str]) – The target type. Can be an Amazon Simple Notification Service topic or client. - Amazon Simple Notification Service topics are specified as SNS . - clients are specified as AWSChatbotSlack . - clients for Microsoft Teams are specified as AWSChatbotMicrosoftTeams .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.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.cfn_property_mixins import aws_codestarnotifications as codestarnotifications

target_property = codestarnotifications.CfnNotificationRulePropsMixin.TargetProperty(
    target_address="targetAddress",
    target_type="targetType"
)

Attributes

target_address

The Amazon Resource Name (ARN) of the topic or client.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.html#cfn-codestarnotifications-notificationrule-target-targetaddress

target_type

The target type. Can be an Amazon Simple Notification Service topic or client.

  • Amazon Simple Notification Service topics are specified as SNS .

  • clients are specified as AWSChatbotSlack .

  • clients for Microsoft Teams are specified as AWSChatbotMicrosoftTeams .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.html#cfn-codestarnotifications-notificationrule-target-targettype