@itentialopensource/adapter-datadog 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +12 -12
  3. package/AUTH.md +39 -0
  4. package/BROKER.md +199 -0
  5. package/CALLS.md +169 -0
  6. package/CHANGELOG.md +50 -16
  7. package/CODE_OF_CONDUCT.md +12 -17
  8. package/CONTRIBUTING.md +88 -74
  9. package/ENHANCE.md +69 -0
  10. package/PROPERTIES.md +641 -0
  11. package/README.md +244 -392
  12. package/SUMMARY.md +9 -0
  13. package/SYSTEMINFO.md +11 -0
  14. package/TROUBLESHOOT.md +47 -0
  15. package/adapter.js +1415 -86
  16. package/adapterBase.js +1331 -50
  17. package/entities/.generic/action.json +214 -0
  18. package/entities/.generic/schema.json +28 -0
  19. package/entities/.system/action.json +1 -1
  20. package/error.json +12 -0
  21. package/package.json +47 -23
  22. package/pronghorn.json +642 -0
  23. package/propertiesDecorators.json +14 -0
  24. package/propertiesSchema.json +505 -11
  25. package/refs?service=git-upload-pack +0 -0
  26. package/report/adapterInfo.json +10 -0
  27. package/report/updateReport1594143341130.json +95 -0
  28. package/report/updateReport1614879713647.json +95 -0
  29. package/report/updateReport1653677151204.json +120 -0
  30. package/sampleProperties.json +110 -6
  31. package/test/integration/adapterTestBasicGet.js +85 -0
  32. package/test/integration/adapterTestConnectivity.js +93 -0
  33. package/test/integration/adapterTestIntegration.js +33 -96
  34. package/test/unit/adapterBaseTestUnit.js +949 -0
  35. package/test/unit/adapterTestUnit.js +643 -104
  36. package/utils/adapterInfo.js +206 -0
  37. package/utils/addAuth.js +94 -0
  38. package/utils/artifactize.js +9 -14
  39. package/utils/basicGet.js +50 -0
  40. package/utils/checkMigrate.js +63 -0
  41. package/utils/entitiesToDB.js +179 -0
  42. package/utils/findPath.js +74 -0
  43. package/utils/modify.js +154 -0
  44. package/utils/packModificationScript.js +1 -1
  45. package/utils/patches2bundledDeps.js +90 -0
  46. package/utils/pre-commit.sh +4 -1
  47. package/utils/removeHooks.js +20 -0
  48. package/utils/tbScript.js +184 -0
  49. package/utils/tbUtils.js +469 -0
  50. package/utils/testRunner.js +16 -16
  51. package/utils/troubleshootingAdapter.js +190 -0
  52. package/gl-code-quality-report.json +0 -1
package/adapter.js CHANGED
@@ -10,12 +10,10 @@
10
10
 
11
11
  /* Required libraries. */
12
12
  const path = require('path');
13
- // const xmldom = require('xmldom');
14
13
 
15
14
  /* Fetch in the other needed components for the this Adaptor */
16
15
  const AdapterBaseCl = require(path.join(__dirname, 'adapterBase.js'));
17
16
 
18
-
19
17
  /**
20
18
  * This is the adapter/interface into Datadog
21
19
  */
@@ -25,69 +23,303 @@ class Datadog extends AdapterBaseCl {
25
23
  /**
26
24
  * Datadog Adapter
27
25
  * @constructor
26
+ */
27
+ /* Working on changing the way we do Emit methods due to size and time constrainsts
28
28
  constructor(prongid, properties) {
29
29
  // Instantiate the AdapterBase super class
30
30
  super(prongid, properties);
31
31
 
32
+ const restFunctionNames = this.getWorkflowFunctions();
33
+
34
+ // Dynamically bind emit functions
35
+ for (let i = 0; i < restFunctionNames.length; i += 1) {
36
+ // Bind function to have name fnNameEmit for fnName
37
+ const version = restFunctionNames[i].match(/__v[0-9]+/);
38
+ const baseFnName = restFunctionNames[i].replace(/__v[0-9]+/, '');
39
+ const fnNameEmit = version ? `${baseFnName}Emit${version}` : `${baseFnName}Emit`;
40
+ this[fnNameEmit] = function (...args) {
41
+ // extract the callback
42
+ const callback = args[args.length - 1];
43
+ // slice the callback from args so we can insert our own
44
+ const functionArgs = args.slice(0, args.length - 1);
45
+ // create a random name for the listener
46
+ const eventName = `${restFunctionNames[i]}:${Math.random().toString(36)}`;
47
+ // tell the calling class to start listening
48
+ callback({ event: eventName, status: 'received' });
49
+ // store parent for use of this context later
50
+ const parent = this;
51
+ // store emission function
52
+ const func = function (val, err) {
53
+ parent.removeListener(eventName, func);
54
+ parent.emit(eventName, val, err);
55
+ };
56
+ // Use apply to call the function in a specific context
57
+ this[restFunctionNames[i]].apply(this, functionArgs.concat([func])); // eslint-disable-line prefer-spread
58
+ };
59
+ }
60
+
32
61
  // Uncomment if you have things to add to the constructor like using your own properties.
33
62
  // Otherwise the constructor in the adapterBase will be used.
34
63
  // Capture my own properties - they need to be defined in propertiesSchema.json
35
- if (this.allProps && this.allProps.myownproperty) {
36
- mypropvariable = this.allProps.myownproperty;
37
- }
64
+ // if (this.allProps && this.allProps.myownproperty) {
65
+ // mypropvariable = this.allProps.myownproperty;
66
+ // }
38
67
  }
39
68
  */
40
69
 
41
-
42
70
  /**
43
71
  * @callback healthCallback
44
- * @param {Object} result - the result of the get request (contains an id and a status)
72
+ * @param {Object} reqObj - the request to send into the healthcheck
73
+ * @param {Callback} callback - The results of the call
45
74
  */
75
+ healthCheck(reqObj, callback) {
76
+ // you can modify what is passed into the healthcheck by changing things in the newReq
77
+ let newReq = null;
78
+ if (reqObj) {
79
+ newReq = Object.assign(...reqObj);
80
+ }
81
+ super.healthCheck(newReq, callback);
82
+ }
83
+
46
84
  /**
47
- * @callback getCallback
48
- * @param {Object} result - the result of the get request (entity/ies)
49
- * @param {String} error - any error that occurred
85
+ * @iapGetAdapterWorkflowFunctions
50
86
  */
87
+ iapGetAdapterWorkflowFunctions(inIgnore) {
88
+ let myIgnore = [
89
+ 'healthCheck',
90
+ 'iapGetAdapterWorkflowFunctions',
91
+ 'iapHasAdapterEntity',
92
+ 'iapVerifyAdapterCapability',
93
+ 'iapUpdateAdapterEntityCache',
94
+ 'hasEntities',
95
+ 'getAuthorization'
96
+ ];
97
+ if (!inIgnore && Array.isArray(inIgnore)) {
98
+ myIgnore = inIgnore;
99
+ } else if (!inIgnore && typeof inIgnore === 'string') {
100
+ myIgnore = [inIgnore];
101
+ }
102
+
103
+ // The generic adapter functions should already be ignored (e.g. healthCheck)
104
+ // you can add specific methods that you do not want to be workflow functions to ignore like below
105
+ // myIgnore.push('myMethodNotInWorkflow');
106
+
107
+ return super.iapGetAdapterWorkflowFunctions(myIgnore);
108
+ }
109
+
51
110
  /**
52
- * @callback createCallback
53
- * @param {Object} item - the newly created entity
54
- * @param {String} error - any error that occurred
111
+ * iapUpdateAdapterConfiguration is used to update any of the adapter configuration files. This
112
+ * allows customers to make changes to adapter configuration without having to be on the
113
+ * file system.
114
+ *
115
+ * @function iapUpdateAdapterConfiguration
116
+ * @param {string} configFile - the name of the file being updated (required)
117
+ * @param {Object} changes - an object containing all of the changes = formatted like the configuration file (required)
118
+ * @param {string} entity - the entity to be changed, if an action, schema or mock data file (optional)
119
+ * @param {string} type - the type of entity file to change, (action, schema, mock) (optional)
120
+ * @param {string} action - the action to be changed, if an action, schema or mock data file (optional)
121
+ * @param {Callback} callback - The results of the call
55
122
  */
123
+ iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback) {
124
+ const meth = 'adapter-iapUpdateAdapterConfiguration';
125
+ const origin = `${this.id}-${meth}`;
126
+ log.trace(origin);
127
+
128
+ super.iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback);
129
+ }
130
+
56
131
  /**
57
- * @callback updateCallback
58
- * @param {String} status - the status of the update action
59
- * @param {String} error - any error that occurred
132
+ * See if the API path provided is found in this adapter
133
+ *
134
+ * @function iapFindAdapterPath
135
+ * @param {string} apiPath - the api path to check on
136
+ * @param {Callback} callback - The results of the call
60
137
  */
138
+ iapFindAdapterPath(apiPath, callback) {
139
+ const meth = 'adapter-iapFindAdapterPath';
140
+ const origin = `${this.id}-${meth}`;
141
+ log.trace(origin);
142
+
143
+ super.iapFindAdapterPath(apiPath, callback);
144
+ }
145
+
61
146
  /**
62
- * @callback deleteCallback
63
- * @param {String} status - the status of the delete action
64
- * @param {String} error - any error that occurred
147
+ * @summary Suspends adapter
148
+ *
149
+ * @function iapSuspendAdapter
150
+ * @param {Callback} callback - callback function
151
+ */
152
+ iapSuspendAdapter(mode, callback) {
153
+ const meth = 'adapter-iapSuspendAdapter';
154
+ const origin = `${this.id}-${meth}`;
155
+ log.trace(origin);
156
+
157
+ try {
158
+ return super.iapSuspendAdapter(mode, callback);
159
+ } catch (error) {
160
+ log.error(`${origin}: ${error}`);
161
+ return callback(null, error);
162
+ }
163
+ }
164
+
165
+ /**
166
+ * @summary Unsuspends adapter
167
+ *
168
+ * @function iapUnsuspendAdapter
169
+ * @param {Callback} callback - callback function
170
+ */
171
+ iapUnsuspendAdapter(callback) {
172
+ const meth = 'adapter-iapUnsuspendAdapter';
173
+ const origin = `${this.id}-${meth}`;
174
+ log.trace(origin);
175
+
176
+ try {
177
+ return super.iapUnsuspendAdapter(callback);
178
+ } catch (error) {
179
+ log.error(`${origin}: ${error}`);
180
+ return callback(null, error);
181
+ }
182
+ }
183
+
184
+ /**
185
+ * @summary Get the Adaoter Queue
186
+ *
187
+ * @function iapGetAdapterQueue
188
+ * @param {Callback} callback - callback function
189
+ */
190
+ iapGetAdapterQueue(callback) {
191
+ const meth = 'adapter-iapGetAdapterQueue';
192
+ const origin = `${this.id}-${meth}`;
193
+ log.trace(origin);
194
+
195
+ return super.iapGetAdapterQueue(callback);
196
+ }
197
+
198
+ /**
199
+ * @summary Runs troubleshoot scripts for adapter
200
+ *
201
+ * @function iapTroubleshootAdapter
202
+ * @param {Object} props - the connection, healthcheck and authentication properties
203
+ *
204
+ * @param {boolean} persistFlag - whether the adapter properties should be updated
205
+ * @param {Callback} callback - The results of the call
206
+ */
207
+ iapTroubleshootAdapter(props, persistFlag, callback) {
208
+ const meth = 'adapter-iapTroubleshootAdapter';
209
+ const origin = `${this.id}-${meth}`;
210
+ log.trace(origin);
211
+
212
+ try {
213
+ return super.iapTroubleshootAdapter(props, persistFlag, this, callback);
214
+ } catch (error) {
215
+ log.error(`${origin}: ${error}`);
216
+ return callback(null, error);
217
+ }
218
+ }
219
+
220
+ /**
221
+ * @summary runs healthcheck script for adapter
222
+ *
223
+ * @function iapRunAdapterHealthcheck
224
+ * @param {Adapter} adapter - adapter instance to troubleshoot
225
+ * @param {Callback} callback - callback function
226
+ */
227
+ iapRunAdapterHealthcheck(callback) {
228
+ const meth = 'adapter-iapRunAdapterHealthcheck';
229
+ const origin = `${this.id}-${meth}`;
230
+ log.trace(origin);
231
+
232
+ try {
233
+ return super.iapRunAdapterHealthcheck(this, callback);
234
+ } catch (error) {
235
+ log.error(`${origin}: ${error}`);
236
+ return callback(null, error);
237
+ }
238
+ }
239
+
240
+ /**
241
+ * @summary runs connectivity check script for adapter
242
+ *
243
+ * @function iapRunAdapterConnectivity
244
+ * @param {Callback} callback - callback function
245
+ */
246
+ iapRunAdapterConnectivity(callback) {
247
+ const meth = 'adapter-iapRunAdapterConnectivity';
248
+ const origin = `${this.id}-${meth}`;
249
+ log.trace(origin);
250
+
251
+ try {
252
+ return super.iapRunAdapterConnectivity(callback);
253
+ } catch (error) {
254
+ log.error(`${origin}: ${error}`);
255
+ return callback(null, error);
256
+ }
257
+ }
258
+
259
+ /**
260
+ * @summary runs basicGet script for adapter
261
+ *
262
+ * @function iapRunAdapterBasicGet
263
+ * @param {Callback} callback - callback function
264
+ */
265
+ iapRunAdapterBasicGet(callback) {
266
+ const meth = 'adapter-iapRunAdapterBasicGet';
267
+ const origin = `${this.id}-${meth}`;
268
+ log.trace(origin);
269
+
270
+ try {
271
+ return super.iapRunAdapterBasicGet(callback);
272
+ } catch (error) {
273
+ log.error(`${origin}: ${error}`);
274
+ return callback(null, error);
275
+ }
276
+ }
277
+
278
+ /**
279
+ * @summary moves entites into Mongo DB
280
+ *
281
+ * @function iapMoveAdapterEntitiesToDB
282
+ * @param {getCallback} callback - a callback function to return the result (Generics)
283
+ * or the error
65
284
  */
