# DetailType

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

- Source: [`aws-codestarnotifications/lib/notification-rule.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-codestarnotifications/lib/notification-rule.ts#L14)

## Example

```ts
import * as notifications from 'aws-cdk-lib/aws-codestarnotifications';
import * as codebuild from 'aws-cdk-lib/aws-codebuild';
import * as sns from 'aws-cdk-lib/aws-sns';
import * as chatbot from 'aws-cdk-lib/aws-chatbot';

const project = new codebuild.PipelineProject(this, 'MyProject');

const topic = new sns.Topic(this, 'MyTopic1');

const slack = new chatbot.SlackChannelConfiguration(this, 'MySlackChannel', {
  slackChannelConfigurationName: 'YOUR_CHANNEL_NAME',
  slackWorkspaceId: 'YOUR_SLACK_WORKSPACE_ID',
  slackChannelId: 'YOUR_SLACK_CHANNEL_ID',
});

const rule = new notifications.NotificationRule(this, 'NotificationRule', {
  source: project,
  events: [
    'codebuild-project-build-state-succeeded',
    'codebuild-project-build-state-failed',
  ],
  targets: [topic],
  notificationRuleName: 'MyNotificationRuleName',
  enabled: true, // The default is true
  detailType: notifications.DetailType.FULL, // The default is FULL
  createdBy: 'Jone Doe',
});
rule.addTarget(slack);
```

## Members

| Member | Description |
| --- | --- |
| `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. |

## Referenced by

- [`NotificationRuleOptions`](/v2/docs/aws-cdk-lib.aws_codestarnotifications.NotificationRuleOptions).detailType
