[](https://badge.fury.io/js/%goodnotes-oss%2Fcdk-datadog-resources)
npm install @goodnotes-oss/cdk-datadog-resources
An AWS CDK construct library that wraps DataDog/datadog-cloudformation-resources.
Before using this library, register datadog-cloudformation-resources to your AWS account.
You need to register the correct version listed in Supported Resources.
- TypeScript
- ~~Python~~. Not currently supported
- ~~Java~~ Sorry, there is a problem with the release. (#22)
| Supported? | Resource | Datadog CF Resource Name | Description | Datadog CF Version |
| :--------: | ---------- | -------------------------------- | --------------------------------------------------- | ------------------ |
| ✅ | Dashboards | Datadog::Dashboards::Dashboard | [Create, update, and delete Datadog dashboards.][1] | [2.1.0][2] |
| ✅ | Monitors | Datadog::Monitors::Monitor | [Create, update, and delete Datadog monitors.][3] | [4.6.0][4] |
| ✅ | SLOs | Datadog::SLOs::SLO | [Create, update, and delete Datadog SLOs.][5] | [1.1.0][6] |
[1]: https://github.com/DataDog/datadog-cloudformation-resources/tree/master/datadog-dashboards-dashboard-handler
[2]: https://github.com/DataDog/datadog-cloudformation-resources/blob/master/datadog-dashboards-dashboard-handler/CHANGELOG.md#210--2023-04-10
[3]: https://github.com/DataDog/datadog-cloudformation-resources/tree/master/datadog-monitors-monitor-handler
[4]: https://github.com/DataDog/datadog-cloudformation-resources/blob/master/datadog-monitors-monitor-handler/CHANGELOG.md#300--2021-02-16
[5]: https://github.com/DataDog/datadog-cloudformation-resources/tree/master/datadog-slos-slo-handler
[6]: https://github.com/DataDog/datadog-cloudformation-resources/blob/master/datadog-slos-slo-handler/CHANGELOG.md#110--2023-04-10
TypeScript
``shell`
npm install @goodnotes-oss/cdk-datadog-resources
Below are examples of TypeScript. Credentials are not required because that is configured at CFN extension level Check requirements
`typescript
import { DatadogMonitor } from '@goodnotes-oss/cdk-datadog-resources';
new DatadogMonitor(yourStack, 'TestMonitor', {
query: 'avg(last_1h):sum:system.cpu.system{host:host0} > 100',
type: MonitorType.QUERY_ALERT,
name: 'Test Monitor',
options: {
thresholds: {
critical: 100,
warning: 80,
oK: 90,
},
notifyNoData: true,
evaluationDelay: 60,
},
});
``
This is a fork of https://github.com/NomadBlacky/cdk-datadog-resources, which is currently unmaintained.
- The DataDog Dashboard TypeScript Interface was generated from the DataDog/datadog-api-client-typescript package through GoodNotes/ts-interface-generator. It is currently inlined while this setup is PoC.