CfnNotificationRulePropsMixin

class aws_cdk.mixins_preview.aws_codestarnotifications.mixins.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.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_codestarnotifications import mixins as codestarnotifications_mixins

cfn_notification_rule_props_mixin = codestarnotifications_mixins.CfnNotificationRulePropsMixin(codestarnotifications_mixins.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_mixins.CfnNotificationRulePropsMixin.TargetProperty(
        target_address="targetAddress",
        target_type="targetType"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

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:

IConstruct

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)

(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

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 (Optional[str]) – 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.mixins_preview.aws_codestarnotifications import mixins as codestarnotifications_mixins

target_property = codestarnotifications_mixins.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