285
+ iapMoveAdapterEntitiesToDB(callback) {
286
+ const meth = 'adapter-iapMoveAdapterEntitiesToDB';
287
+ const origin = `${this.id}-${meth}`;
288
+ log.trace(origin);
289
+
290
+ try {
291
+ return super.iapMoveAdapterEntitiesToDB(callback);
292
+ } catch (err) {
293
+ log.error(`${origin}: ${err}`);
294
+ return callback(null, err);
295
+ }
296
+ }
66
297
 
298
+ /* BROKER CALLS */
67
299
  /**
68
300
  * @summary Determines if this adapter supports the specific entity
69
301
  *
70
- * @function hasEntity
302
+ * @function iapHasAdapterEntity
71
303
  * @param {String} entityType - the entity type to check for
72
304
  * @param {String/Array} entityId - the specific entity we are looking for
73
305
  *
74
306
  * @param {Callback} callback - An array of whether the adapter can has the
75
307
  * desired capability or an error
76
308
  */
77
- hasEntity(entityType, entityId, callback) {
78
- const origin = `${this.id}-adapter-hasEntity`;
309
+ iapHasAdapterEntity(entityType, entityId, callback) {
310
+ const origin = `${this.id}-adapter-iapHasAdapterEntity`;
79
311
  log.trace(origin);
80
312
 
81
313
  // Make the call -
82
- // verifyCapability(entityType, actionType, entityId, callback)
83
- return this.verifyCapability(entityType, null, entityId, callback);
314
+ // iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
315
+ return this.iapVerifyAdapterCapability(entityType, null, entityId, callback);
84
316
  }
85
317
 
86
318
  /**
87
319
  * @summary Provides a way for the adapter to tell north bound integrations
88
320
  * whether the adapter supports type, action and specific entity
89
321
  *
90
- * @function verifyCapability
322
+ * @function iapVerifyAdapterCapability
91
323
  * @param {String} entityType - the entity type to check for
92
324
  * @param {String} actionType - the action type to check for
93
325
  * @param {String/Array} entityId - the specific entity we are looking for
@@ -95,15 +327,15 @@ class Datadog extends AdapterBaseCl {
95
327
  * @param {Callback} callback - An array of whether the adapter can has the
96
328
  * desired capability or an error
97
329
  */
98
- verifyCapability(entityType, actionType, entityId, callback) {
99
- const meth = 'adapterBase-verifyCapability';
330
+ iapVerifyAdapterCapability(entityType, actionType, entityId, callback) {
331
+ const meth = 'adapterBase-iapVerifyAdapterCapability';
100
332
  const origin = `${this.id}-${meth}`;
101
333
  log.trace(origin);
102
334
 
103
335
  // if caching
104
336
  if (this.caching) {
105
- // Make the call - verifyCapability(entityType, actionType, entityId, callback)
106
- return this.requestHandlerInst.verifyCapability(entityType, actionType, entityId, (results, error) => {
337
+ // Make the call - iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
338
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (results, error) => {
107
339
  if (error) {
108
340
  return callback(null, error);
109
341
  }
@@ -121,7 +353,7 @@ class Datadog extends AdapterBaseCl {
121
353
  }
122
354
 
123
355
  // need to check the cache again since it has been updated
124
- return this.requestHandlerInst.verifyCapability(entityType, actionType, entityId, (vcapable, verror) => {
356
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (vcapable, verror) => {
125
357
  if (verror) {
126
358
  return callback(null, verror);
127
359
  }
@@ -154,7 +386,7 @@ class Datadog extends AdapterBaseCl {
154
386
  // if no entity id
155
387
  if (!entityId) {
156
388
  // need to check the cache again since it has been updated
157
- return this.requestHandlerInst.verifyCapability(entityType, actionType, null, (vcapable, verror) => {
389
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
158
390
  if (verror) {
159
391
  return callback(null, verror);
160
392
  }
@@ -175,7 +407,7 @@ class Datadog extends AdapterBaseCl {
175
407
  }
176
408
 
177
409
  // need to check the cache again since it has been updated
178
- return this.requestHandlerInst.verifyCapability(entityType, actionType, null, (vcapable, verror) => {
410
+ return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
179
411
  if (verror) {
180
412
  return callback(null, verror);
181
413
  }
@@ -216,11 +448,11 @@ class Datadog extends AdapterBaseCl {
216
448
  /**
217
449
  * @summary Updates the cache for all entities by call the get All entity method
218
450
  *
219
- * @function updateEntityCache
451
+ * @function iapUpdateAdapterEntityCache
220
452
  *
221
453
  */
222
- updateEntityCache() {
223
- const origin = `${this.id}-adapter-updateEntityCache`;
454
+ iapUpdateAdapterEntityCache() {
455
+ const origin = `${this.id}-adapter-iapUpdateAdapterEntityCache`;
224
456
  log.trace(origin);
225
457
 
226
458
  if (this.caching) {
@@ -233,6 +465,385 @@ class Datadog extends AdapterBaseCl {
233
465
  }
234
466
  }
235
467
 
468
+ /**
469
+ * @summary Determines if this adapter supports any in a list of entities
470
+ *
471
+ * @function hasEntities
472
+ * @param {String} entityType - the entity type to check for
473
+ * @param {Array} entityList - the list of entities we are looking for
474
+ *
475
+ * @param {Callback} callback - A map where the entity is the key and the
476
+ * value is true or false
477
+ */
478
+ hasEntities(entityType, entityList, callback) {
479
+ const meth = 'adapter-hasEntities';
480
+ const origin = `${this.id}-${meth}`;
481
+ log.trace(origin);
482
+
483
+ try {
484
+ return super.hasEntities(entityType, entityList, callback);
485
+ } catch (err) {
486
+ log.error(`${origin}: ${err}`);
487
+ return callback(null, err);
488
+ }
489
+ }
490
+
491
+ /**
492
+ * @summary Get Appliance that match the deviceName
493
+ *
494
+ * @function getDevice
495
+ * @param {String} deviceName - the deviceName to find (required)
496
+ *
497
+ * @param {getCallback} callback - a callback function to return the result
498
+ * (appliance) or the error
499
+ */
500
+ getDevice(deviceName, callback) {
501
+ const meth = 'adapter-getDevice';
502
+ const origin = `${this.id}-${meth}`;
503
+ log.trace(origin);
504
+
505
+ try {
506
+ return super.getDevice(deviceName, callback);
507
+ } catch (err) {
508
+ log.error(`${origin}: ${err}`);
509
+ return callback(null, err);
510
+ }
511
+ }
512
+
513
+ /**
514
+ * @summary Get Appliances that match the filter
515
+ *
516
+ * @function getDevicesFiltered
517
+ * @param {Object} options - the data to use to filter the appliances (optional)
518
+ *
519
+ * @param {getCallback} callback - a callback function to return the result
520
+ * (appliances) or the error
521
+ */
522
+ getDevicesFiltered(options, callback) {
523
+ const meth = 'adapter-getDevicesFiltered';
524
+ const origin = `${this.id}-${meth}`;
525
+ log.trace(origin);
526
+
527
+ try {
528
+ return super.getDevicesFiltered(options, callback);
529
+ } catch (err) {
530
+ log.error(`${origin}: ${err}`);
531
+ return callback(null, err);
532
+ }
533
+ }
534
+
535
+ /**
536
+ * @summary Gets the status for the provided appliance
537
+ *
538
+ * @function isAlive
539
+ * @param {String} deviceName - the deviceName of the appliance. (required)
540
+ *
541
+ * @param {configCallback} callback - callback function to return the result
542
+ * (appliance isAlive) or the error
543
+ */
544
+ isAlive(deviceName, callback) {
545
+ const meth = 'adapter-isAlive';
546
+ const origin = `${this.id}-${meth}`;
547
+ log.trace(origin);
548
+
549
+ try {
550
+ return super.isAlive(deviceName, callback);
551
+ } catch (err) {
552
+ log.error(`${origin}: ${err}`);
553
+ return callback(null, err);
554
+ }
555
+ }
556
+
557
+ /**
558
+ * @summary Gets a config for the provided Appliance
559
+ *
560
+ * @function getConfig
561
+ * @param {String} deviceName - the deviceName of the appliance. (required)
562
+ * @param {String} format - the desired format of the config. (optional)
563
+ *
564
+ * @param {configCallback} callback - callback function to return the result
565
+ * (appliance config) or the error
566
+ */
567
+ getConfig(deviceName, format, callback) {
568
+ const meth = 'adapter-getConfig';
569
+ const origin = `${this.id}-${meth}`;
570
+ log.trace(origin);
571
+
572
+ try {
573
+ return super.getConfig(deviceName, format, callback);
574
+ } catch (err) {
575
+ log.error(`${origin}: ${err}`);
576
+ return callback(null, err);
577
+ }
578
+ }
579
+
580
+ /**
581
+ * @summary Gets the device count from the system
582
+ *
583
+ * @function iapGetDeviceCount
584
+ *
585
+ * @param {getCallback} callback - callback function to return the result
586
+ * (count) or the error
587
+ */
588
+ iapGetDeviceCount(callback) {
589
+ const meth = 'adapter-iapGetDeviceCount';
590
+ const origin = `${this.id}-${meth}`;
591
+ log.trace(origin);
592
+
593
+ try {
594
+ return super.iapGetDeviceCount(callback);
595
+ } catch (err) {
596
+ log.error(`${origin}: ${err}`);
597
+ return callback(null, err);
598
+ }
599
+ }
600
+
601
+ /* GENERIC ADAPTER REQUEST - allows extension of adapter without new calls being added */
602
+ /**
603
+ * Makes the requested generic call
604
+ *
605
+ * @function genericAdapterRequest
606
+ * @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
607
+ * @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
608
+ * @param {Object} queryData - the parameters to be put on the url (optional).
609
+ * Can be a stringified Object.
610
+ * @param {Object} requestBody - the body to add to the request (optional).
611
+ * Can be a stringified Object.
612
+ * @param {Object} addlHeaders - additional headers to be put on the call (optional).
613
+ * Can be a stringified Object.
614
+ * @param {getCallback} callback - a callback function to return the result (Generics)
615
+ * or the error
616
+ */
617
+ genericAdapterRequest(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
618
+ const meth = 'adapter-genericAdapterRequest';
619
+ const origin = `${this.id}-${meth}`;
620
+ log.trace(origin);
621
+
622
+ if (this.suspended && this.suspendMode === 'error') {
623
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
624
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
625
+ return callback(null, errorObj);
626
+ }
627
+
628
+ /* HERE IS WHERE YOU VALIDATE DATA */
629
+ if (uriPath === undefined || uriPath === null || uriPath === '') {
630
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
631
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
632
+ return callback(null, errorObj);
633
+ }
634
+ if (restMethod === undefined || restMethod === null || restMethod === '') {
635
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
636
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
637
+ return callback(null, errorObj);
638
+ }
639
+
640
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
641
+ // remove any leading / and split the uripath into path variables
642
+ let myPath = uriPath;
643
+ while (myPath.indexOf('/') === 0) {
644
+ myPath = myPath.substring(1);
645
+ }
646
+ const pathVars = myPath.split('/');
647
+ const queryParamsAvailable = queryData;
648
+ const queryParams = {};
649
+ const bodyVars = requestBody;
650
+
651
+ // loop in template. long callback arg name to avoid identifier conflicts
652
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
653
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
654
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
655
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
656
+ }
657
+ });
658
+
659
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
660
+ const reqObj = {
661
+ payload: bodyVars,
662
+ uriPathVars: pathVars,
663
+ uriQuery: queryParams,
664
+ uriOptions: {}
665
+ };
666
+ // add headers if provided
667
+ if (addlHeaders) {
668
+ reqObj.addlHeaders = addlHeaders;
669
+ }
670
+
671
+ // determine the call and return flag
672
+ let action = 'getGenerics';
673
+ let returnF = true;
674
+ if (restMethod.toUpperCase() === 'POST') {
675
+ action = 'createGeneric';
676
+ } else if (restMethod.toUpperCase() === 'PUT') {
677
+ action = 'updateGeneric';
678
+ } else if (restMethod.toUpperCase() === 'PATCH') {
679
+ action = 'patchGeneric';
680
+ } else if (restMethod.toUpperCase() === 'DELETE') {
681
+ action = 'deleteGeneric';
682
+ returnF = false;
683
+ }
684
+
685
+ try {
686
+ // Make the call -
687
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
688
+ return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
689
+ // if we received an error or their is no response on the results
690
+ // return an error
691
+ if (irReturnError) {
692
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
693
+ return callback(null, irReturnError);
694
+ }
695
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
696
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequest'], null, null, null);
697
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
698
+ return callback(null, errorObj);
699
+ }
700
+
701
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
702
+ // return the response
703
+ return callback(irReturnData, null);
704
+ });
705
+ } catch (ex) {
706
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
707
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
708
+ return callback(null, errorObj);
709
+ }
710
+ }
711
+
712
+ /**
713
+ * Makes the requested generic call with no base path or version
714
+ *
715
+ * @function genericAdapterRequestNoBasePath
716
+ * @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
717
+ * @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
718
+ * @param {Object} queryData - the parameters to be put on the url (optional).
719
+ * Can be a stringified Object.
720
+ * @param {Object} requestBody - the body to add to the request (optional).
721
+ * Can be a stringified Object.
722
+ * @param {Object} addlHeaders - additional headers to be put on the call (optional).
723
+ * Can be a stringified Object.
724
+ * @param {getCallback} callback - a callback function to return the result (Generics)
725
+ * or the error
726
+ */
727
+ genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
728
+ const meth = 'adapter-genericAdapterRequestNoBasePath';
729
+ const origin = `${this.id}-${meth}`;
730
+ log.trace(origin);
731
+
732
+ if (this.suspended && this.suspendMode === 'error') {
733
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
734
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
735
+ return callback(null, errorObj);
736
+ }
737
+
738
+ /* HERE IS WHERE YOU VALIDATE DATA */
739
+ if (uriPath === undefined || uriPath === null || uriPath === '') {
740
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
741
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
742
+ return callback(null, errorObj);
743
+ }
744
+ if (restMethod === undefined || restMethod === null || restMethod === '') {
745
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
746
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
747
+ return callback(null, errorObj);
748
+ }
749
+
750
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
751
+ // remove any leading / and split the uripath into path variables
752
+ let myPath = uriPath;
753
+ while (myPath.indexOf('/') === 0) {
754
+ myPath = myPath.substring(1);
755
+ }
756
+ const pathVars = myPath.split('/');
757
+ const queryParamsAvailable = queryData;
758
+ const queryParams = {};
759
+ const bodyVars = requestBody;
760
+
761
+ // loop in template. long callback arg name to avoid identifier conflicts
762
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
763
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
764
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
765
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
766
+ }
767
+ });
768
+
769
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
770
+ const reqObj = {
771
+ payload: bodyVars,
772
+ uriPathVars: pathVars,
773
+ uriQuery: queryParams,
774
+ uriOptions: {}
775
+ };
776
+ // add headers if provided
777
+ if (addlHeaders) {
778
+ reqObj.addlHeaders = addlHeaders;
779
+ }
780
+
781
+ // determine the call and return flag
782
+ let action = 'getGenericsNoBase';
783
+ let returnF = true;
784
+ if (restMethod.toUpperCase() === 'POST') {
785
+ action = 'createGenericNoBase';
786
+ } else if (restMethod.toUpperCase() === 'PUT') {
787
+ action = 'updateGenericNoBase';
788
+ } else if (restMethod.toUpperCase() === 'PATCH') {
789
+ action = 'patchGenericNoBase';
790
+ } else if (restMethod.toUpperCase() === 'DELETE') {
791
+ action = 'deleteGenericNoBase';
792
+ returnF = false;
793
+ }
794
+
795
+ try {
796
+ // Make the call -
797
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
798
+ return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
799
+ // if we received an error or their is no response on the results
800
+ // return an error
801
+ if (irReturnError) {
802
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
803
+ return callback(null, irReturnError);
804
+ }
805
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
806
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequestNoBasePath'], null, null, null);
807
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
808
+ return callback(null, errorObj);
809
+ }
810
+
811
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
812
+ // return the response
813
+ return callback(irReturnData, null);
814
+ });
815
+ } catch (ex) {
816
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
817
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
818
+ return callback(null, errorObj);
819
+ }
820
+ }
821
+
822
+ /**
823
+ * @callback healthCallback
824
+ * @param {Object} result - the result of the get request (contains an id and a status)
825
+ */
826
+ /**
827
+ * @callback getCallback
828
+ * @param {Object} result - the result of the get request (entity/ies)
829
+ * @param {String} error - any error that occurred
830
+ */
831
+ /**
832
+ * @callback createCallback
833
+ * @param {Object} item - the newly created entity
834
+ * @param {String} error - any error that occurred
835
+ */
836
+ /**
837
+ * @callback updateCallback
838
+ * @param {String} status - the status of the update action
839
+ * @param {String} error - any error that occurred
840
+ */
841
+ /**
842
+ * @callback deleteCallback
843
+ * @param {String} status - the status of the delete action
844
+ * @param {String} error - any error that occurred
845
+ */
846
+
236
847
  /**
237
848
  * @summary ### Overview
238
849
 
@@ -260,6 +871,12 @@ Create a user for your organization.
260
871
  const origin = `${this.id}-${meth}`;
261
872
  log.trace(origin);
262
873
 
874
+ if (this.suspended && this.suspendMode === 'error') {
875
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
876
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
877
+ return callback(null, errorObj);
878
+ }
879
+
263
880
  /* HERE IS WHERE YOU VALIDATE DATA */
264
881
  if (body === undefined || body === null || body === '') {
265
882
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -361,6 +978,12 @@ This endpoint takes no JSON argument.
361
978
  const origin = `${this.id}-${meth}`;
362
979
  log.trace(origin);
363
980
 
981
+ if (this.suspended && this.suspendMode === 'error') {
982
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
983
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
984
+ return callback(null, errorObj);
985
+ }
986
+
364
987
  /* HERE IS WHERE YOU VALIDATE DATA */
365
988
  if (apiKey === undefined || apiKey === null || apiKey === '') {
366
989
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -457,6 +1080,12 @@ Get a user details.
457
1080
  const origin = `${this.id}-${meth}`;
458
1081
  log.trace(origin);
459
1082
 
1083
+ if (this.suspended && this.suspendMode === 'error') {
1084
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1085
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1086
+ return callback(null, errorObj);
1087
+ }
1088
+
460
1089
  /* HERE IS WHERE YOU VALIDATE DATA */
461
1090
  if (apiKey === undefined || apiKey === null || apiKey === '') {
462
1091
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -559,6 +1188,12 @@ Update a user informations,
559
1188
  const origin = `${this.id}-${meth}`;
560
1189
  log.trace(origin);
561
1190
 
1191
+ if (this.suspended && this.suspendMode === 'error') {
1192
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1193
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1194
+ return callback(null, errorObj);
1195
+ }
1196
+
562
1197
  /* HERE IS WHERE YOU VALIDATE DATA */
563
1198
  if (body === undefined || body === null || body === '') {
564
1199
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -662,6 +1297,12 @@ Delete a user from an organization.
662
1297
  const origin = `${this.id}-${meth}`;
663
1298
  log.trace(origin);
664
1299
 
1300
+ if (this.suspended && this.suspendMode === 'error') {
1301
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1302
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1303
+ return callback(null, errorObj);
1304
+ }
1305
+
665
1306
  /* HERE IS WHERE YOU VALIDATE DATA */
666
1307
  if (apiKey === undefined || apiKey === null || apiKey === '') {
667
1308
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -755,6 +1396,12 @@ This GET call just checks to see if an API call key is valid.
755
1396
  const origin = `${this.id}-${meth}`;
756
1397
  log.trace(origin);
757
1398
 
1399
+ if (this.suspended && this.suspendMode === 'error') {
1400
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1401
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1402
+ return callback(null, errorObj);
1403
+ }
1404
+
758
1405
  /* HERE IS WHERE YOU VALIDATE DATA */
759
1406
  if (apiKey === undefined || apiKey === null || apiKey === '') {
760
1407
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -828,24 +1475,16 @@ This GET call just checks to see if an API call key is valid.
828
1475
 
829
1476
  /**
830
1477
  * @summary ### Overview
831
-
832
1478
  This POST call allows for you to POST check statuses for use with monitors
833
-
834
1479
  ### Arguments
835
-
836
1480
  * **`check`** *[required]*: The text for the message
837
-
838
1481
  * **`host_name`** *[required]*: The name of the host submitting the check
839
-
840
1482
  * **`status`** *[optional]*: An integer for the status of the check:
841
1483
  * 0 : OK
842
1484
  * 1 : WARNING
843
1485
  * 2 : CRITICAL
844
1486
  * 3 : UNKNOWN
845
-
846
-
847
1487
  * **`timestamp`** *[optional]*: POSIX timestamp of the event.
848
-
849
1488
  * **`message`** *[optional]*: A description of why this stat...(description truncated)
850
1489
  *
851
1490
  * @function postACheckStatus
@@ -860,6 +1499,12 @@ This POST call allows for you to POST check statuses for use with monitors
860
1499
  const origin = `${this.id}-${meth}`;
861
1500
  log.trace(origin);
862
1501
 
1502
+ if (this.suspended && this.suspendMode === 'error') {
1503
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1504
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1505
+ return callback(null, errorObj);
1506
+ }
1507
+
863
1508
  /* HERE IS WHERE YOU VALIDATE DATA */
864
1509
  if (body === undefined || body === null || body === '') {
865
1510
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -943,15 +1588,10 @@ This POST call allows for you to POST check statuses for use with monitors
943
1588
 
944
1589
  /**
945
1590
  * @summary ### Overview
946
-
947
1591
  This POST call allows for you to POST status messages to a previous post via ID.
948
-
949
1592
  ### Arguments
950
-
951
1593
  * **`message`** [*required*]: The comment text.
952
-
953
1594
  * **`handle`** [*optional*, *default* = **application key owner**]: The handle of the user making the comment.
954
-
955
1595
  * **`related_event_id`** [*optional*, *default* = **None**]: The id of another comment or event to reply to.
956
1596
  *
957
1597
  * @function replyToComment
@@ -966,6 +1606,12 @@ This POST call allows for you to POST status messages to a previous post via ID.
966
1606
  const origin = `${this.id}-${meth}`;
967
1607
  log.trace(origin);
968
1608
 
1609
+ if (this.suspended && this.suspendMode === 'error') {
1610
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1611
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1612
+ return callback(null, errorObj);
1613
+ }
1614
+
969
1615
  /* HERE IS WHERE YOU VALIDATE DATA */
970
1616
  if (body === undefined || body === null || body === '') {
971
1617
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -1049,13 +1695,9 @@ This POST call allows for you to POST status messages to a previous post via ID.
1049
1695
 
1050
1696
  /**
1051
1697
  * @summary ### Overview
1052
-
1053
1698
  This POST call allows for you to change a previously posted comment by commentId
1054
-
1055
1699
  ### Arguments
1056
-
1057
1700
  * **`message`** [*optional*, *default* = **original message**]: The comment text.
1058
-
1059
1701
  * **`handle`** [*optional*, *default* = **Application key owner**]: The handle of the user making the comment.
1060
1702
  *
1061
1703
  * @function editAComment
@@ -1070,6 +1712,12 @@ This POST call allows for you to change a previously posted comment by commentId
1070
1712
  const origin = `${this.id}-${meth}`;
1071
1713
  log.trace(origin);
1072
1714
 
1715
+ if (this.suspended && this.suspendMode === 'error') {
1716
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1717
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1718
+ return callback(null, errorObj);
1719
+ }
1720
+
1073
1721
  /* HERE IS WHERE YOU VALIDATE DATA */
1074
1722
  if (body === undefined || body === null || body === '') {
1075
1723
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -1153,11 +1801,8 @@ This POST call allows for you to change a previously posted comment by commentId
1153
1801
 
1154
1802
  /**
1155
1803
  * @summary ### Overview
1156
-
1157
1804
  Thiscall allows for you to DELETE a previously posted comment by with a given .
1158
-
1159
1805
  ### Arguments
1160
-
1161
1806
  This endpoint takes no JSON arguments.
1162
1807
  *
1163
1808
  * @function deleteAComment
@@ -1171,6 +1816,12 @@ This endpoint takes no JSON arguments.
1171
1816
  const origin = `${this.id}-${meth}`;
1172
1817
  log.trace(origin);
1173
1818
 
1819
+ if (this.suspended && this.suspendMode === 'error') {
1820
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1821
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1822
+ return callback(null, errorObj);
1823
+ }
1824
+
1174
1825
  /* HERE IS WHERE YOU VALIDATE DATA */
1175
1826
  if (apiKey === undefined || apiKey === null || apiKey === '') {
1176
1827
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -1249,11 +1900,8 @@ This endpoint takes no JSON arguments.
1249
1900
 
1250
1901
  /**
1251
1902
  * @summary ### Overview
1252
-
1253
- Create a Dashboard in Datadog.
1254
-
1903
+ Create a Dashboard in Datadog.\
1255
1904
  ### Arguments
1256
-
1257
1905
  * **`title`** [*required*]: Title of the dashboard.
1258
1906
  * **`widgets`** [*required*]: List of widgets to display on the dashboard. Widget definitions follow this form:
1259
1907
  * **`definition`** [*required*]: [Definition of the widget.](https://docs.datadoghq.com//graphing/widgets)
@@ -1272,6 +1920,12 @@ Create a Dashboard in Datadog.
1272
1920
  const origin = `${this.id}-${meth}`;
1273
1921
  log.trace(origin);
1274
1922
 
1923
+ if (this.suspended && this.suspendMode === 'error') {
1924
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1925
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1926
+ return callback(null, errorObj);
1927
+ }
1928
+
1275
1929
  /* HERE IS WHERE YOU VALIDATE DATA */
1276
1930
  if (body === undefined || body === null || body === '') {
1277
1931
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -1355,11 +2009,8 @@ Create a Dashboard in Datadog.
1355
2009
 
1356
2010
  /**
1357
2011
  * @summary ### Overview
1358
-
1359
2012
  Update a Dashboard in Datadog.
1360
-
1361
2013
  ### Arguments
1362
-
1363
2014
  * **`title`** [*required*]: Title of the dashboard.
1364
2015
  * **`widgets`** [*required*]: List of widgets to display on the dashboard. Widget definitions follow this form:
1365
2016
  * **`definition`** [*required*]: [Definition of the widget.](https://docs.datadoghq.com/graphing/widgets)
@@ -1378,6 +2029,12 @@ Update a Dashboard in Datadog.
1378
2029
  const origin = `${this.id}-${meth}`;
1379
2030
  log.trace(origin);
1380
2031
 
2032
+ if (this.suspended && this.suspendMode === 'error') {
2033
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2034
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2035
+ return callback(null, errorObj);
2036
+ }
2037
+
1381
2038
  /* HERE IS WHERE YOU VALIDATE DATA */
1382
2039
  if (body === undefined || body === null || body === '') {
1383
2040
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -1479,6 +2136,12 @@ This end point takes no JSON arguments.
1479
2136
  const origin = `${this.id}-${meth}`;
1480
2137
  log.trace(origin);
1481
2138
 
2139
+ if (this.suspended && this.suspendMode === 'error') {
2140
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2141
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2142
+ return callback(null, errorObj);
2143
+ }
2144
+
1482
2145
  /* HERE IS WHERE YOU VALIDATE DATA */
1483
2146
  if (apiKey === undefined || apiKey === null || apiKey === '') {
1484
2147
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -1575,6 +2238,12 @@ This end point takes no JSON arguments.
1575
2238
  const origin = `${this.id}-${meth}`;
1576
2239
  log.trace(origin);
1577
2240
 
2241
+ if (this.suspended && this.suspendMode === 'error') {
2242
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2243
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2244
+ return callback(null, errorObj);
2245
+ }
2246
+
1578
2247
  /* HERE IS WHERE YOU VALIDATE DATA */
1579
2248
  if (apiKey === undefined || apiKey === null || apiKey === '') {
1580
2249
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -1671,6 +2340,12 @@ This end point takes no JSON arguments.
1671
2340
  const origin = `${this.id}-${meth}`;
1672
2341
  log.trace(origin);
1673
2342
 
2343
+ if (this.suspended && this.suspendMode === 'error') {
2344
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2345
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2346
+ return callback(null, errorObj);
2347
+ }
2348
+
1674
2349
  /* HERE IS WHERE YOU VALIDATE DATA */
1675
2350
  if (apiKey === undefined || apiKey === null || apiKey === '') {
1676
2351
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -1767,6 +2442,12 @@ This end point takes no JSON arguments.
1767
2442
  const origin = `${this.id}-${meth}`;
1768
2443
  log.trace(origin);
1769
2444
 
2445
+ if (this.suspended && this.suspendMode === 'error') {
2446
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2447
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2448
+ return callback(null, errorObj);
2449
+ }
2450
+
1770
2451
  /* HERE IS WHERE YOU VALIDATE DATA */
1771
2452
  if (apiKey === undefined || apiKey === null || apiKey === '') {
1772
2453
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -1864,6 +2545,12 @@ Update the name of a dashboard list
1864
2545
  const origin = `${this.id}-${meth}`;
1865
2546
  log.trace(origin);
1866
2547
 
2548
+ if (this.suspended && this.suspendMode === 'error') {
2549
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2550
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2551
+ return callback(null, errorObj);
2552
+ }
2553
+
1867
2554
  /* HERE IS WHERE YOU VALIDATE DATA */
1868
2555
  if (body === undefined || body === null || body === '') {
1869
2556
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -1965,6 +2652,12 @@ This end point takes no JSON arguments.
1965
2652
  const origin = `${this.id}-${meth}`;
1966
2653
  log.trace(origin);
1967
2654
 
2655
+ if (this.suspended && this.suspendMode === 'error') {
2656
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2657
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2658
+ return callback(null, errorObj);
2659
+ }
2660
+
1968
2661
  /* HERE IS WHERE YOU VALIDATE DATA */
1969
2662
  if (apiKey === undefined || apiKey === null || apiKey === '') {
1970
2663
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -2061,6 +2754,12 @@ This end point takes no JSON arguments.
2061
2754
  const origin = `${this.id}-${meth}`;
2062
2755
  log.trace(origin);
2063
2756
 
2757
+ if (this.suspended && this.suspendMode === 'error') {
2758
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2759
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2760
+ return callback(null, errorObj);
2761
+ }
2762
+
2064
2763
  /* HERE IS WHERE YOU VALIDATE DATA */
2065
2764
  if (apiKey === undefined || apiKey === null || apiKey === '') {
2066
2765
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -2158,6 +2857,12 @@ Create an empty dashboard list.
2158
2857
  const origin = `${this.id}-${meth}`;
2159
2858
  log.trace(origin);
2160
2859
 
2860
+ if (this.suspended && this.suspendMode === 'error') {
2861
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2862
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2863
+ return callback(null, errorObj);
2864
+ }
2865
+
2161
2866
  /* HERE IS WHERE YOU VALIDATE DATA */
2162
2867
  if (body === undefined || body === null || body === '') {
2163
2868
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -2259,6 +2964,12 @@ This end point takes no JSON arguments.
2259
2964
  const origin = `${this.id}-${meth}`;
2260
2965
  log.trace(origin);
2261
2966
 
2967
+ if (this.suspended && this.suspendMode === 'error') {
2968
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2969
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2970
+ return callback(null, errorObj);
2971
+ }
2972
+
2262
2973
  /* HERE IS WHERE YOU VALIDATE DATA */
2263
2974
  if (apiKey === undefined || apiKey === null || apiKey === '') {
2264
2975
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -2363,6 +3074,12 @@ Add dashboards to an existing dashboard list.
2363
3074
  const origin = `${this.id}-${meth}`;
2364
3075
  log.trace(origin);
2365
3076
 
3077
+ if (this.suspended && this.suspendMode === 'error') {
3078
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3079
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3080
+ return callback(null, errorObj);
3081
+ }
3082
+
2366
3083
  /* HERE IS WHERE YOU VALIDATE DATA */
2367
3084
  if (body === undefined || body === null || body === '') {
2368
3085
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -2472,6 +3189,12 @@ Update dashboards of an existing dashboard list.
2472
3189
  const origin = `${this.id}-${meth}`;
2473
3190
  log.trace(origin);
2474
3191
 
3192
+ if (this.suspended && this.suspendMode === 'error') {
3193
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3194
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3195
+ return callback(null, errorObj);
3196
+ }
3197
+
2475
3198
  /* HERE IS WHERE YOU VALIDATE DATA */
2476
3199
  if (body === undefined || body === null || body === '') {
2477
3200
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -2580,6 +3303,12 @@ Delete dashboards from an existing dashboard list.
2580
3303
  const origin = `${this.id}-${meth}`;
2581
3304
  log.trace(origin);
2582
3305
 
3306
+ if (this.suspended && this.suspendMode === 'error') {
3307
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3308
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3309
+ return callback(null, errorObj);
3310
+ }
3311
+
2583
3312
  /* HERE IS WHERE YOU VALIDATE DATA */
2584
3313
  if (apiKey === undefined || apiKey === null || apiKey === '') {
2585
3314
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -2678,6 +3407,12 @@ Schedule a single Downtime.
2678
3407
  const origin = `${this.id}-${meth}`;
2679
3408
  log.trace(origin);
2680
3409
 
3410
+ if (this.suspended && this.suspendMode === 'error') {
3411
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3412
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3413
+ return callback(null, errorObj);
3414
+ }
3415
+
2681
3416
  /* HERE IS WHERE YOU VALIDATE DATA */
2682
3417
  if (body === undefined || body === null || body === '') {
2683
3418
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -2779,6 +3514,12 @@ Get All Scheduled Downtimes
2779
3514
  const origin = `${this.id}-${meth}`;
2780
3515
  log.trace(origin);
2781
3516
 
3517
+ if (this.suspended && this.suspendMode === 'error') {
3518
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3519
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3520
+ return callback(null, errorObj);
3521
+ }
3522
+
2782
3523
  /* HERE IS WHERE YOU VALIDATE DATA */
2783
3524
  if (apiKey === undefined || apiKey === null || apiKey === '') {
2784
3525
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -2878,6 +3619,12 @@ Update a single Downtime by downtime_id.
2878
3619
  const origin = `${this.id}-${meth}`;
2879
3620
  log.trace(origin);
2880
3621
 
3622
+ if (this.suspended && this.suspendMode === 'error') {
3623
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3624
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3625
+ return callback(null, errorObj);
3626
+ }
3627
+
2881
3628
  /* HERE IS WHERE YOU VALIDATE DATA */
2882
3629
  if (body === undefined || body === null || body === '') {
2883
3630
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -2973,6 +3720,12 @@ Update a single Downtime by downtime_id.
2973
3720
  const origin = `${this.id}-${meth}`;
2974
3721
  log.trace(origin);
2975
3722
 
3723
+ if (this.suspended && this.suspendMode === 'error') {
3724
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3725
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3726
+ return callback(null, errorObj);
3727
+ }
3728
+
2976
3729
  /* HERE IS WHERE YOU VALIDATE DATA */
2977
3730
  if (apiKey === undefined || apiKey === null || apiKey === '') {
2978
3731
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -3069,6 +3822,12 @@ This endpoint takes no JSON arguments.
3069
3822
  const origin = `${this.id}-${meth}`;
3070
3823
  log.trace(origin);
3071
3824
 
3825
+ if (this.suspended && this.suspendMode === 'error') {
3826
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3827
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3828
+ return callback(null, errorObj);
3829
+ }
3830
+
3072
3831
  /* HERE IS WHERE YOU VALIDATE DATA */
3073
3832
  if (apiKey === undefined || apiKey === null || apiKey === '') {
3074
3833
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -3166,6 +3925,12 @@ DELETE all Downtimes that match the scope of X
3166
3925
  const origin = `${this.id}-${meth}`;
3167
3926
  log.trace(origin);
3168
3927
 
3928
+ if (this.suspended && this.suspendMode === 'error') {
3929
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3930
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3931
+ return callback(null, errorObj);
3932
+ }
3933
+
3169
3934
  /* HERE IS WHERE YOU VALIDATE DATA */
3170
3935
  if (body === undefined || body === null || body === '') {
3171
3936
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -3269,6 +4034,12 @@ This endpoint takes no JSON arguments.
3269
4034
  const origin = `${this.id}-${meth}`;
3270
4035
  log.trace(origin);
3271
4036
 
4037
+ if (this.suspended && this.suspendMode === 'error') {
4038
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4039
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4040
+ return callback(null, errorObj);
4041
+ }
4042
+
3272
4043
  /* HERE IS WHERE YOU VALIDATE DATA */
3273
4044
  if (apiKey === undefined || apiKey === null || apiKey === '') {
3274
4045
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -3368,6 +4139,12 @@ If you are interested in using template variables, see [Embeddable Graphs with T
3368
4139
  const origin = `${this.id}-${meth}`;
3369
4140
  log.trace(origin);
3370
4141
 
4142
+ if (this.suspended && this.suspendMode === 'error') {
4143
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4144
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4145
+ return callback(null, errorObj);
4146
+ }
4147
+
3371
4148
  /* HERE IS WHERE YOU VALIDATE DATA */
3372
4149
  if (body === undefined || body === null || body === '') {
3373
4150
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -3477,6 +4254,12 @@ On failur...(description truncated)
3477
4254
  const origin = `${this.id}-${meth}`;
3478
4255
  log.trace(origin);
3479
4256
 
4257
+ if (this.suspended && this.suspendMode === 'error') {
4258
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4259
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4260
+ return callback(null, errorObj);
4261
+ }
4262
+
3480
4263
  /* HERE IS WHERE YOU VALIDATE DATA */
3481
4264
  if (apiKey === undefined || apiKey === null || apiKey === '') {
3482
4265
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -3575,6 +4358,12 @@ This endpoint takes no JSON arguments.
3575
4358
  const origin = `${this.id}-${meth}`;
3576
4359
  log.trace(origin);
3577
4360
 
4361
+ if (this.suspended && this.suspendMode === 'error') {
4362
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4363
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4364
+ return callback(null, errorObj);
4365
+ }
4366
+
3578
4367
  /* HERE IS WHERE YOU VALIDATE DATA */
3579
4368
  if (apiKey === undefined || apiKey === null || apiKey === '') {
3580
4369
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -3673,6 +4462,12 @@ This endpoint takes no JSON arguments.
3673
4462
  const origin = `${this.id}-${meth}`;
3674
4463
  log.trace(origin);
3675
4464
 
4465
+ if (this.suspended && this.suspendMode === 'error') {
4466
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4467
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4468
+ return callback(null, errorObj);
4469
+ }
4470
+
3676
4471
  /* HERE IS WHERE YOU VALIDATE DATA */
3677
4472
  if (apiKey === undefined || apiKey === null || apiKey === '') {
3678
4473
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -3771,6 +4566,12 @@ This endpoint allows you to post events to the stream. Tag them, set priority an
3771
4566
  const origin = `${this.id}-${meth}`;
3772
4567
  log.trace(origin);
3773
4568
 
4569
+ if (this.suspended && this.suspendMode === 'error') {
4570
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4571
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4572
+ return callback(null, errorObj);
4573
+ }
4574
+
3774
4575
  /* HERE IS WHERE YOU VALIDATE DATA */
3775
4576
  if (body === undefined || body === null || body === '') {
3776
4577
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -3876,6 +4677,12 @@ Note: if the event you're querying contains markdown formatting of any kind, you
3876
4677
  const origin = `${this.id}-${meth}`;
3877
4678
  log.trace(origin);
3878
4679
 
4680
+ if (this.suspended && this.suspendMode === 'error') {
4681
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4682
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4683
+ return callback(null, errorObj);
4684
+ }
4685
+
3879
4686
  /* HERE IS WHERE YOU VALIDATE DATA */
3880
4687
  if (apiKey === undefined || apiKey === null || apiKey === '') {
3881
4688
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -3972,6 +4779,12 @@ This endpoint takes no JSON arguments.
3972
4779
  const origin = `${this.id}-${meth}`;
3973
4780
  log.trace(origin);
3974
4781
 
4782
+ if (this.suspended && this.suspendMode === 'error') {
4783
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4784
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4785
+ return callback(null, errorObj);
4786
+ }
4787
+
3975
4788
  /* HERE IS WHERE YOU VALIDATE DATA */
3976
4789
  if (apiKey === undefined || apiKey === null || apiKey === '') {
3977
4790
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -4068,6 +4881,12 @@ This endpoint takes no JSON arguments.
4068
4881
  const origin = `${this.id}-${meth}`;
4069
4882
  log.trace(origin);
4070
4883
 
4884
+ if (this.suspended && this.suspendMode === 'error') {
4885
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4886
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4887
+ return callback(null, errorObj);
4888
+ }
4889
+
4071
4890
  /* HERE IS WHERE YOU VALIDATE DATA */
4072
4891
  if (apiKey === undefined || apiKey === null || apiKey === '') {
4073
4892
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -4172,6 +4991,12 @@ Get a Graph snapshot.
4172
4991
  const origin = `${this.id}-${meth}`;
4173
4992
  log.trace(origin);
4174
4993
 
4994
+ if (this.suspended && this.suspendMode === 'error') {
4995
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4996
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4997
+ return callback(null, errorObj);
4998
+ }
4999
+
4175
5000
  /* HERE IS WHERE YOU VALIDATE DATA */
4176
5001
  if (apiKey === undefined || apiKey === null || apiKey === '') {
4177
5002
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -4295,6 +5120,12 @@ This endpoint allows searching for hosts by name, alias, or tag. Hosts live with
4295
5120
  const origin = `${this.id}-${meth}`;
4296
5121
  log.trace(origin);
4297
5122
 
5123
+ if (this.suspended && this.suspendMode === 'error') {
5124
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5125
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5126
+ return callback(null, errorObj);
5127
+ }
5128
+
4298
5129
  /* HERE IS WHERE YOU VALIDATE DATA */
4299
5130
  if (apiKey === undefined || apiKey === null || apiKey === '') {
4300
5131
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -4416,6 +5247,12 @@ This endpoint takes no JSON arguments.
4416
5247
  const origin = `${this.id}-${meth}`;
4417
5248
  log.trace(origin);
4418
5249
 
5250
+ if (this.suspended && this.suspendMode === 'error') {
5251
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5252
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5253
+ return callback(null, errorObj);
5254
+ }
5255
+
4419
5256
  /* HERE IS WHERE YOU VALIDATE DATA */
4420
5257
  if (apiKey === undefined || apiKey === null || apiKey === '') {
4421
5258
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -4515,6 +5352,12 @@ Mute a host in order to avoid any monitor to trigger on it.
4515
5352
  const origin = `${this.id}-${meth}`;
4516
5353
  log.trace(origin);
4517
5354
 
5355
+ if (this.suspended && this.suspendMode === 'error') {
5356
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5357
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5358
+ return callback(null, errorObj);
5359
+ }
5360
+
4518
5361
  /* HERE IS WHERE YOU VALIDATE DATA */
4519
5362
  if (body === undefined || body === null || body === '') {
4520
5363
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -4617,6 +5460,12 @@ This endpoint takes no JSON arguments.
4617
5460
  const origin = `${this.id}-${meth}`;
4618
5461
  log.trace(origin);
4619
5462
 
5463
+ if (this.suspended && this.suspendMode === 'error') {
5464
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5465
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5466
+ return callback(null, errorObj);
5467
+ }
5468
+
4620
5469
  /* HERE IS WHERE YOU VALIDATE DATA */
4621
5470
  if (body === undefined || body === null || body === '') {
4622
5471
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -4718,6 +5567,12 @@ This endpoint takes no JSON argument.
4718
5567
  const origin = `${this.id}-${meth}`;
4719
5568
  log.trace(origin);
4720
5569
 
5570
+ if (this.suspended && this.suspendMode === 'error') {
5571
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5572
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5573
+ return callback(null, errorObj);
5574
+ }
5575
+
4721
5576
  /* HERE IS WHERE YOU VALIDATE DATA */
4722
5577
  if (apiKey === undefined || apiKey === null || apiKey === '') {
4723
5578
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -4824,6 +5679,12 @@ Create a Datadog-Amazon Web Services integration.
4824
5679
  const origin = `${this.id}-${meth}`;
4825
5680
  log.trace(origin);
4826
5681
 
5682
+ if (this.suspended && this.suspendMode === 'error') {
5683
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5684
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5685
+ return callback(null, errorObj);
5686
+ }
5687
+
4827
5688
  /* HERE IS WHERE YOU VALIDATE DATA */
4828
5689
  if (body === undefined || body === null || body === '') {
4829
5690
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -4927,6 +5788,12 @@ This endpoint takes no JSON argument.
4927
5788
  const origin = `${this.id}-${meth}`;
4928
5789
  log.trace(origin);
4929
5790
 
5791
+ if (this.suspended && this.suspendMode === 'error') {
5792
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5793
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5794
+ return callback(null, errorObj);
5795
+ }
5796
+
4930
5797
  /* HERE IS WHERE YOU VALIDATE DATA */
4931
5798
  if (apiKey === undefined || apiKey === null || apiKey === '') {
4932
5799
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -5023,6 +5890,12 @@ This endpoint takes no JSON arguments
5023
5890
  const origin = `${this.id}-${meth}`;
5024
5891
  log.trace(origin);
5025
5892
 
5893
+ if (this.suspended && this.suspendMode === 'error') {
5894
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5895
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5896
+ return callback(null, errorObj);
5897
+ }
5898
+
5026
5899
  /* HERE IS WHERE YOU VALIDATE DATA */
5027
5900
  if (apiKey === undefined || apiKey === null || apiKey === '') {
5028
5901
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -5119,6 +5992,12 @@ This endpoint takes no JSON arguments.
5119
5992
  const origin = `${this.id}-${meth}`;
5120
5993
  log.trace(origin);
5121
5994
 
5995
+ if (this.suspended && this.suspendMode === 'error') {
5996
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5997
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5998
+ return callback(null, errorObj);
5999
+ }
6000
+
5122
6001
  /* HERE IS WHERE YOU VALIDATE DATA */
5123
6002
  if (apiKey === undefined || apiKey === null || apiKey === '') {
5124
6003
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -5220,6 +6099,12 @@ List AWS Accounts (role-based only) in Datadog. [Read more about Datadog-AWS int
5220
6099
  const origin = `${this.id}-${meth}`;
5221
6100
  log.trace(origin);
5222
6101
 
6102
+ if (this.suspended && this.suspendMode === 'error') {
6103
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6104
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6105
+ return callback(null, errorObj);
6106
+ }
6107
+
5223
6108
  /* HERE IS WHERE YOU VALIDATE DATA */
5224
6109
  if (body === undefined || body === null || body === '') {
5225
6110
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -5315,6 +6200,12 @@ List AWS Accounts (role-based only) in Datadog. [Read more about Datadog-AWS int
5315
6200
  const origin = `${this.id}-${meth}`;
5316
6201
  log.trace(origin);
5317
6202
 
6203
+ if (this.suspended && this.suspendMode === 'error') {
6204
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6205
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6206
+ return callback(null, errorObj);
6207
+ }
6208
+
5318
6209
  /* HERE IS WHERE YOU VALIDATE DATA */
5319
6210
  if (apiKey === undefined || apiKey === null || apiKey === '') {
5320
6211
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -5393,22 +6284,14 @@ List AWS Accounts (role-based only) in Datadog. [Read more about Datadog-AWS int
5393
6284
 
5394
6285
  /**
5395
6286
  * @summary ### Overview
5396
-
5397
6287
  Generate a new AWS external id for a given AWS account id and role name pair.
5398
-
5399
6288
  ### Arguments
5400
-
5401
-
5402
6289
  * **`account_id`** [*required*]:
5403
-
5404
6290
  Your AWS Account ID without dashes.
5405
6291
  [Consult the Datadog AWS integration to learn more][1] about your AWS account ID.
5406
-
5407
6292
  * **`role_name`** [*required*]:
5408
-
5409
6293
  Your Datadog role delegation name.
5410
6294
  For more information about you AWS account Role name, [see the Datadog AWS integration configuration info][2].
5411
-
5412
6295
  [1]: /integrations/amazon_web_services/#co...(description truncated)
5413
6296
  *
5414
6297
  * @function generateNewExternalIDs
@@ -5423,6 +6306,12 @@ Generate a new AWS external id for a given AWS account id and role name pair.
5423
6306
  const origin = `${this.id}-${meth}`;
5424
6307
  log.trace(origin);
5425
6308
 
6309
+ if (this.suspended && this.suspendMode === 'error') {
6310
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6311
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6312
+ return callback(null, errorObj);
6313
+ }
6314
+
5426
6315
  /* HERE IS WHERE YOU VALIDATE DATA */
5427
6316
  if (body === undefined || body === null || body === '') {
5428
6317
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -5524,6 +6413,12 @@ This endpoint takes no JSON argument.
5524
6413
  const origin = `${this.id}-${meth}`;
5525
6414
  log.trace(origin);
5526
6415
 
6416
+ if (this.suspended && this.suspendMode === 'error') {
6417
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6418
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6419
+ return callback(null, errorObj);
6420
+ }
6421
+
5527
6422
  /* HERE IS WHERE YOU VALIDATE DATA */
5528
6423
  if (apiKey === undefined || apiKey === null || apiKey === '') {
5529
6424
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -5629,6 +6524,12 @@ Refer to the [Datadog-Azure integration installation instructions][1] to see how
5629
6524
  const origin = `${this.id}-${meth}`;
5630
6525
  log.trace(origin);
5631
6526
 
6527
+ if (this.suspended && this.suspendMode === 'error') {
6528
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6529
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6530
+ return callback(null, errorObj);
6531
+ }
6532
+
5632
6533
  /* HERE IS WHERE YOU VALIDATE DATA */
5633
6534
  if (body === undefined || body === null || body === '') {
5634
6535
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -5730,6 +6631,12 @@ This endpoint takes no JSON argument.
5730
6631
  const origin = `${this.id}-${meth}`;
5731
6632
  log.trace(origin);
5732
6633
 
6634
+ if (this.suspended && this.suspendMode === 'error') {
6635
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6636
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6637
+ return callback(null, errorObj);
6638
+ }
6639
+
5733
6640
  /* HERE IS WHERE YOU VALIDATE DATA */
5734
6641
  if (apiKey === undefined || apiKey === null || apiKey === '') {
5735
6642
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -5826,6 +6733,12 @@ This endpoint takes no JSON argument.
5826
6733
  const origin = `${this.id}-${meth}`;
5827
6734
  log.trace(origin);
5828
6735
 
6736
+ if (this.suspended && this.suspendMode === 'error') {
6737
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6738
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6739
+ return callback(null, errorObj);
6740
+ }
6741
+
5829
6742
  /* HERE IS WHERE YOU VALIDATE DATA */
5830
6743
  if (apiKey === undefined || apiKey === null || apiKey === '') {
5831
6744
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -5926,6 +6839,12 @@ All of the following fields' values are provided by the JSON service account key
5926
6839
  const origin = `${this.id}-${meth}`;
5927
6840
  log.trace(origin);
5928
6841
 
6842
+ if (this.suspended && this.suspendMode === 'error') {
6843
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6844
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6845
+ return callback(null, errorObj);
6846
+ }
6847
+
5929
6848
  /* HERE IS WHERE YOU VALIDATE DATA */
5930
6849
  if (body === undefined || body === null || body === '') {
5931
6850
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -6035,6 +6954,12 @@ Update your Datadog-Google Cloud Platform integration Automute options.
6035
6954
  const origin = `${this.id}-${meth}`;
6036
6955
  log.trace(origin);
6037
6956
 
6957
+ if (this.suspended && this.suspendMode === 'error') {
6958
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6959
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6960
+ return callback(null, errorObj);
6961
+ }
6962
+
6038
6963
  /* HERE IS WHERE YOU VALIDATE DATA */
6039
6964
  if (body === undefined || body === null || body === '') {
6040
6965
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -6138,6 +7063,12 @@ This endpoint takes no JSON argument.
6138
7063
  const origin = `${this.id}-${meth}`;
6139
7064
  log.trace(origin);
6140
7065
 
7066
+ if (this.suspended && this.suspendMode === 'error') {
7067
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7068
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7069
+ return callback(null, errorObj);
7070
+ }
7071
+
6141
7072
  /* HERE IS WHERE YOU VALIDATE DATA */
6142
7073
  if (apiKey === undefined || apiKey === null || apiKey === '') {
6143
7074
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -6234,6 +7165,12 @@ This endpoint takes no JSON argument.
6234
7165
  const origin = `${this.id}-${meth}`;
6235
7166
  log.trace(origin);
6236
7167
 
7168
+ if (this.suspended && this.suspendMode === 'error') {
7169
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7170
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7171
+ return callback(null, errorObj);
7172
+ }
7173
+
6237
7174
  /* HERE IS WHERE YOU VALIDATE DATA */
6238
7175
  if (apiKey === undefined || apiKey === null || apiKey === '') {
6239
7176
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -6334,6 +7271,12 @@ Add new services and schedules to your Datadog-PagerDuty integration. [Read more
6334
7271
  const origin = `${this.id}-${meth}`;
6335
7272
  log.trace(origin);
6336
7273
 
7274
+ if (this.suspended && this.suspendMode === 'error') {
7275
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7276
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7277
+ return callback(null, errorObj);
7278
+ }
7279
+
6337
7280
  /* HERE IS WHERE YOU VALIDATE DATA */
6338
7281
  if (body === undefined || body === null || body === '') {
6339
7282
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -6417,14 +7360,9 @@ Add new services and schedules to your Datadog-PagerDuty integration. [Read more
6417
7360
 
6418
7361
  /**
6419
7362
  * @summary ### Overview
6420
-
6421
7363
  Delete a Datadog-PagerDuty integration configured in your Datadog Account. [Read more about Datadog-PagerDuty integration][1].
6422
-
6423
7364
  ### Arguments
6424
-
6425
7365
  This endpoint takes no JSON arguments
6426
-
6427
-
6428
7366
  [1]: https://docs.datadoghq.com/integrations/pagerduty
6429
7367
  *
6430
7368
  * @function deletePagerDutyConfiguration
@@ -6438,6 +7376,12 @@ This endpoint takes no JSON arguments
6438
7376
  const origin = `${this.id}-${meth}`;
6439
7377
  log.trace(origin);
6440
7378
 
7379
+ if (this.suspended && this.suspendMode === 'error') {
7380
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7381
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7382
+ return callback(null, errorObj);
7383
+ }
7384
+
6441
7385
  /* HERE IS WHERE YOU VALIDATE DATA */
6442
7386
  if (apiKey === undefined || apiKey === null || apiKey === '') {
6443
7387
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -6534,6 +7478,12 @@ This endpoint takes no JSON argument.
6534
7478
  const origin = `${this.id}-${meth}`;
6535
7479
  log.trace(origin);
6536
7480
 
7481
+ if (this.suspended && this.suspendMode === 'error') {
7482
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7483
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7484
+ return callback(null, errorObj);
7485
+ }
7486
+
6537
7487
  /* HERE IS WHERE YOU VALIDATE DATA */
6538
7488
  if (apiKey === undefined || apiKey === null || apiKey === '') {
6539
7489
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -6635,6 +7585,12 @@ Add channels to your existing Datadog-Slack integration directly through Datadog
6635
7585
  const origin = `${this.id}-${meth}`;
6636
7586
  log.trace(origin);
6637
7587
 
7588
+ if (this.suspended && this.suspendMode === 'error') {
7589
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7590
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7591
+ return callback(null, errorObj);
7592
+ }
7593
+
6638
7594
  /* HERE IS WHERE YOU VALIDATE DATA */
6639
7595
  if (body === undefined || body === null || body === '') {
6640
7596
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -6718,14 +7674,9 @@ Add channels to your existing Datadog-Slack integration directly through Datadog
6718
7674
 
6719
7675
  /**
6720
7676
  * @summary ### Overview
6721
-
6722
7677
  Delete a Datadog-Slack integration configured in your Datadog Account. [Read more about Datadog-Slack integration][1].
6723
-
6724
7678
  ### Arguments
6725
-
6726
7679
  This endpoint takes no JSON arguments
6727
-
6728
-
6729
7680
  [1]: https://docs.datadoghq.com/integrations/slack
6730
7681
  *
6731
7682
  * @function deleteSlackConfigurationDetails
@@ -6739,6 +7690,12 @@ This endpoint takes no JSON arguments
6739
7690
  const origin = `${this.id}-${meth}`;
6740
7691
  log.trace(origin);
6741
7692
 
7693
+ if (this.suspended && this.suspendMode === 'error') {
7694
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7695
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7696
+ return callback(null, errorObj);
7697
+ }
7698
+
6742
7699
  /* HERE IS WHERE YOU VALIDATE DATA */
6743
7700
  if (apiKey === undefined || apiKey === null || apiKey === '') {
6744
7701
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -6829,6 +7786,12 @@ This endpoint takes no JSON arguments
6829
7786
  const origin = `${this.id}-${meth}`;
6830
7787
  log.trace(origin);
6831
7788
 
7789
+ if (this.suspended && this.suspendMode === 'error') {
7790
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7791
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7792
+ return callback(null, errorObj);
7793
+ }
7794
+
6832
7795
  /* HERE IS WHERE YOU VALIDATE DATA */
6833
7796
  if (apiKey === undefined || apiKey === null || apiKey === '') {
6834
7797
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -6920,6 +7883,12 @@ This endpoint takes no JSON arguments
6920
7883
  const origin = `${this.id}-${meth}`;
6921
7884
  log.trace(origin);
6922
7885
 
7886
+ if (this.suspended && this.suspendMode === 'error') {
7887
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7888
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7889
+ return callback(null, errorObj);
7890
+ }
7891
+
6923
7892
  /* HERE IS WHERE YOU VALIDATE DATA */
6924
7893
  if (body === undefined || body === null || body === '') {
6925
7894
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -7015,6 +7984,12 @@ This endpoint takes no JSON arguments
7015
7984
  const origin = `${this.id}-${meth}`;
7016
7985
  log.trace(origin);
7017
7986
 
7987
+ if (this.suspended && this.suspendMode === 'error') {
7988
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7989
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7990
+ return callback(null, errorObj);
7991
+ }
7992
+
7018
7993
  /* HERE IS WHERE YOU VALIDATE DATA */
7019
7994
  if (apiKey === undefined || apiKey === null || apiKey === '') {
7020
7995
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -7106,6 +8081,12 @@ This endpoint takes no JSON arguments
7106
8081
  const origin = `${this.id}-${meth}`;
7107
8082
  log.trace(origin);
7108
8083
 
8084
+ if (this.suspended && this.suspendMode === 'error') {
8085
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8086
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8087
+ return callback(null, errorObj);
8088
+ }
8089
+
7109
8090
  /* HERE IS WHERE YOU VALIDATE DATA */
7110
8091
  if (body === undefined || body === null || body === '') {
7111
8092
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -7207,6 +8188,12 @@ This endpoint takes no JSON arguments.
7207
8188
  const origin = `${this.id}-${meth}`;
7208
8189
  log.trace(origin);
7209
8190
 
8191
+ if (this.suspended && this.suspendMode === 'error') {
8192
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8193
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8194
+ return callback(null, errorObj);
8195
+ }
8196
+
7210
8197
  /* HERE IS WHERE YOU VALIDATE DATA */
7211
8198
  if (apiKey === undefined || apiKey === null || apiKey === '') {
7212
8199
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -7304,6 +8291,12 @@ Create an API key with a given name.
7304
8291
  const origin = `${this.id}-${meth}`;
7305
8292
  log.trace(origin);
7306
8293
 
8294
+ if (this.suspended && this.suspendMode === 'error') {
8295
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8296
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8297
+ return callback(null, errorObj);
8298
+ }
8299
+
7307
8300
  /* HERE IS WHERE YOU VALIDATE DATA */
7308
8301
  if (body === undefined || body === null || body === '') {
7309
8302
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -7405,6 +8398,12 @@ This endpoint takes no JSON arguments.
7405
8398
  const origin = `${this.id}-${meth}`;
7406
8399
  log.trace(origin);
7407
8400
 
8401
+ if (this.suspended && this.suspendMode === 'error') {
8402
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8403
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8404
+ return callback(null, errorObj);
8405
+ }
8406
+
7408
8407
  /* HERE IS WHERE YOU VALIDATE DATA */
7409
8408
  if (apiKey === undefined || apiKey === null || apiKey === '') {
7410
8409
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -7502,6 +8501,12 @@ Edit an API key name.
7502
8501
  const origin = `${this.id}-${meth}`;
7503
8502
  log.trace(origin);
7504
8503
 
8504
+ if (this.suspended && this.suspendMode === 'error') {
8505
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8506
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8507
+ return callback(null, errorObj);
8508
+ }
8509
+
7505
8510
  /* HERE IS WHERE YOU VALIDATE DATA */
7506
8511
  if (body === undefined || body === null || body === '') {
7507
8512
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -7603,6 +8608,12 @@ This endpoint takes no JSON arguments.
7603
8608
  const origin = `${this.id}-${meth}`;
7604
8609
  log.trace(origin);
7605
8610
 
8611
+ if (this.suspended && this.suspendMode === 'error') {
8612
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8613
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8614
+ return callback(null, errorObj);
8615
+ }
8616
+
7606
8617
  /* HERE IS WHERE YOU VALIDATE DATA */
7607
8618
  if (apiKey === undefined || apiKey === null || apiKey === '') {
7608
8619
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -7699,6 +8710,12 @@ This endpoint takes no JSON arguments.
7699
8710
  const origin = `${this.id}-${meth}`;
7700
8711
  log.trace(origin);
7701
8712
 
8713
+ if (this.suspended && this.suspendMode === 'error') {
8714
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8715
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8716
+ return callback(null, errorObj);
8717
+ }
8718
+
7702
8719
  /* HERE IS WHERE YOU VALIDATE DATA */
7703
8720
  if (apiKey === undefined || apiKey === null || apiKey === '') {
7704
8721
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -7796,6 +8813,12 @@ Create an application key with a given name.
7796
8813
  const origin = `${this.id}-${meth}`;
7797
8814
  log.trace(origin);
7798
8815
 
8816
+ if (this.suspended && this.suspendMode === 'error') {
8817
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8818
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8819
+ return callback(null, errorObj);
8820
+ }
8821
+
7799
8822
  /* HERE IS WHERE YOU VALIDATE DATA */
7800
8823
  if (body === undefined || body === null || body === '') {
7801
8824
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -7897,6 +8920,12 @@ This endpoint takes no JSON arguments.
7897
8920
  const origin = `${this.id}-${meth}`;
7898
8921
  log.trace(origin);
7899
8922
 
8923
+ if (this.suspended && this.suspendMode === 'error') {
8924
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8925
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8926
+ return callback(null, errorObj);
8927
+ }
8928
+
7900
8929
  /* HERE IS WHERE YOU VALIDATE DATA */
7901
8930
  if (apiKey === undefined || apiKey === null || apiKey === '') {
7902
8931
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -7994,6 +9023,12 @@ Edit an application key name.
7994
9023
  const origin = `${this.id}-${meth}`;
7995
9024
  log.trace(origin);
7996
9025
 
9026
+ if (this.suspended && this.suspendMode === 'error') {
9027
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9028
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9029
+ return callback(null, errorObj);
9030
+ }
9031
+
7997
9032
  /* HERE IS WHERE YOU VALIDATE DATA */
7998
9033
  if (body === undefined || body === null || body === '') {
7999
9034
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -8095,6 +9130,12 @@ This endpoint takes no JSON arguments.
8095
9130
  const origin = `${this.id}-${meth}`;
8096
9131
  log.trace(origin);
8097
9132
 
9133
+ if (this.suspended && this.suspendMode === 'error') {
9134
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9135
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9136
+ return callback(null, errorObj);
9137
+ }
9138
+
8098
9139
  /* HERE IS WHERE YOU VALIDATE DATA */
8099
9140
  if (apiKey === undefined || apiKey === null || apiKey === '') {
8100
9141
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -8173,18 +9214,12 @@ This endpoint takes no JSON arguments.
8173
9214
 
8174
9215
  /**
8175
9216
  * @summary ### Overview
8176
-
8177
9217
  Send your logs to your Datadog platform over HTTP. Limits per HTTP request are:
8178
-
8179
9218
  * Maximum content size per payload: 2MB
8180
9219
  * Maximum size for a single log: 256kB
8181
9220
  * Maximum array size if sending multiple logs in an array: 50 entries
8182
-
8183
9221
  **Note**: If you are in the Datadog EU site (`app.datadoghq.eu`), the HTTP log endpoint is: `http-intake.logs.datadoghq.eu`.
8184
-
8185
-
8186
9222
  ### Arguments
8187
-
8188
9223
  | Item | Description ...(description truncated)
8189
9224
  *
8190
9225
  * @function sendLogsOverHTTP
@@ -8201,6 +9236,12 @@ Send your logs to your Datadog platform over HTTP. Limits per HTTP request are:
8201
9236
  const origin = `${this.id}-${meth}`;
8202
9237
  log.trace(origin);
8203
9238
 
9239
+ if (this.suspended && this.suspendMode === 'error') {
9240
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9241
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9242
+ return callback(null, errorObj);
9243
+ }
9244
+
8204
9245
  /* HERE IS WHERE YOU VALIDATE DATA */
8205
9246
  if (body === undefined || body === null || body === '') {
8206
9247
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -8313,6 +9354,12 @@ List endpoint returns logs that match a log search query. Results are paginated.
8313
9354
  const origin = `${this.id}-${meth}`;
8314
9355
  log.trace(origin);
8315
9356
 
9357
+ if (this.suspended && this.suspendMode === 'error') {
9358
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9359
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9360
+ return callback(null, errorObj);
9361
+ }
9362
+
8316
9363
  /* HERE IS WHERE YOU VALIDATE DATA */
8317
9364
  if (body === undefined || body === null || body === '') {
8318
9365
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -8417,6 +9464,12 @@ Get the list of actively reporting metrics from a given time until now. This end
8417
9464
  const origin = `${this.id}-${meth}`;
8418
9465
  log.trace(origin);
8419
9466
 
9467
+ if (this.suspended && this.suspendMode === 'error') {
9468
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9469
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9470
+ return callback(null, errorObj);
9471
+ }
9472
+
8420
9473
  /* HERE IS WHERE YOU VALIDATE DATA */
8421
9474
  if (apiKey === undefined || apiKey === null || apiKey === '') {
8422
9475
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -8527,6 +9580,12 @@ The metrics end-point allows you to post time-series data that can be graphed on
8527
9580
  const origin = `${this.id}-${meth}`;
8528
9581
  log.trace(origin);
8529
9582
 
9583
+ if (this.suspended && this.suspendMode === 'error') {
9584
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9585
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9586
+ return callback(null, errorObj);
9587
+ }
9588
+
8530
9589
  /* HERE IS WHERE YOU VALIDATE DATA */
8531
9590
  if (body === undefined || body === null || body === '') {
8532
9591
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -8633,6 +9692,12 @@ This endpoint allows you to query for metrics from any time period.
8633
9692
  const origin = `${this.id}-${meth}`;
8634
9693
  log.trace(origin);
8635
9694
 
9695
+ if (this.suspended && this.suspendMode === 'error') {
9696
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9697
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9698
+ return callback(null, errorObj);
9699
+ }
9700
+
8636
9701
  /* HERE IS WHERE YOU VALIDATE DATA */
8637
9702
  if (apiKey === undefined || apiKey === null || apiKey === '') {
8638
9703
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -8744,6 +9809,12 @@ This endpoint takes no JSON arguments.
8744
9809
  const origin = `${this.id}-${meth}`;
8745
9810
  log.trace(origin);
8746
9811
 
9812
+ if (this.suspended && this.suspendMode === 'error') {
9813
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9814
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9815
+ return callback(null, errorObj);
9816
+ }
9817
+
8747
9818
  /* HERE IS WHERE YOU VALIDATE DATA */
8748
9819
  if (apiKey === undefined || apiKey === null || apiKey === '') {
8749
9820
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -8844,6 +9915,12 @@ The metrics metadata endpoint allows you to edit fields of a metric's metadata.
8844
9915
  const origin = `${this.id}-${meth}`;
8845
9916
  log.trace(origin);
8846
9917
 
9918
+ if (this.suspended && this.suspendMode === 'error') {
9919
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9920
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9921
+ return callback(null, errorObj);
9922
+ }
9923
+
8847
9924
  /* HERE IS WHERE YOU VALIDATE DATA */
8848
9925
  if (body === undefined || body === null || body === '') {
8849
9926
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -8946,6 +10023,12 @@ This endpoint allows you to search for metrics from the last 24 hours in Datadog
8946
10023
  const origin = `${this.id}-${meth}`;
8947
10024
  log.trace(origin);
8948
10025
 
10026
+ if (this.suspended && this.suspendMode === 'error') {
10027
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10028
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10029
+ return callback(null, errorObj);
10030
+ }
10031
+
8949
10032
  /* HERE IS WHERE YOU VALIDATE DATA */
8950
10033
  if (q === undefined || q === null || q === '') {
8951
10034
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['q'], null, null, null);
@@ -9056,6 +10139,12 @@ If you manage and deploy monitors programmatically, it's easier to define the mo
9056
10139
  const origin = `${this.id}-${meth}`;
9057
10140
  log.trace(origin);
9058
10141
 
10142
+ if (this.suspended && this.suspendMode === 'error') {
10143
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10144
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10145
+ return callback(null, errorObj);
10146
+ }
10147
+
9059
10148
  /* HERE IS WHERE YOU VALIDATE DATA */
9060
10149
  if (body === undefined || body === null || body === '') {
9061
10150
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -9158,6 +10247,12 @@ Get a monitor details based on its monitor ID.
9158
10247
  const origin = `${this.id}-${meth}`;
9159
10248
  log.trace(origin);
9160
10249
 
10250
+ if (this.suspended && this.suspendMode === 'error') {
10251
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10252
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10253
+ return callback(null, errorObj);
10254
+ }
10255
+
9161
10256
  /* HERE IS WHERE YOU VALIDATE DATA */
9162
10257
  if (apiKey === undefined || apiKey === null || apiKey === '') {
9163
10258
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -9263,6 +10358,12 @@ Edit a monitor details based on its monitor ID.
9263
10358
  const origin = `${this.id}-${meth}`;
9264
10359
  log.trace(origin);
9265
10360
 
10361
+ if (this.suspended && this.suspendMode === 'error') {
10362
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10363
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10364
+ return callback(null, errorObj);
10365
+ }
10366
+
9266
10367
  /* HERE IS WHERE YOU VALIDATE DATA */
9267
10368
  if (body === undefined || body === null || body === '') {
9268
10369
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -9364,6 +10465,12 @@ This endpoint takes no JSON arguments.
9364
10465
  const origin = `${this.id}-${meth}`;
9365
10466
  log.trace(origin);
9366
10467
 
10468
+ if (this.suspended && this.suspendMode === 'error') {
10469
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10470
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10471
+ return callback(null, errorObj);
10472
+ }
10473
+
9367
10474
  /* HERE IS WHERE YOU VALIDATE DATA */
9368
10475
  if (apiKey === undefined || apiKey === null || apiKey === '') {
9369
10476
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -9465,6 +10572,12 @@ Resolve a monitor by monitorId & Group.
9465
10572
  const origin = `${this.id}-${meth}`;
9466
10573
  log.trace(origin);
9467
10574
 
10575
+ if (this.suspended && this.suspendMode === 'error') {
10576
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10577
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10578
+ return callback(null, errorObj);
10579
+ }
10580
+
9468
10581
  /* HERE IS WHERE YOU VALIDATE DATA */
9469
10582
  if (body === undefined || body === null || body === '') {
9470
10583
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -9567,6 +10680,12 @@ Mute a specific monitor base on its ID.
9567
10680
  const origin = `${this.id}-${meth}`;
9568
10681
  log.trace(origin);
9569
10682
 
10683
+ if (this.suspended && this.suspendMode === 'error') {
10684
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10685
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10686
+ return callback(null, errorObj);
10687
+ }
10688
+
9570
10689
  /* HERE IS WHERE YOU VALIDATE DATA */
9571
10690
  if (body === undefined || body === null || body === '') {
9572
10691
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -9668,6 +10787,12 @@ Mute a specific monitor base on its ID.
9668
10787
  const origin = `${this.id}-${meth}`;
9669
10788
  log.trace(origin);
9670
10789
 
10790
+ if (this.suspended && this.suspendMode === 'error') {
10791
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10792
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10793
+ return callback(null, errorObj);
10794
+ }
10795
+
9671
10796
  /* HERE IS WHERE YOU VALIDATE DATA */
9672
10797
  if (body === undefined || body === null || body === '') {
9673
10798
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -9772,6 +10897,12 @@ This endpoint takes no JSON arguments.
9772
10897
  const origin = `${this.id}-${meth}`;
9773
10898
  log.trace(origin);
9774
10899
 
10900
+ if (this.suspended && this.suspendMode === 'error') {
10901
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10902
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10903
+ return callback(null, errorObj);
10904
+ }
10905
+
9775
10906
  /* HERE IS WHERE YOU VALIDATE DATA */
9776
10907
  if (body === undefined || body === null || body === '') {
9777
10908
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -9874,6 +11005,12 @@ This endpoint takes no JSON arguments.
9874
11005
  const origin = `${this.id}-${meth}`;
9875
11006
  log.trace(origin);
9876
11007
 
11008
+ if (this.suspended && this.suspendMode === 'error') {
11009
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11010
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11011
+ return callback(null, errorObj);
11012
+ }
11013
+
9877
11014
  /* HERE IS WHERE YOU VALIDATE DATA */
9878
11015
  if (body === undefined || body === null || body === '') {
9879
11016
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -9978,6 +11115,12 @@ See [Create a monitor][1] documentation for details on constructing a monitor de
9978
11115
  const origin = `${this.id}-${meth}`;
9979
11116
  log.trace(origin);
9980
11117
 
11118
+ if (this.suspended && this.suspendMode === 'error') {
11119
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11120
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11121
+ return callback(null, errorObj);
11122
+ }
11123
+
9981
11124
  /* HERE IS WHERE YOU VALIDATE DATA */
9982
11125
  if (body === undefined || body === null || body === '') {
9983
11126
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -10089,6 +11232,12 @@ tags
10089
11232
  const origin = `${this.id}-${meth}`;
10090
11233
  log.trace(origin);
10091
11234
 
11235
+ if (this.suspended && this.suspendMode === 'error') {
11236
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11237
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11238
+ return callback(null, errorObj);
11239
+ }
11240
+
10092
11241
  /* HERE IS WHERE YOU VALIDATE DATA */
10093
11242
  if (apiKey === undefined || apiKey === null || apiKey === '') {
10094
11243
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -10219,6 +11368,12 @@ tags
10219
11368
  const origin = `${this.id}-${meth}`;
10220
11369
  log.trace(origin);
10221
11370
 
11371
+ if (this.suspended && this.suspendMode === 'error') {
11372
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11373
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11374
+ return callback(null, errorObj);
11375
+ }
11376
+
10222
11377
  /* HERE IS WHERE YOU VALIDATE DATA */
10223
11378
  if (apiKey === undefined || apiKey === null || apiKey === '') {
10224
11379
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -10340,6 +11495,12 @@ Once a new child-organization is created, you ...(description truncated)
10340
11495
  const origin = `${this.id}-${meth}`;
10341
11496
  log.trace(origin);
10342
11497
 
11498
+ if (this.suspended && this.suspendMode === 'error') {
11499
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11500
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11501
+ return callback(null, errorObj);
11502
+ }
11503
+
10343
11504
  /* HERE IS WHERE YOU VALIDATE DATA */
10344
11505
  if (body === undefined || body === null || body === '') {
10345
11506
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -10441,6 +11602,12 @@ This endpoint takes no JSON argument.
10441
11602
  const origin = `${this.id}-${meth}`;
10442
11603
  log.trace(origin);
10443
11604
 
11605
+ if (this.suspended && this.suspendMode === 'error') {
11606
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11607
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11608
+ return callback(null, errorObj);
11609
+ }
11610
+
10444
11611
  /* HERE IS WHERE YOU VALIDATE DATA */
10445
11612
  if (apiKey === undefined || apiKey === null || apiKey === '') {
10446
11613
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -10536,6 +11703,12 @@ Get an organisation details based on its public ID.
10536
11703
  const origin = `${this.id}-${meth}`;
10537
11704
  log.trace(origin);
10538
11705
 
11706
+ if (this.suspended && this.suspendMode === 'error') {
11707
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11708
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11709
+ return callback(null, errorObj);
11710
+ }
11711
+
10539
11712
  /* HERE IS WHERE YOU VALIDATE DATA */
10540
11713
  if (apiKey === undefined || apiKey === null || apiKey === '') {
10541
11714
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -10636,6 +11809,12 @@ Update a Datadog organization information.
10636
11809
  const origin = `${this.id}-${meth}`;
10637
11810
  log.trace(origin);
10638
11811
 
11812
+ if (this.suspended && this.suspendMode === 'error') {
11813
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11814
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11815
+ return callback(null, errorObj);
11816
+ }
11817
+
10639
11818
  /* HERE IS WHERE YOU VALIDATE DATA */
10640
11819
  if (body === undefined || body === null || body === '') {
10641
11820
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -10752,6 +11931,12 @@ There are a couple of options for updating the Identity Provider (IdP) metadata
10752
11931
  const origin = `${this.id}-${meth}`;
10753
11932
  log.trace(origin);
10754
11933
 
11934
+ if (this.suspended && this.suspendMode === 'error') {
11935
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11936
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11937
+ return callback(null, errorObj);
11938
+ }
11939
+
10755
11940
  /* HERE IS WHERE YOU VALIDATE DATA */
10756
11941
  if (body === undefined || body === null || body === '') {
10757
11942
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -10852,6 +12037,12 @@ A b...(description truncated)
10852
12037
  const origin = `${this.id}-${meth}`;
10853
12038
  log.trace(origin);
10854
12039
 
12040
+ if (this.suspended && this.suspendMode === 'error') {
12041
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12042
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12043
+ return callback(null, errorObj);
12044
+ }
12045
+
10855
12046
  /* HERE IS WHERE YOU VALIDATE DATA */
10856
12047
  if (body === undefined || body === null || body === '') {
10857
12048
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -10953,6 +12144,12 @@ Get a list of all existing tests.
10953
12144
  const origin = `${this.id}-${meth}`;
10954
12145
  log.trace(origin);
10955
12146
 
12147
+ if (this.suspended && this.suspendMode === 'error') {
12148
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12149
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12150
+ return callback(null, errorObj);
12151
+ }
12152
+
10956
12153
  /* HERE IS WHERE YOU VALIDATE DATA */
10957
12154
  if (apiKey === undefined || apiKey === null || apiKey === '') {
10958
12155
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -11050,6 +12247,12 @@ Start or pause an existing Synthetics test.
11050
12247
  const origin = `${this.id}-${meth}`;
11051
12248
  log.trace(origin);
11052
12249
 
12250
+ if (this.suspended && this.suspendMode === 'error') {
12251
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12252
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12253
+ return callback(null, errorObj);
12254
+ }
12255
+
11053
12256
  /* HERE IS WHERE YOU VALIDATE DATA */
11054
12257
  if (body === undefined || body === null || body === '') {
11055
12258
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -11154,6 +12357,12 @@ In orde...(description truncated)
11154
12357
  const origin = `${this.id}-${meth}`;
11155
12358
  log.trace(origin);
11156
12359
 
12360
+ if (this.suspended && this.suspendMode === 'error') {
12361
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12362
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12363
+ return callback(null, errorObj);
12364
+ }
12365
+
11157
12366
  /* HERE IS WHERE YOU VALIDATE DATA */
11158
12367
  if (body === undefined || body === null || body === '') {
11159
12368
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -11256,6 +12465,12 @@ Delete one or many tests.
11256
12465
  const origin = `${this.id}-${meth}`;
11257
12466
  log.trace(origin);
11258
12467
 
12468
+ if (this.suspended && this.suspendMode === 'error') {
12469
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12470
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12471
+ return callback(null, errorObj);
12472
+ }
12473
+
11259
12474
  /* HERE IS WHERE YOU VALIDATE DATA */
11260
12475
  if (body === undefined || body === null || body === '') {
11261
12476
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -11357,6 +12572,12 @@ Get the most recent results for a specific test.
11357
12572
  const origin = `${this.id}-${meth}`;
11358
12573
  log.trace(origin);
11359
12574
 
12575
+ if (this.suspended && this.suspendMode === 'error') {
12576
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12577
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12578
+ return callback(null, errorObj);
12579
+ }
12580
+
11360
12581
  /* HERE IS WHERE YOU VALIDATE DATA */
11361
12582
  if (apiKey === undefined || apiKey === null || apiKey === '') {
11362
12583
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -11453,6 +12674,12 @@ Get a specific result for a specific test.
11453
12674
  const origin = `${this.id}-${meth}`;
11454
12675
  log.trace(origin);
11455
12676
 
12677
+ if (this.suspended && this.suspendMode === 'error') {
12678
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12679
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12680
+ return callback(null, errorObj);
12681
+ }
12682
+
11456
12683
  /* HERE IS WHERE YOU VALIDATE DATA */
11457
12684
  if (apiKey === undefined || apiKey === null || apiKey === '') {
11458
12685
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -11549,6 +12776,12 @@ Get information on a specific test.
11549
12776
  const origin = `${this.id}-${meth}`;
11550
12777
  log.trace(origin);
11551
12778
 
12779
+ if (this.suspended && this.suspendMode === 'error') {
12780
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12781
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12782
+ return callback(null, errorObj);
12783
+ }
12784
+
11552
12785
  /* HERE IS WHERE YOU VALIDATE DATA */
11553
12786
  if (apiKey === undefined || apiKey === null || apiKey === '') {
11554
12787
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -11645,6 +12878,12 @@ Get a list of devices for browser checks.
11645
12878
  const origin = `${this.id}-${meth}`;
11646
12879
  log.trace(origin);
11647
12880
 
12881
+ if (this.suspended && this.suspendMode === 'error') {
12882
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12883
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12884
+ return callback(null, errorObj);
12885
+ }
12886
+
11648
12887
  /* HERE IS WHERE YOU VALIDATE DATA */
11649
12888
  if (apiKey === undefined || apiKey === null || apiKey === '') {
11650
12889
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -11741,6 +12980,12 @@ Get a list of available locations
11741
12980
  const origin = `${this.id}-${meth}`;
11742
12981
  log.trace(origin);
11743
12982
 
12983
+ if (this.suspended && this.suspendMode === 'error') {
12984
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12985
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12986
+ return callback(null, errorObj);
12987
+ }
12988
+
11744
12989
  /* HERE IS WHERE YOU VALIDATE DATA */
11745
12990
  if (apiKey === undefined || apiKey === null || apiKey === '') {
11746
12991
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -11837,6 +13082,12 @@ Return a mapping of tags to hosts for your whole infrastructure.
11837
13082
  const origin = `${this.id}-${meth}`;
11838
13083
  log.trace(origin);
11839
13084
 
13085
+ if (this.suspended && this.suspendMode === 'error') {
13086
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13087
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13088
+ return callback(null, errorObj);
13089
+ }
13090
+
11840
13091
  /* HERE IS WHERE YOU VALIDATE DATA */
11841
13092
  if (apiKey === undefined || apiKey === null || apiKey === '') {
11842
13093
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -11933,6 +13184,12 @@ Return the list of tags that apply to a given host.
11933
13184
  const origin = `${this.id}-${meth}`;
11934
13185
  log.trace(origin);
11935
13186
 
13187
+ if (this.suspended && this.suspendMode === 'error') {
13188
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13189
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13190
+ return callback(null, errorObj);
13191
+ }
13192
+
11936
13193
  /* HERE IS WHERE YOU VALIDATE DATA */
11937
13194
  if (apiKey === undefined || apiKey === null || apiKey === '') {
11938
13195
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -12033,6 +13290,12 @@ This endpoint allows you to add new tags to a host, optionally specifying where
12033
13290
  const origin = `${this.id}-${meth}`;
12034
13291
  log.trace(origin);
12035
13292
 
13293
+ if (this.suspended && this.suspendMode === 'error') {
13294
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13295
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13296
+ return callback(null, errorObj);
13297
+ }
13298
+
12036
13299
  /* HERE IS WHERE YOU VALIDATE DATA */
12037
13300
  if (body === undefined || body === null || body === '') {
12038
13301
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -12138,6 +13401,12 @@ This endpoint allows you to update/replace all tags in an integration source wit
12138
13401
  const origin = `${this.id}-${meth}`;
12139
13402
  log.trace(origin);
12140
13403
 
13404
+ if (this.suspended && this.suspendMode === 'error') {
13405
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13406
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13407
+ return callback(null, errorObj);
13408
+ }
13409
+
12141
13410
  /* HERE IS WHERE YOU VALIDATE DATA */
12142
13411
  if (body === undefined || body === null || body === '') {
12143
13412
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -12239,6 +13508,12 @@ Remove all tags in an integration source for a single host.
12239
13508
  const origin = `${this.id}-${meth}`;
12240
13509
  log.trace(origin);
12241
13510
 
13511
+ if (this.suspended && this.suspendMode === 'error') {
13512
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13513
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13514
+ return callback(null, errorObj);
13515
+ }
13516
+
12242
13517
  /* HERE IS WHERE YOU VALIDATE DATA */
12243
13518
  if (apiKey === undefined || apiKey === null || apiKey === '') {
12244
13519
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -12332,6 +13607,12 @@ Tracing data is sent to the Datadog Agent via an HTTP API. We provide some [offi
12332
13607
  const origin = `${this.id}-${meth}`;
12333
13608
  log.trace(origin);
12334
13609
 
13610
+ if (this.suspended && this.suspendMode === 'error') {
13611
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13612
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13613
+ return callback(null, errorObj);
13614
+ }
13615
+
12335
13616
  /* HERE IS WHERE YOU VALIDATE DATA */
12336
13617
  if (body === undefined || body === null || body === '') {
12337
13618
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -12416,6 +13697,12 @@ Tracing data is sent to the Datadog Agent via an HTTP API. We provide some [offi
12416
13697
  const origin = `${this.id}-${meth}`;
12417
13698
  log.trace(origin);
12418
13699
 
13700
+ if (this.suspended && this.suspendMode === 'error') {
13701
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13702
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13703
+ return callback(null, errorObj);
13704
+ }
13705
+
12419
13706
  /* HERE IS WHERE YOU VALIDATE DATA */
12420
13707
  if (body === undefined || body === null || body === '') {
12421
13708
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -12515,6 +13802,12 @@ Get Hourly Usage For Hosts and Containers.
12515
13802
  const origin = `${this.id}-${meth}`;
12516
13803
  log.trace(origin);
12517
13804
 
13805
+ if (this.suspended && this.suspendMode === 'error') {
13806
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13807
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13808
+ return callback(null, errorObj);
13809
+ }
13810
+
12518
13811
  /* HERE IS WHERE YOU VALIDATE DATA */
12519
13812
  if (apiKey === undefined || apiKey === null || apiKey === '') {
12520
13813
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -12628,6 +13921,12 @@ Get Hourly Usage For Logs.
12628
13921
  const origin = `${this.id}-${meth}`;
12629
13922
  log.trace(origin);
12630
13923
 
13924
+ if (this.suspended && this.suspendMode === 'error') {
13925
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13926
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13927
+ return callback(null, errorObj);
13928
+ }
13929
+
12631
13930
  /* HERE IS WHERE YOU VALIDATE DATA */
12632
13931
  if (apiKey === undefined || apiKey === null || apiKey === '') {
12633
13932
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -12739,6 +14038,12 @@ Get Hourly Usage For [Custom Metrics][1].
12739
14038
  const origin = `${this.id}-${meth}`;
12740
14039
  log.trace(origin);
12741
14040
 
14041
+ if (this.suspended && this.suspendMode === 'error') {
14042
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14043
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14044
+ return callback(null, errorObj);
14045
+ }
14046
+
12742
14047
  /* HERE IS WHERE YOU VALIDATE DATA */
12743
14048
  if (apiKey === undefined || apiKey === null || apiKey === '') {
12744
14049
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -12849,6 +14154,12 @@ Get Top [Custom Metrics][1] By Hourly Average.
12849
14154
  const origin = `${this.id}-${meth}`;
12850
14155
  log.trace(origin);
12851
14156
 
14157
+ if (this.suspended && this.suspendMode === 'error') {
14158
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14159
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14160
+ return callback(null, errorObj);
14161
+ }
14162
+
12852
14163
  /* HERE IS WHERE YOU VALIDATE DATA */
12853
14164
  if (apiKey === undefined || apiKey === null || apiKey === '') {
12854
14165
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -12960,6 +14271,12 @@ Get usage across your multi-org account
12960
14271
  const origin = `${this.id}-${meth}`;
12961
14272
  log.trace(origin);
12962
14273
 
14274
+ if (this.suspended && this.suspendMode === 'error') {
14275
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14276
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14277
+ return callback(null, errorObj);
14278
+ }
14279
+
12963
14280
  /* HERE IS WHERE YOU VALIDATE DATA */
12964
14281
  if (apiKey === undefined || apiKey === null || apiKey === '') {
12965
14282
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -13078,6 +14395,12 @@ Get hourly usage For Trace Search.
13078
14395
  const origin = `${this.id}-${meth}`;
13079
14396
  log.trace(origin);
13080
14397
 
14398
+ if (this.suspended && this.suspendMode === 'error') {
14399
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14400
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14401
+ return callback(null, errorObj);
14402
+ }
14403
+
13081
14404
  /* HERE IS WHERE YOU VALIDATE DATA */
13082
14405
  if (apiKey === undefined || apiKey === null || apiKey === '') {
13083
14406
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);
@@ -13189,6 +14512,12 @@ Get Hourly Usage For [Fargate][1].
13189
14512
  const origin = `${this.id}-${meth}`;
13190
14513
  log.trace(origin);
13191
14514
 
14515
+ if (this.suspended && this.suspendMode === 'error') {
14516
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14517
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14518
+ return callback(null, errorObj);
14519
+ }
14520
+
13192
14521
  /* HERE IS WHERE YOU VALIDATE DATA */
13193
14522
  if (apiKey === undefined || apiKey === null || apiKey === '') {
13194
14523
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['apiKey'], null, null, null);