CfnNotificationRulePropsMixin
- class aws_cdk.cfn_property_mixins.aws_codestarnotifications.CfnNotificationRulePropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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:
- 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:
props (
Union[CfnNotificationRuleMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()
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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.
TargetProperty
- class CfnNotificationRulePropsMixin.TargetProperty(*, target_address=None, target_type=None)
Bases:
objectInformation 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 asSNS. - clients are specified asAWSChatbotSlack. - clients for Microsoft Teams are specified asAWSChatbotMicrosoftTeams.
- See:
- 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.
- 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.