6363</dependency >
6464```
6565</details >
66+
6667## Usage
6768
68- Below are examples of TypeScript.
69+ Below are examples of TypeScript. Credentials are not required because that is configured at CFN extension level Check [ requirements ] ( #requirements )
6970
7071### Dashboards
7172
7273``` typescript
7374import * as fs from ' fs' ;
74- import { DatadogDashboard } from ' @nomadblacky /cdk-datadog-resources' ;
75+ import { DatadogDashboard } from ' @goodnotes-oos /cdk-datadog-resources' ;
7576
7677new DatadogDashboard (yourStack , ' TestDashboard' , {
77- datadogCredentials: {
78- apiKey: process .env .DATADOG_API_KEY ! ,
79- applicationKey: process .env .DATADOG_APP_KEY ! ,
80- },
8178 dashboardDefinition: fs .readFileSync (` ${__dirname }/path/to/your/dashboard-definition.json ` ).toString (),
8279});
8380```
8481
8582### Monitors
8683
8784``` typescript
88- import { DatadogMonitor } from ' @nomadblacky /cdk-datadog-resources' ;
85+ import { DatadogMonitor } from ' @goodnotes-oos /cdk-datadog-resources' ;
8986
9087new DatadogMonitor (yourStack , ' TestMonitor' , {
91- datadogCredentials: {
92- apiKey: process .env .DATADOG_API_KEY ! ,
93- applicationKey: process .env .DATADOG_APP_KEY ! ,
94- },
9588 query: ' avg(last_1h):sum:system.cpu.system{host:host0} > 100' ,
96- type: MonitorType .QueryAlert ,
89+ type: MonitorType .QUERY_ALERT ,
9790 name: ' Test Monitor' ,
9891 options: {
9992 thresholds: {
@@ -110,7 +103,7 @@ new DatadogMonitor(yourStack, 'TestMonitor', {
110103### Downtimes
111104
112105``` typescript
113- import { DatadogDowntime } from ' @nomadblacky /cdk-datadog-resources' ;
106+ import { DatadogDowntime } from ' @goodnotes-oos /cdk-datadog-resources' ;
114107
115108new DatadogDowntime (stack , ' TestMonitor' , {
116109 datadogCredentials: {
@@ -126,13 +119,9 @@ new DatadogDowntime(stack, 'TestMonitor', {
126119### Users
127120
128121``` typescript
129- import { DatadogIAMUser } from ' @nomadblacky /cdk-datadog-resources' ;
122+ import { DatadogIAMUser } from ' @goodnotes-oos /cdk-datadog-resources' ;
130123
131124new DatadogIAMUser (stack , ' TestUser' , {
132- datadogCredentials: {
133- apiKey: ' DATADOG_API_KEY' ,
134- applicationKey: ' DATADOG_APP_KEY' ,
135- },
136125137126 name: ' name_example' ,
138127 handle: ' title_example' ,
@@ -143,13 +132,9 @@ new DatadogIAMUser(stack, 'TestUser', {
143132### DataDog Integration
144133
145134``` typescript
146- import { DatadogIntegrationAWS } from ' @nomadblacky /cdk-datadog-resources' ;
135+ import { DatadogIntegrationAWS } from ' @goodnotes-oos /cdk-datadog-resources' ;
147136
148137new DatadogIntegrationAWS (this , ' DataDogIntegration' , {
149- datadogCredentials: {
150- apiKey: " DATADOG_API_KEY" ,
151- applicationKey: " DATADOG_APP_KEY" ,
152- },
153138 accountId: " ACCOUNT_ID" ,
154139 roleName: " DatadogIntegrationRole" ,
155140});
0 commit comments