DetailType

class aws_cdk.aws_codestarnotifications.DetailType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

The level of detail to include in the notifications for this resource.

ExampleMetadata:

infused

Example:

import aws_cdk.aws_codestarnotifications as notifications
import aws_cdk.aws_codebuild as codebuild
import aws_cdk.aws_sns as sns
import aws_cdk.aws_chatbot as chatbot


project = codebuild.PipelineProject(self, "MyProject")

topic = sns.Topic(self, "MyTopic1")

slack = chatbot.SlackChannelConfiguration(self, "MySlackChannel",
    slack_channel_configuration_name="YOUR_CHANNEL_NAME",
    slack_workspace_id="YOUR_SLACK_WORKSPACE_ID",
    slack_channel_id="YOUR_SLACK_CHANNEL_ID"
)

rule = notifications.NotificationRule(self, "NotificationRule",
    source=project,
    events=["codebuild-project-build-state-succeeded", "codebuild-project-build-state-failed"
    ],
    targets=[topic],
    notification_rule_name="MyNotificationRuleName",
    enabled=True,  # The default is true
    detail_type=notifications.DetailType.FULL,  # The default is FULL
    created_by="Jone Doe"
)
rule.add_target(slack)

Attributes

BASIC

BASIC will include only the contents of the event as it would appear in AWS CloudWatch.

FULL

FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.